Cart insights

Read the store's open carts and their value, and remind known shoppers whose carts are about to expire.

Cart insights count the store's own live carts; they never list individual anonymous carts or score shoppers. Carts are measured every ten minutes, so measured_at says how fresh the numbers are, and Buy Now carts are not counted. Reads use read_orders; starting or cancelling a reminder uses write_orders.

The summary's value prices each cart's units at today's prices in the store's base currency (a sale price while it runs), before discounts, shipping and tax. Per-product numbers are product fields: in_carts (carts holding the product, any variant), in_checkout (those with an open checkout) and units_in_carts. Carts don't hold stock, so compare units_in_carts with the product's stock to see when carts want more than you have.

A reminder sends the store's Cart recovery message to known shoppers whose carts expire within 24 hours, only on channels they agreed to marketing on, and never to someone sent a recovery message in the last 24 hours. It runs in the background: start it, then poll it for progress. One reminder runs per store at a time.

Endpoints#

Get open carts

GET read_orders

The store's open carts now: how many, their value, and those about to expire.

The store's live carts are measured every ten minutes (measured_at); Buy Now carts are not counted. known_carts belong to signed-in customers; checkout_carts have an open checkout; expiring_carts expire within 24 hours unless the shopper comes back. value is the carts' units at today's base-currency prices (a sale price while it runs), before discounts, shipping and tax. remindable is how many known shoppers with a cart expiring within 24 hours can be sent a reminder now: they agreed to marketing and weren't sent a recovery message today. reminder is the store's running reminder, or its last one from the past day.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Remind shoppers whose carts expire

POST write_orders

Send the cart recovery message to known shoppers whose carts expire within 24 hours.

Starts a background reminder. Each shopper gets the store's Cart recovery email and/or text message with a link back to their cart, only if they agreed to marketing on that channel and weren't sent a recovery message in the last 24 hours. Poll the reminder for progress. One reminder runs per store at a time.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
channels array<string>

email (default), text, or both.

Example: ["email"]

Errors

  • 409 CART_REMINDER_NOTHING_TO_SEND

    No shopper can be reminded now.

  • 409 CART_REMINDER_RUNNING

    A reminder is already running.

  • 400 CART_REMINDER_CHANNELS_INVALID

    channels is not email and/or text, or text messages aren't set up.

  • 400 STORE_API_BODY_PROPERTY_UNKNOWN

    The body has a property this request does not accept. The message and error.details.properties list the allowed and required properties (nested for each object or list of objects).

  • 400 STORE_API_BODY_PROPERTY_INVALID

    A body property has the wrong type (error.details.expected_type). The message and error.details.properties list the allowed and required properties.

Get a reminder

GET read_orders

Progress of a reminder.

status is queued, running, completed, failed or cancelled; processed of total shoppers are done, with how many were sent and skipped (consent withdrawn, cart bought or emptied, or already reminded meanwhile).

Path parameters

Name Type Description
reminderId required uuid

Reminder id.

Example: 5b2f0c1e-8d4a-4f6b-9c3e-1a2b3c4d5e6f

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 404 CART_REMINDER_NOT_FOUND

    No such reminder in this store.

Cancel a reminder

POST write_orders

Stop a running reminder.

Messages already sent stay sent. Cancelling a reminder that has ended returns it unchanged.

Path parameters

Name Type Description
reminderId required uuid

Reminder id.

Example: 5b2f0c1e-8d4a-4f6b-9c3e-1a2b3c4d5e6f

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 404 CART_REMINDER_NOT_FOUND

    No such reminder in this store.