Skip to content

Abandoned carts

Endpoints for managing abandoned carts

An abandoned cart function helps businesses track when online shoppers add items to their virtual shopping carts but leave the website or app without completing their purchase.

It captures data about these abandoned carts, including the specific products left behind and, when available, the customer's contact information.

Create or update a cart

Request

Creates or updates a cart.

As with many other endpoints, the payload is configurable and can contain additional data in the extendedProperties field.

To update a cart, use the same cartId as an existing cart.

Security
api_key
Bodyapplication/json
cartIdstringrequired

Unique identifier of cart

Example:"934E2183-5004-45B0-8E75-A5178F1DEEF1"
cartUrlstring

URL to customers cart

Example:"http://mywebshop.com/cart/934E2183-5004-45B0-8E75-A5178F1DEEF1"
contactIdstringrequired

Customer identifer

Example:"F68438A9-800B-457D-81D5-952FCEB63D8C"
externalIdstring

External customer identifer

Example:"100001111"
extendedPropertiesobject

Additional properties depending on configuration

itemsArray of objects

List of products/items

curl -i -X POST \
  https://api.oculos.no/v4/abandonedCarts \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '{
    "cartId": "934E2183-5004-45B0-8E75-A5178F1DEEF1",
    "cartUrl": "http://mywebshop.com/cart/934E2183-5004-45B0-8E75-A5178F1DEEF1",
    "contactId": "F68438A9-800B-457D-81D5-952FCEB63D8C",
    "externalId": "100001111",
    "extendedProperties": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "items": [
      {
        "itemId": "1001",
        "quantity": 2,
        "productUrl": "https://mywebshop.com/products/1001",
        "imageUrl": "https://mywebshop.com/products/images/1001",
        "name": "Product 1001",
        "price": 799.9,
        "salePrice": 499.5,
        "currency": "NOK"
      }
    ]
  }'

Responses

OK