Update a SKU
Changed onUpdate a SKU
Request
- Base URLhttps://{your_organization_slug}.commercelayer.io/api
- URLhttps://{your_organization_slug}.commercelayer.io/api/skus/{skuId}
- AuthHTTP bearer
Path parameters
The resource's id
Request body
Example request
{
"data": {
"id": "XAyRWNUzyN",
"attributes": {
"code": "TSHIRTMM000000FFFFFFXLXX",
"name": "Men's Black T-shirt with White Logo (XL)",
"description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"image_url": "https://img.yourdomain.com/skus/xYZkjABcde.png",
"pieces_per_pack": 6,
"weight": 300,
"unit_of_weight": "gr",
"hs_tariff_number": "4901.91.0020",
"reference": "ANY-EXTERNAL-REFEFERNCE",
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
"metadata": {
"foo": "bar"
}
},
"relationships": {
"shipping_category": {
"data": {
"id": "XAyRWNUzyN"
}
},
"tags": {
"data": {
"id": "XAyRWNUzyN"
}
}
}
}
}Response
The updated SKU object
Changes
- breaking
added the new required request property
/// - breaking
request property
//was restricted to a list of enum values - breaking
request property
/was restricted to a list of enum values - warning
removed the request property
/// - warning
removed the request property
/// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the
request property default valueskuswas removed - info
added the new
grenum value to the request property// - info
added the new
lbenum value to the request property// - info
added the new
ozenum value to the request property// - info
added the new
skusenum value to the request property/ - info
added the media type
application/vnd.api+jsonfor the response with the status
- breaking