POST /catalog/products/{product_id}/variants/{variant_id}/image

Creates a Variant Image.

Only one image can be explicitly associated with a Variant. If the Variant already has an associated image, overwrites the existing Variant Image.

The image displays on the storefront when the Variant is selected.

Required Fields

Servers

Path parameters

Name Type Required Description
product_id Integer Yes

The ID of the Product to which the resource belongs. Product variant metafield endpoints that have the product_id in the request path are successful as long as the parameter is not empty. The product_id segment is there only for path consistency.

variant_id Integer Yes

ID of the variant on a product, or on an associated Price List Record.

Request headers

Name Type Required Description
Accept String Yes

The MIME type of the response body.

Default value: "application/json"

Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
image_url String No

A public URL for a GIF, JPEG, or PNG image. Limit of 8MB per file.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.