Handshake
GET/api/v1/handshake/{domain}/sessions
Authorization
bearer_token In: header
Path Parameters
Query Parameters
Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.
Comma-separated sort keys, - for descending, at most 1. Keys: updated_at, created_at. Default: -created_at.
Rows per page, 1 to 100 (default 25).
1 <= value <= 100The page.next_cursor of the previous page. Cannot be combined with page.
A 1-based page number, for jumping. Cannot be combined with cursor.
1 <= valueSet to true to include the number of matching rows in page.total.
Only return sessions where the caller is a party
Response Body
application/json
curl -X GET "https://example.com/api/v1/handshake/string/sessions"{ "page": { "has_more": true, "next_cursor": "string", "page": 0, "total": 0 }, "sessions": [ { "active_offer_id": "string", "created_at": "2019-08-24T14:15:22Z", "domain": "string", "initiator": { "id": "string", "kind": "auth_user", "label": "string" }, "policy": { "max_rounds": 0, "offer_ttl_seconds": 0, "session_ttl_seconds": 0, "settlement_timeout_seconds": 0 }, "responder": { "id": "string", "kind": "auth_user", "label": "string" }, "round": 0, "session_id": "string", "settlement_id": "string", "status": "NEGOTIATING", "updated_at": "2019-08-24T14:15:22Z" } ]}POST/api/v1/handshake/{domain}/sessions
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/handshake/string/sessions" \ -H "Content-Type: application/json" \ -d '{ "counterparty_id": "string", "counterparty_kind": "auth_user" }'{ "opening_offer": null, "session": { "active_offer_id": "string", "created_at": "2019-08-24T14:15:22Z", "domain": "string", "initiator": { "id": "string", "kind": "auth_user", "label": "string" }, "policy": { "max_rounds": 0, "offer_ttl_seconds": 0, "session_ttl_seconds": 0, "settlement_timeout_seconds": 0 }, "responder": { "id": "string", "kind": "auth_user", "label": "string" }, "round": 0, "session_id": "string", "settlement_id": "string", "status": "NEGOTIATING", "updated_at": "2019-08-24T14:15:22Z" }}GET/api/v1/handshake/{domain}/sessions/{id}
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/handshake/string/sessions/string"{ "active_offer_id": "string", "created_at": "2019-08-24T14:15:22Z", "domain": "string", "initiator": { "id": "string", "kind": "auth_user", "label": "string" }, "policy": { "max_rounds": 0, "offer_ttl_seconds": 0, "session_ttl_seconds": 0, "settlement_timeout_seconds": 0 }, "responder": { "id": "string", "kind": "auth_user", "label": "string" }, "round": 0, "session_id": "string", "settlement_id": "string", "status": "NEGOTIATING", "updated_at": "2019-08-24T14:15:22Z"}POST/api/v1/handshake/{domain}/sessions/{id}/cancel
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X POST "https://example.com/api/v1/handshake/string/sessions/string/cancel"{ "message": "string", "rolled_back": true, "session_id": "string"}GET/api/v1/handshake/{domain}/sessions/{id}/history
Authorization
bearer_token In: header
Path Parameters
Query Parameters
Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.
Comma-separated sort keys, - for descending, at most 1. Keys: created_at, round. Default: round.
Rows per page, 1 to 100 (default 25).
1 <= value <= 100The page.next_cursor of the previous page. Cannot be combined with page.
A 1-based page number, for jumping. Cannot be combined with cursor.
1 <= valueSet to true to include the number of matching rows in page.total.
View mode: "transcript" (default) or "concessions"
Response Body
application/json
curl -X GET "https://example.com/api/v1/handshake/string/sessions/string/history"{ "concessions": [ { "deltas": [ { "currency_deltas": [ { "currency_id": "string", "delta": 0.1 } ], "items_added": [ "string" ], "items_removed": [ "string" ], "party_id": "string", "terms_changed": [ "string" ] } ], "round": 0 } ], "offers": [ { "bundle": { "initiator_gives": { "currency_legs": [ { "amount": 0.1, "currency_id": "string" } ], "item_legs": [ { "item_id": "string", "quantity": 0 } ], "terms": [ { "binding": true, "key": "string", "value": "string" } ] }, "responder_gives": { "currency_legs": [ { "amount": 0.1, "currency_id": "string" } ], "item_legs": [ { "item_id": "string", "quantity": 0 } ], "terms": [ { "binding": true, "key": "string", "value": "string" } ] } }, "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "in_reply_to": "string", "offer_id": "string", "proposed_by": "string", "round": 0, "session_id": "string", "status": "OPEN" } ], "page": { "has_more": true, "next_cursor": "string", "page": 0, "total": 0 }, "session_id": "string", "view": "string"}POST/api/v1/handshake/{domain}/sessions/{id}/offers
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/handshake/string/sessions/string/offers" \ -H "Content-Type: application/json" \ -d '{ "bundle": { "initiator_gives": {}, "responder_gives": {} } }'{ "bundle": { "initiator_gives": { "currency_legs": [ { "amount": 0.1, "currency_id": "string" } ], "item_legs": [ { "item_id": "string", "quantity": 0 } ], "terms": [ { "binding": true, "key": "string", "value": "string" } ] }, "responder_gives": { "currency_legs": [ { "amount": 0.1, "currency_id": "string" } ], "item_legs": [ { "item_id": "string", "quantity": 0 } ], "terms": [ { "binding": true, "key": "string", "value": "string" } ] } }, "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "in_reply_to": "string", "offer_id": "string", "proposed_by": "string", "round": 0, "session_id": "string", "status": "OPEN"}POST/api/v1/handshake/{domain}/sessions/{id}/offers/{offer_id}/accept
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X POST "https://example.com/api/v1/handshake/string/sessions/string/offers/string/accept"{ "accepted_offer_id": "string", "deadline_at": "2019-08-24T14:15:22Z", "initiator_stage": { "confirmed": true, "item_lock_ids": [ "string" ], "ledger_hold_ids": [ "string" ], "party_id": "string", "staged": true }, "responder_stage": { "confirmed": true, "item_lock_ids": [ "string" ], "ledger_hold_ids": [ "string" ], "party_id": "string", "staged": true }, "session_id": "string", "settlement_id": "string", "status": "STAGING"}POST/api/v1/handshake/{domain}/sessions/{id}/offers/{offer_id}/reject
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X POST "https://example.com/api/v1/handshake/string/sessions/string/offers/string/reject"{ "bundle": { "initiator_gives": { "currency_legs": [ { "amount": 0.1, "currency_id": "string" } ], "item_legs": [ { "item_id": "string", "quantity": 0 } ], "terms": [ { "binding": true, "key": "string", "value": "string" } ] }, "responder_gives": { "currency_legs": [ { "amount": 0.1, "currency_id": "string" } ], "item_legs": [ { "item_id": "string", "quantity": 0 } ], "terms": [ { "binding": true, "key": "string", "value": "string" } ] } }, "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "in_reply_to": "string", "offer_id": "string", "proposed_by": "string", "round": 0, "session_id": "string", "status": "OPEN"}POST/api/v1/handshake/{domain}/sessions/{id}/offers/{offer_id}/withdraw
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X POST "https://example.com/api/v1/handshake/string/sessions/string/offers/string/withdraw"{ "bundle": { "initiator_gives": { "currency_legs": [ { "amount": 0.1, "currency_id": "string" } ], "item_legs": [ { "item_id": "string", "quantity": 0 } ], "terms": [ { "binding": true, "key": "string", "value": "string" } ] }, "responder_gives": { "currency_legs": [ { "amount": 0.1, "currency_id": "string" } ], "item_legs": [ { "item_id": "string", "quantity": 0 } ], "terms": [ { "binding": true, "key": "string", "value": "string" } ] } }, "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "in_reply_to": "string", "offer_id": "string", "proposed_by": "string", "round": 0, "session_id": "string", "status": "OPEN"}POST/api/v1/handshake/{domain}/sessions/{id}/settlement/confirm
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/handshake/string/sessions/string/settlement/confirm" \ -H "Content-Type: application/json" \ -d '{}'{ "outcome": "WAITING_FOR_COUNTERPARTY", "settlement": { "accepted_offer_id": "string", "deadline_at": "2019-08-24T14:15:22Z", "initiator_stage": { "confirmed": true, "item_lock_ids": [ "string" ], "ledger_hold_ids": [ "string" ], "party_id": "string", "staged": true }, "responder_stage": { "confirmed": true, "item_lock_ids": [ "string" ], "ledger_hold_ids": [ "string" ], "party_id": "string", "staged": true }, "session_id": "string", "settlement_id": "string", "status": "STAGING" }}POST/api/v1/handshake/{domain}/sessions/{id}/settlement/stage
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X POST "https://example.com/api/v1/handshake/string/sessions/string/settlement/stage"{ "accepted_offer_id": "string", "deadline_at": "2019-08-24T14:15:22Z", "initiator_stage": { "confirmed": true, "item_lock_ids": [ "string" ], "ledger_hold_ids": [ "string" ], "party_id": "string", "staged": true }, "responder_stage": { "confirmed": true, "item_lock_ids": [ "string" ], "ledger_hold_ids": [ "string" ], "party_id": "string", "staged": true }, "session_id": "string", "settlement_id": "string", "status": "STAGING"}POST/api/v1/handshake/{domain}/settlements/sweep
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X POST "https://example.com/api/v1/handshake/string/settlements/sweep"{ "cancelled": 0, "message": "string"}