Replace a product
Replaces a product identified by its Corso ID. Only products created through this API can be updated. The body carries the product's full representation, so any field omitted from it is cleared and any variant omitted from it is marked as removed. The handle cannot be changed.
Path Parameters
- productId number required
The Corso ID for the product
Example: 902113
- application/json
Request Body
- title string
The title of the product.
- vendor string
The vendor of the product.
- productType string
The product type.
- tags string[]
Possible values: Value must match regular expression
^[^,]*$The tags applied to the product. A tag cannot contain a comma.
- status string
Possible values: [
active,archived,draft]The status of the product. Defaults to
active. - imageUrl uri
A publicly reachable http(s) image URL for the product. Corso stores the URL as given and does not re-host the image.
variants object[] required
Possible values:
>= 1The complete set of variants for the product. Any variant previously stored but omitted here is marked as removed.
Array [barcode stringThe barcode, UPC, or ISBN for the variant.
options object[] required
The option values that identify this variant, for example
[{ "name": "Size", "value": "Small" }]. The order does not affect the variant's identity, but it is preserved, so send them in the order you want the variant's display name composed in. Send an empty array for a product with a single, unvaried variant.Array [name string requiredThe name of the option.
value string requiredThis variant's value for the option.
]sku stringThe stock keeping unit (SKU) for the variant.
grams integerThe weight of the variant in whole grams.
price stringPossible values: Value must match regular expression
^\d{1,8}(\.\d{1,2})?$The price of the variant, as a plain decimal amount without a currency symbol or thousands separators. Interpreted in the store's currency.
compareAtPrice stringPossible values: Value must match regular expression
^\d{1,8}(\.\d{1,2})?$The compare-at (list) price of the variant.
unitCost stringPossible values: Value must match regular expression
^\d{1,8}(\.\d{1,2})?$The cost of goods for the variant.
imageUrl uriA publicly reachable http(s) image URL for the variant. Corso stores the URL as given and does not re-host the image.
]
- 200
- 400
- 401
- 403
- 404
- 429
OK
- application/json
- Schema
- Example (from schema)
Schema
- productId number required
The Corso ID of the product. Use this for all subsequent reads, updates, and deletes.
- storeId number required
The Corso ID of the store that the product belongs to.
- handle string required
The handle that identifies the product. Sending the same handle to
POST /productsupdates this product rather than creating a new one. - title string
The title of the product.
- vendor string
The vendor of the product.
- productType string
The product type.
- tags string[]
The tags applied to the product.
- status string required
Possible values: [
active,archived,draft]The status of the product. Only
activeproducts are usable in Corso. - imageUrl string
A publicly reachable image URL for the product. Corso stores the URL as given and does not re-host the image.
options object[]
The options defined across the product's variants.
Array [name string requiredThe name of the option.
position number requiredThe 1-based position of the option on the product, following the order the options were sent in.
values string[] requiredEvery value used for this option across all variants.
]variants object[] required
The variants of the product.
Array [variantId number requiredThe Corso ID of the variant.
options object[] required
The option values that identify this variant. This combination is the variant's identity, so the variant keeps its
variantIdacross writes for as long as the values are unchanged, no matter what order they are sent in. The order is preserved here and in the product'soptions, and determines how Corso composes the variant's display name.Array [name string requiredThe name of the option.
value string requiredThis variant's value for the option.
]sku stringThe stock keeping unit (SKU) for the variant.
barcode stringThe barcode, UPC, or ISBN for the variant.
grams numberThe weight of the variant in grams.
price stringThe price of the variant, in the store's currency.
compareAtPrice stringThe compare-at (list) price of the variant.
unitCost stringThe cost of goods for the variant.
imageUrl stringA publicly reachable image URL for the variant. Corso stores the URL as given and does not re-host the image.
title stringThe variant title Corso derives from its option values, or the product title for a single-variant product.
displayName stringThe customer-facing name Corso shows for the variant.
displayPosition numberThe 1-based position of the variant, following the order the variants were sent in.
]- createdOn date-time
The date/time when the product was created in Corso.
- updatedOn date-time
The date/time when the product was last updated in Corso.
- deletedOn date-time
The date/time when the product was deleted, if it has been. A deleted product is still retrievable but is excluded from returns, exchanges, and search results.
{
"productId": 902113,
"storeId": 6734,
"handle": "vintage-tee-2019",
"title": "Vintage Tee (2019)",
"vendor": "Acme",
"productType": "Shirts",
"tags": [
"archive",
"2019"
],
"status": "active",
"imageUrl": "https://cdn.example.com/products/vintage-tee.jpg",
"options": [
{
"name": "Size",
"position": 1,
"values": [
"Small",
"Medium",
"Large"
]
}
],
"variants": [
{
"variantId": 5512331,
"options": [
{
"name": "Size",
"value": "Small"
}
],
"sku": "VT-2019-S",
"barcode": "012345678905",
"grams": 180,
"price": "29.99",
"compareAtPrice": "39.99",
"unitCost": "11.50",
"imageUrl": "https://cdn.example.com/products/vintage-tee-small.jpg",
"title": "Small",
"displayName": "Vintage Tee (2019) - Small",
"displayPosition": 1
}
],
"createdOn": "2024-01-20T14:45:00Z",
"updatedOn": "2024-01-21T09:15:00Z",
"deletedOn": "2024-03-02T11:00:00Z"
}
Bad Request
Unauthorized
Forbidden
Not Found
Too Many Requests
Response Headers
RateLimit-Limit integer
The maximum number of requests allowed in the current window.
RateLimit-Remaining integer
The number of requests remaining in the current window.
RateLimit-Reset integer
The number of seconds until the current rate limit window resets.
Retry-After integer
The number of seconds to wait before retrying (only present when rate limited).