Builds a UBL-TR e-Invoice or e-Archive XML document from plain JSON, computing every total and validating the parties.
Selling into Türkiye means issuing a UBL-TR document whose element order is fixed by schema and whose totals must agree to the kuruş, or the integrator rejects it. This endpoint takes the invoice as ordinary JSON and returns the XML. Totals you send are ignored on purpose — line amounts, per-rate VAT subtotals and the payable amount are all recomputed here, because a rounding difference of one kuruş is the most common rejection. VKN and TCKN checksums are verified, and the amount is written out in Turkish words as invoices require. It does not sign the document and does not transmit it: the financial seal and the submission to the tax authority belong to your certificate and your integrator. What comes back is a document ready to enter that step.
Credits per call: 3 · Operation id: tr_invoice_build
In the GET form every field is a query parameter; object and array fields are JSON-encoded.
Request
- Base URL: https://api.temsor.com
- URL: https://api.temsor.com/v1/tr/invoice/build
- Auth: one of:
- HTTP bearer
- API key in header x-api-key
Query parameters
TEMELFATURA: no formal objection flow. TICARIFATURA: buyer may accept/reject. EARSIVFATURA: buyer is not an e-Invoice user.
Invoice number. Omit and supply series to have it built from the series and sequence.
Three-letter series code, used with sequence.
Sequence number within the series and year.
Document UUID (ETTN). Generated when omitted.
ISO 4217. Anything other than TRY requires exchangeRate.
Units of TRY per one unit of currency.
Adds the payable amount written out in Turkish words as a note, the way invoices require.
Delivery note number, if the goods shipped separately.
Response
Success
Changes
No recorded changes to this operation across all 1 revision of this API.