Notify Order Storage Success
After the daemon successfully processes the order received from Talk2Sync, it must notify Talk2Sync that the order was inserted or updated successfully.
This notification completes the daemon-side processing step for the order and allows Talk2Sync to continue with the next transaction.
1. Notify Successful Storage
Send a POST request using the _id of the processed order:
POST https://api.talk2sync.com/api/adapters/custom/reverse/connection/{{your key}}/pull/orders/{{_id}}/succeded
Replace {{_id}} with the _id of the order that was processed.
Note: The endpoint path uses
succededas specified by the protocol.
2. Request Body
The request body must contain the order that was successfully inserted or updated:
{
"order": {
"_id": "75554554546",
"orderid": "777777",
"last_updated": 1517360038797,
"status": "paid",
"dateCreated": "",
"dateClosed": "",
"total": {
"amount": 350,
"currency": "USD"
},
"orderItems": [
{
"id": "7778545",
"variation_id": "0",
"quantity": "1",
"unitPrice": "350",
"currencyId": "USD"
}
],
"buyer": {
"id": "4578889",
"email": "testbuyer@example.com",
"phone": "88888888",
"firstName": "John",
"lastName": "Doe"
}
}
}
The order sent in the request should correspond to the order that the daemon actually inserted or updated.
3. Wait for the Transaction to Complete
The success notification should return HTTP 200 OK.
After receiving a successful response, the daemon must wait until Talk2Sync finishes processing the order transaction before requesting another order.
Check the order readyfornext status:
GET https://api.talk2sync.com/api/adapters/custom/reverse/connection/{{your key}}/pull/orders/readyfornext
The response should have a structure similar to:
{
"ready": false
}
or:
{
"ready": true
}
ready: false
Talk2Sync is still processing the previous order transaction. The daemon must wait and query the endpoint again.
ready: true
The previous transaction has completed and the daemon can proceed with the next order.
Process
Next Steps
- Review Get Next Order to Pull to retrieve the next order.
- Review Notify Order Storage Failure to report a failed storage operation.
- Review Set Finish Order Pulls to finalize the order download.