The Kingdom of Saudi Arabia's Zakat, Tax and Customs Authority (ZATCA) has introduced e-invoicing to streamline the business processes and ensure tax compliance. To help businesses integrate this system seamlessly, Antna provides a comprehensive API solution. Let's delve into the features and functionalities of the Antna's ZATCA E-Invoicing API.
Getting Started with Antna's API:
Before diving into the API calls, it's essential to understand the foundation. Antna's API is designed around the REST architecture, accepting JSON-encoded body requests and returning data in the same format. To begin, users need to register with Antna and create an account. Once registered, they can utilize the API's features completely.
Compliance API - Antna APIs for ZATCA E-Invoicing (1.0.0)
This document is your go-to resource for comprehending and implementing our APIs seamlessly. Specifically tailored for both developers and Antna users, these APIs unlock the full potential of your Antna account's ZATCA features.
Here's what you'll find in this document:
Ready to get started? Explore the sections below to streamline your integration with Antna's ZATCA E-Invoicing APIs.
API workflows are predefined sequences of API calls and actions that help automate specific processes or tasks within an application or system. In the context of E-Invoicing, there are two workflows mentioned:
1. B2C Tax Document Flow:
2. B2B Tax Document Flow:
Each of these workflows would consist of a set of API endpoints, data handling procedures, and potentially authentication and authorization steps, all designed to facilitate the specific tax-related processes involved in either B2C or B2B contexts. These workflows serve as guides for developers and system integrators, ensuring that the right API calls are made in the correct sequence to achieve the desired outcome when dealing with tax-related documents.
To begin, you'll need to register with Antna and create an account. Follow these simple steps:
Document and API Usage Guidelines
Our APIs operate using fundamental HTTP request methods: POST, GET, PATCH, and PUT.
You can easily select your preferred request and response code language by choosing it from the dropdown menu at the top.
For seamless testing and integration, you can import and evaluate our entire API collection within the Postman app by clicking the 'Run in Postman' button.
Please take note: Any requests made with valid API credentials will directly impact real-time data in your Antna account.
Authorization: accessToken
All our APIs come with corresponding example requests and responses, covering both successful and unsuccessful calls. Here's what each definition means:
This user-friendly guide will help you get started with Antna's services and make the most out of our APIs.
Error Codes and What They Mean
While using Antna's APIs, you might come across several response codes. Each code signifies a specific status of your request:
Support:
For assistance with Antna's APIs:
support@antna.co.in
, and we'll respond promptly.support@antna.co.in
.Ensure you also review our Terms of Service for comprehensive policies and guidelines.
Within this directory, you'll find a collection of APIs essential for aligning your application with ZATCA compliance.
To access these APIs, an OAuth 2.0 Token header is mandatory for authorization. To acquire the OAuth Access Token for testing purposes, simply sign in through Postman.
When transitioning to the production environment, we will furnish an Authorization API for obtaining both the access token and refresh token.
As a security measure, please note that API sign-in remains disabled in our test environment.
Before proceeding with API testing, it's essential to ensure that you have the necessary tools and accounts set up. Here's a step-by-step guide to help you get started with API testing using Postman:
Step 1: Install Postman (if not already installed)
Step 2: Create a Free Postman Account
Step 3: Verify Your Email
Step 4: Log In to Postman
Step 5: Set Up Postman for API Testing
Import or Create Requests
You can access Complyance API Docs within our forked collection, making it effortless to start using our Zatca APIs. Just click the "Run in Postman" button, and you'll have immediate access to all the API resources and endpoints, simplifying the integration process.
Click on the "Run in Postman" button, and after being redirected to the link, simply select "fork collection" to gain access to our Complyance API Docs and facilitate your integration with Zatca APIs.
After forking the collection, you'll have access to all of ZATCA's APIs through our Complyance API Docs.
By following these steps, you'll be ready to perform API testing using Postman. Make sure to refer to the API documentation for the specific API you want to test to understand the endpoints, authentication requirements, and expected responses.
API Description:Use this API to create an account in Antna's test environment, granting access to ZATCA APIs for onboarding, reporting, and clearing.
Request Parameters:
Response Parameters:
Request Sample:
{
"email": "example562234@gmail.com",
"password": "Example@123"
}
Response Sample:
{
"refreshToken": "eyJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiUlNBLU9BRVAifQ..."
}
Carefully review the response to confirm the success of your API request. Look for a status code (commonly 200 OK for success) and verify that the refreshToken and any other expected data are present.
Request Samples:
{
"refreshToken": ""
}
{
"accessToken": ""
}
This API allows you to log in to your Antna account and obtain an access token for accessing other Antna APIs. You need to provide your refresh token to get the access token, which is valid for one day.
Carefully examine the response to ensure the success of your API request. Look for the status code, which should typically be "200 OK" for a successful sign-in.
Once you've completed the signup and sign-in processes and successfully acquired the AccessToken, it's time to proceed with onboarding. This API facilitates the onboarding of your E-Invoice Generation Solution (EGS) in the ZATCA sandbox environment. Ensure you supply the necessary parameters in the specified format, and feel free to include any additional parameters that suit your specific requirements.
I can provide a complete explanation of the Onboarding
API along with JSON data samples for better understanding. Here's the information presented in a tabular format:
<aside>💡 Simply copy the received AccessToken and head to the top of the Zatca File. Click on "Authorization" and paste the AccessToken in the current Token field
</aside>
Upon sending the request, you will receive the following message: For example "Your EGS with serial number - '1-TST|2-TST|3-ed22f1d8-e6a2-1118-9b58-d9a8f11e44yt' has been successfully onboarded with ZATCA!”
<aside>💡 You can view all the details in the response body section.
</aside>
Request Sample:
{
"csrInputs": {
"otp": "123345",
"commonName": "TST-886431145-300055184400003",
"serialNumber": "1-TST 2-TST 3-ed22f1d8-e6a2-1118-9b58-d9a8f11e44yt",
"organizationIdentifier": "300055184400003",
"organizationUnitName": "Riyadh",
"organizationName": "Antna Technologies",
"countryName": "SA",
"invoiceType": "1100",
"location": "Riyadh",
"industry": "Petroleum"
}
}
csrInputs
: This is the main object containing all the parameters required for onboarding.otp
: The One-Time Password received from the Fatoora Portal.commonName
: A unique name or asset tracking number for your EGS.serialNumber
: A unique identification code for the EGS in a specific format.organizationIdentifier
: The organization VAT number.organizationUnitName
: The branch name for taxpayers or the 10-digit TIN number for VAT Groups.organizationName
: The name of the taxpayer or organization.countryName
: The name of the country in 2-letter code (ISO 3166 Alpha-2).invoiceType
: The document type(s) your solution will be generating.location
: The address of the branch or location where the device or solution unit is situated.industry
: The industry or sector for which the device or solution (EGS) will generate invoices.These parameters are sent in the request body to initiate the onboarding process for your EGS in the ZATCA sandbox environment. The response will indicate whether the onboarding was successful ("status": "SUCCESS"
) or if there were errors ("status": "ERROR"
), along with additional details about any errors encountered.
Response Sample (Success):
{
"status": "SUCCESS",
"errors": []
}
here's an explanation of the response parameters for the Onboarding
API in the previous format:
status
(string): This parameter indicates the status of the onboarding process by ZATCA. It's a high-level summary of whether the onboarding was successful or not. It has two possible enum values:SUCCESS
: Indicates that the onboarding process was successfully completed with ZATCA's Fatoora Portal.ERROR
: Indicates that the onboarding failed with ZATCA's Fatoora Portal due to various errors.errors
(list): If the onboarding fails due to errors originating from the APIs in the ZATCA layer, this parameter will contain the corresponding API error messages. It's a list that may include detailed information about what went wrong. Developers are advised to log this error response for further analysis and Root Cause Analysis (RCA).code
(string): This parameter represents the error status code of the failed ZATCA API. It provides additional information about the nature of the error. For example, if the error is related to a bad request, the code might be 400 BAD_REQUEST
.message
(string): This parameter provides a human-readable error message associated with the corresponding API error. It offers a brief explanation of why the error occurred. For example, it might indicate that the OTP (One-Time Password) is a required field.These response parameters help developers understand the outcome of the onboarding process and diagnose any issues that may have occurred during the API call.
This API allows you to onboard your EGS in the ZATCA sandbox environment with the required parameters, and it provides feedback on the onboarding status.
First, navigate to the Body section and review all the parameters. Once you've reviewed them, send the request. If the request is successful, you will receive a response.
<aside>💡 However, if you encounter an error, make sure to change the document ID and choose one of the following document types for the "documentType" parameter: TAX_INVOICE, SIMPLIFIED_TAX_INVOICE, TAX_INVOICE_CREDIT_NOTE, TAX_INVOICE_DEBIT_NOTE, SIMPLIFIED_TAX_INVOICE_CREDIT_NOTE, SIMPLIFIED_TAX_INVOICE_DEBIT_NOTE, ESTIMATE, or ALL. Then, resend the request.
</aside>
This API allows you to create a secure and cryptographically signed base64 encoded QR code. It's designed for your EGS (E-Invoice Generation Solution) to generate QR codes for specific B2C documents such as Simplified Tax Invoices, Simplified Tax Invoice Credit Notes, or Simplified Tax Invoice Debit Notes, which are meant for submission to ZATCA's sandbox environment.
To successfully report your document to ZATCA, it's crucial to provide all the necessary parameters in the specified format. You also have the flexibility to include additional parameters if needed.
Keep in mind that the generated base64 encoded QR code can be used to produce a scannable QR image for your documents.
Request Parameters:
Certainly, let's explain all the PARAMS (Request Parameters) for the QR Code (Simplified Invoice) API in detail:
addrLine1
, addrLine2
, additionalNo
, buildingNumber
, city
, state
, zipCode
, district
, and country
. These fields describe the physical address of the seller.addrLine1
, addrLine2
, additionalNo
, buildingNumber
, city
, state
, zipCode
, district
, and country
.invoiceData
for individual line items. These include lineItemDesc
, lineItemPrice
, lineItemQty
, lineItemTaxableAmount
, discountOnLineItem
, vatRateOnLineItem
, and more.isSpecialBillingAgreement
is true and the self-billed condition applies, this parameter should be set to "false."isSpecialBillingAgreement
is true and the third-party billing condition applies, this parameter should be set to "true."additionalSellerIdType
. Example: "1112233344"additionalBuyerIdType
. Example: "112233445566"is not charged at the standard rate, you can provide a narration explaining the tax treatment applied to the supply.
These parameters collectively form your request to generate a QR code for your B2C document. The API uses this data to create a base64 encoded QR code that can be used on your printed B2C document to comply with ZATCA regulations.
let's explain the Response Parameters for the QR Code (Simplified Invoice) API:
encodedQrCodeData
parameter holds the QR code data in a format that can be used to create a scannable QR image. It's a critical component for compliance with ZATCA regulations as it contains encoded information about the invoice.To comply with ZATCA regulations, you'll need to use this encodedQrCodeData
string to generate a QR code image. This image can then be added to your B2C documents, enabling customers or tax authorities to scan and verify the invoice information as required by the regulations. It's important to note that this QR code is specifically intended for use on B2C documents.
The JSON format you provided is a request payload for making a POST request to the /test/api/v1/proto/generateQRCode
endpoint. This request is intended to generate a QR code for an E-invoice document. Below is an explanation of the JSON format along with an example:
{
"invoiceData": {
"documentType": "SIMPLIFIED_TAX_INVOICE",
"referenceId": "",
"documentIssueDateTime": "2022-12-30T09:58:24.000Z",
"documentDueDateTime": "2022-12-30T09:58:24.000Z",
"sellerName": "ahmad abdurrahman",
"sellerAddress": {},
"buyerName": "Zahid Gani",
"documentLineItems": [],
"totalExcludingVat": 1112,
"totalTaxableAmountExcludingVat": 1146,
"vatTotal": 166.8,
"documentTotal": 1278.8,
"discountOnDocumentTotal": 34,
"isSpecialBillingAgreement": "false",
"isTransactionType": "false",
"isSelfBilled": "false",
"isThirdParty": "false",
"isNominalSupply": "false",
"isExport": "false",
"isSummary": "false",
"supplyDate": "2022-12-30T09:58:24.000Z",
"sellerVatRegistrationNumber": "300055184400003",
"sellerGroupVatRegistrationNumber": "",
"additionalSellerIdType": "CRN",
"additionalSellerIdNumber": "1112233344",
"specialTaxTreatment": "0",
"currency": "SAR",
"documentId": "001"
}
}
Explanation:
invoiceData
: This object contains all the details of the E-invoice document.documentType
: Specifies the type of document, in this case, "SIMPLIFIED_TAX_INVOICE."documentIssueDateTime
and documentDueDateTime
: The date and time of issue and due date for the document.sellerName
and buyerName
: Names of the seller and buyer.documentLineItems
: An array of line items within the invoice.totalExcludingVat
: The total amount excluding VAT.totalTaxableAmountExcludingVat
: The total taxable amount excluding VAT.vatTotal
: The total VAT amount.documentTotal
: The total document amount.discountOnDocumentTotal
: Any discount applied to the total document.isSpecialBillingAgreement
, isTransactionType
, etc.) indicate various conditions related to the transaction.supplyDate
: Date and time of goods or service supply.sellerVatRegistrationNumber
: VAT registration number of the seller.additionalSellerIdType
and additionalSellerIdNumber
: Additional seller identification information.specialTaxTreatment
: Information about any special tax treatment.currency
: Transaction currency.documentId
: A unique identification of the invoice.Example Response:
This JSON response contains the base64 encoded QR code data, which can be used to generate a scannable QR image for the printed B2C document. The encoded QR code data is provided in the encodedQrCodeData
field.
The provided information pertains to the authorization and response details for making an HTTP request to the /test/api/v1/proto/generateQRCode
endpoint. Let's break down what each part means:
AUTHORIZATIONS:
oauth2Auth
: This indicates that the authorization mechanism being used for this API endpoint is OAuth 2.0, a commonly used protocol for secure and delegated access.HTTP:
oauth2Auth
: This section specifies the HTTP request method that should be used when making a request to this API endpoint. In this case, it's oauth2Auth
, which is a custom or specific request method for OAuth 2.0 authorization.HTTP Authorization Scheme:
oauth2
: This field specifies the type of authorization scheme being used, which is OAuth 2.0 in this case. OAuth 2.0 is an industry-standard protocol for token-based authorization.REQUEST BODY SCHEMA:
application/json object
: This indicates that the request body of the HTTP request should adhere to the JSON format and structure defined for this API endpoint. The request body should be an object (in JSON format) that contains the necessary data for generating the QR code.Responses:
200 OK
: This is an HTTP status code that indicates a successful response. In other words, when the request to generate the QR code is successful, the server will respond with a status code of 200 OK.RESPONSE HEADERS:
Date
: Specifies the date and time when the response was generated.Content-Type
: Specifies the type of content in the response, which is application/json
in this case, indicating that the response will be in JSON format.Content-Length
: Indicates the length (in bytes) of the response content.Connection
: Specifies the status of the connection between the client and the server.x-amzn-RequestId
: A unique identifier for the request, which can be useful for tracking and debugging.Access-Control-Allow-Origin
: This header indicates which origins are permitted to access this resource. An asterisk (``) means that any origin is allowed.Access-Control-Allow-Headers
: Specifies the allowed HTTP headers for cross-origin requests.x-amz-apigw-id
: A unique identifier for the Amazon API Gateway used for the request.Access-Control-Allow-Methods
: Specifies the HTTP methods that are allowed when accessing this resource from a different origin.Access-Control-Expose-Headers
: Lists which headers are exposed to the browser when the request's credentials mode is "include."X-Amzn-Trace-Id
: An Amazon Trace ID that can be useful for debugging and tracing requests.RESPONSE SCHEMA:
application/json object
: This indicates that the response from the server will be in JSON format and should adhere to a specific structure defined for this API endpoint. It's an object in JSON format that contains the response data.In summary, this information provides details about how to authorize the request (OAuth 2.0), what to include in the request body (JSON object), what to expect in the response (HTTP status code 200 OK, JSON response), and various response headers that provide additional information about the response and its handling.
This API allows you to send your B2C documents (such as Simplified Tax Invoices, Credit Notes, or Debit Notes) generated by your E-Invoice Generation Solution to ZATCA's sandbox environment.
To make sure your document is reported successfully, you need to provide all the necessary information in a specific format. If needed, you can also include extra details according to your requirements.
This JSON response contains the base64 encoded QR code data, which can be used to generate a scannable QR image for the printed B2C document. The encoded QR code data is provided in the encodedQrCodeData
field.
Request Parameters:
Response Parameters:
The provided JSON data is a sample payload for a POST request to the /test/api/v1/proto/reportDocument
endpoint. This request is used to report a document to ZATCA's sandbox environment. Here's an explanation of the JSON data:
{
"invoiceData": {
"documentType": "SIMPLIFIED_TAX_INVOICE",
"referenceId": "",
"documentIssueDateTime": "2022-12-30T09:58:24.000Z",
"documentDueDateTime": "2022-12-30T09:58:24.000Z",
"sellerName": "ahmad abdurrahman",
"sellerAddress": {},
"buyerName": "Zahid Gani",
"documentLineItems": [],
"totalExcludingVat": 1112,
"totalTaxableAmountExcludingVat": 1146,
"vatTotal": 166.8,
"documentTotal": 1278.8,
"discountOnDocumentTotal": 34,
"isSpecialBillingAgreement": "false",
"isTransactionType": "false",
"isSelfBilled": "false",
"isThirdParty": "false",
"isNominalSupply": "false",
"isExport": "false",
"isSummary": "false",
"supplyDate": "2022-12-30T09:58:24.000Z",
"sellerVatRegistrationNumber": "300055184400003",
"sellerGroupVatRegistrationNumber": "",
"additionalSellerIdType": "CRN",
"additionalSellerIdNumber": "1112233344",
"specialTaxTreatment": "0",
"currency": "SAR",
"documentId": "001"
}
}
Explanation:
invoiceData
: This is an object that contains all the details of the invoice or document being reported.documentType
: Specifies the type of document, in this case, it's a "SIMPLIFIED_TAX_INVOICE."referenceId
: This field is left empty in this example, but it can contain the ID of the original document (reference document) for which this document is generated. It's applicable for Credit Notes and Debit Notes.documentIssueDateTime
: Indicates the date and time when the document was issued, in the format "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'."documentDueDateTime
: Specifies the due date and time of the document.sellerName
: Name of the seller or company.sellerAddress
: An empty object here, but it typically contains the seller's address details.buyerName
: Name of the buyer.documentLineItems
: An empty array for line items; this is where you would include details of the products or services.totalExcludingVat
: The total amount excluding VAT.totalTaxableAmountExcludingVat
: The total taxable amount excluding VAT.vatTotal
: The total VAT amount.documentTotal
: The total document amount.discountOnDocumentTotal
: Any discount applied to the total document amount.isSpecialBillingAgreement
: Indicates if it's a special billing agreement.isTransactionType
: Indicates the transaction type.isSelfBilled
: Indicates if it's a self-billed condition.isThirdParty
: Indicates if it's a third-party billing condition.isNominalSupply
: Indicates if it's a nominal supply condition.isExport
: Indicates if it's an export condition.isSummary
: Indicates if it's a summary invoice condition.supplyDate
: Date and time of goods/service supply.sellerVatRegistrationNumber
: Seller's VAT registration number.sellerGroupVatRegistrationNumber
: Group VAT registration number of the seller.additionalSellerIdType
: Type of additional seller ID (e.g., CRN).additionalSellerIdNumber
: Additional seller ID number.specialTaxTreatment
: Tax treatment applied if not charged at the standard rate.currency
: Transaction currency of the document.documentId
: Unique identification of the invoice or document.The response to this request is a JSON object that provides information about the reporting status:
{
"zatcaResponse": {
"validationResults": {},
"reportingStatus": "REPORTED",
"timestamp": 0,
"status": 0
},
"isReported": true
}
Explanation:
zatcaResponse
: This object contains information related to the ZATCA reporting process.validationResults
: This object may contain validation results, such as information messages, warning messages, and error messages. In this example, it's empty.reportingStatus
: Indicates the reporting status, which is "REPORTED" in this case.timestamp
: A timestamp, which is set to 0 in this example.status
: A status code, which is set to 0 in this example.isReported
: A boolean flag indicating whether the document was successfully reported. In this case, it's set to true, indicating successful reporting.The provided information is about the authorization and response details for an API. Let's break it down into simpler terms:
Date
: The date and time when the response was sent.Content-Type
: The type of data in the response, which is JSON in this case.Content-Length
: The size of the response data in bytes.Connection
: Information about how the connection is maintained.x-amzn-RequestId
: An ID associated with the request for tracking purposes.Access-Control-Allow-Origin
: Indicates which websites are allowed to access this API (in this case, any website is allowed with "*").Access-Control-Allow-Headers
: Lists the types of headers that are allowed when making requests.x-amz-apigw-id
: Another ID related to the request, often used for debugging.Access-Control-Allow-Methods
: Specifies which HTTP methods (like GET, POST, etc.) are allowed.Access-Control-Expose-Headers
: Specifies which headers are safe to expose to the response.X-Amzn-Trace-Id
: A trace ID used for tracking and debugging.In simpler terms, this information tells you how the API checks if you're allowed to use it (OAuth 2.0), what kind of data it expects from you (JSON), and what kind of response it sends back when you use it (a JSON response with specific details in its headers).
This API provides the functionality to clear the B2B documents (including Tax Invoices, Tax Invoice Credit Notes, and Tax Invoice Debit Notes) generated by your EGS (E-Invoice Generation Solution) in the ZATCA's sandbox environment.
To successfully report your document, it's essential to provide all the necessary parameters in the specified format. If needed, you can also include additional parameters based on your preferences.
In simpler terms, this API allows you to transmit your generated business documents to ZATCA's sandbox environment, ensuring compliance and accuracy in the process.
Request Parameters:
The provided JSON data represents a POST request payload for an API endpoint at "/test/api/v1/proto/clearDocument". This API request appears to be related to invoice data and clearance status. Let's break down the JSON data and its structure:
{
"invoiceData": {
"documentType": "TAX_INVOICE",
"referenceId": "",
"documentIssueDateTime": "2022-12-31T04:33:41.000Z",
"documentDueDateTime": "2022-12-31T04:33:41.000Z",
"sellerName": "ahmad abdurrahman",
"sellerAddress": {},
"buyerName": "Zahid Gani",
"buyerAddress": {},
"documentLineItems": [],
"totalExcludingVat": 539,
"totalTaxableAmountExcludingVat": 573,
"vatTotal": 80.85,
"documentTotal": 619.85,
"discountOnDocumentTotal": 34,
"isSpecialBillingAgreement": "false",
"isTransactionType": "false",
"isSelfBilled": "false",
"isThirdParty": "false",
"isNominalSupply": "false",
"isExport": "false",
"isSummary": "false",
"supplyDate": "2022-12-31T04:33:41.000Z",
"sellerVatRegistrationNumber": "310175397400003",
"sellerGroupVatRegistrationNumber": "",
"additionalSellerIdType": "CRN",
"additionalSellerIdNumber": "34523452345234",
"specialTaxTreatment": "0",
"additionalBuyerIdType": "CRN",
"additionalBuyerIdNumber": "12345678",
"currency": "SAR",
"paymentMeans": "CREDIT",
"documentId": "0002"
}
}
Here's an explanation of the JSON structure:
invoiceData
: This is the main object containing invoice-related information.documentType
: Specifies the type of document, in this case, "TAX_INVOICE".referenceId
: Appears to be an empty string for this invoice.documentIssueDateTime
: Indicates the date and time when the document was issued.documentDueDateTime
: Indicates the due date and time for the document.sellerName
: Contains the name of the seller, "ahmad abdurrahman".sellerAddress
: An empty object, which could potentially hold seller address details.buyerName
: Contains the name of the buyer, "Zahid Gani".buyerAddress
: An empty object, which could potentially hold buyer address details.documentLineItems
: An empty array, suggesting that this invoice has no line items.totalExcludingVat
: Total amount excluding Value Added Tax (VAT), 539 SAR in this case.totalTaxableAmountExcludingVat
: Total taxable amount excluding VAT, 573 SAR.vatTotal
: The total VAT amount, 80.85 SAR.documentTotal
: The total amount of the document, 619.85 SAR.discountOnDocumentTotal
: Indicates a discount on the document total, 34 SAR.isSpecialBillingAgreement
, isTransactionType
, isSelfBilled
, isThirdParty
, isNominalSupply
, isExport
, isSummary
: Boolean flags that appear to be "false" for this invoice.supplyDate
: Specifies the supply date and time.sellerVatRegistrationNumber
: VAT registration number of the seller.sellerGroupVatRegistrationNumber
: An empty string, possibly for seller group VAT registration.additionalSellerIdType
: Type of additional seller identification, "CRN" (assuming this means Customer Reference Number).additionalSellerIdNumber
: Additional identification number for the seller.specialTaxTreatment
: Indicates a special tax treatment, "0" in this case.additionalBuyerIdType
: Type of additional buyer identification, "CRN" (Customer Reference Number).additionalBuyerIdNumber
: Additional identification number for the buyer.currency
: Specifies the currency used, "SAR" (Saudi Riyal).paymentMeans
: Payment means used for this document, "CREDIT".documentId
: The document's unique identifier, "0002".This JSON data appears to represent the details of a tax invoice, including information about the seller, buyer, invoice amounts, and related flags. It's typically used for tax and financial purposes. The API request is likely to submit this invoice data for processing, and the response would contain information about the clearance status, as indicated in the provided response sample.
These parameters are essential for successfully reporting your B2B document to ZATCA's sandbox environment, ensuring compliance with E-invoicing regulations in Saudi Arabia.
Response Parameters:
{
"zatcaResponse": {
"validationResults": {},
"clearanceStatus": "CLEARED",
"clearedInvoice": "PD94bWw... (truncated)",
// Other fields...
}
}
"zatcaResponse"
: This is the root object of the JSON data, and it contains several nested fields."validationResults"
: This field appears to be an object, but it's empty {}
. It might be used to store validation results, but in this case, there don't appear to be any validation results provided."clearanceStatus"
: This field contains a string value "CLEARED"
. It likely represents the status of some clearance process and indicates that the process has been "Cleared.""clearedInvoice"
: This field appears to contain a long string that starts with "PD94bWw..."
. This is likely a Base64-encoded XML document, often used for structured data.The provided JSON data seems to be a response from some system or API. It contains information about the clearance status of an invoice, but the details are truncated, and it includes a Base64-encoded XML document, which might contain more specific information about the cleared invoice.
If you have specific questions or need more information about this JSON data or its purpose, please provide additional details or questions, and I'd be happy to assist further.
Look for the status code, which should typically be "200 OK" for a successful sign-in.
Before sending the request, please check the Headers section for the Authorization header. Once you've confirmed its presence, proceed to send the request. This will allow you to obtain the base64 data you need.
After receiving the base64 encoded data, go to **https://base64.guru/converter/decode/pdf** or simply search for "Base64 to PDF" in your preferred search engine. Paste the base64 data into the provided field and click the "Decode" button. You'll then be able to download the PDF document.
Same Tax Invoice Documet:
same Invoice pdf format:
Add User API
The Add User API allows you to add a new user to your Antna account. This new user can be used to onboard another EGS (Electronic Governance Service) with the ZATCA (Zakat, Tax, and Customs Authority) test environment.
Request Parameters:
Request Samples:
{
"email": "admin125@example.com",
"password": "Example@123"
}
Response Parameters:
Response Samples:
{
"refreshToken": ""
}
AUTHORIZATIONS:
HTTP Authorization Scheme:
REQUEST BODY SCHEMA:
Responses:
If you require further information, please don't hesitate to reach out to us through our Contact Us options:
📞 WhatsApp or call us at +91 8778237303📧 Email us at: sales@complyance.io📺 Subscribe to our YouTube channel for informative content and updates: YouTube Channel - youtube.com/@complyance
We eagerly anticipate your engagement and are committed to assisting you in seamlessly navigating the realm of ZATCA invoicing! ✨