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 Headers
  • Request Body
  1. Generate Einvoice API

JSON

If you cannot provide an XML document as input you can provide the required document information via a JSON input. We have constructed a schema which supports the requirements to generate all the document types acceptable by ZATCA. We provide the following to test out JSON schema using the inputs you will be providing.

  • Redoc UI to view each parameter of the JSON input in detail

  • Swagger UI to test out the payload with the test API

  • Postman Collection if you want to run via the postman app

Here are some samples for each document.

  • Standard Invoice

  • Standard Debit Note

  • Standard Credit Note

  • Standard Prepayment

  • Standard Invoice with Prepayments

  • Simplified Invoice

  • Simplified Debit Note

  • Simplified Credit Note

  • Simplified Prepayment

  • Simplified Invoice with Prepayment

Request Method

POST

Request Path

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

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

Request Body

Refer to the sample documents for inputs

The response for the API can be found here.

PreviousUBL2.1 XML (VAT IN URL)NextJSON (VAT IN URL)

Last updated 1 year ago