Finance

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

post/v1/tr/invoice/build

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

Request body

profile'TEMELFATURA' | 'TICARIFATURA' | 'EARSIVFATURA'

TEMELFATURA: no formal objection flow. TICARIFATURA: buyer may accept/reject. EARSIVFATURA: buyer is not an e-Invoice user.

invoiceTypeCode'SATIS' | 'IADE'
idstring

Invoice number. Omit and supply series to have it built from the series and sequence.

seriesstring

Three-letter series code, used with sequence.

sequenceinteger

Sequence number within the series and year.

uuidstring uuid

Document UUID (ETTN). Generated when omitted.

issueDatestring required
issueTimestring
currencystring

ISO 4217. Anything other than TRY requires exchangeRate.

exchangeRatenumber

Units of TRY per one unit of currency.

notesstring[]
amountInWordsboolean

Adds the payable amount written out in Turkish words as a note, the way invoices require.

despatchDocumentIdstring

Delivery note number, if the goods shipped separately.

orderReferenceIdstring

Response

Success

okunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.