Skip to main content

POST /v1/invoices

Issues a signed e-CF and submits it to DGII asynchronously.

Request

curl -X POST https://sandbox.api.erply.pro/v1/invoices \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d @invoice.json

Required headers

HeaderNotes
AuthorizationBearer <jwt> obtained from /v1/auth/token.
Idempotency-KeyUUID v4. TTL 24 h.
Content-Typeapplication/json; charset=utf-8.

Body

{
"tenantId": "demo-rnc-131000001",
"ecfType": "31",
"encf": "E310000000001",
"issueDate": "2026-05-01",
"buyer": { "rnc": "131000002", "name": "Cliente Demo S.R.L." },
"lines": [
{ "description": "Servicio", "qty": 1, "unitPrice": 5000.00, "taxRate": 0.18 }
],
"subtotal": 5000.00,
"tax": 900.00,
"grandTotal": 5900.00
}

Responses

HTTPMeaning
202 AcceptedAccepted, queued for DGII.
200 OKIdempotent replay.
{
"docId": "01HW9X4G…",
"trackId": "20260501-DGII-9988",
"status": "pending",
"_links": {
"self": "/v1/invoices/01HW9X4G…",
"status": "/v1/invoices/01HW9X4G…/status"
}
}

Possible errors

HTTPSlugCause
400malformed-jsonBody is not JSON.
400unsupported-ecf-typeType outside the catalog.
400validation-errorPydantic failed.
401unauthorisedInvalid token.
422mathematical-discrepancyTotals don't match.
422tenant-config-missingMissing RNC/PFX.
422dgii-rejected (+ DGII code)DGII rejection.
504dgii-unavailableDGII timeout.

See the full DGII error dictionary for the numeric codes.