Get Invoice in PDF

To generate the signed invoice in a PDF format you can use this API. This API converts the signed XML UBL2.1 compliant invoice into a Human Readable PDF format. The template of which is inspired from the ZATCA SDK.

Request Method

GET

Request Path

{{API_URL}}/api/v2/ksa_einvoice/online_service/get_invoice_in_pdf/

Request Params

Parameter
Value
Description

invoice_id

1

ID of the invoice

invoice_uuid

63547e08-0c1b-11ee-be56-0242ac120002

UUID of the invoice

Request Headers

Parameter
Value
Description

Productid

einvoicing_global

Keep as is

Authorization/MiplApiKey

api_key/auth token

Value and header type is mentioned in the Authentication Page

Responses

200 (OK)

Response will be a file of PDF format

404 (Not found)

If invoice is not found in the database

{
    "message" : "Invoice Does not exist in the database"
    "success": false,
    "error_code": 1001,
    "data": {}
}

401 (Permission Error)

You will get 401 errors when the token is invalid.

500 (Server Error)

If there is a server error during the invoice processing

{
    "message": "Internal Server Error",
    "success": false,
    "error_code": 1001,
    "data": {}
}

Last updated