Get Provider by Booking
Returns the full record of the provider assigned to a booking, identified by the booking's Sodtrack id.
/api/integration/booking/{bookingId}/providerRequest
curl -X GET "https://uat.integration.cl.sodtrack-shared.sodtrack.com/api/integration/booking/{bookingId}/provider" \
-H "Authorization: Bearer $SODTRACK_TOKEN" \
-H "origin: <your-origin>"Base URL: https://uat.integration.cl.sodtrack-shared.sodtrack.com · other environments
Path parameters
| Name | Type | Description |
|---|---|---|
bookingIdrequired | string | — |
Headers
| Name | Type | Description |
|---|---|---|
origin | string | — |
Responses
{
"id": 1543,
"reference": "PROV-EXT-1543",
"name": "María",
"lastname": "Técnica",
"email": "maria.tecnica@example.com",
"phone": "+56912345678",
"identificationNumber": "12345678-9",
"identificationNumberCountry": "CL",
"status": "accepted",
"isCompany": false,
"worksOnHolidays": false,
"ownsTransportation": true,
"isMainProviderEligible": true,
"isLeadAssignmentEligible": true,
"isDirectAssignment": false,
"isRequestAutoAcceptance": false,
"priorityGroup": 1,
"rating": 4.5,
"reviewsCount": 12,
"createdDate": "2025-02-14T13:05:30.000Z",
"addresses": [
{
"id": 24,
"address": "Av. Providencia 1234",
"formattedAddress": "Av. Providencia 1234, Providencia, Región Metropolitana, Chile",
"extraInfo": "Office 302",
"active": true,
"coordinates": {
"lat": -33.4263,
"lng": -70.62
}
}
],
"parent": {
"id": 893,
"reference": "COMPANY-EXT-893",
"name": "Servicios del Sur",
"lastname": "SpA"
},
"dynamicForms": [
{
"id": 7410,
"name": "Technician registration",
"flow": "network_worker_creation",
"createdDate": "2025-02-14T13:06:10.000Z",
"fields": [
{
"id": 52118,
"reference": "license",
"label": "License number",
"type": "text",
"value": "LIC-1234",
"secondaryValue": null
},
{
"id": 52119,
"reference": "specialties",
"label": "Specialties",
"type": "checkbox",
"value": "Electricity, Plumbing",
"secondaryValue": null
}
]
}
]
}Error responses for this endpoint follow the shared error reference.
Purpose
Returns the full record of the provider assigned to a booking, identified by the booking's Sodtrack id.
The response has the same shape as Get Provider: basic information (personal data, status, features, rating and addresses), the dynamic forms filled for the provider and, when the provider belongs to a company, the company in parent.
Unlike the provider returned by the booking endpoints, which reports a provider that belongs to a company as the company itself, this endpoint returns the provider actually assigned to the booking. The company is identified in parent, and its full record is obtained with Get Provider using parent.id.
Field Definitions
🔐 Authentication
| Field | Type | Required | Description |
|---|---|---|---|
x-api-key (header) | string | ✅ | External integration API key provided by Sodtrack. |
🔎 Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
bookingId | number | ✅ | Sodtrack booking id. Must be an integer. |
Example Request
Path parameter example:
bookingId = 51889Response Example
Booking assigned to a provider that belongs to a company:
{
"id": 1543,
"reference": "PROV-EXT-1543",
"name": "María",
"lastname": "Técnica",
"email": "maria.tecnica@example.com",
"phone": "+56912345678",
"identificationNumber": "12345678-9",
"identificationNumberCountry": "CL",
"status": "accepted",
"isCompany": false,
"worksOnHolidays": false,
"ownsTransportation": true,
"isMainProviderEligible": true,
"isLeadAssignmentEligible": true,
"isDirectAssignment": false,
"isRequestAutoAcceptance": false,
"priorityGroup": 1,
"rating": 4.5,
"reviewsCount": 12,
"createdDate": "2025-02-14T13:05:30.000Z",
"addresses": [
{
"id": 24,
"address": "Av. Providencia 1234",
"formattedAddress": "Av. Providencia 1234, Providencia, Región Metropolitana, Chile",
"extraInfo": "Office 302",
"active": true,
"coordinates": {
"lat": -33.4263,
"lng": -70.6200
}
}
],
"parent": {
"id": 893,
"reference": "COMPANY-EXT-893",
"name": "Servicios del Sur",
"lastname": "SpA"
},
"dynamicForms": [
{
"id": 7410,
"name": "Technician registration",
"flow": "network_worker_creation",
"createdDate": "2025-02-14T13:06:10.000Z",
"fields": [
{
"id": 52118,
"reference": "license",
"label": "License number",
"type": "text",
"value": "LIC-1234",
"secondaryValue": null
},
{
"id": 52119,
"reference": "specialties",
"label": "Specialties",
"type": "checkbox",
"value": "Electricity, Plumbing",
"secondaryValue": null
}
]
}
]
}Booking assigned to an independent provider, without addresses or forms:
{
"id": 622,
"reference": "PROV-EXT-622",
"name": "Juan",
"lastname": "Pérez",
"email": "juan.perez@example.com",
"phone": "+56933334444",
"identificationNumber": "11222333-4",
"identificationNumberCountry": "CL",
"status": "accepted",
"isCompany": false,
"worksOnHolidays": true,
"ownsTransportation": true,
"isMainProviderEligible": true,
"isLeadAssignmentEligible": false,
"isDirectAssignment": false,
"isRequestAutoAcceptance": true,
"priorityGroup": 2,
"rating": 0,
"reviewsCount": 0,
"createdDate": "2024-11-03T09:30:00.000Z",
"addresses": [],
"parent": null,
"dynamicForms": []
}Response Fields
| Field | Type | Description |
|---|---|---|
id | number | Sodtrack id of the provider assigned to the booking. |
reference | string | null |
name | string | null |
lastname | string | null |
email | string | Provider email. |
phone | string | null |
identificationNumber | string | null |
identificationNumberCountry | string | null |
status | string | Provider status. One of: "created", "accepted", "rejected". |
isCompany | boolean | true when the provider is a company. |
worksOnHolidays | boolean | true when the provider works on holidays. |
ownsTransportation | boolean | true when the provider owns transportation. |
isMainProviderEligible | boolean | true when the provider can be assigned as main provider of a service. |
isLeadAssignmentEligible | boolean | true when the provider can be assigned leads. |
isDirectAssignment | boolean | Companies only: true when bookings and requests are assigned directly to the providers that belong to the company. |
isRequestAutoAcceptance | boolean | true when requests sent to the provider are accepted automatically. |
priorityGroup | number | null |
rating | number | Average review rating, from 0 to 5. 0 when the provider has no reviews. |
reviewsCount | number | Number of reviews received. |
createdDate | string | Provider creation timestamp. |
addresses | array | Provider addresses (see Address). Empty when the provider has none. |
parent | object | null |
dynamicForms | array | Dynamic forms filled for the provider (see Dynamic form). Empty when none was filled. |
Address (addresses[])
| Field | Type | Description |
|---|---|---|
id | number | Sodtrack address id. |
address | string | null |
formattedAddress | string | null |
extraInfo | string | null |
active | boolean | false when the address is no longer in use. |
coordinates | object | null |
Company (parent)
| Field | Type | Description |
|---|---|---|
id | number | Sodtrack provider id of the company. Use it with Get Provider to get the company's full record. |
reference | string | null |
name | string | null |
lastname | string | null |
Only these fields are returned for the company.
Dynamic form (dynamicForms[])
| Field | Type | Description |
|---|---|---|
id | number | Id of this form submission. |
name | string | Form name. |
flow | string | null |
createdDate | string | Timestamp of the submission. |
fields | array | Fields of the form (see Dynamic form field). |
Dynamic form field (dynamicForms[].fields[])
| Field | Type | Description |
|---|---|---|
id | number | Field id within this submission. |
reference | string | null |
label | string | Field label. |
type | string | Field type, for example "text", "short_text", "numeric", "currency", "date", "hour", "boolean", "select", "checkbox", "attachment" or "signature". |
value | string | null |
secondaryValue | string | null |
Error Responses
| HTTP Status | Error | Description |
|---|---|---|
400 Bad Request | Validation failed (numeric string is expected) | bookingId is not an integer. |
401 Unauthorized | — | API key missing or invalid, or the request does not come from an authorized network. |
403 Forbidden | — | The request origin is not allowed. |
404 Not Found | BOOKING_NOT_FOUND: {bookingId} | No booking matches bookingId, or the booking was deleted. |
404 Not Found | BOOKING_PROVIDER_NOT_ASSIGNED: {bookingId} | The booking has no provider assigned yet. |
500 Internal Server Error | — | Unexpected server error. Contact Sodtrack support. |
Business Rules & Constraints
Assigned provider and company
The booking endpoints report a provider that belongs to a company as the company, with the person actually assigned in assignedTo. This endpoint returns the assigned provider itself:
| Assigned provider | Response |
|---|---|
| Belongs to a company | The assigned provider, with the company in parent. |
| Independent provider | The provider, with parent set to null. |
| Company | The company, with parent set to null. |
To get the company's full record (addresses, features, dynamic forms), use Get Provider with parent.id.
Bookings without a provider
A booking that has no provider assigned yet responds 404 Not Found with BOOKING_PROVIDER_NOT_ASSIGNED. Request it again once a provider is assigned.
Addresses
addresseslists the addresses registered for the provider. Other addresses of the same Sodtrack user are not included.- Addresses that are no longer in use are still returned, with
activeset tofalse. - Deleted addresses are not returned.
Dynamic forms
Each entry in dynamicForms is one form submission. The same form can appear more than once if it was filled more than once. flow indicates when the form was filled:
flow | When it is filled |
|---|---|
"provider_creation" | Registration of an independent provider. |
"network_creation" | Registration of a company. |
"network_worker_creation" | Registration of a provider that belongs to a company. |
Only forms visible to Sodtrack administrators are returned.
Dynamic form values
- Option fields (
"select","boolean","checkbox"):valueis the selected option. For"checkbox", all selected options are returned in a single string, separated by", ". - Conditional fields: when a field is shown only for a specific option of another field, it is returned only if that option was selected.
- Attachment and signature fields:
valueis a temporary signed URL to download the file, valid for 24 hours. Request the provider again to get a new URL. - An option field with no option selected, or any field without a stored answer, is returned with
valueset tonull.
Data and format
- Timestamps use ISO 8601 (UTC).