This endpoint will convert the latest session for a customer based off an email address.
POST /customer/convert/
Payload Structure:
| 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 Payload Structure:
| 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 | A unique url to return to the cart page |
Any additional params will be treated as strings and added to the
metadatafield of the cart.
Cart Item Payload Structure:
| 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 of Strings | Categories which the product belongs to |
item_qty |
No | Integer | The quantity of the product in the cart |
qty_price |
No | Integer | The total price of the product (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
metadatafield of the cart item.
Example Payload:
{
"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"
}
]
}
This endpoint will immediately stop any active journeys for a specific customer.
POST /customer/cancel/
Payload Structure:
| Param Name | Required | Type | Description |
|---|---|---|---|
email |
Yes | String | The email address of the customer |
Example Payload:
{"email": "[email protected]"}
This endpoint will unsubscribe a customer from receiving emails from Rejoiner.
POST /customer/unsubscribe/
Payload Structure:
| Param Name | Required | Type | Description |
|---|---|---|---|
email |
Yes | String | The email address of the customer |
Example Payload:
{"email": "[email protected]"}
This endpoint will record the explicit consent of a customer in Rejoiner.
POST /customer/opt_in/
Payload Structure:
| Param Name | Required | Type | Description |
|---|---|---|---|
email |
Yes | String | The email address of the customer |
Any additional fields will be treated as strings and stored along with the record of explicit consent. This will allow you to store any additional information you find necessary regarding how the consent was received.
Example Payload:
{
"email": "[email protected]",
"type": "accepts marketing checkbox",
"otherInfo": "accepted marketing on checkout page"
}
This endpoint will return the customer profile data stored in Rejoiner. You can use either the Rejoiner Customer ID or the customer's email address.
GET /customers/CUSTOMER_ID/
GET /customers/EMAIL/
Example Response:
{
"id": "foobar",
"email": "[email protected]",
"first_name": "Madonna",
"last_name": "Lewis",
"phone": "",
"timezone": "",
"age": 49,
"gender": "",
"language": "",
"address1": "1505 Dogwood Lane",
"address2": "",
"address3": "",
"city": "Tucson",
"state": "AZ",
"postal_code": "85705",
"country": "US",
"birthdate":"1969-10-26",
"tags": [
"foo",
"bar"
],
"is_unsubscribed": false,
"unsubscribe_date": null,
"is_opted_in": true,
"opt_in_date":"2018-05-25T05:35:31.803626",
"opt_in_info":{},
"metadata": {
"foo": "bar"
}
}
This endpoint will create the customer profile record.
POST /customers/
Payload Structure:
| Param Name | Required | Type | Description |
|---|---|---|---|
email |
Yes | String | The email address of the customer |
first_name |
No | String | The first name of the customer |
last_name |
No | String | The last name of the customer |
phone |
No | String | The phone number of the customer |
timezone |
No | String | The timezone of the customer |
age |
No | Number | The age of the customer |
gender |
No | String | Can be either m or f |
language |
No | String | No more than 2 characters |
address1 |
No | String | Street address line 1 |
address2 |
No | String | Street address line 2 |
address3 |
No | String | Street address line 3 |
city |
No | String | Customer address city |
state |
No | String | Customer address state |
postal_code |
No | String | Customer address zip code |
country |
No | String | Customer address country |
birthdate |
No | String | Must match format YYYY-MM-DD |
tags |
No | Array of strings | Customer Tags |
metadata |
No | JSON Object | Any arbitrary data about the customer |
This endpoint will update the customer profile record. You can use either the Rejoiner Customer ID or the customer's email address.
PUT /customers/CUSTOMER_ID/
PUT /customers/EMAIL/
Payload Structure:
| Param Name | Required | Type | Description |
|---|---|---|---|
email |
Yes | String | The email address of the customer |
first_name |
No | String | The first name of the customer |
last_name |
No | String | The last name of the customer |
phone |
No | String | The phone number of the customer |
timezone |
No | String | The timezone of the customer |
age |
No | Number | The age of the customer |
gender |
No | String | Can be either m or f |
language |
No | String | No more than 2 characters |
address1 |
No | String | Street address line 1 |
address2 |
No | String | Street address line 2 |
address3 |
No | String | Street address line 3 |
city |
No | String | Customer address city |
state |
No | String | Customer address state |
postal_code |
No | String | Customer address zip code |
country |
No | String | Customer address country |
birthdate |
No | String | Must match format YYYY-MM-DD |
tags |
No | Array of strings | Customer Tags |
metadata |
No | JSON Object | Any arbitrary data about the customer |
The
metadatafield will accept a JSON object, but individual keys cannot later be updated separately. When updatingmetadataany previously existing metadata will be replaced.