Cart

Upload a file for a customizable option

Stages a file for a file-type customizable option and returns a token. Send the token on add-to-cart as customizableOptions: { "<optionId>": ["<token>"] }. Requires the storefront key and a cart/customer Bearer token.

post/customizable-option-files

Request

Headers

X-STOREFRONT-KEYstring required

Storefront API Key for authentication. Required for all shop/storefront API requests.

X-Localestring
Example:en

Locale code for localized data (e.g. "en", "fr", "ar"). Defaults to channel's default locale.

X-Channelstring
Example:default

Channel code (e.g. "default"). Defaults to the current channel.

X-Currencystring
Example:USD

Currency code (e.g. "USD", "EUR", "INR"). Defaults to channel's base currency.

Request body multipart/form-data

product_idinteger required
option_idinteger required
filestring binary required

Example request

{
  "product_id": 2977,
  "option_id": 11
}

Response

File staged. Returns a token to send on add-to-cart.

Changes

No recorded changes to this operation across all 13 revisions of this API.