This endpoint will convert the latest session for a customer based off an email address.

POST /customer/convert/

Payload Specification

Param NameRequiredTypeDescription
emailYesStringThe customer's email address
cart_dataNoCartData, see belowInformation about the customer's cart
cart_itemsNoArray of CartItem, see belowInformation 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

Param NameRequiredTypeDescription
cart_valueNoIntegerThe total value of the cart in cents
cart_item_countNoIntegerThe total number of items in the cart
promoNoStringPromo code applied to the cart
order_numberNoStringExternal ID for the order
return_urlNoStringUnique URL to return to the cart page

📘

Any additional params will be treated as strings and added to the metadata field 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

Param NameRequiredTypeDescription
product_idYesStringThe unique SKU or ID which identifies the product
nameNoStringThe name of the product
priceNoIntegerThe unit price of the product in cents
descriptionNoStringA short description of the product
categoryNoArray(String)Categories to which the product belongs
item_qtyNoIntegerThe quantity of the product in the cart
qty_priceNoIntegerThe total price of the price (price x quantity) in cents
product_urlNoStringThe URL of the product on your site
image_urlNoStringThe URL of an image or thumbnail of the product

📘

Any additional params will be treated as strings and added to the metadata field 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"
    }
  ]
}