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_idstringrequiredThe store's ID, like
store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.
Headers
shop-api-versionYYYY-MMThe version to answer in. Without it, your app’s pinned version, else the newest.
Body
swatchesarray of objectsrequired
Returns
200 The swatches now.
Errors
- 403
forbiddenMissing permission. - 422
validation_failedA name twice or blank, a colour that isn't one, a photo the library lacks, or nothing to show; seeerrors[].field.