Fetch fresh data from the main queue.
The queue holds only the freshest data, there are no historical data stored. Only to make a point, imagine a case when, between synchronization sessions, someone creates a lead and then updates its representation. You will get only the freshest data for the lead.
Deleted resources will include only ids, and you should treat it as an instruction to perform local delete.
Once there is no more data to synchronize you will get a 204 response, otherwise you get 200.
A successfull response will include an array of resources, you are already fimiliar with, and additional Sync related attributes within meta/sync
object.
The sync
meta object fields:
Parameter |
Description |
event_type |
An eventy type. Treat it as a hint. Possible values: created , updated , deleted . |
ack_key |
An acknowledgement key. |
revision |
Data revision. |
The top level meta
attribute includes a few attributes that may hint your syncing process.
Parameter |
Description |
type |
"collection" |
count |
Number of objects returned in current request. |
count_left |
Number of objects left to sync. |
failed_objects |
Items that failed te be fetched in current request. |
failed_objects
is a list of items which should have been included but for some reasons weren’t.
Every item has these attributes attached:
Parameter |
Description |
id |
Numeric id value |
type |
Text representing type of the failed object, like lead |
Example failed_objects
might look like:
[{"type": "deal", "id": 1}, {"type": "lead", "id": 2}]