Get Bookings By Customer
Returns the bookings of a customer, as a paginated list.
/api/integration/customer/{customerId}/bookingsRequest
curl -X GET "https://dev.integration.cl.sodtrack-shared.sodtrack.com/api/integration/customer/{customerId}/bookings" \
-H "Authorization: Bearer $SODTRACK_TOKEN"Base URL: https://dev.integration.cl.sodtrack-shared.sodtrack.com · other environments
Path parameters
| Name | Type | Description |
|---|---|---|
customerIdrequired | string | — |
Responses
{
"data": [
{
"id": 13,
"reference": "BK-2026-0456",
"status": "accepted",
"scheduledDate": "2026-08-26T04:22:29.911Z",
"quantity": 1,
"totalDurationMinutes": 60,
"doneDate": null,
"createdDate": "2026-08-26T04:22:29.911Z",
"customer": {
"id": 32841,
"reference": "CUST-00123"
},
"stakeholder": null,
"service": {
"id": 1,
"name": "Water heater installation"
},
"variant": {
"id": 1,
"name": "Standard installation",
"type": "execution",
"skus": []
},
"category": {
"id": 1,
"name": "Installations"
},
"address": {
"formattedAddress": "Av. Corrientes 1234, Buenos Aires",
"coordinates": null
},
"originAddress": null,
"saleChannel": null,
"project": null,
"lead": null,
"provider": {
"id": 19,
"reference": null,
"name": "Carlos",
"lastname": "Muñoz",
"email": "carlos.munoz@example.com",
"phone": "+56972345678",
"identificationNumber": null,
"assignedTo": null
},
"bookingBundle": null,
"price": 0,
"cost": 0,
"bookingAddOns": [],
"products": [
{
"id": 5,
"name": "Water heater 80L",
"sku": "WH-80L",
"productType": "product",
"quantity": 1,
"serialNumber": "SN-0001-A",
"pricing": {
"price": 39999,
"cost": 25000,
"currency": {
"id": 3,
"name": "MXN",
"symbol": "$"
}
}
}
],
"incidents": [],
"alerts": [],
"notes": [],
"dynamicFormSnapshotFields": []
},
{
"id": 12,
"reference": "BK-2026-0455",
"status": "waiting_customer_to_set_date",
"scheduledDate": null,
"quantity": 1,
"totalDurationMinutes": 60,
"doneDate": null,
"createdDate": "2026-08-26T04:22:29.911Z",
"customer": {
"id": 32841,
"reference": "CUST-00123"
},
"stakeholder": null,
"service": {
"id": 1,
"name": "Water heater installation"
},
"variant": {
"id": 1,
"name": "Standard installation",
"type": "execution",
"skus": []
},
"category": {
"id": 1,
"name": "Installations"
},
"address": {
"formattedAddress": "Calle Falsa 123, Buenos Aires",
"coordinates": null
},
"originAddress": null,
"saleChannel": null,
"project": null,
"lead": null,
"provider": null,
"bookingBundle": null,
"price": 0,
"cost": 0,
"bookingAddOns": [],
"products": [],
"incidents": [],
"alerts": [],
"notes": [],
"dynamicFormSnapshotFields": []
}
],
"metadata": {
"count": 2,
"pageNumber": 1,
"pageSize": 10,
"totalPages": 1
}
}Error responses for this endpoint follow the shared error reference.
Purpose
Returns the bookings of a customer, as a paginated list.
The customer is identified by its Sodtrack id in the path. To resolve that id from your own data, search the customer first with GET /api/integration/customer/v2 (by reference, phoneNumber, identificationNumber or a booking) and take id from the result.
Sodtrack returns every booking the customer owns, newest first. Each booking is returned in full, in the same shape as the booking search and detail endpoints: status, dates, service, variant, category, addresses, provider, products, add-ons, incidents, alerts, notes and dynamic form answers.
Authentication
| Header | Required | Description |
|---|---|---|
x-api-key | ✅ | Sodtrack inbound integration API key. |
The endpoint is restricted to Sodtrack's private integration network. Requests from unauthorized origins are rejected.
Endpoint
GET /api/integration/customer/{customerId}/bookings
Field Definitions
🧍 Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
customerId | number | ✅ | Sodtrack customer id. Must be an integer. |
📄 Pagination (query parameters)
| Field | Type | Required | Description |
|---|---|---|---|
pageNumber | number | ❌ | 1-based page number. Defaults to 1. |
pageSize | number | ❌ | Bookings per page. Between 1 and 50. Defaults to 10. |
No other parameter is accepted; any other query parameter is ignored.
Example Request
GET /api/integration/customer/32841/bookingsSecond page of 5 bookings:
GET /api/integration/customer/32841/bookings?pageNumber=2&pageSize=5Response Example
{
"data": [
{
"id": 13,
"reference": "BK-2026-0456",
"status": "accepted",
"scheduledDate": "2026-08-26T04:22:29.911Z",
"quantity": 1,
"totalDurationMinutes": 60,
"doneDate": null,
"createdDate": "2026-08-26T04:22:29.911Z",
"customer": {
"id": 32841,
"reference": "CUST-00123"
},
"stakeholder": null,
"service": {
"id": 1,
"name": "Water heater installation"
},
"variant": {
"id": 1,
"name": "Standard installation",
"type": "execution",
"skus": []
},
"category": {
"id": 1,
"name": "Installations"
},
"address": {
"formattedAddress": "Av. Corrientes 1234, Buenos Aires",
"coordinates": null
},
"originAddress": null,
"saleChannel": null,
"project": null,
"lead": null,
"provider": {
"id": 19,
"reference": null,
"name": "Carlos",
"lastname": "Muñoz",
"email": "carlos.munoz@example.com",
"phone": "+56972345678",
"identificationNumber": null,
"assignedTo": null
},
"bookingBundle": null,
"price": 0,
"cost": 0,
"bookingAddOns": [],
"products": [
{
"id": 5,
"name": "Water heater 80L",
"sku": "WH-80L",
"productType": "product",
"quantity": 1,
"serialNumber": "SN-0001-A",
"pricing": {
"price": 39999,
"cost": 25000,
"currency": {
"id": 3,
"name": "MXN",
"symbol": "$"
}
}
}
],
"incidents": [],
"alerts": [],
"notes": [],
"dynamicFormSnapshotFields": []
},
{
"id": 12,
"reference": "BK-2026-0455",
"status": "waiting_customer_to_set_date",
"scheduledDate": null,
"quantity": 1,
"totalDurationMinutes": 60,
"doneDate": null,
"createdDate": "2026-08-26T04:22:29.911Z",
"customer": {
"id": 32841,
"reference": "CUST-00123"
},
"stakeholder": null,
"service": {
"id": 1,
"name": "Water heater installation"
},
"variant": {
"id": 1,
"name": "Standard installation",
"type": "execution",
"skus": []
},
"category": {
"id": 1,
"name": "Installations"
},
"address": {
"formattedAddress": "Calle Falsa 123, Buenos Aires",
"coordinates": null
},
"originAddress": null,
"saleChannel": null,
"project": null,
"lead": null,
"provider": null,
"bookingBundle": null,
"price": 0,
"cost": 0,
"bookingAddOns": [],
"products": [],
"incidents": [],
"alerts": [],
"notes": [],
"dynamicFormSnapshotFields": []
}
],
"metadata": {
"count": 2,
"pageNumber": 1,
"pageSize": 10,
"totalPages": 1
}
}Response Fields
| Field | Type | Description |
|---|---|---|
data[] | array | Bookings in the page, newest first. Empty when the customer has none. |
data[].id | number | Sodtrack booking id. |
data[].reference | `string | null` |
data[].status | string | One of: "created", "searching", "accepted", "on_my_way_to_origin", "arrived_to_origin", "on_my_way_to_destination", "arrived_to_destination", "left_destination", "done", "cancelled", "waiting_customer_to_set_date", "waiting_scheduling_mechanism", "waiting_assignment_mechanism", "waiting_provider_to_propose_date", "waiting_customer_to_accept_proposed_date". |
data[].scheduledDate | `string (datetime) | null` |
data[].quantity | number | Quantity booked. |
data[].totalDurationMinutes | `number | null` |
data[].doneDate | `string (datetime) | null` |
data[].createdDate | string (datetime) | When the booking was created. |
data[].customer | `object | null` |
data[].stakeholder | `object | null` |
data[].service | `object | null` |
data[].variant | `object | null` |
data[].category | `object | null` |
data[].address | `object | null` |
data[].originAddress | `object | null` |
data[].saleChannel | `object | null` |
data[].project | `object | null` |
data[].lead | `object | null` |
data[].provider | `object | null` |
data[].bookingBundle | `object | null` |
data[].price | `number | null` |
data[].cost | `number | null` |
data[].bookingAddOns[] | array | Add-ons: id, name, reference. |
data[].products[] | array | Products in the booking: id, name, sku, productType ("product" or "component"), quantity, serialNumber and pricing (price, cost, currency with id, name, symbol). |
data[].incidents[] | array | Incidents: id and reference. |
data[].alerts[] | array | Alerts: id and reference. |
data[].notes[] | array | Notes: id, note, reference. |
data[].dynamicFormSnapshotFields[] | array | Dynamic form answers captured during the booking: id, reference, value, secondaryValue, type, snapshotId. |
metadata.count | number | Total bookings owned by the customer, across all pages. |
metadata.pageNumber | number | Page returned. |
metadata.pageSize | number | Page size applied. |
metadata.totalPages | number | Total number of pages. |
Error Responses
| HTTP Status | Error | Description |
|---|---|---|
400 Bad Request | Validation failed (numeric string is expected) | customerId is not an integer. |
400 Bad Request | — | A pagination parameter has the wrong type or is out of range (for example pageSize above 50). |
401 Unauthorized | — | Missing or invalid x-api-key, or the request does not come from an authorized origin. |
404 Not Found | CUSTOMER_NOT_FOUND: {customerId} | No customer exists with that id. |
500 Internal Server Error | — | Unexpected server error. Contact Sodtrack support. |
Business Rules & Constraints
The customer must exist
customerId must be the id of a Sodtrack customer. Unknown ids, and ids of providers, network users or other account types, are answered with 404 Not Found. A customer that exists but has no booking is answered with 200 OK and an empty data.
Bookings are the ones the customer owns
data contains every booking whose customer is that user, in any status, including cancelled and completed ones. Bookings where the customer only appears as a requesting party for someone else are not included.
Provider of a bundled booking
When a booking is part of a bundle and has no provider of its own, provider shows the provider assigned to the head of the bundle, which is who executes the work.
Ordering
Bookings are ordered by id, newest first.
Page boundaries
A pageNumber beyond the last page is not an error: it returns an empty data with the same metadata.count and metadata.totalPages.