Currently Supported Platforms
Creates a product in a merchant's store. A Rutter product must contain at least one variant, which is a specific configuration of the product & has an associated SKU. See Variants Array
below for more information.
Variants Array
The variants array specifies different configurations of a new product. Each object in the variant array must have an sku
value and contain an option_values
array.
If the product does not have multiple configurations, leave the option_values
array empty.
If a product has multiple configurations, the option_values
array for each variant will determine the differences. For example, a T-Shirt
product might have several variants that differ by Color
.
See the code sample below for 2 example POST bodies:
// A product with no variants
{
"product": {
// ... other Product fields
"variants": [
{
"sku": "my-product",
"option_values": [], // Leave option_values empty
"price": 123.45
}
]
}
}
// A product with two variants
{
"product": {
// ... other Product fields
"variants": [
{
"sku": "blue-shirt",
"option_values": [
{
"name": "Color",
"value": "Blue"
}
],
"price": 123.45,
"inventory": {
"total_count": 30
}
},
{
"sku": "red-shirt",
"option_values": [
{
"name": "Color", // Must be spelled exactly the same as above
"value": "Red"
}
],
"price": 100,
"inventory": {
"total_count": 90
}
}
]
}
}
It is important that inside option_values
the name
property values (e.g. Color
) stays the same across the different variants, otherwise Rutter will be unable to group these values together.
Platform Differences
Due to differences across Ecommerce platforms, Rutter enforces a set of standards to ensure that products will be successfully created with the same input. Calling the API with an invalid input will return an error. The standards are listed below, and please reach out to [email protected] if you have any special requirements:
- The product
name
allows for a max of 80 characters. - A max of 20
tags
are allowed per product. - Images must have a minimum resolution of 500x500 pixels.
- Image files must be no larger than 10mb.
- The
price
value inside of variants must be greater than 0. - The
option_values
array must contain less than or equal to 2 uniquename
values. For example, a valid product could havename
values ofColor
andSize
, but attempting to add another value would return an error. - Each product can have between 1 and 100 variants.
- Each variant can have a maximum of 1 image.
- Each product can have a maximum of 6 images.
Magento
Due to limitations of the Magento API, variants are created asynchronously after the Create API call succeeds. You will be notified via a webhook of PRODUCT_UPDATED if images are created successfully, or a PRODUCT_FINISH_FAILED webhook indicating with reasons why the product create fails.
PrestaShop
Due to limitations of the PrestaShop API, variants are created asynchronously after the Create API call succeeds. You will be notified via a webhook of PRODUCT_UPDATED if images are created successfully, or a PRODUCT_FINISH_FAILED webhook indicating with reasons why the product create fails.
Async Image Create
Because images takes much longer for platforms to process than the rest of the platforms, all images are created asynchronously after the Create API call succeeds. You will be notified via a webhook of PRODUCT_UPDATED if images are created successfully, or a PRODUCT_FINISH_FAILED webhook indicating with reasons why the product create fails.