Vendors

Vendors group products by supplier or source. Reads require read_products; writes require write_products. A vendor supports name, slug, description, seo_title, seo_description, image_id, and template_handle. The slug is optional when creating a vendor and is generated from its name when omitted. Assigning a non-empty image_id also requires read_files for the referenced uploaded image. On create, omitting template_handle assigns default_vendor. Use default_vendor for the default vendor template, or pass an alternate vendor template handle configured for the store. Omit template_handle on update to leave the current assignment unchanged; an empty string is invalid.

Endpoints#

Vendor limits

GET read_products

Fetch vendor field limits and request limits.

Returns the validation limits clients need when building vendor forms and requests.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

List vendors

GET read_products

List vendors for the store.

Returns vendors with pagination, search, and sorting.

Query parameters

Name Type Description
page integer

Page number.

Example: 1
limit integer

Page size.

Example: 20
search string

Search query.

Example: acme-supplies
sort_by string

Sort field from the Vendor list contract.

Allowed values
nameproduct_countcreated_atupdated_at
Example: name
sort_direction string

Sort direction from the Vendor list contract.

Allowed values
ascdesc
Example: asc

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Search vendors

GET read_products

Search vendors for picker-style suggestions.

Returns lightweight vendor suggestions by query. This endpoint is intended for pickers and simple selection UIs.

Query parameters

Name Type Description
q string

Search query.

Example: acme
limit integer

Suggestion count.

Example: 10

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Get a vendor

GET read_products

Fetch one vendor by id.

Returns the vendor if it belongs to the token's store.

Path parameters

Name Type Description
id required integer

Vendor id.

Example: 7

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 404 VENDOR_NOT_FOUND

    Vendor does not exist in this store.

Create a vendor

POST write_products

Create a vendor.

Creates a vendor. name is required. Omit slug to generate it from the name. A non-empty image_id must identify an uploaded image in this store and requires read_files; video, document, 3D-model, and site-asset ids are rejected.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
name required string

Vendor name.

Example: Acme Supplies
slug string

Optional slug. Omit to generate from name.

Example: acme-supplies
description string

Optional plain-text description.

Example: Acme Supplies provides wholesale outdoor gear.
seo_title string

Optional SEO title.

Example: Acme Supplies
seo_description string

Optional SEO description.

Example: Shop products supplied by Acme Supplies.
image_id string

Optional Media-library upload image id. Video, document, 3D-model, and site-asset ids are invalid. Non-empty values require read_files access to the referenced file.

Example: f_8f2a1c2b9d4e
template_handle string

Template assignment. On create, omitting this field or sending an empty string assigns default_vendor. Use default_vendor for the default Vendor template, or pass an alternate Vendor template handle configured for the store. On update, omit template_handle to leave the assignment unchanged, use default_vendor to reset it to default, and do not send an empty string.

Example: default_vendor

Errors

  • 400 STORE_API_INVALID_REQUEST_BODY

    Request body is not valid JSON.

  • 400 STORE_API_CREATE_REDIRECT_UNSUPPORTED

    create_redirect is only supported when updating a vendor.

  • 400 VENDOR_NAME_REQUIRED

    Name is required.

  • 400 VENDOR_NAME_INVALID_CHARS

    Name contains unsupported control characters.

  • 400 VENDOR_NAME_TOO_LONG

    Name exceeds the maximum length.

  • 400 VENDOR_DESCRIPTION_INVALID_CHARS

    Description contains unsupported control characters.

  • 400 VENDOR_DESCRIPTION_TOO_LONG

    Description exceeds the maximum length.

  • 400 VENDOR_SEO_TITLE_INVALID_CHARS

    SEO title contains unsupported control characters.

  • 400 VENDOR_SEO_TITLE_TOO_LONG

    SEO title exceeds the maximum length.

  • 400 VENDOR_SEO_DESCRIPTION_INVALID_CHARS

    SEO description contains unsupported control characters.

  • 400 VENDOR_SEO_DESCRIPTION_TOO_LONG

    SEO description exceeds the maximum length.

  • 400 VENDOR_SLUG_INVALID_FORMAT

    Slug is not valid for Vendor URLs.

  • 400 VENDOR_SLUG_TOO_LONG

    Slug exceeds the maximum length.

  • 400 TEMPLATE_HANDLE_INVALID

    Template handle is not valid for Vendor templates.

  • 400 TEMPLATE_HANDLE_NOT_FOUND

    Template handle is not available for this store.

  • 400 INVALID_INPUT

    image_id is malformed, is not an image, or references a file outside the Media-library upload namespace.

  • 403 STORE_ADMIN_TOKEN_RUNTIME_FORBIDDEN

    A non-empty image_id requires read_files scope in addition to write_products.

  • 404 NOT_FOUND

    The supplied image does not exist in this store.

  • 409 VENDOR_DUPLICATE

    Name or slug already exists in this store.

  • 400 VENDOR_SLUG_GENERATION_FAILED

    A slug could not be generated from the supplied name.

  • 400 VENDOR_UNIQUE_SLUG_GENERATION_FAILED

    A unique generated slug could not be found; supply a slug explicitly.

  • 400 VENDOR_LIMIT_REACHED

    The store has reached its vendor limit.

Bulk create vendors

POST write_products

Create multiple vendors by name.

Creates multiple vendors from names. Slugs are generated server-side; existing names are skipped and reported in the response.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
names required array<string>

Vendor names to create.

Example: Acme Supplies

Errors

  • 400 VENDOR_BULK_NO_NAMES

    No names were provided.

  • 400 VENDOR_BULK_CREATE_TOO_MANY

    Batch exceeds the Vendor bulk create cap.

  • 409 VENDOR_BULK_DUPLICATE

    One of the names in the batch was just created by another request.

Update a vendor

PUT write_products

Update a vendor.

Updates only the fields you provide. Empty description and SEO values clear those fields; an empty image_id clears the image. A non-empty image_id must identify an uploaded image in this store and requires read_files; video, document, 3D-model, and site-asset ids are rejected. When slug changes, create_redirect controls whether the previous URL redirects to the new one and defaults to true.

Path parameters

Name Type Description
id required integer

Vendor id.

Example: 7

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
name string

Vendor name.

Example: Acme Supplies
slug string

New slug. Omit to leave the current slug unchanged; an empty value is invalid.

Example: acme-supplies
description string

Optional plain-text description.

Example: Acme Supplies provides wholesale outdoor gear.
seo_title string

Optional SEO title.

Example: Acme Supplies
seo_description string

Optional SEO description.

Example: Shop products supplied by Acme Supplies.
image_id string

Optional Media-library upload image id. Video, document, 3D-model, and site-asset ids are invalid. Non-empty values require read_files access to the referenced file.

Example: f_8f2a1c2b9d4e
template_handle string

Template assignment. On create, omitting this field or sending an empty string assigns default_vendor. Use default_vendor for the default Vendor template, or pass an alternate Vendor template handle configured for the store. On update, omit template_handle to leave the assignment unchanged, use default_vendor to reset it to default, and do not send an empty string.

Example: default_vendor
create_redirect boolean

When slug changes, create a redirect from the previous slug.

Example: true

Errors

  • 400 STORE_API_INVALID_VENDOR_ID

    Vendor id is invalid.

  • 400 STORE_API_INVALID_REQUEST_BODY

    Request body is not valid JSON.

  • 400 VENDOR_NAME_REQUIRED

    Name is required.

  • 400 VENDOR_NAME_INVALID_CHARS

    Name contains unsupported control characters.

  • 400 VENDOR_NAME_TOO_LONG

    Name exceeds the maximum length.

  • 400 VENDOR_DESCRIPTION_INVALID_CHARS

    Description contains unsupported control characters.

  • 400 VENDOR_DESCRIPTION_TOO_LONG

    Description exceeds the maximum length.

  • 400 VENDOR_SEO_TITLE_INVALID_CHARS

    SEO title contains unsupported control characters.

  • 400 VENDOR_SEO_TITLE_TOO_LONG

    SEO title exceeds the maximum length.

  • 400 VENDOR_SEO_DESCRIPTION_INVALID_CHARS

    SEO description contains unsupported control characters.

  • 400 VENDOR_SEO_DESCRIPTION_TOO_LONG

    SEO description exceeds the maximum length.

  • 400 VENDOR_SLUG_INVALID_FORMAT

    Slug is not valid for Vendor URLs.

  • 400 VENDOR_SLUG_TOO_LONG

    Slug exceeds the maximum length.

  • 400 TEMPLATE_HANDLE_INVALID

    Template handle is not valid for Vendor templates.

  • 400 TEMPLATE_HANDLE_NOT_FOUND

    Template handle is not available for this store.

  • 400 INVALID_INPUT

    image_id is malformed, is not an image, or references a file outside the Media-library upload namespace.

  • 403 STORE_ADMIN_TOKEN_RUNTIME_FORBIDDEN

    A non-empty image_id requires read_files scope in addition to write_products.

  • 404 NOT_FOUND

    The supplied image does not exist in this store.

  • 409 VENDOR_DUPLICATE

    Name or slug already exists in this store.

  • 404 VENDOR_NOT_FOUND

    Vendor does not exist in this store.

  • 409 TRANSLATION_SOURCE_FIELD_HAS_TRANSLATIONS

    Clear a field's translations before clearing its source value.

Delete a vendor

DELETE write_products

Delete a vendor.

Deletes a vendor. If dependent products, collection rules, or menu items require confirmation, retry with the returned confirmation token.

Path parameters

Name Type Description
id required integer

Vendor id.

Example: 7

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
confirmed boolean

On a confirmation retry, set this to true and send the returned confirmation_token. Omit it on the first request.

confirmation_token string

Token from the CONFIRMATION_REQUIRED response. Omit it on the first request and resend the exact same id selection when using it.

Errors

  • 400 VENDOR_CONFIRMATION_INVALID

    Confirmation token is missing, expired, or mismatched.

  • 404 VENDOR_NOT_FOUND

    Vendor does not exist in this store.

  • 409 CONFIRMATION_REQUIRED

    Delete requires confirmation because dependent records will be changed.

Bulk delete vendors

POST write_products

Delete multiple vendors.

Send store-scoped integer vendor ids in vendor_ids. The first request needs only that array. If products, collection rules, or menu items will be changed, the API returns CONFIRMATION_REQUIRED; retry the same ids with confirmed: true and its confirmation_token. The success response separates deleted ids from missing or concurrently changed ids in deleted and failed. All database changes for the ids reported as deleted commit together.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
vendor_ids required array<integer>

Store-scoped integer vendor ids to delete.

Example: [7, 11]
confirmed boolean

On a confirmation retry, set this to true and send the returned confirmation_token. Omit it on the first request.

confirmation_token string

Token from the CONFIRMATION_REQUIRED response. Omit it on the first request and resend the exact same id selection when using it.

Errors

  • 400 STORE_API_INVALID_REQUEST_BODY

    Request body is not valid JSON.

  • 400 VENDOR_BULK_NO_IDS

    No vendor_ids were provided.

  • 400 VENDOR_BULK_DELETE_TOO_MANY

    Batch exceeds the Vendor bulk delete cap.

  • 409 VENDOR_BULK_RACED

    Dependencies changed while the bulk delete was running; the affected id is returned in failed.

  • 400 VENDOR_CONFIRMATION_INVALID

    Confirmation token is missing, expired, or mismatched.

  • 404 VENDOR_NOT_FOUND

    Vendor does not exist in this store.

  • 409 CONFIRMATION_REQUIRED

    Delete requires confirmation because dependent records will be changed.

Fields#

Field

Kind

Create

Update

Required

Translatable

name

text

Yes

Yes

create

Yes

slug

slug

Yes

Yes

Yes

description

textarea

Yes

Yes

Yes

seo_title

text

Yes

Yes

Yes

seo_description

textarea

Yes

Yes

Yes

image_id

image

Yes

Yes

No

template_handle

template

Yes

Yes

No

create_redirect

boolean

No

Yes

No

product_count

integer

No

No

No

created_at

datetime

No

No

No

updated_at

datetime

No

No

No

storefront_url

url

No

No

No

No

Webhook events#

Vendor webhook events are declared by the Vendor resource contract. The event cards below include the topic, subscription scope, store permission, payload schema, and sample payload.

Vendor created

EVENT vendors/create write_products products:write

Fired when a vendor is created.

Payload fields

Field Type Description
vendor.id integer Always present
vendor.name string Can be removed/added via the Payload builder
vendor.slug string Can be removed/added via the Payload builder
vendor.description string Can be removed/added via the Payload builder
vendor.seo_title string Can be removed/added via the Payload builder
vendor.seo_description string Can be removed/added via the Payload builder
vendor.image_id string Can be removed/added via the Payload builder
vendor.image_url string Can be removed/added via the Payload builder
vendor.image_cdn_url string Can be removed/added via the Payload builder
vendor.product_count integer Can be removed/added via the Payload builder
vendor.template_handle string Can be removed/added via the Payload builder
vendor.created_at string Can be removed/added via the Payload builder
vendor.updated_at string Can be removed/added via the Payload builder
vendor.translations_updated_at string Can be removed/added via the Payload builder

Vendor updated

EVENT vendors/update write_products products:write

Fired when a vendor is updated.

Payload fields

Field Type Description
vendor.id integer Always present
vendor.name string Can be removed/added via the Payload builder
vendor.slug string Can be removed/added via the Payload builder
vendor.description string Can be removed/added via the Payload builder
vendor.seo_title string Can be removed/added via the Payload builder
vendor.seo_description string Can be removed/added via the Payload builder
vendor.image_id string Can be removed/added via the Payload builder
vendor.image_url string Can be removed/added via the Payload builder
vendor.image_cdn_url string Can be removed/added via the Payload builder
vendor.product_count integer Can be removed/added via the Payload builder
vendor.template_handle string Can be removed/added via the Payload builder
vendor.created_at string Can be removed/added via the Payload builder
vendor.updated_at string Can be removed/added via the Payload builder
vendor.translations_updated_at string Can be removed/added via the Payload builder

Vendor deleted

EVENT vendors/delete write_products products:write

Fired when a vendor is deleted.

Payload fields

Field Type Description
vendor.id integer Always present
vendor.name string Can be removed/added via the Payload builder
vendor.slug string Can be removed/added via the Payload builder