Generate E-Invoice for a Document

Generate a valid E-Invoice with JSON payload and send it to LHDN for submission. Share the Document through the Peppol network if enabled for sharing.

Request Method

POST

Request URL

https://api-sandbox.my.cleartax.com/einvoice/v1/documents/generate

Request Headers

ParameterData TypeField ValidationsDescription

x-clear-auth-token

String

Cannot be empty

Mandatory. User auth token.

x-clear-tin

String

Cannot be empty

Mandatory. TIN of the entity

x-clear-branch

String

Should be a valid branch from the user account

Optional. Branch name (store name) added in the user account which maps to a TIN of the entity.

x-request-id

UUID

Should be unique for every request

Optional. Unique request ID.

Used for Debugging Support Issues

Content-Type

String

application/json

application/json

Request Path Params

There are no path parameters for this API.

Request Query Params

ParameterData TypeField ValidationsDescription

dry-run

Boolean

true/false

Default: false

Will only run Validations

einvoice-type

ENUM

SALES, PURCHASE, SALES_B2C

Default: SALES

Request Body

ParameterData TypeField ValidationsDescription

Documents

Array

MinListLength: 1

MaxListLength: 10

Mandatory. List of Documents

Version

String

NA

Mandatory. MY_GENERATE_UBL_2_1_V1

Documents Object

ParameterData TypeField ValidationsDescription

DocumentData

String

NA

Mandatory. Base64 of the document data shared below

DocumentFormat

ENUM

JSON

Mandatory. Describes the data received is in the JSON Format

UniqueIdentifier

String

NA

Mandatory. Unique identifier formed with concatenation of TIN, Document Number, Document Type, Fiscal Year fields with _

Example: C948329382_INV-101_INV_2024

CustomFields

Object

NA

Map of Custom fields with key-value pair eg : ( { “Internal Number” : “INV000012”

})

Document Data

ParameterData TypeField ValidationsDescription

Id

String

NA

Mandatory. Document reference number used by Supplier for internal tracking purpose.

IssueDate

String

Format:

YYYY-MM-DD

Mandatory. Date of issuance of the e-Invoice

*Note that the date must be the current date

IssueTime

String

Format: HH:mm:ss (24 hr format)

Mandatory. Time of issuance of the e-Invoice

*Note that the time must be the current time

InvoiceTypeCode

Object

NA

Mandatory. Invoice Type Code https://sdk.myinvois.hasil.gov.my/codes/e-invoice-types/ Object. Identifies the document type (e.g., invoice, credit note, debit note, refund note, etc.)

DocumentCurrencyCode

String

Enum: ISO code list 4217 alpha-3

Mandatory. Specific currency that is used to represent the monetary value stated in the e-Invoice. Default: "MYR".

https://sdk.myinvois.hasil.gov.my/codes/currencies/

TaxCurrencyCode

String

Enum: ISO code list 4217 alpha-3

Optional. Specific currency that is used to represent the tax monetary value stated in the e-Invoice. Default: "MYR".

https://sdk.myinvois.hasil.gov.my/codes/currencies/

TaxExchangeRate

Object

NA

Mandatory. Tax Exchange Rate Object

TaxExchangeRate.CalculationRate

String

MaxLength: 15

Optional, add wherever applicable.Rate at which non-Malaysian currency will be converted into Malaysian Ringgit.

InvoicePeriod

Object

NA

Optional. Represents Billing Period Details. Refer to Invoice Period Object

AccountingSupplierParty

Object

NA

Mandatory. Accounting Supplier Party Object

AccountingCustomerParty

Object

NA

Mandatory. Accounting Customer Party Object

Delivery

Object

NA

Mandatory where applicable

InvoiceLine

Array

NA

Mandatory. Array of Invoice Line Item Objects

PaymentMeans

Object

NA

Conditional. Required in case of Standard Tax Invoice, Standard Credit Note, Standard Debit Note, Simplified Credit Note and Simplified Debit Note. Not required in case of Simplified Tax Invoice. Array of Payment Means Object

PaymentTerms

Object

NA

Optional. Payment Terms Object

PrepaidPayment

Object

NA

Optional. Prepaid Payment Object

BillingReference

Array

NA

Optional. Supplier’s internal billing reference details to facilitate payment from Buyer. Billing Reference Object

LegalMonetaryTotal

Object

NA

Mandatory. Legal Monetary Total Object

TaxTotal

Array

NA

Mandatory. Array of Tax Total Objects

AllowanceCharge

Array

NA

Conditional. Required in case of invoice level discount. Allowance Charge Object

AdditionalDocumentReference

Array

NA

Mandatory where applicable.

Invoice Type Code Object

ParameterData TypeField ValidationsDescription

Value

Enum

INVOICE,

CREDIT_NOTE,

DEBIT_NOTE,

REFUND_NOTE, SELF_BILLED_INVOICE, SELF_BILLED_CREDIT_NOTE, SELF_BILLED_DEBIT_NOTE, SELF_BILLED_REFUND_NOTE

Mandatory. Value specifying the functional type of the Invoice. The document type must be equal to one of values from the subset of Enum

Invoice Period Object

ParameterData TypeField ValidationsDescription

StartDate

Date

yyyy-mm-dd

Max Length: 10

Billing Period Start Date

EndDate

Date

yyyy-mm-dd

Max Length: 10

Billing Period End Date

Description

String

Max Length: 50

Frequency of the invoice (e.g., Daily, Weekly, Biweekly, Monthly, Bimonthly, Quarterly, Half-yearly, Yearly, Others / Not Applicable)

Payment Terms Object

ParameterData TypeField ValidationsDescription

Note

String

Max Length: 300

Optional. An agreed-upon payment terms and conditions e.g., timing and method of payment

Prepaid Payment Object

ParameterData TypeField ValidationsDescription

PaidAmount

Amount Object

NA

Optional.Monetary value that is prepaid by the Buyer in order to fulfill the financial obligation.

Please add currencyID attribute to the XML element.

PaidDate

Date

yyyy-mm-dd

Max Length: 10

Optional.Date of prepayment received

PaidTime

Time

hh:mm:ss

Max Length: 12

Optional.Time of prepayment received

Id

String

MaxLength: 150

Optional. Unique identifier assigned to trace payment

Billing Reference Object

ParameterData TypeField ValidationsDescription

AdditionalDocumentReference

Object

NA

NA

AdditionalDocumentReference.ID

String

MaxLength: 150

Optional. Supplier’s internal billing reference number to facilitate payment from Buyer

Legal Monetary Total Object

ParameterData TypeField ValidationsDescription

TaxExclusiveAmount

Amount Object

currencyId=’MYR’

Mandatory. Sum of amount payable (inclusive of applicable discounts and charges), excluding any applicable taxes (e.g., sales tax, service tax)

TaxInclusiveAmount

Amount Object

NA

Mandatory. Sum of amount payable inclusive of total taxes chargeable (e.g., sales tax, service tax).

PayableAmount

Amount Object

NA

Mandatory. Sum of amount payable (inclusive of total taxes chargeable) excluding any amount paid in advance and any rounding adjustment.

LineExtensionAmount

Amount Object

NA

Optional. Sum of total amount payable (inclusive of applicable line item and invoice level discounts and charges), excluding any applicable taxes (e.g., sales tax, service tax).

AllowanceTotalAmount

Amount Object

NA

Optional. Total amount deducted from the original price of a product or service.

ChargeTotalAmount

Amount Object

NA

Optional. Total charge associated with the product or service imposed after tax.

PayableRoundingAmount

Amount Object

NA

Optional, where applicable. Rounding amount added to the amount payable.

PrepaidAmount

Amount Object

NA

Optional

Tax Total Object

ParameterData TypeField ValidationsDescription

TaxAmount

Amount Object

NA

Mandatory. Total amount of tax payable

TaxSubtotal[]

Array

NA

Mandatory. One or more Tax Subtotal objects.

Tax SubTotal Object

ParameterData TypeField ValidationsDescription

TaxableAmount

Amount Object

NA

Optional where applicable. Sum of amount chargeable for each tax type

TaxAmount

Amount Object

NA

Mandatory, if applicable. Total amount of tax payable for each tax type

TaxCategory

Object

NA

Mandatory. Tax Category Object

Tax Category Object

ParameterData TypeField ValidationsDescription

Id

String

E

Mandatory if tax exemption is applicable

TaxExemptionReason

String

MaxLength: 300

Mandatory if tax exemption is applicable. Description of tax exemption applicable.(e.g., Buyer’s sales tax exemption certificate number, special exemption as per gazette orders, etc.). The input of special characters is not allowed, except for dash (-).

Document Allowance Charge Object

ParameterData TypeField ValidationsDescription

ChargeIndicator

String

NA

Mandatory. An indicator that this AllowanceCharge describes a discount. The value of this tag indicating discount (Allowance) must be ""false""." Else true

Amount

Amount Object

NA

Optional. Total amount deducted from the original price of a product or service

Or

Each Document level charge (BG-21) shall have a Document level charge amount (BT-99).

Please add currencyID attribute to the XML element.

AllowanceChargeReason

String

NA

Optional. Contain the description of the additional discount applied or description of the additional fees

Delivery Object

ParameterData TypeField ValidationsDescription

DeliveryParty

Object

NA

Optional

Shipment.FreightAllowanceCharge

Object. Shipment Object

NA

Optional. Details of Other Charges. Details of additional charges, along with the amount payable

Delivery Party Object

ParameterData TypeField ValidationsDescription

PartyLegalEntity.RegistrationName

String

NA

Name of shipping recipient of the products included in the e-Invoice in a commercial transaction

PartyIdentification.Id.Value

String

Max Length: 14

Optional. TIN of the shipping recipient assigned by IRBM

PartyIdentification.Id.SchemeID

String

- NRIC VARCHAR (12 CHAR)

- PASSPORT VARCHAR (12 CHAR)

- BRN VARCHAR (20 CHAR)

- ARMY VARCHAR (12 CHAR)

- SST

- TTX

- TIN

Optional. For businesses: Business registration number For Malaysian individual: MyKad identification number

For non-Malaysian individual: Passport number

PostalAddress

Object. Postal Address Object

NA

Optional

Shipment Object

ParameterData TypeField ValidationsDescription

ChargeIndicator

Boolean

NA

Optional

AllowanceChargeReason

String

MaxLength: 300

Optional

Amount

Amount

NA

Optional

Additional Document Reference Object

ParameterData TypeField ValidationsDescription

Id

String

Max Length: 12

Mandatory where applicable. Unique identifier assigned on the Declaration of Goods Imported.The input of special characters is not allowed. OR FTA for Free Trade Agreement

DocumentType

String

CustomsImportForm,

FreeTradeAgreement,

K2

Mandatory where applicable. Invoice counter value. Default: Clear will try to generate the ICV based on configuration.

DocumentDescription

String

Max Length: 300

Mandatory where applicable. Details, provisions and requirements outlined within a trade agreement between two or more countries. The input of special characters is not allowed, except for dash (-), open bracket (() and closed bracket ()).

Accounting Supplier Party Object

ParameterData TypeField ValidationsDescription

Party

Object

NA

Mandatory. Supplier Party Object.

AdditionalAccountID

String

Max Length: 300

Optional. A unique identification number or code used for validation of a certified exporter by the relevant authority. The input of special characters is not allowed, except for dash (-)

Party.PartyLegalEntity

Object

NA

Mandatory. Seller Party Legal Entity Object

Party.PartyLegalEntity.RegistrationName

String

NA

Conditional. Name of business or individual who will be the issuer of the e-Invoice.

Party.PartyIdentification

Array

NA

Mandatory. Supplier Party Identification Object.

Party.PartyIdentification.Id

Object

NA

Mandatory. Supplier Party Identification ID Object.

Party.PartyIdentification.Id.value

String

Alphanumeric

Mandatory: ID from the below list:

  • TIN (14 CHAR)

  • NRIC (12 CHAR)

  • PASSPORT (12 CHAR)

  • BRN (20 CHAR)

  • ARMY (12 CHAR)

  • SST (17 CHAR)

  • TTX (17 CHAR)

Party.PartyIdentification.Id.schemeID

String

Enum: TIN/NRIC/PASSPORT/BRN/ARMY

Mandatory ID is one of the list:

  • TIN (14 CHAR)

  • NRIC (12 CHAR)

  • PASSPORT (12 CHAR)

  • BRN (20 CHAR)

  • ARMY (12 CHAR)

  • SST (17 CHAR)

  • TTX (17 CHAR)

Party.Contact

Object

NA

Optional

Party.Contact.ElectronicMail

String

MaxLength: 320

Optional

Party.Contact.Telephone

String

MaxLength: 15

Mandatory. Example: +60-123456789

Party.IndustryClassificationCode

String

NA

Mandatory

Party.IndustryClassificationCode.value

String

NA

Mandatory. Supplier’s Malaysia Standard Industrial Classification (MSIC) Code. 5-digit numeric code that represent the Supplier’s business nature and activity

Party.IndustryClassificationCode.name

String

MaxLength: 300

Mandatory. Supplier’s Business Activity Description

Party.PostalAddress

Object. Postal Address Object

NA

Mandatory. Seller Postal Address object. Seller address must contain additional number, street name, building number, postal code, city, Neighborhood, country code.

Postal Address Object

ParameterData TypeField ValidationsDescription

AddressLine

Array

Min Size: 1

Max Size: 3

Mandatory.

AddressLine.Line

String

MaxLength: 150

Mandatory. Seller address line - the main address line in an address.

PostalZone

String

Numerals MinLen: 5 MaxLen: 5

Optional. The identifier for an addressable group of properties according to the relevant postal service. Ex 50480

CityName

String

NA

The common name of the city, town or village, where the Seller address is located.

CountrySubentityCode

String

NA

Mandatory. The state of a country.

Country

Object

NA

Mandatory

Country.IdentificationCode

Object

NA

Country Identification

Country.IdentificationCode.CountryCode

String

Equal: "MYS"

Mandatory. Seller country code. Country codes in an invoice MUST be coded using ISO code list 3166-1.

Accounting Customer Party Object

ParameterData TypeField ValidationsDescription

Party

Object

NA

Buyer Party Object.

Party.PartyLegalEntity

Object

NA

Conditional.

Buyer Party Legal Entity Object

Party.PartyLegalEntity.RegistrationName

String

NA

Name of recipient of the e-Invoice in a commercial transaction

Party.PartyIdentification

Array

NA

Mandatory. Buyer Party Identification Object.

Party.PartyIdentification.Id

Object

NA

Mandatory. Buyer Party Identification ID Object.

Party.PartyIdentification.Id.value

String

Alphanumeric

Mandatory: ID from the below list:

  • TIN (14 CHAR)

  • NRIC (12 CHAR)

  • PASSPORT (12 CHAR)

  • BRN (20 CHAR)

  • ARMY (12 CHAR)

  • SST (17 CHAR)

  • TTX (17 CHAR)

Party.PartyIdentification.Id.schemeID

String

Enum: TIN/NRIC/PASSPORT/BRN/ARMY

Mandatory ID is one of the list:

  • TIN (14 CHAR)

  • NRIC (12 CHAR)

  • PASSPORT (12 CHAR)

  • BRN (20 CHAR)

  • ARMY (12 CHAR)

  • SST (17 CHAR)

  • TTX (17 CHAR)

Party.Contact

Object

NA

Optional

Party.Contact.ElectronicMail

String

MaxLength: 320

Optional, Default: NA

Party.Contact.Telephone

String

MaxLength: 15

  • Optional, Default: NA

Party.PostalAddress

Object. Postal Address Object

NA

Mandatory for B2B Optional for B2C. Buyer Postal Address object. Buyer address must contain additional number, street name, building number, postal code, city, Neighborhood, country code.

Invoice Line Object

ParameterData TypeField ValidationsDescription

Id

Number

NA

Mandatory. Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126).

A unique identifier for the individual line within the Invoice.

An Invoice shall have at least one Invoice line (BG-25)

Item

Object

NA

Mandatory. Each Invoice line (BG-25) shall contain the Item name (BT-153).

Item.Description

String

MaxLength: 300

MandatoryDetails of products or services being billed as a result of a commercial transaction

Item.CommodityClassification[]

Array

NA

Mandatory

Item.CommodityClassification[].ItemClassificationCode

String

MaxLength: 3

Mandatory. Category of products or services being billed as a result of a commercial transaction. More than 1 classification codes can be added for goods / services included in the invoice. OR Product Tariff Code [Only applicable for Goods]

Item.ProductTariffCode

Object

MaxLength: 12

Optional. Only Applicable to Goods. Harmonized System code of the goods under the relevant Sales Tax Orders.The input of special characters is not allowed, except for full stop (.).

Item.OriginCountry.IdentificationCode.CountryCode

String

NA

Optional. Code. Description of origin of goods

ItemPriceExtension

Amount Object

NA

Mandatory. Amount of each individual item / service within the invoice, excluding any taxes, charges or discounts

Price

Object

NA

Mandatory. Each Invoice line shall contain the Item net price

Price.PriceAmount

Amount Object

NA

Mandatory. Price assigned to a single unit of a product or service.

LineExtensionAmount

Amount Object

NA

Mandatory. Total Excluding Tax. Sum of amount payable (inclusive of applicable discounts and charges), excluding any applicable taxes (e.g., sales tax, service tax)

InvoicedQuantity

Object

NA

Optional. The quantity of items object

InvoicedQuantity.Quantity

Number

NA

Optional. Number of units of a particular product or service in a commercial transaction

InvoicedQuantity.UnitCode

String

This field is following the UN/ECE Recommendation 20, Revision 17 (2021) as per here hence the values should be following that standard.

MaxLength : 3

Optional. Standard unit or system used to measure the product or service.This value should be represented in actual decimal value like 0.15.

AllowanceCharge[]

Array

NA

Conditional. Required only if there is invoice line item level allowance.

One or more Invoice level allowance charge objects.

AllowanceCharge[].ChargeIndicator

Boolean

NA

Conditional. Required in case of parent context exists.

An indicator that this AllowanceCharge describes a discount. The value of this tag indicating discount (Allowance) must be "false". The value of this tag indicating Charge (Allowance) must be "true".

AllowanceCharge[].AllowanceChargeReason

String

NA

Optional. To contain the description of the line-item discount applied

AllowanceCharge[].Amount

Amount Object

NA

Amount deducted from the original price of a product or service.

OR

Charge associated with the product or service imposed after tax

AllowanceCharge[].MultiplierFactorNumeric

Number

Min: 0.00

Max: 100.00

Conditional, Discount Rate or Charge Rate.

MultiplierFactorNumeric. Charge associated with the product or service (be it in the form of percentage (%) or prevailing specified rate) imposed after tax OR

Percentage of deduction from the original price of a product or service

TaxTotal

Object

NA

Mandatory when applicable.

TaxTotal.TaxAmount

Amount Object

NA

Mandatory. The amount of tax payable.

TaxTotal.TaxSubtotal

Array

NA

Mandatory, wherever applicable. Types of taxes that will be applicable

Line Level Tax SubTotal Object

ParameterData TypeField ValidationsDescription

TaxAmount

Amount Object

NA

Mandatory, The amount of tax payable.

TaxableAmount

Amount Object

NA

Total amount of tax exempted for sales tax or service tax purposes.

Please add currencyID attribute to the XML element.

TaxCategory

Object

NA

Mandatory. Line Level Tax Category Object

Line Level Tax Category Object

ParameterData TypeField ValidationsDescription

ID

String

MaxLength: 2

Mandatory. Code

Type of taxes that will be applicable. Use ID: E for Exemption

TaxExemptionReason

String

Max Length: 300

Description of tax exemption applicable.(e.g., Buyer’s sales tax exemption certificate number, special exemption as per gazette orders, etc.). The input of special characters is not allowed, except for dash (-).

Please add currencyID attribute to the XML element.

Payment Means Object

ParameterData TypeField ValidationsDescription

PaymentMeansCode

String

Link

Max Length: 2

Optional. Chosen mechanism through which funds are transferred from buyer to supplier (e.g., cash, cheque, bank transfer, credit card, debit card, e-Wallet/ Digital Wallet, etc.)

PayeeFinancialAccount

Object

NA

Optional. Payee Financial Account Payment Note object. Default: null

PayeeFinancialAccount.Id

MultiLingualString

MaxLength: 150

Optional. The Supplier’s bank account number to facilitate payment by Buyer

Custom Fields Object

This is a custom object of key-value pairs that can be used to display custom fields in custom output PDF templates or in certain reports.

For example:

{
    "country_of_origin": "IN",
    "total_containers": "3"
}

Sample Request

Request Body

{
    "Documents": [
        {
            "DocumentData": "ewogICAgIkludm9pY2VUeXBlQ29kZSI6IHsKICAgICAgICAiVmFsdWUiOiAiMDEiCiAgICB9LAogICAgIkludm9pY2VQZXJpb2QiOiB7CiAgICAgICAgIlN0YXJ0RGF0ZSI6ICIyMDI0LTA2LTAzIiwKICAgICAgICAiRW5kRGF0ZSI6ICIyMDI0LTA2LTAzIiwKICAgICAgICAiRGVzY3JpcHRpb24iOiAiTW9udGhseSIKICAgIH0sCiAgICAiQmlsbGluZ1JlZmVyZW5jZSI6IFsKICAgICAgICB7CiAgICAgICAgICAgICJBZGRpdGlvbmFsRG9jdW1lbnRSZWZlcmVuY2UiOiB7CiAgICAgICAgICAgICAgICAiSWQiOiAiIgogICAgICAgICAgICB9CiAgICAgICAgfQogICAgXSwKICAgICJJc3N1ZURhdGUiOiAiMjAyNC0wNi0wMyIsCiAgICAiSXNzdWVUaW1lIjogIjE4OjMwOjAwIiwKICAgICJEb2N1bWVudEN1cnJlbmN5Q29kZSI6ICJNWVIiLAogICAgIklkIjogIlRFU1QtU0FMRVMtMDAxIiwKICAgICJBY2NvdW50aW5nQ3VzdG9tZXJQYXJ0eSI6IHsKICAgICAgICAiUGFydHkiOiB7CiAgICAgICAgICAgICJDb250YWN0IjogewogICAgICAgICAgICAgICAgIkVsZWN0cm9uaWNNYWlsIjogImluZm9AZ21haWwuY29tIiwKICAgICAgICAgICAgICAgICJUZWxlcGhvbmUiOiAiNjAzMjIzMDA5MCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIlBhcnR5SWRlbnRpZmljYXRpb24iOiBbCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgIklkIjogewogICAgICAgICAgICAgICAgICAgICAgICAiU2NoZW1lSUQiOiAiVElOIiwKICAgICAgICAgICAgICAgICAgICAgICAgIlZhbHVlIjogIkM1ODk2MjM0MDQwIgogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgIklkIjogewogICAgICAgICAgICAgICAgICAgICAgICAiU2NoZW1lSUQiOiAiQlJOIiwKICAgICAgICAgICAgICAgICAgICAgICAgIlZhbHVlIjogIjE5OTUwMTAxMDY2NiIKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICJJZCI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgIlNjaGVtZUlEIjogIlNTVCIsCiAgICAgICAgICAgICAgICAgICAgICAgICJWYWx1ZSI6ICJOQSIKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJQYXJ0eUxlZ2FsRW50aXR5IjogewogICAgICAgICAgICAgICAgIlJlZ2lzdHJhdGlvbk5hbWUiOiAiRGVmbWFjcm8gU29mdHdhcmUgUHZ0IEx0ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIlBvc3RhbEFkZHJlc3MiOiB7CiAgICAgICAgICAgICAgICAiQWRkcmVzc0xpbmUiOiBbCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAiTGluZSI6ICJMZXZlbCAzMyIKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgIkxpbmUiOiAiSWxoYW0gVG93ZXIiCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICJMaW5lIjogIiA4IEphbGFuIEJpbmphaSIKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgIkNpdHlOYW1lIjogIiA4IEphbGFuIEJpbmphaSIsCiAgICAgICAgICAgICAgICAiQ291bnRyeSI6IHsKICAgICAgICAgICAgICAgICAgICAiSWRlbnRpZmljYXRpb25Db2RlIjogewogICAgICAgICAgICAgICAgICAgICAgICAiQ291bnRyeUNvZGUiOiAiTVlTIgogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAiQ291bnRyeVN1YmVudGl0eUNvZGUiOiAiMTQiLAogICAgICAgICAgICAgICAgIlBvc3RhbFpvbmUiOiAiNTA0NTAiCiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9LAogICAgIkFjY291bnRpbmdTdXBwbGllclBhcnR5IjogewogICAgICAgICJQYXJ0eSI6IHsKICAgICAgICAgICAgIkNvbnRhY3QiOiB7CiAgICAgICAgICAgICAgICAiRWxlY3Ryb25pY01haWwiOiAiZ2VuZXJhbEBwbHVzLmNvbS5teSIsCiAgICAgICAgICAgICAgICAiVGVsZXBob25lIjogIjYwMzIyMzAwOTAiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICJJbmR1c3RyeUNsYXNzaWZpY2F0aW9uQ29kZSI6IHsKICAgICAgICAgICAgICAgICJWYWx1ZSI6ICIwMTExMSIsCiAgICAgICAgICAgICAgICAiTmFtZSI6ICJPdGhlciBzZXJ2aWNlIGFjdGl2aXRpZXMgbi5lLmMuIgogICAgICAgICAgICB9LAogICAgICAgICAgICAiUGFydHlJZGVudGlmaWNhdGlvbiI6IFsKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAiSWQiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJTY2hlbWVJRCI6ICJUSU4iLAogICAgICAgICAgICAgICAgICAgICAgICAiVmFsdWUiOiAiQzU4NzQ2NzA4MDgwIgogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgIklkIjogewogICAgICAgICAgICAgICAgICAgICAgICAiU2NoZW1lSUQiOiAiQlJOIiwKICAgICAgICAgICAgICAgICAgICAgICAgIlZhbHVlIjogIjIwMjQwMTAyMTEyOCIKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICJJZCI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgIlNjaGVtZUlEIjogIlNTVCIsCiAgICAgICAgICAgICAgICAgICAgICAgICJWYWx1ZSI6ICJOQSIKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICJJZCI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgIlNjaGVtZUlEIjogIlRUWCIsCiAgICAgICAgICAgICAgICAgICAgICAgICJWYWx1ZSI6ICJOQSIKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJQYXJ0eUxlZ2FsRW50aXR5IjogewogICAgICAgICAgICAgICAgIlJlZ2lzdHJhdGlvbk5hbWUiOiAiWFlaIgogICAgICAgICAgICB9LAogICAgICAgICAgICAiUG9zdGFsQWRkcmVzcyI6IHsKICAgICAgICAgICAgICAgICJBZGRyZXNzTGluZSI6IFsKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICJMaW5lIjogIk1lbmFyYSBLb3Jwb3JhdCIKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgIkxpbmUiOiAiUGVyc2FkYSBQTFVTIgogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAiTGluZSI6ICJQZXJzaW1wYW5nYW4gQmVydGluZ2thdCBTdWJhbmcgS00xNSIKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgIkNpdHlOYW1lIjogIkxlYnVocmF5YSBCYXJ1IExlbWJhaCBLbGFuZyIsCiAgICAgICAgICAgICAgICAiQ291bnRyeSI6IHsKICAgICAgICAgICAgICAgICAgICAiSWRlbnRpZmljYXRpb25Db2RlIjogewogICAgICAgICAgICAgICAgICAgICAgICAiQ291bnRyeUNvZGUiOiAiTVlTIgogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAiQ291bnRyeVN1YmVudGl0eUNvZGUiOiAiMTAiLAogICAgICAgICAgICAgICAgIlBvc3RhbFpvbmUiOiAiNDczMDEiCiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9LAogICAgIkRlbGl2ZXJ5IjogewogICAgICAgICJEZWxpdmVyeVBhcnR5IjogewogICAgICAgICAgICAiQ29udGFjdCI6IHsKICAgICAgICAgICAgICAgICJFbGVjdHJvbmljTWFpbCI6ICJpbmZvQG9saXZlc3RvdWNoLmNvbSIsCiAgICAgICAgICAgICAgICAiVGVsZXBob25lIjogIjYwMzIyMzAwOTAiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICJQYXJ0eUlkZW50aWZpY2F0aW9uIjogWwogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICJJZCI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgIlNjaGVtZUlEIjogIlRJTiIsCiAgICAgICAgICAgICAgICAgICAgICAgICJWYWx1ZSI6ICJDNTg5NjIzNDA0MCIKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICJJZCI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgIlNjaGVtZUlEIjogIkJSTiIsCiAgICAgICAgICAgICAgICAgICAgICAgICJWYWx1ZSI6ICIxOTk1MDEwMTA2NjYiCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAiSWQiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJTY2hlbWVJRCI6ICJTU1QiLAogICAgICAgICAgICAgICAgICAgICAgICAiVmFsdWUiOiAiTkEiCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICBdLAogICAgICAgICAgICAiUGFydHlMZWdhbEVudGl0eSI6IHsKICAgICAgICAgICAgICAgICJSZWdpc3RyYXRpb25OYW1lIjogIkNBTVBCRUxMIFNPVVAgU09VVEhFQVNUIEFTSUEgU0ROIEJIRCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIlBvc3RhbEFkZHJlc3MiOiB7CiAgICAgICAgICAgICAgICAiQWRkcmVzc0xpbmUiOiBbCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAiTGluZSI6ICJMZXZlbCAzMyIKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgIkxpbmUiOiAiSWxoYW0gVG93ZXIiCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICJMaW5lIjogIiA4IEphbGFuIEJpbmphaSIKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgIkNpdHlOYW1lIjogIiA4IEphbGFuIEJpbmphaSIsCiAgICAgICAgICAgICAgICAiQ291bnRyeSI6IHsKICAgICAgICAgICAgICAgICAgICAiSWRlbnRpZmljYXRpb25Db2RlIjogewogICAgICAgICAgICAgICAgICAgICAgICAiQ291bnRyeUNvZGUiOiAiTVlTIgogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAiQ291bnRyeVN1YmVudGl0eUNvZGUiOiAiMTQiLAogICAgICAgICAgICAgICAgIlBvc3RhbFpvbmUiOiAiNTA0NTAiCiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9LAogICAgIkludm9pY2VMaW5lIjogWwogICAgICAgIHsKICAgICAgICAgICAgIklkIjogIjEiLAogICAgICAgICAgICAiSW52b2ljZWRRdWFudGl0eSI6IHsKICAgICAgICAgICAgICAgICJRdWFudGl0eSI6IDEsCiAgICAgICAgICAgICAgICAiVW5pdENvZGUiOiAiS0dTIgogICAgICAgICAgICB9LAogICAgICAgICAgICAiSXRlbSI6IHsKICAgICAgICAgICAgICAgICJDb21tb2RpdHlDbGFzc2lmaWNhdGlvbiI6IFsKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICJJdGVtQ2xhc3NpZmljYXRpb25Db2RlIjogewogICAgICAgICAgICAgICAgICAgICAgICAgICAgIkxpc3RJRCI6ICJDTEFTUyIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAiVmFsdWUiOiAiMDExIgogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICJEZXNjcmlwdGlvbiI6ICJSZXBhaXIgYW5kIG1haW50ZW5hbmNlIiwKICAgICAgICAgICAgICAgICJPcmlnaW5Db3VudHJ5IjogewogICAgICAgICAgICAgICAgICAgICJJZGVudGlmaWNhdGlvbkNvZGUiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJDb3VudHJ5Q29kZSI6ICJNWVMiCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LAogICAgICAgICAgICAiSXRlbVByaWNlRXh0ZW5zaW9uIjogewogICAgICAgICAgICAgICAgIkFtb3VudCI6IHsKICAgICAgICAgICAgICAgICAgICAiQ3VycmVuY3lJRCI6ICJNWVIiLAogICAgICAgICAgICAgICAgICAgICJWYWx1ZSI6ICIxMjAwMDAiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICJBbGxvd2FuY2VDaGFyZ2UiOiBbCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgIkNoYXJnZUluZGljYXRvciI6IGZhbHNlLAogICAgICAgICAgICAgICAgICAgICJNdWx0aXBsaWVyRmFjdG9yTnVtZXJpYyI6IDAuMTAsCiAgICAgICAgICAgICAgICAgICAgIkFsbG93YW5jZUNoYXJnZVJlYXNvbiI6ICJTYW1wbGUiLAogICAgICAgICAgICAgICAgICAgICJBbW91bnQiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJDdXJyZW5jeUlEIjogIk1ZUiIsCiAgICAgICAgICAgICAgICAgICAgICAgICJWYWx1ZSI6ICIxMjAwMC4wMCIKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICJDaGFyZ2VJbmRpY2F0b3IiOiB0cnVlLAogICAgICAgICAgICAgICAgICAgICJNdWx0aXBsaWVyRmFjdG9yTnVtZXJpYyI6IDAsCiAgICAgICAgICAgICAgICAgICAgIkFsbG93YW5jZUNoYXJnZVJlYXNvbiI6ICJTYW1wbGUiLAogICAgICAgICAgICAgICAgICAgICJBbW91bnQiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJDdXJyZW5jeUlEIjogIk1ZUiIsCiAgICAgICAgICAgICAgICAgICAgICAgICJWYWx1ZSI6ICIwLjAwIgogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgXSwKICAgICAgICAgICAgIlByaWNlIjogewogICAgICAgICAgICAgICAgIlByaWNlQW1vdW50IjogewogICAgICAgICAgICAgICAgICAgICJDdXJyZW5jeUlEIjogIk1ZUiIsCiAgICAgICAgICAgICAgICAgICAgIlZhbHVlIjogIjEwODAwMC4wMCIKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgIkxpbmVFeHRlbnNpb25BbW91bnQiOiB7CiAgICAgICAgICAgICAgICAiQ3VycmVuY3lJRCI6ICJNWVIiLAogICAgICAgICAgICAgICAgIlZhbHVlIjogIjEwODAwMCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIlRheFRvdGFsIjogewogICAgICAgICAgICAgICAgIlRheEFtb3VudCI6IHsKICAgICAgICAgICAgICAgICAgICAiQ3VycmVuY3lJRCI6ICJNWVIiLAogICAgICAgICAgICAgICAgICAgICJWYWx1ZSI6ICI4NjQwLjAwIgogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICJUYXhTdWJ0b3RhbCI6IFsKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICJUYXhBbW91bnQiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAiQ3VycmVuY3lJRCI6ICJNWVIiLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgIlZhbHVlIjogIjg2NDAuMDAiCiAgICAgICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgICAgICJUYXhhYmxlQW1vdW50IjogewogICAgICAgICAgICAgICAgICAgICAgICAgICAgIkN1cnJlbmN5SUQiOiAiTVlSIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJWYWx1ZSI6ICIxMDgwMDAuMDAiCiAgICAgICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgICAgICJUYXhDYXRlZ29yeSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJJZCI6ICIwMSIKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIF0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgIF0sCiAgICAiQWxsb3dhbmNlQ2hhcmdlIjogWwogICAgICAgIHsKICAgICAgICAgICAgIkNoYXJnZUluZGljYXRvciI6IGZhbHNlLAogICAgICAgICAgICAiQWxsb3dhbmNlQ2hhcmdlUmVhc29uIjogIlNhbXBsZSBEZXNjcmlwdGlvbiIsCiAgICAgICAgICAgICJBbW91bnQiOiB7CiAgICAgICAgICAgICAgICAiVmFsdWUiOiA4MDAwLAogICAgICAgICAgICAgICAgIkN1cnJlbmN5SUQiOiAiTVlSIgogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJDaGFyZ2VJbmRpY2F0b3IiOiB0cnVlLAogICAgICAgICAgICAiQWxsb3dhbmNlQ2hhcmdlUmVhc29uIjogIlNlcnZpY2UgY2hhcmdlIiwKICAgICAgICAgICAgIkFtb3VudCI6IHsKICAgICAgICAgICAgICAgICJWYWx1ZSI6IDAsCiAgICAgICAgICAgICAgICAiQ3VycmVuY3lJRCI6ICJNWVIiCiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICBdLAogICAgIlRheFRvdGFsIjogWwogICAgICAgIHsKICAgICAgICAgICAgIlRheEFtb3VudCI6IHsKICAgICAgICAgICAgICAgICJDdXJyZW5jeUlEIjogIk1ZUiIsCiAgICAgICAgICAgICAgICAiVmFsdWUiOiAiMTAwMDAuMDAiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICJUYXhTdWJ0b3RhbCI6IFsKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAiVGF4YWJsZUFtb3VudCI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgIkN1cnJlbmN5SUQiOiAiTVlSIiwKICAgICAgICAgICAgICAgICAgICAgICAgIlZhbHVlIjogIjEwMDAwMC4wMCIKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICJUYXhBbW91bnQiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJDdXJyZW5jeUlEIjogIk1ZUiIsCiAgICAgICAgICAgICAgICAgICAgICAgICJWYWx1ZSI6ICIxMDAwMC4wMCIKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICJUYXhDYXRlZ29yeSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgIklkIjogIjAxIgogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgXQogICAgICAgIH0KICAgIF0sCiAgICAiTGVnYWxNb25ldGFyeVRvdGFsIjogewogICAgICAgICJMaW5lRXh0ZW5zaW9uQW1vdW50IjogewogICAgICAgICAgICAiQ3VycmVuY3lJRCI6ICJNWVIiLAogICAgICAgICAgICAiVmFsdWUiOiAiMTA4MDAwLjAwIgogICAgICAgIH0sCiAgICAgICAgIkFsbG93YW5jZVRvdGFsQW1vdW50IjogewogICAgICAgICAgICAiQ3VycmVuY3lJRCI6ICJNWVIiLAogICAgICAgICAgICAiVmFsdWUiOiAiODAwMC4wMCIKICAgICAgICB9LAogICAgICAgICJDaGFyZ2VUb3RhbEFtb3VudCI6IHsKICAgICAgICAgICAgIkN1cnJlbmN5SUQiOiAiTVlSIiwKICAgICAgICAgICAgIlZhbHVlIjogIjAuMDAiCiAgICAgICAgfSwKICAgICAgICAiVGF4RXhjbHVzaXZlQW1vdW50IjogewogICAgICAgICAgICAiQ3VycmVuY3lJRCI6ICJNWVIiLAogICAgICAgICAgICAiVmFsdWUiOiAiMTAwMDAwLjAwIgogICAgICAgIH0sCiAgICAgICAgIlRheEluY2x1c2l2ZUFtb3VudCI6IHsKICAgICAgICAgICAgIkN1cnJlbmN5SUQiOiAiTVlSIiwKICAgICAgICAgICAgIlZhbHVlIjogIjExMDAwMC4wMCIKICAgICAgICB9LAogICAgICAgICJQcmVwYWlkQW1vdW50IjogewogICAgICAgICAgICAiQ3VycmVuY3lJRCI6ICJNWVIiLAogICAgICAgICAgICAiVmFsdWUiOiAiMC4wMCIKICAgICAgICB9LAogICAgICAgICJQYXlhYmxlQW1vdW50IjogewogICAgICAgICAgICAiQ3VycmVuY3lJRCI6ICJNWVIiLAogICAgICAgICAgICAiVmFsdWUiOiAiMTEwMDAwLjAwIgogICAgICAgIH0sCiAgICAgICAgIlBheWFibGVSb3VuZGluZ0Ftb3VudCI6IHsKICAgICAgICAgICAgIlZhbHVlIjogIjAuMDAiCiAgICAgICAgfQogICAgfSwKICAgICJQYXltZW50TWVhbnMiOiB7CiAgICAgICAgIlBheW1lbnRNZWFuc0NvZGUiOiAiNCIKICAgIH0sCiAgICAiUGF5bWVudFRlcm1zIjogewogICAgICAgICJOb3RlIjogIlBheW1lbnQgTWV0aG9kIGlzIGNhc2giCiAgICB9Cn0=",
            "DocumentFormat": "JSON",
            "UniqueIdentifier": "C58746708080_TEST-SALES-001_01_2024",
            "CustomFields": {
                "Internal Number": "INV00001234561687"
            },
            "version": "MY_GENERATE_UBL_2_1_V1"
        }
    ]
}

Sample Request - Document Details - Decoded

Response Status Codes

HTTP Status CodeDescription

200

For successfully submitted document or with validation errors

400

For any kind of Invalid Payload issues

401

If the user is not authenticated for the operation

403

If the user is not authorized for the operation

Response Schema

ParameterData TypeField ValidationsDescription

Success

Boolean

true/false

Mandatory. Indicates the request was successful or not

DocumentResponses

Array

NA

NA

ErrorDetails

Array<ErrorDetail>

Error details

Optional.

Error list from ClearTax

Document Details Object

ParameterData TypeField ValidationsDescription

DocumentId

String

NA

Unique document id generated in database

UniqueId

String

NA

Mandatory. Same uniqueId as shared in the request

Success

Boolean

true/false

Indicates, if the request for this document was successfully processed or not

Status

String

NA

Enum, status of the document.

Uuid

Boolean

true/false

Mandatory. Cleartax reference Id used for further actions. Should be persisted in ERP

ErrorDetails

Array<ErrorDetail>

Error details

Optional.

Error list from ClearTax/LHDN

WarningDetails

Array<ErrorDetail>

Warning details

Optional. Warning list from ClearTax

Sample Response (Success)

HTTP Status Code

200

Response Body

{
    "ErrorDetails": null,
    "Success": null,
    "DocumentResponses": [
        {
            "DocumentId": "665f28c2f626dc2cac32abea",
            "Success": "true",
            "UniqueId": "C58746708080_TEST-SALES-001_01_2024",
            "Uuid": "Y4K7SPNCBE8FAQSCWDEEVHZH10",
            "InternalId": null,
            "ErrorDetails": [],
            "WarningDetails": [
                {
                    "Code": null,
                    "Message": null
                }
            ]
        }
    ]
}

Sample Response (Error)

HTTP Status Code: 400

Response Body

{
    "ErrorDetails": null,
    "Success": null,
    "DocumentResponses": [
        {
            "DocumentId": null,
            "Success": null,
            "UniqueId": "C10709273050_20240410035_01_2024",
            "Uuid": null,
            "InternalId": null,
            "ErrorDetails": [
                {
                    "ErrorCode": "ERR-10001",
                    "ErrorMessage": "Supplier TIN null is not matching the TIN present in the account",
                    "ErrorSource": "CLEARTAX"
                }
            ],
            "WarningDetails": [
                {
                    "Code": null,
                    "Message": null
                }
            ]
        }
    ]
}

API Validations

Currently there are no known validations.

API Constraints

  1. This API needs to be authenticated with a valid user authentication token. If the auth token is not present or is invalid, the API will return HTTP Status Code 401.

  2. If the auth token is valid, but the user does not have the authorization to generate an e-invoice for a document, then the API will return HTTP Status Code 403. The user, whose auth token is used, should have an Admin role for the particular TIN used in the request.

Last updated