Skip to main content
Your system is the source of truth. Push every change to Okasie, and reconcile now and then to repair anything that went wrong.

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’s listingId.
  • Always send the whole car. PUT is a full replacement: a field you leave out is cleared.
  • Leave images out 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 listingId and listingUrl from the response if you want to show the dealer where the car is online. listingUrl is only set while the car is active.

Reconcile

Once a day, compare what Okasie has with your stock. Read per dealer with List Listings, using status=all so drafts and deleted listings are included:
The result also contains listings the dealer created in other ways. Keep only your own: those whose 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: PUT it;
  • a listing that is active on Okasie but no longer in your stock: DELETE it.
Deleted listings come back with status 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 PUT twice gives the same listing.
  • Retry 429 after Retry-After and 500 with increasing delays.
  • Do not retry 400, 403, 409 and 422 unchanged; log the code and message, and show them to the dealer where it helps (for example LISTING_LIMIT_REACHED: the dealer’s plan is full).
  • Check warnings.skippedImages and send the car again when the photos are reachable.
See Error Handling for every code.