Delete a product
DELETE https://api.squarespace.com/{api-version}/commerce/products/{id}
Deletes a physical product, including any variants and images.
A successful request deletes a Product
and any ProductVariant
and ProductImage
subresources.
Read the Overview to learn more about these resources.
Parameters
If needed, see the "Related endpoints" section to learn how to retrieve a resource id.
{api-version}
string
required
See the Products API Overview page for the current API version.
{id}
string
required
Specifies the Product
to delete.
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/1.0/commerce/products/123" \
-i \
-H "Authorization: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" \
-H "User-Agent: YOUR_CUSTOM_APP_DESCRIPTION" \
-X DELETE
Response example
A response to a successful request will not contain any data.
Status codes and error conditions
204 NO CONTENT
The Product
was deleted successfully.
404 NOT FOUND
Type: INVALID_REQUEST_ERROR
Subtype: INVALID_ARGUMENT
The requested Product
was not found.
405 METHOD NOT ALLOWED
Type: METHOD_NOT_ALLOWED
Subtype: OPERATION_NOT_ALLOWED_FOR_PRODUCT_TYPE
The Product
requested is not a physical Product
.
Related endpoints
To retrieve ids for a Product
, the retrieve all products endpoint
is suggested, though other Products API endpoints may be used.