Push Products Page
The Push Products Page operation initializes the upstream synchronization process and sends product data from the external system to Talk2Sync.
Before sending products, the daemon must determine the current upstream state, synchronization strategy, entity, and cursor position. It must then initialize the upstream process and select the appropriate endpoint depending on whether Talk2Sync is requesting a health-check sample or the complete product dataset.
1. Check the Upstream State
First, retrieve the current upstream connection status:
GET https://api.talk2sync.com/api/adapters/custom/reverse/connection/{{your key}}/upstreamstatus
A response should have a structure similar to:
{
"connectionstatus": "waiting"
}
The waiting status indicates that the upstream process is ready to be initialized.
2. Check the Synchronization Strategy
Retrieve the strategy currently requested by Talk2Sync:
GET https://api.talk2sync.com/api/adapters/custom/reverse/connection/{{your key}}/strategy
The response can be:
{
"strategy": "push"
}
or:
{
"strategy": "pingsample"
}
The strategy determines whether the daemon must send the complete dataset or only a sample for health checks.
push— Send the complete dataset.pingsample— Send a sample of the dataset for health-check purposes.
3. 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 should identify the requested entity:
{
"entity": "products"
}
or:
{
"entity": "orders"
}
For this operation, the daemon should continue with the product upload flow only when the returned entity is products.
4. Retrieve the Cursor Offset
Retrieve the current cursor position:
GET https://api.talk2sync.com/api/adapters/custom/reverse/connection/{{your key}}/cursoroffset
A response should have a structure similar to:
{
"cursoroffset": 1517358864869
}
The cursoroffset represents the last update timestamp, in milliseconds, of the last record discovered by Talk2Sync for the currently selected entity type.
This value can be used by the external system to determine which records should be considered during the synchronization process.
5. Initialize the Upstream Process
After obtaining the required connection information, initialize the upstream process:
POST https://api.talk2sync.com/api/adapters/custom/reverse/connection/{{your key}}/push/initialize
The endpoint should return HTTP status 200.
After initialization, querying the upstream status again should return:
{
"connectionstatus": "initialized"
}
The daemon should proceed only after the upstream process has been successfully initialized.
6. Select the Product Push Operation
If the requested entity is products, the daemon can begin sending product data.
The endpoint depends on the previously retrieved synchronization strategy.
Sample Push
When the strategy is pingsample, send a sample for health-check purposes:
POST https://api.talk2sync.com/api/adapters/custom/reverse/connection/{{your key}}/pingsample/products
Full Product Push
When the strategy is push, send the product dataset:
POST https://api.talk2sync.com/api/adapters/custom/reverse/connection/{{your key}}/push/products
7. Product Payload
The request body should contain a products array with the products being sent to Talk2Sync:
{
"products": [
{
"_id": "100004777",
"sku": "100004777",
"last_updated": 1517360038797,
"title": "EON618S JBL SUBWOOFER 18\" AMPLIFICADO",
"url": "",
"brand": "",
"mpn": "",
"model": "",
"description": "JBL Premium Transducers",
"variations": [
{
"availabilities": [
{
"tag": "default",
"quantity": "50"
}
],
"prices": [
{
"tag": "default",
"currency": "USD",
"number": "1060.51"
}
],
"images": [
{
"url": "https://www.example.com/13080-thickbox_default/eon618s-jbl-subwoofer-18-amplificado-.jpg"
}
],
"videos": [
{
"url": ""
}
],
"barcode": "",
"size": "",
"color": ""
}
]
}
]
}
Process Summary
The complete operation follows this sequence:
Next Steps
- Review Set Finish Products Push to complete the product upload operation.
- Review Push Orders Page for the corresponding order upload process.
- Review the Product Upload protocol to understand where this operation fits in the complete reverse connection flow.