KSA APIs Online
Product DocsWebsite
  • Intro
  • Environments
  • Authentication
    • Access Tokens
    • API KEY
  • Generate Einvoice API
    • UBL2.1 XML
    • UBL2.1 XML (VAT IN URL)
    • JSON
    • JSON (VAT IN URL)
    • Responses
    • Callback Response
    • Technical Guidelines
  • Get Invoice Process Status
  • Get Invoice in PDF
Powered by GitBook
On this page
  • Request Method
  • Request Path
  • Request Params
  • Request Headers
  • Responses
  • 200 (OK)
  • 404 (Not found)
  • 401 (Permission Error)
  • 500 (Server Error)

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": {}
}
PreviousGet Invoice Process Status

Last updated 1 year ago