v50

latestOpenAPI 3.0.0raw.githubusercontent.com2026-05-29208421.4 MB
SKU file

Update SKU file

Updates a new image on an SKU based on its URL or on a form-data request body.

Permissions

Any user or API key must have at least one of the appropriate License Manager resources to be able to successfully run this request. Otherwise they will receive a status code 403 error. These are the applicable resources for this endpoint:

ProductCategoryResource
CatalogContentSKUs

There are no applicable predefined roles for this resource list. You must create a custom role and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see Authentication overview.

❗ To prevent integrations from having excessive permissions, consider the best practices for managing API keys when assigning License Manager roles to integrations.

put/api/catalog/pvt/stockkeepingunit/{skuId}/file/{skuFileId}

Path parameters

skuIdinteger required
Example:123456

SKU's unique numerical identifier.

skuFileIdinteger required
Example:517

ID of the association of the SKU and the image, which can be obtained by placing a request to the Get SKU file endpoint and copying the Id field.

Headers

Content-Typestring required

Type of the content being sent.

Acceptstring required

HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.

Request body

IsMainboolean

Defines if the image is the main image of the SKU.

Labelstring

SKU image label.

Namestring required

SKU image name.

Textstring nullable

General text of the image.

Urlstring required

External image's URL. The URL must start with the protocol identifier (http:// or https://) and end with the file extension (.jpg, .png or .gif).

Positioninteger

Position of the SKU image as displayed in the storefront, where 0 corresponds to the first position, 1 to the second position, and so on. Note that:

  • When isMain is true, the image position will always be 0.
  • When you configure more positions than the number of images, the count will jump a position. For example, if you have images in positions 0, 1, 2, and you update image 1 to position 3, you will have 0, 2, 3.
  • If you configure images for the same position, they will both occupy it. For example, for images 0, 1, 2, if you update image 2 for position 1, you will have 0, 1, 1. When in position conflict, images will be ordered by image ID.

You can reorganize all image positions using the Reorder SKU files endpoint, or via VTEX Admin, on the SKU editing page.

Example request

{
  "IsMain": true,
  "Label": "Main",
  "Name": "Nike-Red-Janoski-1",
  "Text": "Nike-Red-Janoski",
  "Url": "https://m.media-amazon.com/images/I/610G2-sJx5L._AC_UX695_.jpg"
}

Response

OK

Idinteger

Unique identifier of the association of the image to the SKU.

ArchiveIdinteger

Unique identifier of the image.

SkuIdinteger

SKU unique identifier.

Namestring

Image name.

IsMainboolean

Defines if the image is the SKU main image (true) or not (false). This field will always be true when the image Position is 0, and false otherwise.

Textstring

SKU image text.

Labelstring nullable

Image label.

Urlstring

SKU image URL.

FileLocationstring

Location where the file is stored.

Positioninteger

Position of the SKU image as displayed in the storefront, where 0 corresponds to the first position, 1 to the second position, and so on. The position 0 will always make the isMain value true.