DTOs Reference

Request body schemas for the ZATCA API endpoints (API key–authenticated only). Dashboard-only endpoints are not documented here.

AddressDto

AddressDto
FieldTypeRequiredDescription
streetstringYes
citystringYes
postal_codestringNo
countrystringYes

SellerDto

SellerDto
FieldTypeRequiredDescription
namestringYesSeller legal name
name_arstringNoArabic name
vat_numberstringYesVAT registration number
addressAddressDtoYesSeller address
Nested: AddressDto
FieldTypeRequiredDescription
streetstringYes
citystringYes
postal_codestringNo
countrystringYes

LineItemDto

LineItemDto
FieldTypeRequiredDescription
descriptionstringYesItem description
description_arstringNo
quantitynumberYesMin 0.0001
unit_pricenumberYesIn SAR
vat_category"S" | "Z" | "E" | "O"NoVAT category code

BuyerAddressDto

BuyerAddressDto
FieldTypeRequiredDescription
streetstringYes
citystringYes
postal_codestringNo
countrystringYes

BuyerDto

BuyerDto
FieldTypeRequiredDescription
namestringYes
name_arstringNo
vat_numberstringYes
addressBuyerAddressDtoYes
Nested: BuyerAddressDto
FieldTypeRequiredDescription
streetstringYes
citystringYes
postal_codestringNo
countrystringYes

CreateSimplifiedInvoiceDto

CreateSimplifiedInvoiceDto
FieldTypeRequiredDescription
egs_unit_idstringYesActive EGS unit ID
invoice_numberstringYes
invoice_datestringYesYYYY-MM-DD
invoice_timestringYesHH:mm:ss
sellerSellerDtoYes
line_itemsLineItemDto[]Yes
currencystringNoDefault: SAR

CreateStandardInvoiceDto

Extends CreateSimplifiedInvoiceDto with buyer.

CreateStandardInvoiceDto
FieldTypeRequiredDescription
…(all CreateSimplifiedInvoiceDto fields)Yes
buyerBuyerDtoYesRequired for B2B

CreateCreditNoteDto / CreateDebitNoteDto

CreateCreditNoteDto (same for CreateDebitNoteDto)
FieldTypeRequiredDescription
egs_unit_idstringYes
invoice_numberstringYes
invoice_datestringYes
invoice_timestringYes
original_invoice_uuidstringYesUUID of original invoice
reasonstringYes
reason_arstringNo
sellerSellerDtoYes
buyerBuyerDtoNoRequired if original was B2B
line_itemsLineItemDto[]Yes
currencystringNo

EGS & compliance

CreateEgsDto
FieldTypeRequiredDescription
unit_namestringYes
invoice_type"standard" | "simplified" | "both"NoDefault: simplified
otpstringNo
phase1 | 2NoDefault: 2
RequestProductionDto
FieldTypeRequiredDescription
otpstringYesZATCA OTP for production CSID
ComplianceTestDto
FieldTypeRequiredDescription
egs_unit_idstringYes

API keys & webhooks

CreateApiKeyDto
FieldTypeRequiredDescription
labelstringNoMax 100 chars
prefix"zatca_live_" | "zatca_test_"NoDefault: zatca_test_
WebhookConfigDto
FieldTypeRequiredDescription
webhook_urlstring | nullNoHTTPS; max 500 chars
webhook_secretstring | nullNoMax 64 chars