Skip to main content
POST
/
api
/
v2
/
stats
/
carts
Checkout cart process
curl --request POST \
  --url https://{search_zone}-api.doofinder.com/api/v2/stats/carts \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "checkout_json": [
    {
      "id": "prod_12345",
      "price": 29.99,
      "quantity": 2
    },
    {
      "id": "prod_67890",
      "price": "$12.50",
      "quantity": 1
    }
  ],
  "hashid": "<string>",
  "currency": "EUR",
  "ip": "<string>",
  "referer": "<string>",
  "session_id": "<string>",
  "user_agent": "<string>",
  "user_id": "<string>"
}
'
"<unknown>"

Authorizations

Authorization
string
header
required

Doofinder API key. Pass it as: Authorization: Token <api_key>

Body

application/json
checkout_json
object[]
required

Checkout json array with the cart items basic data.

Example:
[
{
"id": "prod_12345",
"price": 29.99,
"quantity": 2
},
{
"id": "prod_67890",
"price": "$12.50",
"quantity": 1
}
]
hashid
string
required

Unique id of the search engine. In the search engine selector, you will find the hashid information

Pattern: ^[a-f0-9]{32}$
currency
string

Currency of the checkout.

Example:

"EUR"

ip
string
deprecated

Unique address that identifies a device. Detected automatically by the server.

referer
string
deprecated

The referer header value, provides information about the URL from which the current request originated. Detected automatically by the server.

session_id
string | null

Identifier of search session

Maximum string length: 32
user_agent
string
deprecated

Identifier of device. Detected automatically by the server.

user_id
string

Identifier of user

Maximum string length: 36

Response

OK

Response returned over register stat operation.