diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-10-31 16:27:43 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-10-31 16:27:43 +0100 |
commit | a875828acb66b96fdaa80f24a88ccc69abb29654 (patch) | |
tree | b79a3f7c0de70ef833d9788647ee0ef1f3670a3b /core/api-wire.rst | |
parent | f82d5092cdc8fa3a123404f680b43a937cc6ef11 (diff) | |
download | docs-a875828acb66b96fdaa80f24a88ccc69abb29654.tar.gz docs-a875828acb66b96fdaa80f24a88ccc69abb29654.tar.bz2 docs-a875828acb66b96fdaa80f24a88ccc69abb29654.zip |
clean up use of HTTP status codes
Diffstat (limited to 'core/api-wire.rst')
-rw-r--r-- | core/api-wire.rst | 40 |
1 files changed, 23 insertions, 17 deletions
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 |