Accept transfer
const url = 'https://api-admin.billz.ai/v2/transfer/finish/example?Billz-Response-Channel=HTTP';const options = { method: 'PUT', headers: { 'platform-id': '7d4a4c38-dd84-4902-b744-0488b80a4c01', 'Billz-Response-Channel': 'HTTP', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"use_departure_price":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url 'https://api-admin.billz.ai/v2/transfer/finish/example?Billz-Response-Channel=HTTP' \ --header 'Authorization: Bearer <token>' \ --header 'Billz-Response-Channel: HTTP' \ --header 'Content-Type: application/json' \ --header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01' \ --data '{ "use_departure_price": false }'Asynchronous method. To receive the result synchronously over HTTP, pass the Billz-Response-Channel: HTTP header — otherwise the response will be 200 {"message": "<correlation_id>"}. Maximum wait is 600 seconds, after which 408 with error.code = TIMEOUT is returned.
Error codes: 400 — input validation error; 404 — object not found; 408 — timed out waiting for the asynchronous result; 401, 403, 429, 500 — shared by all methods. Body formats and semantics: Response codes and errors.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Taken from the path
Header Parameters
Section titled “Header Parameters”Platform identifier. A static value is used for integrations.
HTTP — wait for the event processing result and return it in the HTTP response. Without the header the method returns only the correlation_id of the published event.
Query Parameters
Section titled “Query Parameters”Same as the Billz-Response-Channel header — for clients that cannot send a custom header. If both are passed, the header applies.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Use the prices of the sending shop
Example
{ "use_departure_price": false}Responses
Section titled “Responses”Success. With the Billz-Response-Channel: HTTP header — the asynchronous response envelope, without it — {"message": "<correlation_id>"}.
Asynchronous response envelope. Returned when the Billz-Response-Channel: HTTP header is passed. The final HTTP code of the request is taken from the status_code field.
object
Customer session identifier
Event processing status (also the final HTTP response code)
object
Error code, empty string if there is no error
Error text, empty string if there is no error
Request identifier, matches the ID of the published event
Response event type, for example <event_type>.success
Operation result, if the method returns one
object
Response of an asynchronous method without the Billz-Response-Channel header — the event has been published.
object
Correlation_id of the published event
object
object
Examplegenerated
{ "session_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "status_code": 1, "error": { "code": "example", "message": "example" }, "correlation_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "topic": "example", "data": {}}