Poll cash-flow item changes
const url = 'https://api.sancho-wms.pl/v1/cashFlowItems.changes';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"integrationId":1,"cursor":"example","limit":100}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.sancho-wms.pl/v1/cashFlowItems.changes \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "integrationId": 1, "cursor": "example", "limit": 100 }'The cash-flow items of one integration whose amounts or status changed. A settlement made or removed shows as the new settled amount of both documents. Answers what changed after cursor (null on the first poll), oldest change first, and the cursor to send next. Store cursor even when items is empty. Delivery is at least once, so a document may come again. The feed stays 60 seconds behind the ERP’s clock, so a change shows up a minute after it was saved. A deleted document sends no tombstone: a client that holds an id the feed no longer mentions confirms it with the list or get (404). A cursor of another feed or list is 400.
Authorizations
Abschnitt betitelt „Authorizations“Request Bodyrequired
Abschnitt betitelt „Request Bodyrequired“object
Responses
Abschnitt betitelt „Responses“Successful response
object
object
object
Example
{ "items": [ { "direction": "incoming", "settlementStatus": "notApplicable", "party": { "kind": "counterParty" }, "sourceDocument": { "type": "invoice" }, "integrationType": "comarch-optima", "transferState": "draft" } ]}Bad request
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "BAD_REQUEST", "message": "Bad request", "issues": []}Unauthorized
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "UNAUTHORIZED", "message": "Unauthorized", "issues": []}Payment required
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "PAYMENT_REQUIRED", "message": "Payment required", "issues": []}Forbidden
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "FORBIDDEN", "message": "Forbidden", "issues": []}Not found
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "NOT_FOUND", "message": "Not found", "issues": []}Unprocessable content
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "UNPROCESSABLE_CONTENT", "message": "Unprocessable content", "issues": []}Too many requests
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "TOO_MANY_REQUESTS", "message": "Too many requests", "issues": []}Internal server error
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": []}Service unavailable
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "SERVICE_UNAVAILABLE", "message": "Service unavailable", "issues": []}