Add To Cart: eventAddToCart

The Add to Cart event API captures the details of products added to a customer's shopping cart. It logs important information such as the product ID, quantity, and pricing details. This data is crucial for understanding customer purchase behavior and intent.

API Endpoint and Method

URL

Copy
https://rcdp-us-east-1.algonomy.com/callback/rest/events/{APP_API_KEY}/eventAddToCart

Example URL

Copy
https://rcdp-us-east-1.algonomy.com/callback/rest/events/BESQILOBZCGHVLZTCNTGJMYGQEARWVZVCUPYVUGNCZPJRSUDAR/eventAddToCart

HTTP Method

POST

Parameters

Parameter

Type Required or Optional

Description

sku

String

Optional

Specifies the SKU of the product.

Example: "421"

productId

String

Required

Unique identifier of the product.

Example: "333"

categoryId

String

Optional

Category ID associated with the product.

Example: "05"

brandId

String

Optional

Brand ID associated with the product.

Example: "45"

price

Float

Required

Specifies the price of the product.

Example: 100.00

quantity

Integer

Required

Number of items added to the cart.

Example: 2

shippingCost

Float

Optional

The shipping cost for the product.

Example: 10

tax

Float

Optional

The tax applied to the product.

Example: 1

totalQuantity

Integer

Required

Total quantity of the product in the cart (current and previously added).

Example: 2

Request Body Schema

Copy
{
  "eventData": {
    "sku": "String",
    "productId": "String",
    "categoryId": "String",
    "brandId": "String",
    "price": "Float",
    "quantity": "Integer",
    "shippingCost": "Float",
    "tax": "Float",
    "totalQuantity":"Integer" 
  }
}

Example Request

Copy
{
  "eventData": {
    "sku": "421",
    "productId": "333",
    "categoryId": "05",
    "brandId": "45",
    "price": 100.00,
    "quantity": 2,
    "shippingCost": 10,
    "tax": 1,
    "totalQuantity": 2
  }
}

Example Response

Copy
{
  "message": "Add to Cart event captured successfully",
  "statusCode": 200
}

HTTP Response Codes

Response Code

Description

202 Accepted The request has been received and validated, but processing is asynchronous and not yet complete.