Update a product image
Alt text, position, primary flag, visibility, the owning variant, the
image kind, a video's poster, and (with extra_variant_ids) the other
variants the image is shared with. Emits the product.image.updated
webhook.
Authorization
bearer_auth Authorization: Bearer <token>. Either a session access token from POST /auth/login (refresh it with POST /auth/refresh) or a store API token (mobi_st_…). A store API token works only for the store it was issued in, and can do at most what its issuing user can there, narrowed to the scopes it was issued with.
In: header
Path Parameters
Store id
uuidProduct id
uuidImage id
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/images/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{
"alt_text": "string",
"cdn_url": "string",
"created_at": "2019-08-24T14:15:22Z",
"extra_variant_ids": [
"b2141a49-c616-47cb-817a-ab59b7d403de"
],
"file_path": "string",
"file_size_bytes": 0,
"filename": "string",
"height": 0,
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"image_kind": "string",
"image_size": "string",
"is_active": true,
"is_primary": true,
"media_type": "string",
"mime_type": "string",
"original_filename": "string",
"position": 0,
"poster_url": "string",
"product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
"product_variant_id": "3346b03a-4660-4dfb-b5d0-e13608e6ced8",
"provider": "string",
"updated_at": "2019-08-24T14:15:22Z",
"width": 0
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}