eCommerce

Use the eCommerce API to trigger an event when a user views a product, adds a product to their shopping cart, or makes a purchase.

Product view

Make a call to this endpoint when a user views a product.

Authorizations:
OAuthFlow (ecommerce:write)
Request Body schema: application/json
required
Array of objects (ProductRequest)

List of items viewed.

occurredAt
string <date-time>

Timestamp of when the action occurred in ISO 8601 format. If the timestamp is older than 12 hours, it will not trigger any relevant journeys. If no timestamp is provided, it is assumed the event occurred when the endpoint is called.

required
object (EventUser)

User associated with the action. Note that this is a visitor to the site and does not need to be actively subscribed to Attentive.

Responses

Request samples

Content type
application/json
{}

Add to cart

Make a call to this endpoint when a user adds a product to their shopping cart.

Authorizations:
OAuthFlow (ecommerce:write)
Request Body schema: application/json
required
Array of objects (ProductRequest)

List of items added to cart.

occurredAt
string <date-time>

Timestamp of when the action occurred in ISO 8601 format. If the timestamp is older than 12 hours, it will not trigger any relevant journeys. If no timestamp is provided, it is assumed the event occurred when the endpoint is called.

required
object (EventUser)

User associated with the action. Note that this is a visitor to the site and does not need to be actively subscribed to Attentive.

Responses

Request samples

Content type
application/json
{}

Purchase

Make a call to this endpoint when a user generates an order or purchase.

Authorizations:
OAuthFlow (ecommerce:write)
Request Body schema: application/json
required
Array of objects (ProductRequest)

List of items purchased.

occurredAt
string <date-time>

Timestamp of when the action occurred in ISO 8601 format. If the timestamp is older than 12 hours, it will not trigger any relevant journeys. If no timestamp is provided, it is assumed the event occurred when the endpoint is called.

required
object (EventUser)

User associated with the action. Note that this is a visitor to the site and does not need to be actively subscribed to Attentive.

Responses

Request samples

Content type
application/json
{}