All recipes
πŸ”„

Menu & inventory sync

Mirror a merchant's live catalogue and stock into any third-party channel.

2–3 days Aggregators Β· marketplaces Β· ERPs

No orders β€” just a rock-solid one-way mirror of the catalogue and per-location stock, kept fresh by webhooks. The pattern every aggregator needs before they can list a merchant.

The build, step by step

  1. 1

    Initial full sync

    Snapshot every location's catalogue.

    • GET/stores
    • GET/locations/{locationId}/catalogue
    Read the docs for this step
  2. 2

    Subscribe to changes

    Register inventory_webhook_url and re-fetch only what changed.

    • POST{your_inventory_webhook_url}
    • POST/locations/{locationId}/catalogue/lookup
    Read the docs for this step

…or hand it to an agent

This prompt briefs an AI coding agent to implement the entire recipe against the live docs β€” authentication, every endpoint, and webhooks.

Build it with AI

Copy this prompt into your coding agent.

Build a one-way catalogue + inventory mirror from Ewity into <target system>. Base URL https://api.ewitypos.com/platform-v1, header Authorization: Bearer <EWITY_PLATFORM_TOKEN>.

IMPORTANT β€” the docs are authoritative. Read https://ewity-api.readme.io/docs/getting-started and confirm every field name / payload shape against the exact reference page linked below before you rely on it. Don't guess β€” refer to the docs.

1) Full sync: GET /stores (ref: https://ewity-api.readme.io/reference/liststores) -> for each online_locations[].id, GET /locations/{id}/catalogue (ref: https://ewity-api.readme.io/reference/getfullcatalogue). Upsert categories/products/variants. Record availability = available && !out_of_stock PER LOCATION. Prices tax-inclusive; keep taxes[] for breakdown.
2) Incremental: register inventory_webhook_url (docs: https://ewity-api.readme.io/docs/webhooks). On CatalogueUpdated { items:[{online_location_id,product_id,variant_id}], occurred_at }, group variant_ids by location and POST /locations/{id}/catalogue/lookup (ref: https://ewity-api.readme.io/reference/lookupcatalogue) { variant_ids } (max 500 ids). Upsert what returns; any requested id NOT returned = deleted -> remove it.
3) Robustness: validate the Bearer token on the webhook, dedupe on (online_location_id, variant_id, occurred_at) (at-least-once delivery), 2xx fast, reconcile with a full re-sync every ~15 min as a safety net. Consult https://ewity-api.readme.io/docs/webhooks for the exact event payloads.

Ready to build menu & inventory sync?

Create an app to get your API key, then follow the steps above.