Skip to main content

Billing — Catalogs

Lookup endpoints for billing reference data. Use these to discover valid values for status_code, concept_id, tariff_id, and currency_id before creating or filtering invoices.

Prerequisites

All endpoints on this page require a valid JWT token, API key, and tenant header. See Authentication for details.

Pending Implementation

These endpoints are documented but not yet implemented in the public API (/apidev/v1/billing/*). The internal billing services exist in geotareas/facturacion/ but have not been wired to the API developers module. This documentation reflects the planned contract — DTOs, controller routes, permissions, and tests are still pending.


Billing Statuses

List all invoice status codes configured for the tenant.

GET/apidev/v1/billing/statuses
PermissionAPICLI_BILLING_READ
Rate Limit60 req/min
Cache300s

Request Headers

Every request to a protected endpoint requires these headers:

HeaderRequiredDescription
AuthorizationYesBearer token obtained from the Login endpoint. Format: Bearer <token>
X-API-KeyYesCompany integration key provided during onboarding. Format: gtk_xxx...
tenantYesYour company hostname (e.g., yourcompany.geotareas.com)
Content-TypeConditionalapplication/json — required for POST and PUT requests

Response Fields

FieldTypeDescription
idstringStatus ID
codestringStatus code used in API filters and mutations
namestringDisplay name
behaviorintegerSystem behavior code (1=Pending, 2=Reconciled, 3=Closed, 9=Cancelled)
behavior_namestringHuman-readable behavior label
is_estimatedbooleanWhether this is an estimated/provisional status

Code Examples

curl -s -X GET "https://api.example.com/apidev/v1/billing/statuses" \
-H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT"

Response Example

{
"success": true,
"data": [
{ "id": "1", "code": "PENDIENTE", "name": "Pendiente", "behavior": 1, "behavior_name": "Pendiente", "is_estimated": false },
{ "id": "2", "code": "CONCILIADO", "name": "Conciliado", "behavior": 2, "behavior_name": "Conciliado", "is_estimated": false },
{ "id": "3", "code": "CERRADA", "name": "Cerrada", "behavior": 3, "behavior_name": "Cerrada", "is_estimated": false },
{ "id": "9", "code": "ANULADA", "name": "Anulada", "behavior": 9, "behavior_name": "Anulada", "is_estimated": false }
]
}

Billing Concepts

List all billable concept types configured for the tenant (e.g., "Movida", "Kilometros recorridos").

GET/apidev/v1/billing/concepts
PermissionAPICLI_BILLING_READ
Rate Limit60 req/min
Cache300s

Response Fields

FieldTypeDescription
idstringConcept ID used in invoice creation
namestringConcept display name
unit.idstringUnit ID
unit.namestringUnit name (e.g., "Unidades", "Kilometros")
descriptionstringOptional description

Response Example

{
"success": true,
"data": [
{
"id": "3",
"name": "Movida",
"unit": { "id": "1", "name": "Unidades" },
"description": "Servicio de grua / traslado basico"
},
{
"id": "5",
"name": "Kilometros recorridos",
"unit": { "id": "2", "name": "Kilometros" },
"description": ""
}
]
}

Currencies

List currencies available for the tenant.

GET/apidev/v1/billing/currencies
PermissionAPICLI_BILLING_READ
Rate Limit60 req/min
Cache600s

Response Fields

FieldTypeDescription
idstringCurrency ID used in invoice creation
namestringCurrency name
symbolstringCurrency symbol (e.g., "$U", "US$")

Response Example

{
"success": true,
"data": [
{ "id": "1", "name": "Pesos Uy", "symbol": "$U" },
{ "id": "2", "name": "Dolar Americano", "symbol": "US$" }
]
}

Tariffs

List active tariffs available for invoice creation.

GET/apidev/v1/billing/tariffs
PermissionAPICLI_BILLING_READ
Rate Limit60 req/min
Cache120s

Query Parameters

ParameterTypeDescription
provider_idstringFilter by provider
currency_idstringFilter by currency
typestringFilter by type: PAGAR or COBRAR

Response Fields

FieldTypeDescription
idstringTariff ID
namestringTariff name
typestringPAGAR or COBRAR
statusstringACTIVA or INACTIVA
currency.idstringCurrency ID
currency.namestringCurrency name
currency.symbolstringCurrency symbol
providerobject | nullSpecific provider, or null if applies to all
applies_to_all_providersbooleanWhether the tariff is global
prestations_countintegerNumber of applicable prestations
origins_countintegerNumber of applicable origins
concepts_countintegerNumber of concepts in the tariff

Response Example

{
"success": true,
"data": [
{
"id": "1",
"name": "Tarifa General - Prestador",
"type": "PAGAR",
"status": "ACTIVA",
"currency": { "id": "1", "name": "Pesos Uy", "symbol": "$U" },
"provider": null,
"applies_to_all_providers": true,
"prestations_count": 3,
"origins_count": 2,
"concepts_count": 2
}
]
}

Tariff Detail

Get the full detail of a tariff including its concepts, unit prices, prestations, and origins.

GET/apidev/v1/billing/tariffs/{id}
PermissionAPICLI_BILLING_READ
Rate Limit60 req/min
Cache120s

Response Example

{
"success": true,
"data": {
"id": "1",
"name": "Tarifa General - Prestador",
"type": "PAGAR",
"status": "ACTIVA",
"currency": { "id": "1", "name": "Pesos Uy", "symbol": "$U" },
"provider": null,
"provider_type": null,
"vehicle_type": null,
"shift": null,
"prestations": [
{ "id": "10", "name": "Asistencia Vial" },
{ "id": "11", "name": "Grua" }
],
"origins": [
{ "id": "99", "name": "Servicios Sura" }
],
"concepts": [
{
"concept_id": "3",
"concept_name": "Movida",
"type": 1,
"unit_price": 900.00,
"negotiable": false,
"includes_tax": false,
"tax_percent": 22.00,
"total": 1098.00
},
{
"concept_id": "5",
"concept_name": "Kilometros recorridos",
"type": 1,
"unit_price": 50.00,
"negotiable": true,
"includes_tax": false,
"tax_percent": 22.00,
"total": 61.00
}
]
}
}

Errors

CodeHTTPDescription
BILLING_TARIFF_NOT_FOUND404Tariff not found
CodeHTTP StatusDescriptionResolution
VALIDATION_ERROR400Request body or query parameters failed validationCheck the error.details field for specific validation failures
UNAUTHORIZED401Missing, expired, or invalid JWT token or API keyRe-authenticate via Login to get a fresh token
RATE_LIMITED429Too many requests — rate limit exceededWait until the Retry-After header time elapses. See Rate Limits
INTERNAL_ERROR500Unexpected server errorRetry after a brief delay. If persistent, contact support