Skip to content

Replace the store's swatches

PUT/admin/v1/stores/{store_id}/option-swatches
  • products:write

Replace the store's swatches, in order: each value name once (case doesn't matter), with a colour, a library photo, or both. At most 500.

Path parameters

  • store_idstringrequired

    The store's ID, like store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.

Headers

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • swatchesarray of objectsrequired

Returns

200 The swatches now.

Errors

  • 403forbiddenMissing permission.
  • 422validation_failedA name twice or blank, a colour that isn't one, a photo the library lacks, or nothing to show; see errors[].field.