Skip to main content
Obras are the central entity in Sintesis. Each obra belongs to a tenant and represents a construction contract with financial and scheduling data.

List obras

GET /api/obras
string
Returns all obras for the authenticated user’s active tenant. Supports pagination, sorting, full-text search, and range filters.

Query parameters

page
number
default:"1"
Page number (1-indexed). Enables paginated mode when provided alongside limit.
limit
number
default:"50"
Results per page. Clamped between 1 and 500.
orderBy
string
default:"n"
Column to sort by. Allowed values: n, designacion_y_ubicacion, sup_de_obra_m2, entidad_contratante, mes_basico_de_contrato, iniciacion, contrato_mas_ampliaciones, certificado_a_la_fecha, saldo_a_certificar, segun_contrato, prorrogas_acordadas, plazo_total, plazo_transc, porcentaje, updated_at.
orderDir
string
default:"asc"
Sort direction: asc or desc.
status
string
Filter by completion status. Accepted values: completed (porcentaje = 100) or in-process (porcentaje < 100).
q
string
Full-text search across designacion_y_ubicacion, entidad_contratante, mes_basico_de_contrato, iniciacion, and numeric fields.
supMin
number
Minimum surface area (m²).
supMax
number
Maximum surface area (m²).
porcentajeMin
number
Minimum completion percentage.
porcentajeMax
number
Maximum completion percentage.
entidad
string[]
Filter by one or more contracting entities. Repeat the parameter for multiple values: ?entidad=MUNICIPIO&entidad=PROVINCIA.
mesYear
string
Filter mes_basico_de_contrato by year substring.
iniYear
string
Filter iniciacion by year substring.
Numeric range filters are also available for contrato_mas_ampliaciones (cmaMin/cmaMax), certificado_a_la_fecha (cafMin/cafMax), saldo_a_certificar (sacMin/sacMax), segun_contrato (scMin/scMax), prorrogas_acordadas (paMin/paMax), plazo_total (ptMin/ptMax), and plazo_transc (ptrMin/ptrMax).

Response

detalleObras
Obra[]
required
Array of obra objects.
pagination
object
Present only when page or limit query params are supplied.
supportsConfigColumns
boolean
required
false if the tenant database does not yet have the on_finish_* columns (older schema).
curl 'https://<domain>/api/obras?page=1&limit=20&orderBy=n&status=in-process' \
  --cookie 'sb-access-token=<session>'

Bulk upsert obras

PUT /api/obras
string
Replaces the entire obras list for the tenant. Records present in the current tenant but absent from the payload are deleted. New obras automatically have tenant-level defaults applied (folders, tablas). When an obra transitions from porcentaje < 100 to porcentaje = 100, an obra.completed workflow event is emitted and any configured flujo actions are executed.

Request body

detalleObras
Obra[]
required
Full array of obras to persist. Each item must conform to the obra schema.

Response

ok
boolean
required
Always true on success.
curl -X PUT 'https://<domain>/api/obras' \
  --cookie 'sb-access-token=<session>' \
  --header 'Content-Type: application/json' \
  --data '{
    "detalleObras": [
      {
        "n": 1,
        "designacionYUbicacion": "Escuela N° 42 — Barrio Norte",
        "supDeObraM2": 1200,
        "entidadContratante": "MUNICIPIO",
        "mesBasicoDeContrato": "enero 2023",
        "iniciacion": "marzo 2023",
        "contratoMasAmpliaciones": 5000000,
        "certificadoALaFecha": 2500000,
        "saldoACertificar": 2500000,
        "segunContrato": 4800000,
        "prorrogasAcordadas": 200000,
        "plazoTotal": 365,
        "plazoTransc": 180,
        "porcentaje": 50
      }
    ]
  }'

Get a single obra

GET /api/obras/{id}
string
Returns a single obra by UUID.

Path parameters

id
string
required
UUID of the obra.

Response

obra
Obra
required
The obra object. See field definitions under List obras.
curl 'https://<domain>/api/obras/a1b2c3d4-...' \
  --cookie 'sb-access-token=<session>'

Replace a single obra

PUT /api/obras/{id}
string
Fully replaces all fields of an existing obra. Completion side-effects (workflow events, flujo actions) fire if porcentaje transitions to 100.

Path parameters

id
string
required
UUID of the obra.

Request body

All obra fields (same schema as the bulk PUT body items, excluding n as identifier — the id path param is authoritative).

Response

ok
boolean
required
Always true on success.

Partially update a single obra

PATCH /api/obras/{id}
string
Updates only the supplied fields of an obra. Omitted fields are left unchanged. Completion side-effects fire if porcentaje transitions to or from 100.

Path parameters

id
string
required
UUID of the obra.

Request body

Any subset of obra fields.

Response

ok
boolean
required
Always true on success.
curl -X PATCH 'https://<domain>/api/obras/a1b2c3d4-...' \
  --cookie 'sb-access-token=<session>' \
  --header 'Content-Type: application/json' \
  --data '{ "porcentaje": 100 }'

Delete a single obra

DELETE /api/obras/{id}
string
Permanently deletes an obra and all its related data (cascaded by the database).

Path parameters

id
string
required
UUID of the obra.

Response

success
boolean
required
Always true on success.

Bulk patch obras

PATCH /api/obras/bulk
string
Upserts multiple obras in a single request. Unlike PUT /api/obras, this endpoint does not delete obras absent from the payload. Defaults are applied to newly created obras.

Request body

updates
Obra[]
required
Array of obra objects to upsert. Each item must include either id (UUID) or a positive n value as identifier. Minimum 1 item.

Response

ok
boolean
required
Always true on success.
count
number
required
Number of obras processed.
supportsConfigColumns
boolean
required
Whether on_finish_* columns are available in this tenant’s schema.

Get certificates for an obra

GET /api/obras/{id}/certificates
string
Returns all certificates linked to the specified obra, ordered by certificate number ascending.

Path parameters

id
string
required
UUID of the obra.

Response

certificates
Certificate[]
required
Array of certificate objects.
total
number
required
Sum of all certificate amounts.

Create a certificate for an obra

POST /api/obras/{id}/certificates
string
Creates a new certificate linked to an obra.

Path parameters

id
string
required
UUID of the obra.

Request body

n_exp
string
required
Expedient number.
n_certificado
number
required
Certificate sequence number.
monto
number
required
Certificate amount.
mes
string
required
Billing month.
estado
string
default:"CERTIFICADO"
Certificate status.

Response

certificate
Certificate
required
The newly created certificate object.

Get findings for an obra

GET /api/obras/{id}/findings
string
Returns reporting findings (anomalies, alerts, or insights) for the specified obra.

Path parameters

id
string
required
UUID of the obra.

Query parameters

period
string
Optional period key to scope findings to a specific reporting period.

Response

findings
object[]
required
Array of finding objects. Structure depends on the reporting rules configured for the tenant.

Get material orders for an obra

GET /api/obras/{id}/materials
string
Returns all material purchase orders associated with an obra, including their line items.

Path parameters

id
string
required
UUID of the obra.

Response

orders
MaterialOrder[]
required
Array of material order objects.

Create a material order for an obra

POST /api/obras/{id}/materials
string
Creates a new material purchase order with line items.

Path parameters

id
string
required
UUID of the obra.

Request body

nroOrden
string
Order number.
solicitante
string
Requestor name.
gestor
string
Manager name.
proveedor
string
Supplier name.
docBucket
string
Storage bucket for attached document.
docPath
string
Storage path for attached document.
items
object[]
required
Line items. Must contain at least one item.

Response

ok
boolean
required
Always true on success.
order
object
required

Build docs developers (and LLMs) love