Skip to main content
Certificados (certificates) represent billing milestones linked to obras. They track expedient numbers, amounts, billing months, invoice data, and payment status.
Certificates can also be managed through the obra-scoped endpoints (GET /api/obras/{id}/certificates and POST /api/obras/{id}/certificates). The endpoints documented here operate across all obras in the tenant.

List all certificates

GET /api/certificados
string
Returns a paginated, filtered, and sorted list of all certificates across the authenticated user’s active tenant. Obra name and contracting entity are joined and included in each result.

Query parameters

page
number
default:"1"
Page number (1-indexed).
limit
number
default:"50"
Results per page. Clamped between 1 and 500.
orderBy
string
default:"obra"
Sort column. Accepted values: obra (obra name), ente (contracting entity), monto, n_exp.
orderDir
string
default:"asc"
Sort direction: asc or desc.
q
string
Full-text search across obra name, contracting entity, expedient number, status, month, amount, certificate number, invoice number, concept, observations, billing date, expiry date, and payment date. Diacritics are normalized.

Response

certificados
FlatCertificate[]
required
Paginated array of certificate objects joined with obra data.
pagination
object
required
curl 'https://<domain>/api/certificados?page=1&limit=10&orderBy=monto&orderDir=desc' \
  --cookie 'sb-access-token=<session>'

Update a certificate

PATCH /api/certificados/{id}
string
Partially updates a certificate. Only billing and payment tracking fields are editable through this endpoint.
Core certificate fields (n_exp, n_certificado, monto, mes, estado) are set at creation time through the obra-scoped endpoint and cannot be changed via this PATCH. The allowed fields are restricted to billing and payment tracking.

Path parameters

id
string
required
UUID of the certificate.

Request body

Supply any subset of the following fields:
facturado
boolean
Whether the certificate has been invoiced.
fecha_facturacion
string
Invoice date.
nro_factura
string
Invoice number.
concepto
string
Invoice concept.
cobrado
boolean
Whether payment has been received.
observaciones
string
Free-text observations.
vencimiento
string
Payment due date.
fecha_pago
string
Actual payment date.
Requests that contain no recognised fields return 400 Bad Request with { "error": "No hay campos válidos para actualizar" }.

Response

certificate
Certificate
required
The full updated certificate row as stored in the database.
curl -X PATCH 'https://<domain>/api/certificados/cert-uuid-...' \
  --cookie 'sb-access-token=<session>' \
  --header 'Content-Type: application/json' \
  --data '{
    "cobrado": true,
    "fecha_pago": "2024-07-18"
  }'

Delete a certificate

DELETE /api/certificados/{id}
string
Permanently deletes a certificate. The certificate must belong to an obra within the authenticated user’s active tenant.

Path parameters

id
string
required
UUID of the certificate.

Response

success
boolean
required
Always true on success.
curl -X DELETE 'https://<domain>/api/certificados/cert-uuid-...' \
  --cookie 'sb-access-token=<session>'

Build docs developers (and LLMs) love