Query Invoice
This Page shows how to fetch the invoice zatca process status of a given invoice
Request Method
GET
Request Path
{{API_URL}}/api/v1/query_invoice/
Request Params
invoice_id
1
ID of the invoice
invoice_uuid
63547e08-0c1b-11ee-be56-0242ac120002
UUID of the invoice
Request Headers
Productid
einvoicing_global
Keep as is
Service
online_service
Keep as is
Authorization/x-api-key
api_key/auth token
Value and header type is mentioned in the Authentication Page
Responses
200
If invoice processing is completed by ZATCA, then status code will be 200 response body will be
{
"message": "Invoice processed by ZATCA",
"data": {
"info_messages": [
{
"type": "INFO",
"code": "XSD_ZATCA_VALID",
"category": "",
"message": "Complied with UBL 2.1 standards in line with ZATCA specifications",
"status": "",
"source": "MI"
}
],
"warning_messages": [],
"error_messages": [],
"schematron_overall_status": "PASS",
"status": "REPORTED",
"invoice": "invoice in base64 format"
}
}
206
If invoice is not processed by ZATCA. Status code is 206 response body will be
{
"message": "Invoice yet to be reported to zatca",
"error_code": 1006,
"data": {}
}
404
If invoice is not found in the database then we return 404 error
{
"message" : "Invoice Does not exist in the database"
"success": false,
"error_code": 1001,
"data": {}
}
500
If we have a crash during the processing of the request.
{
"message" : "Internal Server Error"
"success": false,
"error_code": 1001,
"data": {}
}
523
If the invoice is not present in our local server we have to query the cloud service. Incase only service is not reachable we will return 523 status code
{
"message": "Cloud service is unreachable please again in sometime",
"error_code": 1056,
"data": {}
}
Last updated