Push changes
Rules that keep the sync simple:
- One reference per car, for good. Use your own stable advertisement id as
externalReference. Okasie finds the listing by that reference; it never has to know Okasie’slistingId. - Always send the whole car.
PUTis a full replacement: a field you leave out is cleared. - Leave
imagesout when the photos did not change, to keep the current ones and avoid downloading them again. Send the full list when any photo changed. - Use bulk for volume. Bulk upsert sends up to 100 cars as one request against the rate limit.
- Store
listingIdandlistingUrlfrom the response if you want to show the dealer where the car is online.listingUrlis only set while the car isactive.
Reconcile
Once a day, compare what Okasie has with your stock. Read per dealer with List Listings, usingstatus=all so drafts and deleted listings are included:
externalReference is one of yours and whose externalProvider matches the value on listings you created. Then:
- a car in your stock that is missing on Okasie, or differs:
PUTit; - a listing that is
activeon Okasie but no longer in your stock:DELETEit.
inactive.
Reading changes
updatedSince returns the listings changed at or after a moment, newest first. updatedAt changes on every write, also by the dealer in the Okasie dashboard and by Okasie itself (for example when a sold car goes offline), so use it to notice changes, not as proof that your own call arrived; the response of your write call is that proof.
Errors and retries
- Writes are safe to repeat: the same
PUTtwice gives the same listing. - Retry
429afterRetry-Afterand500with increasing delays. - Do not retry
400,403,409and422unchanged; log thecodeandmessage, and show them to the dealer where it helps (for exampleLISTING_LIMIT_REACHED: the dealer’s plan is full). - Check
warnings.skippedImagesand send the car again when the photos are reachable.