The synchronization endpoint is necessary for the correctness and consistency of data between an external system (e.g. ERP) and the ONe platform.
Table of contents:
Glossary
Name | Explanation |
eventTypes | Type of filters to retrieve. No values mean 'return allβ. Possible to choose: "ADDED" "REMOVED" "CHANGED" "CHANGED_PAYMENT". |
numberOfEvents | Number of events to retrieve |
startId | Index of first retrieved event. "1" should be used first, then value of "nextId" in returned object |
GET order shipment events for synchronization
There is possible to get whole list of clients. Use GET
/api/v1/account/integrations/auth-required/clients
The diagram below shows the dependence of communicating with the API:
Use the following required query parameters to get list of order shipment:
eventTypes
numberOfEvents
startId
In the example, we did not select any
eventTypes
(ADDED, REMOVED, CHANGED_PAYMENT,CHANGED) and set the startId of the last event for better visualization
Example request :
jsoncurl -X GET "https://api-preprod.one.unity.pl/api/v1/orders/integrations/auth-required/synchronization/order?eventTypes=&numberOfEvents=100&startId=15" -H "accept: application/json" -H "one-tenant: panelhandlowca" -H "ApiAuth: 547554a42b7f4f52a500f93a15fea8f5:595f59adc32140bbaed64ac709ec3d0e"
In response you will receive a list with orders shipment event details
Example response:
json{ "nextId": 16, "events": [ { "orderId": "OF/22/8/2022", "shipmentId": "OF/22/8/2022/01", "eventType": "CHANGED_PAYMENT" } ] }