diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-06-22 19:34:47 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-06-22 19:34:47 +0200 |
commit | 555a18f735324a0d7829262529124b029098340d (patch) | |
tree | aeaa5d6aef29c280209dea44d3141e7bce54c3d6 /core/api-merchant.rst | |
parent | 1c356f81ea3051aa443e61e951aace709e90d25d (diff) | |
parent | f47314fe9460324d5bf331d0dc71d5358c6d8e08 (diff) | |
download | docs-555a18f735324a0d7829262529124b029098340d.tar.gz docs-555a18f735324a0d7829262529124b029098340d.tar.bz2 docs-555a18f735324a0d7829262529124b029098340d.zip |
Merge branch 'dd13'
Diffstat (limited to 'core/api-merchant.rst')
-rw-r--r-- | core/api-merchant.rst | 55 |
1 files changed, 46 insertions, 9 deletions
diff --git a/core/api-merchant.rst b/core/api-merchant.rst index 5a55e2d2..d8e3c910 100644 --- a/core/api-merchant.rst +++ b/core/api-merchant.rst @@ -1546,12 +1546,21 @@ Creating orders The backend has successfully created the proposal. The response is a :ts:type:`PostOrderResponse`. :http:statuscode:`404 Not found`: - The order given used products from the inventory, but those were not found - in the inventory. Or the merchant instance is unknown (including possibly the instance being not configured for new orders). Details in the - error code. NOTE: no good way to find out which product is not in the - inventory, we MAY want to specify that in the reply. + Possible reasons are: + + (1) The order given used products from the inventory, but those were + not found in the inventory. + (2) The merchant instance is unknown (including possibly the instance + being not configured for new orders). + (3) The wire method specified is not supported by the backend. + + Details in the error code. + NOTE: currently the client has no good way to find out which product + is not in the inventory, we MAY want to specify that in the reply. :http:statuscode:`409 Conflict`: - A different proposal already exists under the specified order ID. + A different proposal already exists under the specified order ID, + or the requested currency is not supported by this backend. Details in + the error code. :http:statuscode:`410 Gone`: The order given used products from the inventory that are out of stock. The response is a :ts:type:`OutOfStockResponse`. @@ -1622,7 +1631,7 @@ Creating orders fulfillment_url?: string; } - The following `ProductSpecification` can be provided if the parts of the + The following `MinimalInventoryProduct` can be provided if the parts of the order are inventory-based, that is if the `PostOrderRequest` uses ``inventory_products``. For such products, which must be in the backend's inventory, the backend can automatically fill in the amount and other details about @@ -1968,6 +1977,9 @@ the contract!) to minimize risks from information leakage. :http:statuscode:`200 OK`: The merchant deleted the specified fields from the contract of order $ORDER_ID. + :http:statuscode:`204 No content`: + The merchant had already deleted the specified fields + from the contract of order $ORDER_ID. :http:statuscode:`400 Bad request`: The request is malformed or one of the paths is invalid. :http:statuscode:`404 Not found`: @@ -2103,10 +2115,11 @@ Informing the backend about incoming wire transfers resolve it. So in that respect, 202 is the right status code as more work remains to be done for a final resolution.) :http:statuscode:`404 Not found`: - The instance is unknown to the exchange. + The instance or account are unknown to the exchange. :http:statuscode:`409 Conflict`: The wire transfer identifier is already known to us, but for a different amount, - wire method or exchange. + wire method or exchange, or the amount reported by the exchange differs from + the amount reported by the merchant. :http:statuscode:`502 Bad gateway`: The exchange returned an error when we asked it about the ``GET /transfer`` status for this wire transfer. Details of the exchange error are returned. @@ -2352,7 +2365,7 @@ Querying known wire transfers exchange_url: string; // Serial number identifying the transfer in the merchant backend. - // Used for filgering via ``offset``. + // Used for filtering via ``offset``. transfer_serial_id: number; // Time of the execution of the wire transfer by the exchange, according to the exchange @@ -2371,6 +2384,30 @@ Querying known wire transfers } +Deleting wire transfer +---------------------- + +Deleting a wire transfer can be useful in case of a data entry +mistake. In particular, if the exchange base URL was entered +badly, deleting the old entry and adding a correct one is a +good idea. Note that deleting wire transfers is no longer possible +once we got a reply from the exchange. + +.. http:delete:: [/instances/$INSTANCE]/private/transfers/$TID + + Here, the TID ist the 'transfer_serial_id' of the transfer + to delete. + + **Response:** + + :http:statuscode:`204 No content`: + The transfer was deleted. + :http:statuscode:`404 Not found`: + The transfer was already unknown. + :http:statuscode:`409 Conflict`: + The transfer cannot be deleted anymore. + + -------------------- Backend: Giving tips -------------------- |