Get Products
POST/products
Retrieves product details information (e.g. price, description etc) for given items. The endpoing can return either a parent product containing it's variants or the variant/simple product itself.
Request
- application/json
Body
required
Array [
]
Array [
]
A unique identifier to track this request
Possible values: >= 3 characters
and <= 3 characters
The ISO 4217 code of a currency
metadata
object[]
Custom key-value pairs defined during cart creation
items
object[]
required
Cart's line items
Product ID
attributes
object
User selected attributes (e.g. color, size)
Responses
- 200
- 400
OK
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
- Parent
- simple
Array [
]
Array [
Array [
]
]
]
items
object[]
oneOf
Product's unique identifier
Indicates whether product is physical or virtual
attributes
object
Product attributes are the characteristics, such as color, size etc. that define a variation product or provide configuration information about a simple product. attributes object holds a list of attribute id/attribute value id pairs applied on this product. So for the following attribute applied on the product, {attribute_id => 1, attribute_label => color, attribute_option_label => black, attribute_option_id => 34}, this is expected as response: {'1':'34'}. These attributes are used during quote and order.
titled_attributes
object
Product attributes are the characteristics, such as color, size etc. that define a variation product or provide configuration information about a simple product. titled attributes object holds a list of attribute id title/attribute value title pairs applied on this product. So for the following attribute applied on the product, {attribute_id => 1, attribute_label => color, attribute_option_label => black, attribute_option_id => 34}, this is expected as response: {'color':'black'}. The titled attributes are only used in product display in UI and not in any subsequent api calls.
variations
object[]
Product's unique identifier
Indicates whether product is physical or virtual
attributes
object
Product attributes are the characteristics, such as color, size etc. that define a variation product or provide configuration information about a simple product. attributes object holds a list of attribute id/attribute value id pairs applied on this product. So for the following attribute applied on the product, {attribute_id => 1, attribute_label => color, attribute_option_label => black, attribute_option_id => 34}, this is expected as response: {'1':'34'}. These attributes are used during quote and order.
options
object[]
Attribute's unique identifier e.g attr_color
Attribute's user friendly title e.g Color
values
object[]
required
A list of possible values for this option
Value's unique identifier e.g. val_black
Value's user friendly title e.g Black
Product's unique identifier
Indicates whether product is physical or virtual
attributes
object
Product attributes are the characteristics, such as color, size etc. that define a variation product or provide configuration information about a simple product. attributes object holds a list of attribute id/attribute value id pairs applied on this product. So for the following attribute applied on the product, {attribute_id => 1, attribute_label => color, attribute_option_label => black, attribute_option_id => 34}, this is expected as response: {'1':'34'}. These attributes are used during quote and order.
{
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"items": [
null,
{}
]
}
{
"request_id": "af4ebaa6-7f47-4163-85af-d5b82a8cf4b0",
"items": [
{
"id": "123456",
"sku": "product-id-2",
"title": "Product 2",
"description": "Product 2 description",
"image_url": "https://www.mystore/com/assets/img/product-2.jpg",
"stock": 3,
"price_cents": 2000,
"shippable": true,
"options": [
{
"id": "attr_color",
"title": "Color",
"values": [
{
"id": "val_black",
"title": "Black"
},
{
"id": "val_white",
"title": "White"
}
]
},
{
"id": "attr_size",
"title": "Size",
"values": [
{
"id": "val_s",
"title": "S"
},
{
"id": "val_m",
"title": "M"
}
]
}
],
"variations": [
{
"id": "1234567",
"sku": "product-id-2-1",
"title": "Product 2-1",
"stock": 2,
"description": "Product 2-1 description",
"image_url": "https://www.mystore/com/assets/img/product-2-1.jpg",
"price_cents": 2200,
"shippable": true,
"attributes": {
"attr_size": "val_s",
"attr_color": "val_black"
}
},
{
"id": "12345678",
"sku": "product-id-2-2",
"title": "Product 2-2",
"stock": 3,
"description": "Product 2-2 description",
"image_url": "https://www.mystore/com/assets/img/product-2-2.jpg",
"price_cents": 2300,
"shippable": true,
"attributes": {
"attr_size": "val_m",
"attr_color": "val_black"
}
},
{
"id": "123456789",
"sku": "product-id-2-3",
"title": "Product 2-3",
"stock": 0,
"description": "Product 2-3 description",
"image_url": "https://www.mystore/com/assets/img/product-2-3.jpg",
"price_cents": 2200,
"shippable": true,
"attributes": {
"attr_size": "val_s",
"attr_color": "val_white"
}
},
{
"id": "1234567890",
"sku": "product-id-2-4",
"title": "Product 2-4",
"stock": 0,
"description": "Product 2-4 description",
"image_url": "https://www.mystore/com/assets/img/product-2-4.jpg",
"price_cents": 2350,
"shippable": true,
"attributes": {
"attr_size": "val_m",
"attr_color": "val_white"
}
}
]
}
]
}
Bad Request