Operation
Get a customer timeline
GET
/customers/{customerId}/timelineEverything about a customer that you can see, newest first: their cases, the activities on them and on the customer's own log (notes, calls, visits, actions), and their orders. Each is read under your own reach: cases and activities by the account that owns them (`restricted` ones only with cases.read_restricted), orders by orders.read and, at channel scope, your channels. So in an organisation whose accounts share customers, one venue never sees another's cases. Filter by entry type and activity tier; page with cursor.
Path parameters
customerIdstringRequired- Customer ID
Query parameters
typesstringOptional- Only these entry types
tierstringOptional- Only activities of these tiers (within what you may read)
cursorstringOptional- nextCursor from the previous page
limitstringOptional- Page size, 1 to 100
Returns
The timeline
Errors
- 400
- Bad Request - Invalid input
- 401
- Unauthorized - Authentication required
- 403
- Forbidden - Insufficient permissions
- 404
- Not Found - Resource not found
- 500
- Internal Server Error
Every error names its code and links to it. All error codes
curl -X GET "https://api.ticketlayer.com/v1/customers/cus_abc123/timeline" \ -H "Authorization: Bearer tlak_..." \ -H "X-Ticketlayer-Org: your-org-slug"Response 200
{
"entries": [
{
"type": "order",
"at": "string",
"id": "string",
"case": {
"id": "cas_8f3k2Lq9ZxW1pT0a",
"number": 1042,
"organisationId": "string",
"owningAccountId": "string",
"customerId": "string",
"contact": {
"email": "string",
"phone": "string",
"name": "string"
},
"subject": "string",
"state": "new",
"stateCategory": "open",
"priority": "low",
"category": "accessibility",
"tags": [
"string"
],
"channel": "email",
"salesChannelId": "string",
"resolutionReason": "answered",
"resolverKind": "user",
"resolverId": "string",
"resolvedAt": "string",
"reopenUntil": "string",
"closedAt": "string",
"retainUntil": "string",
"version": 0,
"createdBy": "string",
"createdAt": "string",
"updatedAt": "string",
"assigneeUserId": "string",
"assignedAt": "string",
"queueKey": "string",
"sla": {
"status": "none",
"target": "first_response",
"dueAt": "string",
"breachedAt": "string",
"firstResponseDueAt": "string",
"firstRespondedAt": "string",
"nextResponseDueAt": "string",
"pausedAt": "string",
"pausedSeconds": 0
},
"owedReply": {
"owed": true,
"since": "string",
"dueAt": "string",
"target": "first_response",
"paused": true,
"breached": true
}
},
"activity": {
"id": "act_W1pT0a8f3k2Lq9Zx",
"caseId": "string",
"customerId": "string",
"owningAccountId": "string",
"kind": "email_in",
"direction": "inbound",
"channel": "email",
"authorKind": "customer",
"authorId": "string",
"body": "string",
"tier": "internal",
"sensitive": true,
"metadata": {},
"attachmentAssetIds": [
"string"
],
"occurredAt": "string",
"createdAt": "string"
},
"order": {
"id": "string",
"orderNumber": "string",
"accountId": "string",
"channelId": "string",
"status": "string",
"paymentStatus": "string",
"currency": "string",
"total": 0,
"totalRefunded": 0,
"isTest": true,
"createdAt": "string"
}
}
],
"nextCursor": "string"
}