Update a product
PATCH
/products/{product_id}Authorization
X-API-KeyAPI key · headerrequiredAPI key in format `sk_*`. Scoped to your partner account; server-side use only.
Path parameters
product_idstring<uuid>requiredRequest body
requiredapplication/jsondimensionsDimensionsShow propertiesHide properties
heightnumberrequiredlengthnumberrequiredunitstringrequiredAllowed:
incmwidthnumberrequiredimage_urlstring<uri> | nullnamestringskustringupcstring | nullweightWeightShow propertiesHide properties
unitstringrequiredAllowed:
ozgvaluenumberrequiredResponses
200Catalog product updated.
dimensionsDimensionsrequiredShow propertiesHide properties
heightnumberrequiredlengthnumberrequiredunitstringrequiredAllowed:
incmwidthnumberrequiredimage_urlstring<uri> | nullnamestringrequiredskustringrequiredUnique within the partner organization.
upcstring | nullweightWeightrequiredShow propertiesHide properties
unitstringrequiredAllowed:
ozgvaluenumberrequiredcreated_atstring<date-time>requiredproduct_idstring<uuid>requiredupdated_atstring<date-time>required400Validation failed.
codeErrorCoderequiredStable machine-readable error vocabulary for v1.
Allowed:
validation_errorstate_conflictenvironment_mismatchunsupported_destinationinvalid_api_keynot_foundrate_limitedextraobjectrequiredStructured details such as field errors or SKU availability.
messagestringrequiredHuman-readable summary.
401Missing, invalid, expired, or environment-mismatched API key.
codeErrorCoderequiredStable machine-readable error vocabulary for v1.
Allowed:
validation_errorstate_conflictenvironment_mismatchunsupported_destinationinvalid_api_keynot_foundrate_limitedextraobjectrequiredStructured details such as field errors or SKU availability.
messagestringrequiredHuman-readable summary.
404No such resource exists for this partner and environment.
codeErrorCoderequiredStable machine-readable error vocabulary for v1.
Allowed:
validation_errorstate_conflictenvironment_mismatchunsupported_destinationinvalid_api_keynot_foundrate_limitedextraobjectrequiredStructured details such as field errors or SKU availability.
messagestringrequiredHuman-readable summary.
409The resource state prevents the requested action.
codeErrorCoderequiredStable machine-readable error vocabulary for v1.
Allowed:
validation_errorstate_conflictenvironment_mismatchunsupported_destinationinvalid_api_keynot_foundrate_limitedextraobjectrequiredStructured details such as field errors or SKU availability.
messagestringrequiredHuman-readable summary.
429Rate limit exceeded for this API key.
codeErrorCoderequiredStable machine-readable error vocabulary for v1.
Allowed:
validation_errorstate_conflictenvironment_mismatchunsupported_destinationinvalid_api_keynot_foundrate_limitedextraobjectrequiredStructured details such as field errors or SKU availability.
messagestringrequiredHuman-readable summary.
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PATCH "https://api.vault.stashtab.gg/v1/products/497f6eca-6276-4993-bfeb-53cbbbba6f08" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dimensions": {
"height": 0,
"length": 0,
"unit": "in",
"width": 0
},
"image_url": "http://example.com",
"name": "string",
"sku": "string",
"upc": "string",
"weight": {
"unit": "oz",
"value": 0
}
}'const response = await fetch("https://api.vault.stashtab.gg/v1/products/497f6eca-6276-4993-bfeb-53cbbbba6f08", {
method: "PATCH",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"dimensions": {
"height": 0,
"length": 0,
"unit": "in",
"width": 0
},
"image_url": "http://example.com",
"name": "string",
"sku": "string",
"upc": "string",
"weight": {
"unit": "oz",
"value": 0
}
})
});Response
{
"dimensions": {
"height": 0,
"length": 0,
"unit": "in",
"width": 0
},
"image_url": "http://example.com",
"name": "string",
"sku": "string",
"upc": "string",
"weight": {
"unit": "oz",
"value": 0
},
"created_at": "2019-08-24T14:15:22Z",
"product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
"updated_at": "2019-08-24T14:15:22Z"
}{
"code": "validation_error",
"extra": {},
"message": "string"
}{
"code": "validation_error",
"extra": {},
"message": "string"
}{
"code": "validation_error",
"extra": {},
"message": "string"
}{
"code": "validation_error",
"extra": {},
"message": "string"
}{
"code": "validation_error",
"extra": {},
"message": "string"
}