Search Customers
Returns a paginated list of customers, with the core fields needed to identify a customer and reconcile it against your own records.
/api/integration/customer/v2Request
curl -X GET "https://uat.integration.cl.sodtrack-shared.sodtrack.com/api/integration/customer/v2" \
-H "Authorization: Bearer $SODTRACK_TOKEN"Base URL: https://uat.integration.cl.sodtrack-shared.sodtrack.com · other environments
Responses
{
"data": [
{
"id": 2001,
"reference": "EXT-CUSTOMER-REF-001",
"name": "María",
"lastname": "García",
"createdDate": "2026-06-01T10:00:00.000Z"
}
],
"metadata": {
"count": 1,
"pageSize": 10,
"pageNumber": 1,
"totalPages": 1
}
}Error responses for this endpoint follow the shared error reference.
Purpose
Returns a paginated list of customers, with the core fields needed to identify a customer and reconcile it against your own records.
Filters can be combined freely: every filter sent is applied together, and a customer is returned only when it satisfies all of them. A customer can be looked up directly — by Sodtrack id, client reference, identification number or phone number — or indirectly, through the bookings it owns.
This endpoint is meant to resolve and identify customers. It does not return contact details, identity documents or addresses: request those for a single customer with Get Customer by Id
Field Definitions
🔐 Authentication
| Field | Type | Required | Description |
|---|---|---|---|
x-api-key | header | ✅ | Sodtrack integration API key. Requests without a valid key are rejected. |
🔎 Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | number | ❌ | Sodtrack customer id. Must be an integer, minimum 1. |
reference | string | ❌ | Client reference of the customer. Exact match. |
identificationNumber | string | ❌ | Customer identification number. Separators such as dots and dashes are ignored, so "12.345.678-9" and "123456789" match the same customer. See Identification number matching. |
phoneNumber | string | ❌ | Customer phone number in international format; the leading + is optional. See Phone number matching. |
bookingId | number | ❌ | Returns the customer of the booking with this id. Must be an integer, minimum 1. |
bookingReference | string | ❌ | Returns every customer owning a booking with this reference. |
pageNumber | number | ❌ | Page to return, 1-based. Defaults to 1. Minimum 1. |
pageSize | number | ❌ | Customers per page. Defaults to 10. Minimum 1, maximum 50. |
Every filter is optional. Sending none returns the paginated list of all customers.
Filters sent as empty or whitespace-only strings are ignored, exactly as if they had not been sent. Unrecognized query parameters are ignored.
This endpoint does not accept a request body. Any payload sent is ignored.
Example Request
Look up a customer by identification number:
GET /api/integration/customer/v2?identificationNumber=12.345.678-9
x-api-key: <your-api-key>
Confirm that a reference and an identification number belong to the same customer:
GET /api/integration/customer/v2?reference=EXT-CUSTOMER-REF-001&identificationNumber=123456789
x-api-key: <your-api-key>
Find the customer behind a booking reference:
GET /api/integration/customer/v2?bookingReference=EXT-BOOKING-REF-001
x-api-key: <your-api-key>
Paginate the full customer list:
GET /api/integration/customer/v2?pageNumber=2&pageSize=25
x-api-key: <your-api-key>
Response Example
{
"data": [
{
"id": 2001,
"reference": "EXT-CUSTOMER-REF-001",
"name": "María",
"lastname": "García",
"createdDate": "2026-06-01T10:00:00.000Z"
},
{
"id": 1987,
"reference": null,
"name": "Comercial Andes",
"lastname": null,
"createdDate": "2026-05-18T08:22:41.000Z"
}
],
"metadata": {
"count": 2,
"pageSize": 10,
"pageNumber": 1,
"totalPages": 1
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
data | array | Customers in this page, newest first. Empty when no customer matches the filters. |
metadata.count | number | Total customers matching the filters, across all pages. |
metadata.pageSize | number | Page size applied to this response. |
metadata.pageNumber | number | Page returned. |
metadata.totalPages | number | Total number of pages available. |
🧍 Customer — data[]
| Field | Type | Description |
|---|---|---|
id | number | Unique Sodtrack identifier of the customer. Use it to request the full customer record. |
reference | `string | null` |
name | `string | null` |
lastname | `string | null` |
createdDate | string | ISO 8601 timestamp of creation. |
Error Responses
| HTTP Status | Error | Description |
|---|---|---|
400 Bad Request | InvalidParameters | A query parameter is not an integer or falls outside its allowed range: id or bookingId below 1, pageNumber below 1, or pageSize outside 1–50. |
400 Bad Request | INVALID_PHONE_NUMBER | phoneNumber could not be parsed as a valid phone number. |
401 Unauthorized | — | x-api-key is missing or invalid, or the request does not reach Sodtrack through the authorized network. |
500 Internal Server Error | — | Unexpected server error. Contact Sodtrack support. |
Filters that match no customer are not an error: the response is 200 OK with an empty data array and count of 0.
Business Rules & Constraints
Combining filters
Every filter present in the request is applied together, and only customers satisfying all of them are returned.
| Filters sent | Behavior |
|---|---|
| (none) | All customers, paginated. |
| One filter | Customers matching that filter. |
| Several filters | Only customers matching every filter at once. |
The filters reach the same customer through different paths: id, reference, identificationNumber and phoneNumber point at the customer directly, while bookingId and bookingReference reach it through its bookings. Combining them is a valid way to confirm that one customer matches more than one criterion.
Pointing two filters at different customers is not an error. The request succeeds and returns an empty page, because no single customer satisfies both conditions.
Identification number matching
The value sent is stripped of separator characters before matching, so punctuation formatting does not affect the result.
| Value sent | Matches stored value |
|---|---|
12.345.678-9 | 123456789 |
12345678-9 | 123456789 |
123456789 | 123456789 |
Spaces are not removed: send the identification number without internal spaces, or it will not match. Matching is exact after this normalization, so partial identification numbers return no results.
Phone number matching
The value sent is parsed and normalized to international format before matching, so spaces, dashes and parentheses are irrelevant.
| Value sent | Interpreted as |
|---|---|
+56 9 1234 5678 | +56912345678 |
56912345678 | +56912345678 |
912345678 | +56912345678, using the country configured for your Sodtrack operation |
A number without a country code is interpreted with the country of your Sodtrack operation. The normalized value matches customers whose phone is recorded with or without the leading +.
A value that cannot be parsed as a valid phone number is rejected with 400 INVALID_PHONE_NUMBER, instead of returning an empty page.
Booking-based filtering
bookingId and bookingReference select bookings first, and then return the customers those bookings belong to.
| Filters sent | Behavior |
|---|---|
bookingId | Customer of the booking with that id. |
bookingReference | Distinct customers of every booking sharing that reference. |
| Both | Only bookings matching both the id and the reference are considered. |
If no booking matches, or the matching bookings have no customer associated, the response is an empty page.
Ordering and pagination
-
pageNumberis 1-based: the first page is1. -
pageSizedefaults to10and is capped at50; a higher value is rejected with400 Bad Requestrather than silently reduced. -
countreflects every customer matching the filters, not only those on the current page. -
Customers are returned newest first.
Retrieving the full customer record
This endpoint returns only identification fields. To obtain a customer's email, phone, identification number and addresses, take the id from the result and call Get Customer
Returned data
-
Timestamps are ISO 8601 in UTC.
-
Optional fields that were never set are returned as
null, not omitted.