On this page

Quickstart

Transmit an invoice to the DIAN from the Lynx electronic invoicing Edge Function in a few minutes.

Before you start

  • The Supabase URL of your deployment and its publishable key (apikey).
  • A session access token for a user with the admin or operador role in the organization. See Authentication.
  • The org_id of your organization and the invoice_ids you want to transmit.

Everything is POST, with the session token

The invoicing operations only accept POST, and every call needs org_id. The token is the user’s session token, not a long-lived API key.

Transmit an invoice

Call /transmit with the organization and the invoices. Up to 50 per call; each one is processed on its own, so one error doesn’t stop the rest.

POST /functions/v1/lynx-einvoicing/transmit
curl -X POST "$LYNX_SUPABASE_URL/functions/v1/lynx-einvoicing/transmit" \
  -H "Authorization: Bearer $LYNX_TOKEN" \
  -H "apikey: $LYNX_ANON_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "org_id": "3f1c9a2e-…", "invoice_ids": ["7b2e…", "9c4a…"] }'

# 200 OK
{ "results": [ { "invoice_id": "7b2e…", "status": "transmitida", "message": "Aceptada por la DIAN" } ] }

Read the result

The response carries a results array, one entry per invoice:

Field Meaning
invoice_id The invoice the entry refers to.
status Its state after the call, e.g. transmitida or error.
message A human-readable detail.

Next steps