commit c028b2d151aaacb446035638379f565e8e5c30cd parent 5c7d6d620cf14dbcd626ce5c3e3301ced8c846cc Author: Jonathan Buchanan <jonathan.russ.buchanan@gmail.com> Date: Fri, 5 Jun 2020 13:29:09 -0400 spec for GET /tips Diffstat:
| M | core/api-merchant.rst | | | 44 | ++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 44 insertions(+), 0 deletions(-)
diff --git 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.