Pull Orders Page
The Pull Orders Page operation initializes the order download process and verifies that the reverse connection is ready to provide order data to the daemon.
Before continuing, the daemon must verify the current upstream status and confirm that the requested entity is orders.
1. Check the Upstream Status
First, retrieve the current upstream connection status:
GET https://api.talk2sync.com/api/adapters/custom/reverse/connection/{{your key}}/upstreamstatus
The response should have a structure similar to:
{
"connectionstatus": "waiting"
}
The waiting status indicates that the download process is ready to be initialized.
2. Check the Requested Entity
Retrieve the entity currently being requested:
GET https://api.talk2sync.com/api/adapters/custom/reverse/connection/{{your key}}/entity
The response can identify either products or orders:
{
"entity": "products"
}
or:
{
"entity": "orders"
}
For this operation, continue only when the requested entity is orders.
3. Initialize the Order Download
Initialize the download process:
POST https://api.talk2sync.com/api/adapters/custom/reverse/connection/{{your key}}/pull/initialize
After initialization, query the upstream status again:
GET https://api.talk2sync.com/api/adapters/custom/reverse/connection/{{your key}}/upstreamstatus
Wait until the connection reports:
{
"connectionstatus": "initialized"
}
The daemon should proceed with the subsequent order-pull operations only after the connection reaches the initialized state.
Process
Next Steps
- Continue with Get Next Orders to Pull to retrieve the next order.
- Review Notify Orders Success to report a successful order storage operation.
- Review Notify Orders Failure to report a failed order storage operation.
- Review Set Finish Order Pulls to finalize the order download.