From a875828acb66b96fdaa80f24a88ccc69abb29654 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 31 Oct 2020 16:27:43 +0100 Subject: clean up use of HTTP status codes --- core/api-wire.rst | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to 'core/api-wire.rst') diff --git a/core/api-wire.rst b/core/api-wire.rst index 676c8029..ce8c94e4 100644 --- a/core/api-wire.rst +++ b/core/api-wire.rst @@ -49,13 +49,16 @@ Making Transactions **Response:** - :status 200 OK: + :http:statuscode:`200 OK`: The request has been correctly handled, so the funds have been transferred to the recipient's account. The body is a `TransferResponse` - :status 400 Bad Request: Request malformed. The bank replies with an `ErrorDetail` object. - :status 401 Unauthorized: Authentication failed, likely the credentials are wrong. - :status 404 Not found: The endpoint is wrong or the user name is unknown. The bank replies with an `ErrorDetail` object. - :status 409 Conflict: + :http:statuscode:`400 Bad request`: + Request malformed. The bank replies with an `ErrorDetail` object. + :http:statuscode:`401 Unauthorized`: + Authentication failed, likely the credentials are wrong. + :http:statuscode:`404 Not found`: + The endpoint is wrong or the user name is unknown. The bank replies with an `ErrorDetail` object. + :http:statuscode:`409 Conflict`: A transaction with the same ``transaction_uid`` but different transaction details has been submitted before. @@ -156,10 +159,10 @@ Querying the transaction history **Response** - :status 200 OK: JSON object of type `IncomingHistory`. - :status 400 Bad Request: Request malformed. The bank replies with an `ErrorDetail` object. - :status 401 Unauthorized: Authentication failed, likely the credentials are wrong. - :status 404 Not found: The endpoint is wrong or the user name is unknown. The bank replies with an `ErrorDetail` object. + :http:statuscode:`200 OK`: JSON object of type `IncomingHistory`. + :http:statuscode:`400 Bad request`: Request malformed. The bank replies with an `ErrorDetail` object. + :http:statuscode:`401 Unauthorized`: Authentication failed, likely the credentials are wrong. + :http:statuscode:`404 Not found`: The endpoint is wrong or the user name is unknown. The bank replies with an `ErrorDetail` object. .. ts:def:: IncomingHistory @@ -238,10 +241,10 @@ Querying the transaction history **Response** - :status 200 OK: JSON object of type `OutgoingHistory`. - :status 400 Bad Request: Request malformed. The bank replies with an `ErrorDetail` object. - :status 401 Unauthorized: Authentication failed, likely the credentials are wrong. - :status 404 Not found: The endpoint is wrong or the user name is unknown. The bank replies with an `ErrorDetail` object. + :http:statuscode:`200 OK`: JSON object of type `OutgoingHistory`. + :http:statuscode:`400 Bad request`: Request malformed. The bank replies with an `ErrorDetail` object. + :http:statuscode:`401 Unauthorized`: Authentication failed, likely the credentials are wrong. + :http:statuscode:`404 Not found`: The endpoint is wrong or the user name is unknown. The bank replies with an `ErrorDetail` object. .. ts:def:: OutgoingHistory @@ -296,12 +299,15 @@ exposed by bank gateways in production. **Response:** - :status 200 OK: + :http:statuscode:`200 OK`: The request has been correctly handled, so the funds have been transferred to the recipient's account. The body is a `AddIncomingResponse` - :status 400 Bad Request: The request is malformed. The bank replies with an `ErrorDetail` object. - :status 401 Unauthorized: Authentication failed, likely the credentials are wrong. - :status 404 Not found: The endpoint is wrong or the user name is unknown. The bank replies with an `ErrorDetail` object. + :http:statuscode:`400 Bad request`: + The request is malformed. The bank replies with an `ErrorDetail` object. + :http:statuscode:`401 Unauthorized`: + Authentication failed, likely the credentials are wrong. + :http:statuscode:`404 Not found`: + The endpoint is wrong or the user name is unknown. The bank replies with an `ErrorDetail` object. .. ts:def:: AddIncomingRequest -- cgit v1.2.3