API reference / Stores
4 operations.
/api/v1/storesOpen a store with its storefront profile; the caller becomes its owner. Up to 5 stores per collector.
collector.createStore()stores:write(API keys are coming soon)Idempotency-KeyX-Request-Idobject
slugstringrequiredat most 80 charactersnamestringrequired2–120 characterstaglinestring or nulloptionalat most 640 charactersdescriptionstring or nulloptionalat most 8000 characterswebsitestring or nulloptionalat most 300 charactersphonestring or nulloptionalat most 160 charactersemailstring or nulloptionalat most 200 charactersaddress_line1string or nulloptionalat most 800 charactersaddress_line2string or nulloptionalat most 800 characterscitystring or nulloptionalat most 480 charactersregionstring or nulloptionalat most 480 characterspostal_codestring or nulloptionalat most 80 characterscountrystring or nulloptionallatitudenumber or nulloptional-90–90longitudenumber or nulloptional-180–180hoursobjectrequireddaysobjectrequiredmonarray of [string, string]requiredat most 3 itemstuearray of [string, string]requiredat most 3 itemswedarray of [string, string]requiredat most 3 itemsthuarray of [string, string]requiredat most 3 itemsfriarray of [string, string]requiredat most 3 itemssatarray of [string, string]requiredat most 3 itemssunarray of [string, string]requiredat most 3 itemsnotestring or nulloptionalat most 400 charactersspecialtiesarray of stringrequiredat most 16 itemsshipsbooleanrequiredaccepts_holdsbooleanrequiredhold_daysintegerrequired1–30logo_pathstring or nulloptionalat most 300 charactersbanner_pathstring or nulloptionalat most 300 charactersobject
storeobjectrequiredidstring (uuid)requiredslugstringrequiredinvalid_request: The query or body doesn’t match the schema (see errors[]).
invalid_json: The body isn’t JSON.
invalid_idempotency_key: The Idempotency-Key isn’t 1–255 visible ASCII characters.
invalid_slug: The address isn’t allowed (reserved, too short…).
unauthorized: Not signed in (no session or token, or an expired one).
idempotency_in_progress: The first request with this key is still running.
slug_taken: Another store has that address.
store_limit: The caller already created 5 stores.
idempotency_key_reused: This key was used for a different request.
internal: Something went wrong on our side (quote the requestId).
curl -X POST 'https://collection.id/api/v1/stores' \
-H "Authorization: Bearer $COLLECTOR_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d @body.jsonawait collector.createStore({ body: { … } });/api/v1/stores/{storeId}The store, the caller’s role, billing flags and the counters the dashboard shows. storeId may be the id or the slug.
collector.getStore()store:read(API keys are coming soon)If-None-MatchX-Request-Id| Name | In | Type | About |
|---|---|---|---|
storeIdrequired | path | string | The store’s id or slug.1–200 characters |
A store, the caller’s role in it and the dashboard’s counters.
roleenumrequiredowner (one or more), admin (manages the store), staff (inventory and holds).
One ofowneradminstaff
canManagebooleanrequiredThe caller is an owner or admin.
billingReadybooleanrequiredA payment method for seller fees is on file.
billingConfiguredbooleanrequiredBilling is set up on our side at all.
feeobjectrequiredbpsintegerrequiredSeller fee in basis points (100 = 1%).
minFeeCentsintegerrequiredmaxFeeCentsinteger or nullrequiredcurrencystringrequiredstoreOverridebooleanrequiredThis store has its own rate.
holdsAwaitingintegerrequiredHold requests waiting for an answer.
questionsAwaitingintegerrequiredOpen questions waiting for the store’s answer.
unauthorized: Not signed in (no session or token, or an expired one).
not_found: Nothing at that address.
internal: Something went wrong on our side (quote the requestId).
curl 'https://collection.id/api/v1/stores/<storeId>' \
-H "Authorization: Bearer $COLLECTOR_TOKEN"await collector.getStore({ path: { storeId } });/api/v1/stores/{storeId}Replace the storefront profile: name, contact details, address, hours, specialties and hold settings. Send every field (it isn’t a partial update). Images are uploaded to the store’s folder first.
collector.updateStore()store:storefront:write(API keys are coming soon)X-Request-Id| Name | In | Type | About |
|---|---|---|---|
storeIdrequired | path | string (uuid) |
object
namestringrequired2–120 characterstaglinestring or nulloptionalat most 640 charactersdescriptionstring or nulloptionalat most 8000 characterswebsitestring or nulloptionalat most 300 charactersphonestring or nulloptionalat most 160 charactersemailstring or nulloptionalat most 200 charactersaddress_line1string or nulloptionalat most 800 charactersaddress_line2string or nulloptionalat most 800 characterscitystring or nulloptionalat most 480 charactersregionstring or nulloptionalat most 480 characterspostal_codestring or nulloptionalat most 80 characterscountrystring or nulloptionallatitudenumber or nulloptional-90–90longitudenumber or nulloptional-180–180hoursobjectrequireddaysobjectrequiredmonarray of [string, string]requiredat most 3 itemstuearray of [string, string]requiredat most 3 itemswedarray of [string, string]requiredat most 3 itemsthuarray of [string, string]requiredat most 3 itemsfriarray of [string, string]requiredat most 3 itemssatarray of [string, string]requiredat most 3 itemssunarray of [string, string]requiredat most 3 itemsnotestring or nulloptionalat most 400 charactersspecialtiesarray of stringrequiredat most 16 itemsshipsbooleanrequiredaccepts_holdsbooleanrequiredhold_daysintegerrequired1–30logo_pathstring or nulloptionalat most 300 charactersbanner_pathstring or nulloptionalat most 300 charactersobject
invalid_request: The query or body doesn’t match the schema (see errors[]).
invalid_json: The body isn’t JSON.
unauthorized: Not signed in (no session or token, or an expired one).
forbidden: Only the store’s owners and admins can do this.
not_found: Nothing at that address.
internal: Something went wrong on our side (quote the requestId).
curl -X PATCH 'https://collection.id/api/v1/stores/<storeId>' \
-H "Authorization: Bearer $COLLECTOR_TOKEN" \
-H 'Content-Type: application/json' \
-d @body.jsonawait collector.updateStore({ path: { storeId }, body: { … } });/api/v1/stores/slugWhether a storefront address (collection.id/stores/<slug>) is free to take, and why not.
collector.checkStoreSlug()stores:write(API keys are coming soon)If-None-MatchX-Request-Id| Name | In | Type | About |
|---|---|---|---|
slugoptional | query | string | at most 200 characters · default "" |
object
availablebooleanrequiredreasonstring or nullrequiredinvalid_request: The query or body doesn’t match the schema (see errors[]).
unauthorized: Not signed in (no session or token, or an expired one).
internal: Something went wrong on our side (quote the requestId).
curl 'https://collection.id/api/v1/stores/slug' \
-H "Authorization: Bearer $COLLECTOR_TOKEN"await collector.checkStoreSlug({ query: { … } });