Skip to main content

Route settlements

Route settlements are an operational grouping of receivables registered by an associate during a workday, identified by a route code. They apply to customers whose operating model includes drivers or distributors who visit clients during a single shift and need to settle what they collected at the end of the day.

When to use this resource

If your customer has no fleet or does not use the route-sheet concept, you can ignore this section. Route settlements apply to models B and C on the associates' side.

Model

{
"id": 5001,
"routeCode": "AA-2026-05-15-042",
"date": "2026-05-15",
"associateId": 88,
"receivableAccountIds": [4242, 4243, 4250],
"summary": {
"receivablesCount": 12,
"totalAmount": 425000.00,
"byReceivableType": [
{ "type": "INVOICE", "count": 10, "amount": 450000.00 },
{ "type": "RETURN_PRODUCT", "count": 1, "amount": -15000.00 },
{ "type": "RETENTION", "count": 1, "amount": -10000.00 }
]
},
"creationDate": "2026-05-15T18:30:00-03:00"
}
FieldDescription
routeCodeRoute code. Unique per date and customer
dateDate of the route settlement
associateIdAssociate who settled
receivableAccountIdsReceivable accounts touched during the shift
summary.receivablesCountNumber of receivables registered during the shift
summary.totalAmountNet sum (positives add, negatives subtract)
summary.byReceivableTypeBreakdown by receivable type

Endpoints

MethodPathDescription
GET/v1/route-settlementsList with filters
POST/v1/route-settlementsCreate or update a route settlement
GET/v1/route-settlements/{routeCode}Detail by code
GET/v1/route-settlements/{routeCode}/receivablesReceivables for the route settlement
GET/v1/associates/{id}/route-settlementsRoute settlements for an associate

Create or update

POST /v1/route-settlements
Idempotency-Key: erp-route-AA-2026-05-15-042
Content-Type: application/json

{
"routeCode": "AA-2026-05-15-042",
"date": "2026-05-15",
"associateId": 88
}
FieldTypeRequiredDescription
routeCodestringYesUnique per date and customer
dateYYYY-MM-DDYesDate of the shift
associateIdint64YesResponsible associate

Once created, any receivables that the associate registers during the day with externalRoutingCode = "AA-2026-05-15-042" are automatically grouped under this route settlement.

Validations

ValidationError
routeCode already exists for a different date422 route-code-already-used
Disabled associate422 associate-disabled
Same (routeCode, date) with a different associateId409 route-code-already-used

Filters

GET /v1/route-settlements
ParameterTypeDescription
associateIdint64Route settlements for an associate
routeCodestringSearch by code
fromDate, toDateYYYY-MM-DDDate range
page, countintPagination

List receivables for a route settlement

GET /v1/route-settlements/AA-2026-05-15-042/receivables

Returns the list of receivables (not settlement items, but the receivables registered during that shift). Each one includes its status, amount, client, etc. This is the main input for the driver's daily reconciliation.