Search.../
  1. Home
  2. Getting Started
  3. Overview
Generate a test token to explore our APIs

Remove Product Media From Choices

Developer Preview

Removes media items from all or some of a product's choices. (Media items can only be set for choices within one option at a time - e.g., if you set media items for some or all of the choices within the Colors option (blue, green, and red), you won't be able to also assign media items to choices within the Size option (S, M, and L).)

Authorization

This endpoint requires an authorization header - pass the access token from the OAuth installation flow.

Permissions

This endpoint requires the Manage Products permission scope.

POST

https://www.wixapis.com/stores/v1/products/{id}/choices/media/delete

Path Params

NAME
TYPE
DESCRIPTION
id
Required

string

Product ID.

Body Params

NAME
TYPE
DESCRIPTION
media

Array<object>

Optional - if an empty array is passed, all media will be removed from all choices.

Response Object

Returns an empty object.

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Request

curl

Copy Code
1curl -X POST \
2 'https://www.wixapis.com/stores/v1/products/1044e7e4-37d1-0705-c5b3-623baae212fd/choices/media/delete' \
3 --data-binary '{
4 "option": "Color",
5 "choice": "blue",
6 "mediaIds": [
7 "9cc22d8b8d5244aba9ed73fb1783fc26.jpg",
8 "fljseif3l4ij3l4ijl3r32fwfwf23234.jpg"
9 ]
10 }' \
11 -H 'Content-Type: application/json' \
12 -H 'Authorization: <AUTH>'

Response

json

1
2{}