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

email

Yes

String

The customer's email address

cart_data

No

CartData, see below

Information about the customer's cart

cart_items

No

Array of CartItem, see below

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

Param Name

Required

Type

Description

cart_value

No

Integer

The total value of the cart in cents

cart_item_count

No

Integer

The total number of items in the cart

promo

No

String

Promo code applied to the cart

order_number

No

String

External ID for the order

return_url

No

String

Unique 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 Name

Required

Type

Description

product_id

Yes

String

The unique SKU or ID which identifies the product

name

No

String

The name of the product

price

No

Integer

The unit price of the product in cents

description

No

String

A short description of the product

category

No

Array(String)

Categories to which the product belongs

item_qty

No

Integer

The quantity of the product in the cart

qty_price

No

Integer

The total price of the price (price x quantity) in cents

product_url

No

String

The URL of the product on your site

image_url

No

String

The 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"
    }
  ]
}