Body Required
A list of products to create.
-
Stock Keeping Unit (SKU).
Minimum length is
1
. -
Product statuses (e.g., 1 = Active, 2 = Inactive, 3 = Disabled, 4 = Preorder, 5 = Available, 7 = Draft, 8 = Pending, 9 = Private, 10 = Publish, 11 = Archived).
Values are
1
,2
,3
,4
,5
,7
,8
,9
,10
, or11
. -
Indicates whether the product is a simple product (true) or has variants (false).
-
The currency code for the product's pricing, in ISO 4217 format (e.g., USD, EUR).
Minimum length is
3
, maximum length is3
. Format should match the following pattern:^[A-Z]{3}$
. -
The title or name of the product.
-
description string
A detailed description of the product.
-
images array[string(url)]
URL of the product image.
-
attributes array[object]
A list of key-value pairs representing attributes.
-
A list of product variants.
At least
1
element.
POST
/catalog/product/
curl \
-X POST https://m2e.cloud/api/v1/api/catalog/product/ \
-H "Content-Type: application/json" \
-d '[{"sku":"test-product-SKU","status":1,"is_simple":false,"currency":"USD","title":"Wireless Bluetooth Headphones","description":"High-quality wireless Bluetooth headphones with noise-cancelling feature.","images":["https://example.com/product-image.jpg"],"attributes":[{"name":"material","value":"cotton"}],"variants":[{"sku":"WBH-12345","barcode":"012345678905","price":79.99,"quantity":100,"images":["https://example.com/variant-image1.jpg"],"options":[{"name":"Size","value":"Medium"}],"attributes":[{"name":"material","value":"cotton"}],"weight":0.5,"weight_unit":"GRAMS","height":10.0,"depth":5.0,"width":8.0,"dimension_unit":"CENTILITERS"}]}]'
Request examples
[
{
"sku": "test-product-SKU",
"status": 1,
"is_simple": false,
"currency": "USD",
"title": "Wireless Bluetooth Headphones",
"description": "High-quality wireless Bluetooth headphones with noise-cancelling feature.",
"images": [
"https://example.com/product-image.jpg"
],
"attributes": [
{
"name": "material",
"value": "cotton"
}
],
"variants": [
{
"sku": "WBH-12345",
"barcode": "012345678905",
"price": 79.99,
"quantity": 100,
"images": [
"https://example.com/variant-image1.jpg"
],
"options": [
{
"name": "Size",
"value": "Medium"
}
],
"attributes": [
{
"name": "material",
"value": "cotton"
}
],
"weight": 0.5,
"weight_unit": "GRAMS",
"height": 10.0,
"depth": 5.0,
"width": 8.0,
"dimension_unit": "CENTILITERS"
}
]
}
]
Response examples (200)
# Headers
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 90
X-RateLimit-Retry-After: 2022-11-04T13:43:28Z
# Payload
{
"deleted": 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."
}
]