This endpoint will convert the latest session for a customer based off an email address.
POST /customer/convert/Payload Specification
Param Name | Required | Type | Description |
|---|---|---|---|
| Yes | String | The customer's email address |
| No |
| Information about the customer's cart |
| No | Array of | Information about the items in a customer's cart |
Cart Data
The CartData object is on the cart_data key of the conversion payload and includes metadata that describes the user's total cart.
CartData Specification
CartData SpecificationParam Name | Required | Type | Description |
|---|---|---|---|
| No | Integer | The total value of the cart in cents |
| No | Integer | The total number of items in the cart |
| No | String | Promo code applied to the cart |
| No | String | External ID for the order |
| No | String | Unique URL to return to the cart page |
Any additional params will be treated as strings and added to themetadatafield of the cart.
Cart Item
Each CartItem is an object in an array on the cart_item key of the conversion payload and includes metadata about the specific products in the user's cart.
CartItem Specification
CartItem SpecificationParam Name | Required | Type | Description |
|---|---|---|---|
| Yes | String | The unique SKU or ID which identifies the product |
| No | String | The name of the product |
| No | Integer | The unit price of the product in cents |
| No | String | A short description of the product |
| No | Array(String) | Categories to which the product belongs |
| No | Integer | The quantity of the product in the cart |
| No | Integer | The total price of the price (price x quantity) in cents |
| No | String | The URL of the product on your site |
| No | String | The URL of an image or thumbnail of the product |
Any additional params will be treated as strings and added to themetadatafield of the cart item.
{
"email": "[email protected]",
"cart_data": {
"cart_value": 2000,
"cart_item_count": 3,
"promo": "SALE",
"return_url": "http://example.com/cart/12345/"
},
"cart_items": [
{
"product_id": "12345",
"name": "Product #1",
"price": 1000,
"description": "A product",
"category": ["cool", "products"],
"item_qty": 1,
"qty_price": 1000,
"product_url": "http://example.com/products/12345",
"image_url": "http://example.com/products/img/12345.jpg"
},
{
"product_id": "54321",
"name": "Product #2",
"price": 500,
"description": "Another product",
"category": ["awesome", "products"],
"item_qty": 2,
"qty_price": 1000,
"product_url": "http://example.com/products/54321",
"image_url": "http://example.com/products/img/54321.jpg"
}
]
}