TRANXACT.AI Help

Accounting · E-invoicing

ZATCA Submissions

Every invoice and note stamped under ZATCA Phase 2 and what ZATCA said. A tax invoice (B2B) is cleared when it is posted and may be given to the buyer only once cleared; a simplified invoice (B2C) is reported within 24 hours. One that could not be sent is tried again automatically with the same document. A REJECTED document may not be given to anybody and is never sent again as it is: re-issue it, correct the cause and post the new one.

Type REST12 operationsBase path /api/accounting/zatca-submissionsPublished as /api/v1/zatca-submissions

Download specification (OpenAPI 3.1) Screen: ZATCA Submissions

Overview

PackageAccounting
AuthenticationBearer token: a service account's token (POST /api/auth/service-token) or, for the published path, an API key
AuthorizationThe caller's roles must hold Accounting › ZATCA Submissions on the Roles screen: display for GET, add for POST, change for PUT, delete for DELETE; an action needs the grant of the button that runs it on the screen.
Tableacct.ar_invoices · kept per company (and organisational unit where it has one)
RecordRead only; key id
RulesThe same as the screen: validation, numbering, approvals, posting, the company the caller belongs to, and the audit trail.

API reference

12 operations. Open one for its parameters, bodies, responses and a sample request.

GET/api/accounting/zatca-submissionsList zatca submissions

Query parameters

NameDescriptionExample
limitRows per page (50 by default, at most 200)limit=100
offsetRows to skipoffset=200
qFree-text search over the search columnsq=acme
sortcolumn:asc or column:desc, several separated by commassort=created_at:desc
filterA JSON condition or group (see the filter language), URL-encoded; any field below can be filtered and sortedfilter={"col":"status","op":"eq","value":"open"}
<field>=<value>Shorthand for "field is value" 

Response 200

{
  "rows": [
    {
      "id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
      "invoice_no": "INV-000001",
      "customer_account_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
      "patient_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
      "source_module": "text",
      "source_ref": "text",
      "invoice_date": "2026-10-30",
      "due_date": "2026-10-30",
      "currency": "USD",
      "subtotal": "1250.00",
      "tax": "1250.00",
      "total": "1250.00",
      "amount_paid": "1250.00",
      "status": "draft"
    }
  ],
  "count": 1
}

Sample request

curl "https://demo.tranxact.ai/api/accounting/zatca-submissions?limit=20" \
  -H "Authorization: Bearer $TOKEN"
GET/api/accounting/zatca-submissions/{id}Read one zatca submission

Path parameters

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

Response 200

{
  "id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "invoice_no": "INV-000001",
  "customer_account_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "patient_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "source_module": "text",
  "source_ref": "text",
  "invoice_date": "2026-10-30",
  "due_date": "2026-10-30",
  "currency": "USD",
  "subtotal": "1250.00",
  "tax": "1250.00",
  "total": "1250.00",
  "amount_paid": "1250.00",
  "status": "draft"
}

404 when no record with that id is visible to the caller.

Sample request

curl "https://demo.tranxact.ai/api/accounting/zatca-submissions/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
  -H "Authorization: Bearer $TOKEN"
POST/api/accounting/zatca-submissions/runRun

No body is required.

Response

200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.

Sample request

curl -X POST "https://demo.tranxact.ai/api/accounting/zatca-submissions/run" \
  -H "Authorization: Bearer $TOKEN"
POST/api/accounting/zatca-submissions/{id}/resubmitResubmit

Path parameters

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

No body is required.

Response

200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.

Sample request

curl -X POST "https://demo.tranxact.ai/api/accounting/zatca-submissions/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/resubmit" \
  -H "Authorization: Bearer $TOKEN"
POST/api/accounting/zatca-submissions/{id}/reissueReissue

Path parameters

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

No body is required.

Response

200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.

Sample request

curl -X POST "https://demo.tranxact.ai/api/accounting/zatca-submissions/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/reissue" \
  -H "Authorization: Bearer $TOKEN"
GET/api/accounting/zatca-submissions/{id}/logLog

Path parameters

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

Response

200 with the data as JSON.

Sample request

curl "https://demo.tranxact.ai/api/accounting/zatca-submissions/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/log" \
  -H "Authorization: Bearer $TOKEN"
GET/api/accounting/zatca-submissions/{id}/pdfPdf

Path parameters

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

Response

200 with the data as JSON.

Sample request

curl "https://demo.tranxact.ai/api/accounting/zatca-submissions/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/pdf" \
  -H "Authorization: Bearer $TOKEN"
GET/api/accounting/zatca-submissions/{id}/xmlXml

Path parameters

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

Response

200 with the data as JSON.

Sample request

curl "https://demo.tranxact.ai/api/accounting/zatca-submissions/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/xml" \
  -H "Authorization: Bearer $TOKEN"
POST/api/accounting/zatca-submissionsPost zatca submissions

No body is required.

Response

200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.

Sample request

curl -X POST "https://demo.tranxact.ai/api/accounting/zatca-submissions" \
  -H "Authorization: Bearer $TOKEN"
POST/api/accounting/zatca-submissions/{id}/copyCopy

Path parameters

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

Request body

The keys this action reads (* = required; "one of" lists the only values):

overrides, preview, withLines

Response

200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.

Sample request

curl -X POST "https://demo.tranxact.ai/api/accounting/zatca-submissions/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/copy" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"overrides":"value","preview":"value","withLines":"value"}'
PUT/api/accounting/zatca-submissions/{id}Put zatca submissions

Path parameters

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

No body is required.

Response

200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.

Sample request

curl -X PUT "https://demo.tranxact.ai/api/accounting/zatca-submissions/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
  -H "Authorization: Bearer $TOKEN"
DELETE/api/accounting/zatca-submissions/{id}Delete zatca submissions

Path parameters

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

No body is required.

Response

200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.

Sample request

curl -X DELETE "https://demo.tranxact.ai/api/accounting/zatca-submissions/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
  -H "Authorization: Bearer $TOKEN"

Data model

Every field of a zatca submission, as the API returns it. Field names are the JSON keys; any of them can be filtered and sorted on a list.

FieldTypeAccessDescription
iduuidread onlyId
org_iduuidread onlyOrg id
invoice_notextread onlyInvoice no
customer_account_iduuidread onlyCustomer account id
patient_iduuidread onlyPatient id
source_moduletextread onlySource module
source_reftextread onlySource ref
invoice_datedateread onlyInvoice date
due_datedateread onlyDue date
currencytextread onlyCurrency
subtotalnumericread onlySubtotal
taxnumericread onlyTax
totalnumericread onlyTotal
amount_paidnumericread onlyAmount paid
statustextread onlyStatus
journal_iduuidread onlyJournal id
created_attimestamp with time zoneread onlyCreated at
org_unit_iduuidread onlyOrg unit id
cost_center_iduuidread onlyCost center id
profit_center_iduuidread onlyProfit center id
document_typetextread onlyDocument type
related_invoice_iduuidread onlyRelated invoice id
memo_reasontextread onlyMemo reason
cancelled_attimestamp with time zoneread onlyCancelled at
cancelled_byuuidread onlyCancelled by
cancel_reasontextread onlyCancel reason
reversed_by_iduuidread onlyReversed by id
reverses_iduuidread onlyReverses id
exchange_ratenumericread onlyExchange rate
base_totalnumericread onlyBase total
xf_text_1textread onlyXf text 1
xf_text_2textread onlyXf text 2
xf_text_3textread onlyXf text 3
xf_text_4textread onlyXf text 4
xf_text_5textread onlyXf text 5
xf_num_1numericread onlyXf num 1
xf_num_2numericread onlyXf num 2
xf_num_3numericread onlyXf num 3
xf_date_1dateread onlyXf date 1
xf_date_2dateread onlyXf date 2
created_byuuidread onlyCreated by
updated_attimestamp with time zoneread onlyUpdated at
updated_byuuidread onlyUpdated by
invoice_subtypetextread onlyInvoice subtype
issued_attimestamp with time zoneread onlyIssued at
supply_datedateread onlySupply date
supply_end_datedateread onlySupply end date
seller_snapshotjsonbread onlySeller snapshot
buyer_snapshotjsonbread onlyBuyer snapshot
zatca_qrtextread onlyZatca qr
vat_total_sarnumericread onlyVat total sar
zatca_regimetextread onlyZatca regime
issued_backfilledbooleanread onlyIssued backfilled
zatca_uuiduuidread onlyZatca uuid
invoice_hashtextread onlyInvoice hash
previous_invoice_hashtextread onlyPrevious invoice hash
icvbigintread onlyIcv
subtype_changed_byuuidread onlySubtype changed by
subtype_changed_attimestamp with time zoneread onlySubtype changed at
backfill_repaired_attimestamp with time zoneread onlyBackfill repaired at
backfill_repairjsonbread onlyBackfill repair
supplier_gstintextread onlySupplier gstin
buyer_gstintextread onlyBuyer gstin
supply_state_codetextread onlySupply state code
place_of_supplytextread onlyPlace of supply
is_interstatebooleanread onlyIs interstate
is_reverse_chargebooleanread onlyIs reverse charge
is_exportbooleanread onlyIs export
export_typetextread onlyExport type
shipping_bill_notextread onlyShipping bill no
cgst_totalnumericread onlyCgst total
sgst_totalnumericread onlySgst total
igst_totalnumericread onlyIgst total
cess_totalnumericread onlyCess total
round_offnumericread onlyRound off
duplicate_reasontextread onlyDuplicate reason
duplicate_of_textread onlyDuplicate of
duplicate_confirmed_byuuidread onlyDuplicate confirmed by
duplicate_confirmed_attimestamp with time zoneread onlyDuplicate confirmed at
egs_unit_iduuidread onlyEgs unit id
zatca_invoice_type_codetextread onlyZatca invoice type code
zatca_transaction_codetextread onlyZatca transaction code
zatca_statustextread onlyZatca status
signed_xmltextread onlySigned xml
zatca_signed_attimestamp with time zoneread onlyZatca signed at
cleared_xmltextread onlyCleared xml
zatca_responsejsonbread onlyZatca response
submitted_attimestamp with time zoneread onlySubmitted at
cleared_attimestamp with time zoneread onlyCleared at
zatca_attemptsintegerread onlyZatca attempts
zatca_next_attempt_attimestamp with time zoneread onlyZatca next attempt at
zatca_last_errortextread onlyZatca last error
payment_means_codetextread onlyPayment means code
eway_bill_requiredbooleanread onlyEway bill required
gst_doc_series_iduuidread onlyGst doc series id
gst_financial_yeartextread onlyGst financial year
draft_invoice_notextread onlyDraft invoice no
irntextread onlyIrn
irn_ack_notextread onlyIrn ack no
irn_ack_datetimestamp with time zoneread onlyIrn ack date
irn_signed_qrtextread onlyIrn signed qr
irn_statustextread onlyIrn status
zatca_replaced_by_iduuidread onlyZatca replaced by id
receivable_account_notextread onlyReceivable account no

Errors

StatusMeaning
400The request could not be read: a filter that is not JSON, a bad parameter
401No credential, or it is wrong, revoked or expired
403The caller's roles do not hold Accounting › ZATCA Submissions for this verb, or the address or origin is not allowed
404No record with that id is visible to the caller
409A conflict: a duplicate number, a document in a state that does not allow it, or a record changed or locked by someone else
422Refused by the same validation as the screen; the error names the field and why

Every error is JSON: {"error": "a sentence saying what was wrong"}, with field where it applies.