commit df608421200623029a0a51d9d7592462972330ba parent 0b26e16782eb414da8864d76ba925fccacae133d Author: Marcello Stanisci <marcello.stanisci@inria.fr> Date: Tue, 13 Dec 2016 16:09:31 +0100 #4836 Diffstat:
| M | api-merchant.rst | | | 29 | +++++++++++++++++++++++++++++ |
1 file changed, 29 insertions(+), 0 deletions(-)
diff --git a/api-merchant.rst b/api-merchant.rst @@ -146,6 +146,35 @@ The Frontent HTTP API necessary since the request to ``$pay_url`` must be made from the merchant's origin domain in order to preserve information (e.g. cookies, origin header). +.. http:get:: /history + + Return a list of fulfilled contracts. Typically used by backoffice interfaces. + + **Request** + + :query days: a number indicating that we request contracts from now up to `days` days ago. + + **Response** + + :status 200 OK: The response is a JSON array of `TransactionHistory`_. + +.. http:get:: /map + + Takes a hashcode and return the related contract. Typically used by backoffice interfaces. + + **Request** + + :query h_contract: hashcode of the contract we want to retrieve. + + **Return** + + :status 200 OK: + The body contains a `contract`_ corresponding to `h_contract`. + + :status 404 Not Found: + There is no contract corresponding to `h_contract`. + + ------------------------------ The Merchant Backend HTTP API ------------------------------