Sites & Organisation

External Id Types

Endpoints for managing external ID types

get/shop/external-id-types

List external ID types

listExternalIdTypes

This endpoint lists all the ExternalIdTypes which are associated with the provided site.

Query parameters

  • site_iduuidoptional

    Get external IDs for the given site.

  • archivedbooleanoptional

    Whether to include archived resources in the response. When true, archived resources are returned; when false or omitted, only non-archived resources are returned.

  • pageintegeroptional

    The page to retrieve results from

  • per_pageintegeroptional

    The number of results to return per page

Responses

  • 200

    The external ID types were successfully retrieved

  • 401

    The user is unauthenticated

post/shop/external-id-types

Create a new external ID type

createExternalIdType

Use this endpoint to create a new ExternalIdType.

Request body

  • namestringrequired

    Display name of the external ID type, shown to staff in the admin UI alongside the IDs themselves. Use a clear system-of-record label (e.g. "Salesforce CRM"). 1-120 characters.

  • descriptionstringoptionalnullable

    Optional help text shown next to the external ID type in the admin UI to explain to staff what the ID represents and where it comes from. Plain text, up to 500 characters.

  • applies_tostringrequired

    The type of object the external ID type applies to.

    Possible values:basket
  • site_idsstring[]optional
  • all_sitesbooleanoptional

    Whether the external ID type should be associated with all sites.

Responses

  • 201

    The external ID type was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 422

    The request didn't pass validation

get/shop/external-id-types/{externalIdType}

Show an external ID type

getExternalIdType

Retrieves an ExternalIdType by ID.

Path parameters

Responses

  • 200

    The external ID type was successfully retrieved

  • 401

    The user is unauthenticated

  • 404

    The resource couldn't be found

put/shop/external-id-types/{externalIdType}

Update an external ID type

updateExternalIdType

Updates an ExternalIdType by ID.

Path parameters

Request body

  • namestringoptional

    Display name of the external ID type, shown to staff in the admin UI alongside the IDs themselves. Use a clear system-of-record label (e.g. "Salesforce CRM"). 1-120 characters.

  • descriptionstringoptionalnullable

    Optional help text shown next to the external ID type in the admin UI to explain to staff what the ID represents and where it comes from. Plain text, up to 500 characters.

  • applies_tostringoptional

    The type of object the external ID type applies to.

    Possible values:basket
  • site_idsstring[]optional
  • all_sitesbooleanoptional

    Whether the external ID type should be associated with all sites.

Responses

  • 200

    The external ID type was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

delete/shop/external-id-types/{externalIdType}

Archive an external ID type

deleteExternalIdType

Soft deletes an ExternalId by ID.

Path parameters

Responses

  • 204

    The external ID type was successfully archived.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

post/shop/external-id-types/{externalIdType}/restore

Restore an external id

restoreExternalIdType

Restores an archived (soft-deleted) ExternalIdType by ID.

Path parameters

Responses

  • 200

    The external ID type was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

put/shop/external-id-types/{externalIdType}/sites

Add a site to an external ID type

createExternalIdTypeSite

Enables the ExternalIdType for the given site.

Path parameters

Request body

  • site_iduuidrequired

    Identifier of the site to associate with this external ID type. Once associated, baskets and other supported objects at this site can carry an external ID of this type.

Responses

  • 200

    The external ID type was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

delete/shop/external-id-types/{externalIdType}/sites/{siteId}

Remove a site from an external ID type

deleteExternalIdTypeSite

Disables the the ExternalIdType for the given site.

Path parameters

Responses

  • 200

    The external ID type was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found