Template Docs Commerce APIs Webhooks
Get Started
Get Started

Check a product image’s upload status

GET https://api.squarespace.com/{api-version}/commerce/products/{productId}/images/{imageId}/status

Retrieves the processing status for an uploaded product image.

A successful request indicates that a ProductImage is processing, ready, or in an error state. Read the Overview to learn more about this resource.

Poll this endpoint at a moderate interval suitable for your application’s needs.

Note: Uploads resulting in an error may be retried, but it’s strongly encouraged that these uploads are removed from the system since they may still render on websites as placeholder images. Use the Delete a product image endpoint before retrying an image upload.

Parameters

If necessary, see the "Related endpoints" section to learn how to retrieve parameter ids.

{api-version} string
required

See the Products API Overview page for the current API version.


{productId} string
required

Specifies the parent Product of the ProductImage.


{imageId} string
required

Specifies the ProductImage.

Request example

Read the Making requests guide to learn why specific headers are necessary, and why some are omitted. Every request should also abide by Squarespace rate limits.

curl "https://api.squarespace.com/{api-version}/commerce/products/123/images/456/status" \
 -i \
 -H "Authorization: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" \
 -H "User-Agent: YOUR_CUSTOM_APP_DESCRIPTION"

Response example

A successful request is met with a response containing the image’s status.

Note: For easier reference between the response field and description, a comment was added in the example, though this makes the JSON invalid.

{
  // Status of the image upload job.
  // Supported values: `PROCESSING`, `READY`, `ERROR`.
  "status": "PROCESSING"
}

Status codes and error conditions

200 OK

The request was successful. The message body contains data in the format specified above.


404 NOT FOUND

Type: INVALID_REQUEST_ERROR

Subtype: INVALID_ARGUMENT
Either the Product or the ProductImage was not found.

Related endpoints

To retrieve ids for Products and their ProductImages, use these suggested endpoints.