Abandoned cart emails

Abandoned Cart Emails

Abandoned Cart Emails V3 API managing Handlebars-based emails.

Get all abandoned cart email templates

GET /marketing/abandoned-cart-emails

Request

An array of abandoned cart emails pertaining to a store.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • channel_id in query - integer
    Channel ID to use for channel-level data.

example

curl --request GET \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/marketing/abandoned-cart-emails' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'

Response

OK

Body

object | application/json
  • data
    array[object]

  • meta
    object

    Response metadata.

List of abandoned cart templates

{
"data": [
{
"id": 1,
"notify_at_minutes": 60,
"coupon_code": "FF11-22X4",
"template": {
"subject": "Complete your purchase at {{ store.name }}",
"body": "Complete your purchase <a href=\"{{ notification.checkout_link }}\">{{notification.checkout.link}}",
"translations": [
{
"locale": "en",
"keys": {
"hello_phrase": "Welcome back,"
}
}
]
}
}
],
"meta": {}
}

Create abandoned cart email template

POST /marketing/abandoned-cart-emails

Request

Create an Abandoned Cart Email template.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • channel_id in query - integer
    Channel ID to use for channel-level data.
  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.

Body

object | application/json
  • is_active
    boolean

  • coupon_code
    string

    Example: FF11-22X4
  • notify_at_minutes
    integer

    Describes when this email will be sent, in minutes. Only supports certain intervals described in the enum.

    Allowed: 60 | 120 | 180 | 240 | 300 | 360 | 420 | 480 | 540 | 600 | 660 | 720 | 780 | 840 | 900 | 960 | 1020 | 1080 | 1140 | 1200 | 1260 | 1320 | 1380 | 1440 | 2880 | 4320 | 5760 | 7200 | 8640 | 10080 | 11520 | 12960 | 14400

    Example: 60
  • template
    object

Add active abandoned cart email template

{
"is_active": true,
"coupon_code": "FF11-22X4",
"notify_at_minutes": 60,
"template": {
"subject": "Complete your purchase at {{ store.name }}",
"body": "{{lang 'hello_phrase' }}<br>Complete your purchase <a href='{{ notification.checkout_link }}'>{{notification.checkout.link}}",
"translations": [
{
"locale": "en",
"keys": {
"hello_phrase": "Welcome"
}
}
]
}
}

Response

OK

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

{
"data": {
"id": 1,
"notify_at_minutes": 60,
"coupon_code": "FF11-22X4",
"template": {
"subject": "'Complete your purchase at {{ store.name }}'",
"body": "'Complete your purchase <a href=\"{{ notification.checkout_link }}\">{{notification.checkout.link}}'",
"translations": [
{
"locale": "en",
"keys": {
"property1": "string",
"property2": "string"
}
}
]
},
"is_active": true,
"sent_num": 0
},
"meta": {}
}

Get an email template

GET /marketing/abandoned-cart-emails/{id}

Request

Get a single Abandoned Cart Email template.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • id in path - integer
    required
    ID of the Abandoned Cart Email template.
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.

example

curl --request GET \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/marketing/abandoned-cart-emails/[id]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'

Response

OK

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

{
"data": {
"id": 1,
"notify_at_minutes": 60,
"coupon_code": "FF11-22X4",
"template": {
"subject": "'Complete your purchase at {{ store.name }}'",
"body": "'Complete your purchase <a href=\"{{ notification.checkout_link }}\">{{notification.checkout.link}}'",
"translations": [
{
"locale": "en",
"keys": {
"property1": "string",
"property2": "string"
}
}
]
},
"is_active": true,
"sent_num": 0
},
"meta": {}
}

Update an email template

PUT /marketing/abandoned-cart-emails/{id}

Request

Update an email template.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • id in path - integer
    required
    ID of the Abandoned Cart Email template.
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.

Body

object | application/json
  • is_active
    boolean

  • coupon_code
    string

    Example: FF11-22X4
  • notify_at_minutes
    integer

    Describes when this email will be sent, in minutes. Only supports certain intervals described in the enum.

    Allowed: 60 | 120 | 180 | 240 | 300 | 360 | 420 | 480 | 540 | 600 | 660 | 720 | 780 | 840 | 900 | 960 | 1020 | 1080 | 1140 | 1200 | 1260 | 1320 | 1380 | 1440 | 2880 | 4320 | 5760 | 7200 | 8640 | 10080 | 11520 | 12960 | 14400

    Example: 60
  • template
    object

Update Abandoned Cart Email template

{
"is_active": true,
"coupon_code": "FF11-22X4",
"notify_at_minutes": 60,
"template": {
"subject": "Complete your purchase at {{ store.name }}",
"body": "Complete your purchase <a href=\"{{ notification.checkout_link }}\">{{notification.checkout.link}}",
"translations": [
{
"locale": "en",
"keys": {
"hello_phrase": "Welcome back,"
}
}
]
}
}

Enable email

{
"is_active": true
}

Disable email

{
"is_active": false
}

Update coupon code and notification time

{
"coupon_code": "FF11-22X4",
"notify_at_minutes": 60
}

Response

OK

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

{
"data": {
"id": 1,
"notify_at_minutes": 60,
"coupon_code": "FF11-22X4",
"template": {
"subject": "'Complete your purchase at {{ store.name }}'",
"body": "'Complete your purchase <a href=\"{{ notification.checkout_link }}\">{{notification.checkout.link}}'",
"translations": [
{
"locale": "en",
"keys": {
"property1": "string",
"property2": "string"
}
}
]
},
"is_active": true,
"sent_num": 0
},
"meta": {}
}

Delete email template

DELETE /marketing/abandoned-cart-emails/{id}

Request

Delete Abandoned Cart Email template.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • id in path - integer
    required
    ID of the Abandoned Cart Email template.
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.

example

curl --request DELETE \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/marketing/abandoned-cart-emails/[id]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'

Response

No Content

Get default email template

GET /marketing/abandoned-cart-emails/default

Request

Return default Abandoned Cart Email template.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.

example

curl --request GET \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/marketing/abandoned-cart-emails/default' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'

Response

OK

Body

object | application/json
  • subject
    string
    required

    >= 1 characters
  • body
    string
    required

    >= 1 characters
  • translations
    array[object]
    required

example-1

{
"subject": "Complete your purchase at {{ store.name }}",
"body": "{{lang 'hello_phrase'}} Complete your purchase <a href=\"{{ notification.checkout_link }}\">{{notification.checkout.link}}",
"translations": [
{
"locale": "en",
"keys": {
"hello_phrase": "Welcome back"
}
}
]
}

See something you can improve? Edit this file on GitHub

Did you find what you were looking for?