diff options
author | Jonathan Buchanan <jonathan.russ.buchanan@gmail.com> | 2020-06-05 13:29:09 -0400 |
---|---|---|
committer | Jonathan Buchanan <jonathan.russ.buchanan@gmail.com> | 2020-06-05 13:29:09 -0400 |
commit | c028b2d151aaacb446035638379f565e8e5c30cd (patch) | |
tree | 87cac1e52ca3961ac6c4f541893ebcd51af818ae /core/api-merchant.rst | |
parent | 5c7d6d620cf14dbcd626ce5c3e3301ced8c846cc (diff) | |
download | docs-c028b2d151aaacb446035638379f565e8e5c30cd.tar.gz docs-c028b2d151aaacb446035638379f565e8e5c30cd.tar.bz2 docs-c028b2d151aaacb446035638379f565e8e5c30cd.zip |
spec for GET /tips
Diffstat (limited to 'core/api-merchant.rst')
-rw-r--r-- | core/api-merchant.rst | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/core/api-merchant.rst b/core/api-merchant.rst index 317480f3..3bde039d 100644 --- a/core/api-merchant.rst +++ b/core/api-merchant.rst @@ -1955,6 +1955,50 @@ Giving Customer Tips expiration: Timestamp; } + + +.. http:get:: /tips + + Return the list of all tips. + + **Request:** + + :query expired: *Optional*. If set to "yes", the response also includes + tips that have expired. Otherwise only unexpired tips are returned. + + **Response:** + + :status 200 OK: + The backend has successfully found the list of tips. The backend responds + with a `TipsResponse`. + + .. ts:def:: TipsResponse + + interface TipsResponse { + + // List of tips that are present in the backend. + tips: Tip[]; + } + + .. ts:def:: Tip + + interface Tip { + + // Unique identifier for the tip. + tip_id: HashCode; + + // Exchange from which the tip will be withdrawn. + exchange_url: string; + + // (remaining) amount of the tip (including fees). + tip_amount: Amount; + + // Timestamp indicating when the tip is set to expire (may be in the past). + expiration: Timestamp; + } + + + .. http:post:: /tips/$TIP_ID/pickup Handle request from wallet to pick up a tip. |