API reference
Sync staff & contacts
Upsert the people at a merchant as contacts on the customer.
POST/v1/staff
Upserts the people at a merchant (owner and staff users) as contacts on the customer, deduped on the stable Shopify user id. Send one at a time as you see them, or the whole roster with reconcile to propagate removals. Works for embedded and non-embedded apps alike, you supply the associated_user you got from Shopify's token exchange.
Body
myshopifyDomainstringrequired- The shop these people belong to. An install of your app for that shop must exist.
staffarrayrequired- One or more staff objects (below). A single object is also accepted.
reconcileboolean- Default
false. Whentrue, treatstaffas the complete roster: app-sourced contacts not present are removed. Manually-added contacts are never removed.
Staff object
idstringrequired- The Shopify staff user id (from
associated_user.id). The dedup key, keep it stable. emailstring- Contact email. May change over time; the
idkeeps it the same contact. firstName/lastNamestring- The person's name.
accountOwnerboolean- Marks the contact as the store owner.
installerboolean- Marks the person who installed the app.
tagsarray- Free-form labels stored on the contact.
Returns
200
{ "ok": true, "upserted": n, "removed": n }.400
myshopifyDomain or staff missing / malformed.401Bad or missing
X-Api-Key.404No install of your app for that shop.
429Rate limit exceeded.