Get Budget Execution by Customer

Returns the budgets of a specific customer, newest first, in a paginated list.

GET/api/integration/customer/{customerId}/budget-executions

Request

cURL
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

NameTypeDescription
customerIdrequiredstring

Responses

Get Budget Execution by Customer
{
  "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

FieldTypeRequiredDescription
customerIdnumberSodtrack id of the customer whose budgets are requested.

📄 Query parameters

FieldTypeRequiredDescription
pageNumbernumberPage to return, 1-based. Defaults to 1. Minimum 1.
pageSizenumberBudgets per page. Defaults to 10. Minimum 1, maximum 50.

This endpoint does not accept a request body. Any payload sent is ignored.


Response Fields

FieldTypeDescription
dataarrayBudgets in this page, newest first. Empty when the customer has none.
metadata.countnumberTotal budgets matching the customer, across all pages.
metadata.pageSizenumberPage size applied to this response.
metadata.pageNumbernumberPage returned.
metadata.totalPagesnumberTotal number of pages available.

🧾 Budgetdata[]

FieldTypeDescription
idnumberUnique Sodtrack identifier of the budget. Use it to fetch the full detail, approve or reject.
reference`stringnull`
namestringName of the budget, as prepared by the operation.
description`stringnull`
statusstringCurrent state of the budget. See Budget statuses.
type`stringnull`
customer`objectnull`
customer.idnumberSodtrack customer identifier.
customer.reference`stringnull`
provider`objectnull`
booking`objectnull`
booking.idnumberSodtrack booking identifier.
booking.reference`stringnull`
totalsobjectAmount breakdown. Always present.
createdDatestringISO 8601 timestamp of creation.
updatedDatestringISO 8601 timestamp of the last modification.

👷 Providerdata[].provider

FieldTypeDescription
idnumberSodtrack provider identifier.
reference`stringnull`
namestringFirst name, or company name for a company provider.
lastnamestringLast name. Empty string when not recorded.
emailstringEmail address.
phone`stringnull`
identificationNumber`stringnull`
assignedTo`objectnull`
assignedTo.namestringFirst name of the assignee.
assignedTo.lastnamestringLast name of the assignee.
assignedTo.emailstringEmail of the assignee.

💰 Totalsdata[].totals

FieldTypeDescription
subTotalQuotenumberQuote before subtotal-level discounts and surcharges.
baseItemsCostnumberMaterials cost before any discount or surcharge.
baseActivitiesCostnumberLabor cost before any discount or surcharge.
itemsCostnumberMaterials cost after the adjustments applied to materials.
activitiesCostnumberLabor cost after the adjustments applied to labor.
totalItemDiscountnumberAmount discounted from the materials.
totalActivityDiscountnumberAmount discounted from the labor.
totalSubTotalDiscountnumberAmount discounted from the subtotal.
totalDiscountnumberSum of every discount applied.
totalSurchargenumberSum of every surcharge applied.
totalQuotenumberFinal quoted amount, with every discount and surcharge applied. This is the amount the customer approves.
totalPrice`numbernull`
totalCost`numbernull`

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 StatusErrorDescription
400 Bad RequestInvalidParameterscustomerId is not a number, or a pagination parameter is not an integer or falls outside its allowed range.
401 Unauthorizedx-api-key is missing or invalid.
404 Not FoundCUSTOMER_NOT_FOUND: {customerId}No customer exists with that id.
500 Internal Server ErrorUnexpected 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:

ValueMeaning
createdBudget is being prepared.
waiting_internal_reviewAwaiting internal review before being published.
waiting_admin_approvalAwaiting an internal approval decision.
waiting_customer_approvalPublished to the customer, awaiting their decision.
approvedApproved.
approved_by_provider_on_siteApproved on site by the provider.
override_approvedApproved through an override.
rejectedRejected.

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.