Skip to content

Get unified customer timeline (messages, orders, billing events, notes)

GET
/api/v1/customers/{id}/timeline
curl --request GET \
--url 'https://api.dokanmazad.com/api/v1/customers/cmoabcde000001ny11aabbcc0/timeline?limit=20&cursor=2026-05-01T09%3A30%3A00.000Z_message_clxyz12300msg0001&types=order_log%2Cbilling' \
--header 'X-API-Key: <X-API-Key>'
id
required
string

Customer user CUID

Example
cmoabcde000001ny11aabbcc0
limit
number

Items to return per page (1–100, default 20)

Example
20
cursor
string

Cursor for pagination. Format: {ISO_timestamp}{source_type}{source_id}. Obtain from meta.nextCursor of the previous response.

Example
2026-05-01T09:30:00.000Z_message_clxyz12300msg0001
types
Array<string>

Comma-separated event types to include. Valid values: message | call | order_log | note | billing | notification

Example
order_log,billing

Success

Media typeapplication/json
object
success
required
boolean
data
required
meta
object
page
integer
limit
integer
total
integer
totalPages
integer
data
required
object
type
required

Event type — message | call | order_log | note | billing | notification

string
timestamp
required

Event timestamp (sorted newest-first)

string format: date-time
title
required

Human-readable event title

string
description

Event description

string
metadata

Type-specific metadata. For order_log: { fromStatus, toStatus, orderId }. For message: { direction, messageType, status }. For billing: { amount, currency, billingStatus }.

object
actorId

CUID of the user who triggered the event (null for inbound messages)

string
sourceId

CUID of the source record (OrderLog ID, Message ID, Billing ID, etc.)

string
Examples
Examplesuccess
{
"success": true,
"data": [
{
"type": "order_log",
"timestamp": "2026-05-02T08:00:00.000Z",
"title": "Order status changed",
"description": "DepositSubmitted → DepositConfirmed",
"metadata": {
"fromStatus": "DepositSubmitted",
"toStatus": "DepositConfirmed",
"orderId": "cmosor2zy000313ny24hgtfy0"
},
"actorId": "cmoabcde000004ny44aabbcc0",
"sourceId": "cmlog000000001ny11aabbcc0"
},
{
"type": "message",
"timestamp": "2026-05-01T09:30:00.000Z",
"title": "Customer Message",
"description": "Hello, I want to track my order.",
"metadata": {
"direction": "inbound",
"messageType": "text",
"status": "delivered"
},
"actorId": null,
"sourceId": "clxyz12300msg0001"
}
]
}

Unauthorized — missing or invalid API key

Media typeapplication/json
object
success
required
boolean
error
required
string
statusCode
required
integer
Example
{
"success": false
}

Forbidden — route not in this key’s allowedRoutes

Media typeapplication/json
object
success
required
boolean
error
required
string
statusCode
required
integer
Example
{
"success": false
}

Rate limit exceeded

Media typeapplication/json
object
success
required
boolean
error
required
string
statusCode
required
integer
Example
{
"success": false
}
Retry-After
integer

Seconds to wait before retrying