Skip to main content
POST
Crear solicitud de sincronización a demanda

Authorizations

Authorization
string
header
required

API Key para autenticación. Debe proporcionarse en el header Authorization con el formato: 'Api-Key YOUR-API-KEY' (incluye el prefijo 'Api-Key ' seguido de tu API key)

Body

application/json
master_entity_id
string
required

ID de la entidad maestra. El public ID de la entidad (ment_...).

Example:

"ment_4829301923847"

scrape_types
enum<string>[]

Tipos de scrape a ejecutar. Si se omite o va vacío, se sincronizan todos los tipos habilitados para la entidad.

Available options:
ISSUED_DOCS,
RECEIVED_DOCS,
RECEIVED_HONORARY_BILLS,
THIRD_PARTY_HONORARY,
EMITTED_HONORARY_BILLS,
PURCHASE_BOOK,
SALE_BOOK,
BOOK_SUMMARY
Example:
webhook_url
string<uri>

URL opcional. Al completarse la solicitud hacemos un POST (best effort, timeout 5 s) con el payload {id, status, results}.

Example:

"https://miapp.cl/webhooks/tupana-sync"

Response

Solicitud creada; el scrape corre en segundo plano

Solicitud de sincronización a demanda (recurso asíncrono)

id
string

ID de la solicitud public ID (ment_...).

Example:

"ment_4829301923847"

master_entity_id
string

ID entero de la entidad sincronizada public ID (ment_...).

Example:

"ment_4829301923847"

requested_types
enum<string>[]

Tipos de scrape pedidos. Lista vacía = todos los tipos habilitados para la entidad.

Available options:
ISSUED_DOCS,
RECEIVED_DOCS,
RECEIVED_HONORARY_BILLS,
THIRD_PARTY_HONORARY,
EMITTED_HONORARY_BILLS,
PURCHASE_BOOK,
SALE_BOOK,
BOOK_SUMMARY
Example:
status
enum<string>

Estado de la solicitud: pending (creada, en cola), processing (scrapes corriendo), completed (todos los tipos terminaron OK), failed (al menos un tipo falló).

Available options:
pending,
processing,
completed,
failed
Example:

"pending"

webhook_url
string

URL registrada para notificar al completar. String vacío si no se registró webhook.

Example:

"https://miapp.cl/webhooks/tupana-sync"

results
object

Resultado por tipo de scrape al terminar. Las claves son los scrape_type ejecutados y cada valor es un objeto con success (boolean) más contadores como new_documents, o error si falló. Objeto vacío mientras la solicitud está pending/processing.

Example:
completed_at
string<date-time> | null

Fecha/hora en que terminó de procesarse. null mientras está pending/processing.

Example:

"2026-07-20T14:34:12Z"

created_at
string<date-time>

Fecha/hora de creación de la solicitud

Example:

"2026-07-20T14:30:00Z"