Get Budget Execution by Customer
Returns the budgets of a specific customer, newest first, in a paginated list.
/api/integration/customer/{customerId}/budget-executionsRequest
curl -X GET "https://uat.integration.cl.sodtrack-shared.sodtrack.com/api/integration/customer/{customerId}/budget-executions" \
-H "Authorization: Bearer $SODTRACK_TOKEN"Base URL: https://uat.integration.cl.sodtrack-shared.sodtrack.com · other environments
Path parameters
| Name | Type | Description |
|---|---|---|
customerIdrequired | string | — |
Responses
{
"data": [
{
"id": 1234,
"reference": "BUD-2026-0031",
"name": "Potable water main repair",
"description": "Replacement of the damaged section, floors 3 to 5.",
"status": "waiting_customer_approval",
"type": "itemized",
"customer": {
"id": 4471,
"reference": "CUST-4471"
},
"provider": {
"id": 9,
"reference": "PRV-9",
"name": "Serviteca",
"lastname": "SpA",
"email": "contacto@serviteca.example.com",
"phone": "+56922222222",
"identificationNumber": "76123456-7",
"assignedTo": {
"name": "Ana",
"lastname": "Rojas",
"email": "ana@serviteca.example.com"
}
},
"booking": {
"id": 2686,
"reference": "BK-2686"
},
"totals": {
"subTotalQuote": 1700,
"baseItemsCost": 1250,
"baseActivitiesCost": 450,
"itemsCost": 1125,
"activitiesCost": 500,
"totalItemDiscount": 125,
"totalActivityDiscount": 0,
"totalSubTotalDiscount": 100,
"totalDiscount": 225,
"totalSurcharge": 212.5,
"totalQuote": 1687.5,
"totalPrice": null,
"totalCost": null
},
"createdDate": "2026-09-01T14:22:10.000Z",
"updatedDate": "2026-09-03T09:05:41.000Z"
}
],
"metadata": {
"count": 37,
"pageSize": 10,
"pageNumber": 1,
"totalPages": 4
}
}Error responses for this endpoint follow the shared error reference.
Purpose
Returns the budgets of a specific customer, newest first, in a paginated list.
Each row carries the identity and state of the budget, its customer, its assigned provider and the full amount breakdown.
Field Definitions
📦 Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
customerId | number | ✅ | Sodtrack id of the customer whose budgets are requested. |
📄 Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
pageNumber | number | ❌ | Page to return, 1-based. Defaults to 1. Minimum 1. |
pageSize | number | ❌ | Budgets per page. Defaults to 10. Minimum 1, maximum 50. |
This endpoint does not accept a request body. Any payload sent is ignored.
Response Fields
| Field | Type | Description |
|---|---|---|
data | array | Budgets in this page, newest first. Empty when the customer has none. |
metadata.count | number | Total budgets matching the customer, 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. |
🧾 Budget — data[]
| Field | Type | Description |
|---|---|---|
id | number | Unique Sodtrack identifier of the budget. Use it to fetch the full detail, approve or reject. |
reference | `string | null` |
name | string | Name of the budget, as prepared by the operation. |
description | `string | null` |
status | string | Current state of the budget. See Budget statuses. |
type | `string | null` |
customer | `object | null` |
customer.id | number | Sodtrack customer identifier. |
customer.reference | `string | null` |
provider | `object | null` |
booking | `object | null` |
booking.id | number | Sodtrack booking identifier. |
booking.reference | `string | null` |
totals | object | Amount breakdown. Always present. |
createdDate | string | ISO 8601 timestamp of creation. |
updatedDate | string | ISO 8601 timestamp of the last modification. |
👷 Provider — data[].provider
| Field | Type | Description |
|---|---|---|
id | number | Sodtrack provider identifier. |
reference | `string | null` |
name | string | First name, or company name for a company provider. |
lastname | string | Last name. Empty string when not recorded. |
email | string | Email address. |
phone | `string | null` |
identificationNumber | `string | null` |
assignedTo | `object | null` |
assignedTo.name | string | First name of the assignee. |
assignedTo.lastname | string | Last name of the assignee. |
assignedTo.email | string | Email of the assignee. |
💰 Totals — data[].totals
| Field | Type | Description |
|---|---|---|
subTotalQuote | number | Quote before subtotal-level discounts and surcharges. |
baseItemsCost | number | Materials cost before any discount or surcharge. |
baseActivitiesCost | number | Labor cost before any discount or surcharge. |
itemsCost | number | Materials cost after the adjustments applied to materials. |
activitiesCost | number | Labor cost after the adjustments applied to labor. |
totalItemDiscount | number | Amount discounted from the materials. |
totalActivityDiscount | number | Amount discounted from the labor. |
totalSubTotalDiscount | number | Amount discounted from the subtotal. |
totalDiscount | number | Sum of every discount applied. |
totalSurcharge | number | Sum of every surcharge applied. |
totalQuote | number | Final quoted amount, with every discount and surcharge applied. This is the amount the customer approves. |
totalPrice | `number | null` |
totalCost | `number | null` |
All amounts are numeric values in the currency of the budget's operation. The payload does not carry a currency code; agree on the expected currency with Sodtrack during integration setup.
Error Responses
| HTTP Status | Error | Description |
|---|---|---|
400 Bad Request | InvalidParameters | customerId is not a number, or a pagination parameter is not an integer or falls outside its allowed range. |
401 Unauthorized | — | x-api-key is missing or invalid. |
404 Not Found | CUSTOMER_NOT_FOUND: {customerId} | No customer exists with that id. |
500 Internal Server Error | — | Unexpected server error. Contact Sodtrack support. |
A customer with no budgets is not an error: the response is 200 OK with an empty data array and count of 0.
Business Rules & Constraints
Which budgets belong to a customer
A budget is associated with a customer through either of two paths, and this endpoint returns both:
-
budgets created directly for the customer, and
-
budgets quoted for a booking that belongs to the customer.
The second path covers budgets created from a booking before budgets carried their own customer, so older budgets are not missing from the list.
Budget templates are excluded
Templates are the catalog the operation builds budgets from. They never appear in this list and are not addressable through the budget detail endpoint either.
Ordering and pagination
Budgets are returned newest first. pageSize is capped at 50; a higher value is rejected with 400 Bad Request rather than silently reduced. Unrecognized query parameters are ignored.
Budget statuses
status reports the current state of the budget. Values in active use:
| Value | Meaning |
|---|---|
created | Budget is being prepared. |
waiting_internal_review | Awaiting internal review before being published. |
waiting_admin_approval | Awaiting an internal approval decision. |
waiting_customer_approval | Published to the customer, awaiting their decision. |
approved | Approved. |
approved_by_provider_on_site | Approved on site by the provider. |
override_approved | Approved through an override. |
rejected | Rejected. |
Budgets prior to July 2025 may still report in_progress, provider_submitted, admin_approved, customer_approved or customer_rejected. These values where phased out, but a client should tolerate them when reading historical budgets.