Update variants in catalog
Allows batch updates of variants in the catalog.
PATCH
/catalog/product/variant/
curl \
-X PATCH https://m2e.cloud/api/v1/api/catalog/product/variant/ \
-H "Content-Type: application/json" \
-d '{"variants":[{"sku":"test-product-SKU","barcode":"012345678905","price":99.99,"quantity":17,"images":["https://example.com/image.jpg"],"options":[{"name":"Size","value":"Medium"}],"attributes":[{"name":"material","value":"cotton"}]}]}'
Request examples
{
"variants": [
{
"sku": "test-product-SKU",
"barcode": "012345678905",
"price": 99.99,
"quantity": 17,
"images": [
"https://example.com/image.jpg"
],
"options": [
{
"name": "Size",
"value": "Medium"
}
],
"attributes": [
{
"name": "material",
"value": "cotton"
}
]
}
]
}
Response examples (200)
# Headers
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 90
X-RateLimit-Retry-After: 2022-11-04T13:43:28Z
# Payload
{
"updated": 10
}
Response examples (400)
[
{
"code": null,
"message": "All array items must match schema"
},
{
"code": null,
"message": "The required properties (currency) are missing"
}
]
Response examples (404)
[
{
"code": 404,
"message": "Entity is not found."
}
]
Response examples (401)
[
{
"code": 401,
"message": "Unauthorized"
}
]
Response examples (429)
[
{
"code": 429,
"message": "Too many requests."
}
]
Response examples (500)
[
{
"code": 500,
"message": "Internal server error."
}
]