taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit 3fba4892a5f4bdd032e86eabf13ce6ac04f1e649
parent 7fc415115024466ecf08b5b4ca5fc9472ad0ea2b
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Fri,  9 Dec 2016 11:20:28 +0100

Changin URIs to /map/in /map/out

Diffstat:
Mapi-merchant.rst | 25+++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/api-merchant.rst b/api-merchant.rst @@ -380,7 +380,7 @@ The following API are made available by the merchant's `backend` to the merchant } -.. http:post:: /map +.. http:post:: /map/in Store a pair formed by a plain contract and its hashcode into the database. @@ -393,6 +393,9 @@ The following API are made available by the merchant's `backend` to the merchant :status 200 OK: The data has been successfully stored. + :status 422 Unprocessable Entity: + The hashcode provided by the frontend does not match the contract. + .. _MapRequest: .. _tsref-type-MapRequest: .. code-block:: tsref @@ -402,10 +405,28 @@ The following API are made available by the merchant's `backend` to the merchant // Plain contract to be stored contract: Contract; - // contract's hashcode + // contract's hashcode. We require this value from the frontend + // as an additional check on data integrity. h_contract: HashCode; } + +.. http:get:: /map/out + + Retrieve a contract, given its hashcode. + + **Request** + + :query h_contract: hashcode of the contract to retrieve. + + **Response** + + :status 200 OK: + The body contains a `contract`_ corresponding to `h_contract`. + + :status 404 Not Found: + There is no contract corresponding to `h_contract` into the database. + .. http:get:: /history Returns transactions up to some point in the past