Send Signed E-Invoice XML To ZATCA
Last updated
Was this helpful?
Last updated
Was this helpful?
Send a valid signed E-Invoice XML file to ZATCA for clearance or reporting.
POST
Rate Limit : 1000 API requests per minute
x-cleartax-auth-token
String
Cannot be empty
Mandatory. User auth token.
vat
String
Cannot be empty
Mandatory. VAT or Group VAT of the entity.
device-id
String
MaxLength: 36
Mandatory. The Device ID registered with ClearTax.
file
form-data
NA
UUID
Mandatory. A Universal Unique Identifier is a 128-bit value used to uniquely identify an object or entity on the internet.
ICV
Mandatory. This is an atomically increasing counter.
PIH
Mandatory. Previous Invoice Hash. Hash code of the previous invoice has to be sent.
InvoiceHash
Mandatory. Hash value of current invoice xml by removing tags <ext:UBLExtensions>,
<cac:AdditionalDocumentReference:QRCode>
Request Body
200
For any complete operation - pass / warning / error
400
-
401
If the user is not authenticated for the operation
403
If the user is not authorized for the operation
429
Too Many Requests
5xx
Unhandled exception
validationResults
Object
Cannot be null
Refer below
clearedInvoice
String
-
For clearance, this field will have a base64 encoded cleared XML as string
For reported, this will be null
clearanceStatus
String
REPORTED / NOT_REPORTED / ACCEPTED_WITH_WARNING / CLEARED / NOT_CLEARED, PENDING
For clearance: CLEARED, NOT_CLEARED, ACCEPTED_WITH_WARNING, PENDING
For reported: REPORTED, NOT_REPORTED, ACCEPTED_WITH_WARNING, PENDING
infoMessages
Array of Object
Cannot be null or empty
Will always have some info. Refer below for the structure.
warningMessages
Array of Object
Cannot be null or empty
This array is not empty in case of any warning at the time of reporting/clearance. Refer below for the structure.
errorMessages
Array of Object
Cannot be null or empty
This array is not empty in case of any error at the time of reporting/clearance. Refer below for the structure.
status
String
PASS / WARNING / ERROR
Indicates the response status of the complete API.
type
String
INFO / WARNING / ERROR are the possible values
Indicates the type of the message object
code
String
Cannot be null
ZATCA specific code to identify the message object
category
String
Cannot be null
ZATCA specific category to identify the message object
message
String
Cannot be null
ZATCA specific message
status
String
PASS / WARNING / ERROR
PASS - infoMessages WARNING - warningMessages ERROR - errorMessages
There are no validations from Clear for this API.
This API needs to be authenticated with a valid user authentication token. If the Authentication token is not present or is invalid, the API will return HTTP Status Code 401.
Each customer is allowed to send a limited number of requests per minute to prevent server overload. If the limit is exceeded, the server will respond with a 429 Too Many Requests status code.
If the Authentication token is valid, but the user does not have the authorization to generate device ID, then the API will return HTTP Status Code 403. The user, whose Authentication token is used, should have an “Admin” role for the particular VAT used in the request.
Mandatory. The XML file as per ZATCA specification. Example: