Skip to content
Documentation topics

API reference

Routes an external system can use: customers, contacts, documents, payments, SII status and tickets, with their main fields.

All routes start with /api/v1. Unless stated otherwise, they carry the headers from Authentication and the responses have the shape { "success", "data", "message", "errors" } (see Errors and usage rules).

A read route works only if the service user of your access has the matching permission; a write route must also be authorized by name. This page describes the routes meant for external systems. The Synaptik application uses many others that an application access cannot reach.

Customers

Method and routeWhat it does
GET /clientsLists customers and suppliers, paged. Parameters: page, pageSize, search, activeOnly, isClient, isProvider.
GET /clients/{uid}One customer by uid.
GET /clients/by-code/{code}One customer by code.
GET /clients/by-email/{email}One customer by email.
GET /clients/by-external-id/{externalId}One customer by the identifier you gave it.
POST /clients/upsert-by-rutLooks up a customer by RUT and creates it if missing. Safe to repeat without creating duplicates. Write clients.create.

Body of upsert-by-rut:

FieldDescription
rutFull RUT with check digit, for example 77333333-3. Required.
razonSocialLegal name. Required.
role0 customer, 1 supplier.
matchOnRutAloneWith true, if a customer with that RUT already exists it is returned, whatever name it was saved with. Use it so a retry does not create a second customer.
giro, direccion, comuna, emailOptional.
curl -X POST "https://YOUR_API_ADDRESS/api/v1/clients/upsert-by-rut" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-Synaptik-Tenant: YOUR_TENANT" \
  -H "X-Synaptik-Workspace: YOUR_WORKSPACE_UID" \
  -H "X-Client-Uid: YOUR_WORKSPACE_UID" \
  -H "Content-Type: application/json" \
  -d '{ "rut": "77333333-3", "razonSocial": "Example Trading SpA", "role": 0, "matchOnRutAlone": true }'

The response is the customer's uid as bare JSON text (a quoted GUID), not inside the data envelope. That uid is the documentClientUid of your invoices.

Contacts (CRM)

Method and routeWhat it does
POST /crm/contacts/upsertLooks up a person by email or phone, creates them if missing, and updates them. Safe to repeat. Write contacts.upsert.
GET /crm/contactsLists contacts. Parameters: page, pageSize, search.
GET /crm/contacts/{uid}One contact.
GET /crm/consent-purposesConsent purposes defined in the company.
GET /crm/custom-fieldsCustom fields defined in the company.

Body of upsert: email, phone, firstName, lastName, company, companyClientUid, source, sourceId, notes, tags (list of strings), fields (object with custom field values), activity (one event for the history) and consents (list of consents). The response carries contact and created (whether the person was new).

Documents

A sales invoice uses clientUid (your workspace) and documentClientUid (the customer).

Method and routeWhat it does
GET /documentsLists documents, newest first, paged.
GET /documents/{uid}One document with its totals and state.
GET /documents/by-number/{id}/type/{type}One document by folio and type.
GET /documents/{documentUid}/itemsThe lines of a document.
GET /documents/{uid}/pdfThe document as a PDF (application/pdf). Optional parameter formatUid.
POST /documentsCreates a document, with its lines if items is sent. Write documents.create.
POST /documents/{documentUid}/itemsAdds a line to a draft document. Write documents.create.
PATCH /documents/{uid}/stateChanges a document's state. Write documents.state.
GET /documents/{uid}/transitionsThe states the document can move to.

Filters of GET /documents: page, pageSize, search, type, types, state, owner (1 sales, 0 purchases; no value means both), fromDate, toDate (both included; for a whole day send yyyy-MM-ddT23:59:59), externalReference (the document created with that reference) and includeTotal (false skips counting the total).

Create an invoice

Main fields of POST /documents:

FieldDescription
externalReferenceYour own identifier for what you bill. Up to 100 characters, unique in the company. It makes a retry safe.
typeDocument type. In a Chilean company, 0 is a factura and 2 an exempt factura.
clientUidYour workspace uid.
documentClientUidThe customer's uid.
date, dueDateIssue date and due date.
currencyUidThe currency's uid.
electronictrue for an electronic tax document.
itemsThe document's lines.
name, email, reference, mem, paymentTerms, discount, discountAmountOptional.

Fields of each line in items (and of the body of POST /documents/{uid}/items): name (required), type (3 is an exempt line), qty, unitPrice, description, discount, measureUnitName or measureUnitUid, salesItemUid, lineNumber.

curl -X POST "https://YOUR_API_ADDRESS/api/v1/documents" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-Synaptik-Tenant: YOUR_TENANT" \
  -H "X-Synaptik-Workspace: YOUR_WORKSPACE_UID" \
  -H "X-Client-Uid: YOUR_WORKSPACE_UID" \
  -H "Content-Type: application/json" \
  -d '{
    "externalReference": "RENT-302-2026-10",
    "type": 0,
    "clientUid": "YOUR_WORKSPACE_UID",
    "documentClientUid": "CUSTOMER_UID",
    "date": "2026-10-05",
    "dueDate": "2026-10-15",
    "currencyUid": "CURRENCY_UID",
    "electronic": true,
    "items": [
      { "name": "October rent, apartment 302", "qty": 1, "unitPrice": 400000, "type": 0, "lineNumber": 1 }
    ]
  }'
ResponseMeaning
201A new document was created.
200This reference already has a document made from the same request. Nothing was written; data is that document.
409This reference already has a document made from different data. Nothing was written; data.uid is that document.
400Invalid request, for example a line without a name. Nothing was saved.

The document and all its lines are saved together or not at all. Prices, exempt lines, IVA and totals are computed exactly as for lines added one by one.

Approve the document

curl -X PATCH "https://YOUR_API_ADDRESS/api/v1/documents/DOCUMENT_UID/state" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-Synaptik-Tenant: YOUR_TENANT" \
  -H "X-Synaptik-Workspace: YOUR_WORKSPACE_UID" \
  -H "X-Client-Uid: YOUR_WORKSPACE_UID" \
  -H "Content-Type: application/json" \
  -d '{ "documentState": 4, "stateNote": "Approved by the platform" }'

documentState is the target state and stateNote is an optional note. For a factura and an exempt factura, approval moves the document from state 0 to state 4. GET /documents/{uid}/transitions shows which states the document can move to. Approving a factura sends it to the SII. The response carries the result of the change in data (state, message); a state of 0 is success. If the change could not be made, the answer is 403, 404 or 409 (see Errors and usage rules).

SII status

Method and routeWhat it does
GET /sii/documents/{documentUid}The document's status with the SII: TrackID, verdict, stamp and objections with their code.
GET /sii/documents/{documentUid}/eventsOne document's SII log, newest first.
GET /sii/eventsThe whole company's SII log. Parameters: outcome (ok, aviso, error), kind, from, to, page, pageSize (50 by default).

Customer payments

Method and routeWhat it does
POST /receivables/customer-paymentsRecords a payment and applies it to the customer's invoices. Write payments.create.
GET /receivables/customer-payments?externalReference=...Returns the payment with that reference, or 404.
POST /receivables/customer-payments/reverseReverses a payment your system recorded. Write payments.reverse.
GET /paymentdocuments/for-document/{documentUid}Payments applied to a document.
POST /paymentdocumentsCreates a payment document with references to other documents (an older route; for customer payments use customer-payments). Write payments.create.

Body of POST /receivables/customer-payments:

{
  "externalReference": "PAY-2026-10-000123",
  "date": "2026-10-15",
  "amount": 450000,
  "method": "transfer",
  "bank": "Banco Estado",
  "customerRut": "77333333-5",
  "note": "October rent, apartment 302",
  "applications": [
    { "documentExternalReference": "RENT-302-2026-10", "amount": 400000 },
    { "documentType": 0, "folio": 1234, "amount": 50000 }
  ]
}
  • externalReference: your identifier for the payment, up to 100 characters, unique in the company.
  • date: the day the money arrived. It cannot be after today (Chile time).
  • amount: in whole Chilean pesos.
  • method: transfer, webpay, cheque or cash. A cheque needs bank and chequeNumber, and accepts chequeDate, chequeIssueDate, chequeAccountNumber and chequeHolderRut; those last four are refused with any other method.
  • The customer is named with customerRut or customerUid. If both are sent, they must be the same customer.
  • Each line of applications names one document in one way only: documentUid, or documentType with folio, or documentExternalReference. Without amount, the line takes what the document still owes, up to what is left of the payment.
  • Without applications, the payment is applied to the oldest open invoices first. Whatever is not applied stays in the customer's favour.
ResponseMeaning
201A new payment was recorded.
200This reference already has a payment made from the same request. Nothing was written; data is that payment.
409 reference_conflictThe reference already has a payment made from different data.
400 invalid_requestThe body is wrong: no reference, an amount of zero or with decimals, an unknown method.
422Nothing was written. The code is in message: customer_not_found, customer_mismatch, document_not_found, document_not_payable, application_exceeds_open, applications_exceed_amount, duplicate_document, duplicate_cheque, future_date, no_default_currency.
503 busyAnother payment of the same company was being applied. Nothing was written; send the same request again in a few seconds.

Reverse a payment:

curl -X POST "https://YOUR_API_ADDRESS/api/v1/receivables/customer-payments/reverse" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-Synaptik-Tenant: YOUR_TENANT" \
  -H "X-Synaptik-Workspace: YOUR_WORKSPACE_UID" \
  -H "X-Client-Uid: YOUR_WORKSPACE_UID" \
  -H "Content-Type: application/json" \
  -d '{ "externalReference": "PAY-2026-10-000123", "reason": "bounced_cheque", "note": "Cheque bounced" }'

reason is bounced_cheque, refund or other. Every invoice the payment had paid owes that amount again, and the payment stays on record with status: "reversed". Sending the same reversal again answers 200 with the same record; an unknown reference answers 404 not_found.

The payment the API returns:

{
  "success": true,
  "data": {
    "uid": "...", "folio": 5012, "externalReference": "PAY-2026-10-000123",
    "status": "applied", "date": "2026-10-15T00:00:00", "amount": 450000,
    "method": "transfer", "bank": "Banco Estado", "chequeNumber": null,
    "customerUid": "...", "customerRut": "77333333-5", "customerName": "...",
    "applied": 450000, "unapplied": 0,
    "applications": [
      { "documentUid": "...", "documentType": 0, "folio": 1201,
        "externalReference": "RENT-302-2026-10", "amount": 400000, "balanceAfter": 0, "reverted": false }
    ],
    "posting": { "status": "posted", "asientoUid": "...", "message": null },
    "reversal": null,
    "createdAt": "2026-10-15T14:03:11+00:00"
  },
  "message": "Payment recorded",
  "errors": []
}

Tickets (integration key)

These three routes use the X-Integration-Key header instead of a token. See Authentication.

Method and routeWhat it does
POST /integration/ticketsOpens a ticket in the key's project.
GET /integration/tickets/{externalReference}Reads the ticket created with that reference.
POST /integration/tickets/{externalReference}/commentsAdds a comment to the ticket.

Body of POST /integration/tickets:

FieldDescription
externalReferenceYour identifier (an alert, a form submission). Required. Repeating the same reference returns the same ticket instead of creating another.
subjectSubject. Required.
bodyOptional detail. It is stored as an internal note.

Response of POST and GET (200; there is no success/data envelope). The values are an example:

{
  "externalReference": "ALERT-2041",
  "ticketNumber": "TCK-1042",
  "subject": "Disk at 95% on server 3",
  "state": "New",
  "isOpen": true,
  "openedAt": "2026-11-05T14:02:11Z"
}

Body of .../comments: { "text": "..." } (required). It answers 204.

StatusBody
400{ "error": "externalReference and subject are required." } or { "error": "text is required." }
401No body. The key is missing, unknown or revoked.
404The reference does not exist for this key.
409{ "error": "This key's project is not accepting tickets." }
429More than 60 requests per minute from the same IP.

Keys and webhooks

The /integration/keys and /integration/webhooks routes are used by a person with their session, not by a system. They are described in Authentication and Webhooks.