Get Document details
This API is used to get the document details, including the line item level details by passing the documentId, received in the response of Create an Invoice API.
Request Method
GET
Request URL
Request Headers
x-cleartax-auth-token
String
NA
Mandatory. Access token
gstin
String
MaxLength: 15
Regex: Valid GSTIN as per government.
Mandatory. The seller GSTIN of the invoice.
Request Path Params
documentId
String
NA
Mandatory. Document ID of the invoice for which the details are needed
Request Query Params
document_type
String
NA
Mandatory. Type of document.
Enums :
INV, CRN, DBN, RECEIPT, CASH_MEMO, REFUND, CONSIGNMENT_NOTE, DELIVERY_CHALLAN
Request Body
There is no request body for this API.
Response Status Codes
200
For a successfully processed request (may be a success or validation error).
401
If the user is not authenticated for the operation.
403
If the user is not authorized for the operation.
500
If there are any unhandled exceptions on Clear side.
Response Schema
documentId
String
minLength: 1
maxLength: 256
Document ID of the Invoice
invoiceStatus
String
minLength: 1
maxLength: 100
Status of the Invoice.
Enums : NOT_GENERATED, GENERATED, GENERATION_FAILED, CANCELLED, IN_PROGRESS
document
Object
NA
Document object, containing the details of the document
einvoiceDetails
Object
NA
E-Invoice details of the document
ewaybillDetails
Object
NA
E-WayBill details of the document
warningDetails
Object
NA
Warning details of the document if any
Document Object Schema
documentDetails
Object
NA
Mandatory. This section includes parameters such as type of document, e-commerce provider’s GSTIN, tax currency code, timestamp,etc.
sellerDetails
Object
NA
Mandatory. This section includes parameters such as the name of the seller, GSTIN, contact details, the logo of the seller’s business, etc.
dispatchDetails
Object
NA
Optional. This section includes parameters such as the details of the person who dispatches the goods.
buyerDetails
Object
NA
Conditional. Buyer details object. Mandatory for Non-B2C transactions and Cash Memo. This section includes parameters such as the name of the buyer, GSTIN, contact details, place of supply, etc.
shippingDetails
Object
NA
Optional. This section includes the details of the person to whom the goods are to be shipped.
exportDetails
Object
NA
Optional. Export details object. This section includes parameters such as export duty, export country code/port code, shipping details, etc.
It is required only in the case of exports.
additionalDiscounts
List
NA
Optional. This section includes parameters such as the discount amount and the reason for the same. Examples for an additional discount: Target discount, festival sale discount, etc.
additionalCharges
List
NA
Optional. This section includes parameters such as the additional charges amount and the reason for the same.
An example for additional charges would be packing charges, insurance, freight etc.
paymentInstrumentDetailsAndTerms
Object
NA
Optional. This section includes parameters such as supplier’s bank account details, credit period, the interest rate in case of delay and other payment terms.
paymentReceivedDetails
List
NA
Optional. This section includes parameters such as payer’s name, payment mode, date of payment, amount paid, etc.
metadata
Object
NA
Mandatory. Additional metadata. This section includes parameters like terms and conditions for the document, notes, signature image, etc.
referenceDocuments
Object
NA
Conditional. Details of referenced documents. This section includes parameters related to the linked documents and order reference details.
It is mandatory where credit notes, debit notes and refund notes are issued.
additionalDocumentDetails
List
NA
Optional. This section includes parameters such as attachment type (document/URL/QR code) and description of the same.
lineItems
List
NA
Mandatory. Line Items. This section includes parameters such as item serial number, item name, description, quantity, HSN code, tax rate, tax amount, etc.
valueDetails
Object
NA
Optional. Total Value Details. This section includes parameters related to total value details.
groupId
String
minLength: 1
maxLength: 256
Optional. Group ID of the document
transporterDetails
Object
NA
Optional. Transporter details of the document
transportationDetails
Object
NA
Optional. Transportation details of the object
Document Details Schema
timestamp
DateTimeFormat (dd-MM-yyyy HH:mm:ss)
Date: minLength: 10
maxLength: 10,
pattern: "^[0-3][0-9]\-[0-1][0-9]\-[2][0][1-2][0-9]$" Time: minLength: 8 maxLength: 8, Format: 24 hours Note: If time is unknown, then pass 00:00:00
Mandatory. Date and time of the creation of the Invoice is recorded here.
For eg.- 22-01-2022 02:30:45
It is proof of the moment or time that helps to know when the validity of the invoice starts.
documentType
Document Type (ENUM)
Document Type : ENUM
[ INV, CRN, DBN, RECEIPT, CASH_MEMO, REFUND, CONSIGNMENT_NOTE, DELIVERY_CHALLAN ]
Mandatory. A correct document type needs to be passed here.
An invoice can be in different forms. For example, tax invoice, credit note, debit note, delivery challan, refund voucher, cash memo, advance receipt, etc.
Each type of invoice has different usage.
It is important to mention the type of document at the top to help identify it easily.
supplyType
Supply Type (ENUM)
Supply Type : ENUM
[ B2B, B2C, SEZWP, SEZWOP, EXPWP, EXPWOP, DEXP, BOS ]
Conditional. Mandatory for non Cash Memo documents. The supply type of the transaction should be captured here.
Here are the types of supplies:
Selling goods or services to another business (B2B)
Selling goods or services to the customer (B2C) Selling goods or services to
SEZ by making GST payment
Selling goods or services to SEZ without making GST payment
Exporting goods or services by making GST payment
Exporting goods or services without making GST payment
Deemed exports
Distribution of Input Tax Credit (ITC) by Input Service Distributor (ISD) to its branches Bill of Supply
transactionType
Transaction Type (ENUM)
Transaction Type : ENUM
[ INWARD, OUTWARD ]
Conditional. Mandatory for EWB Non IRN type documents where EWB has been generated. Here are the type of transactions:
Inward for documents where EWB is raised by the receiver
Outward for documents where EWB is raised by the sender
subSupplyType
Sub Supply Type (ENUM)
Sub Supply Type (ENUM)
[ SUPPLY, IMPORT, EXPORT, JOB_WORK, OWN_USE, JOB_WORK_RETURNS, SALES_RETURN, OTHERS, SKD_CKD, LINE_SALES, RECIPIENT_UNKNOWN, EXHIBITION_OR_FAIRS ]
Conditional. Mandatory for EWB Non IRN type documents where EWB has been generated.
subSupplyDescription
String
minLength: 1
maxLength: 100
pattern: "^([^\\\"])*$"
Optional. Sub Supply type description for EWB Non IRN documents
orderId
String
Should be unique for each document. If repeated, will be considered a duplicate request.
For example- 1001001112
Alphanumeric characters & special characters (/ . - ) are allowed.
Mandatory. OrderId. Order number or order ID is a unique number assigned to every order by the seller to keep track of it.
It is useful to the seller to identify the order placed by the customer and find details for the same order depending on the data set up in their system.
For example, if a customer places an order, the said order is assigned a unique number which is never assigned again to any other document. Even if there is a credit note or debit note for referring to the said order, the order ID of such documents will be different.
Eg: If a user issues an invoice to the customer with order id ABC and later due to some changes a credit note has to be issued against it then the order id should be different such as XYZ
documentNoPrefix
String
Alphabets and numbers are allowed here.
You can also use special characters- “/”, “-”.
The first character cannot be 0, “/”, “-” Prefix should end with a “/” or “-”
Min length: 1
Max length: 10
For tax invoices, the maximum allowable length for a complete invoice number is 16 characters (Prefix + Serial number)
Mandatory. Document prefix. The document prefix should be passed here. It is a tag added at the beginning of the document number. It can be letters or numbers that can help further identify the transactions.
A prefix in a document number makes them instantly recognisable.
We will add the next incremental number to the prefix to create a complete invoice number. For example, a company can choose to enter prefix RJS/for its branches in Rajasthan and prefix GJR/for its Gujarat branches,
In response, the invoice number will be RJS/456 or GJR/897
isReverseChargeApplicable
Boolean
The default value is False
It can be set as "True" in case of B2B invoices, B2B Credit Note and B2B Debit Note.
Optional. The input value will be “True” if the tax liability is payable under the reverse charge mechanism, i.e. when the liability to pay GST is on the recipient of goods or services instead of the supplier. The reverse charge is applicable only on notified categories of goods or services.
isIgstApplicableOnIntraState
Boolean
If “True” is selected, then note that- IGST needs to be levied irrespective of the supplier state and place of supply. Reverse charge applicability will always be “Yes”.
Optional. If “True” is selected, it indicates that the supply is intrastate but chargeable to IGST.
By default, it will be “False”.
For example, it will be “True” in the case of transfer of Priority Sector Lending Certificate (PSLC) by a bank to another bank under RBI regulations within the same state.
ecommerceProviderGstin
String
minLength: 15
maxLength: 15
pattern: "^([0-9]{2}[0-9A-Z]{13})$" The tax collector's GSTIN should be passed here.
Optional. E-commerce Provide GSTIN. GSTIN of e-commerce provider should be tagged here.
GSTIN is a unique 15-digit unique identification number which is also called a GST registration number.
When an e-commerce provider is involved in a transaction between seller and buyer, the GSTIN of the e-commerce provider should be mentioned for TCS purposes. Examples of e-commerce providers: Amazon, Flipkart, Meesho.
documentCurrencyCode
Currency Code (ENUM)
minLength: 3 maxLength: 3, pattern : Alphabets ENUM
Optional. It is a three-letter alphabetic code that represents various currencies used for the transactions.
The default document currency code is “INR”.
taxCurrencyCode
Currency Code (ENUM)
minLength: 3 maxLength: 3, pattern : Alphabets ENUM
Optional. It is a three-letter alphabetic code that represents various currencies used for the transaction. The tax currency code will always be “INR”.
documentPeriodDetails
Object
NA
Optional. Document Period Details. This section includes the start date and the end date for the summary invoices.
customFields
Custom Fields (List)
NA
Optional. It is a section where the user can add any number of custom fields and put them in the object.
documentNumber
String
minLength: 1
maxLength: 16
pattern: "^([a-zA-Z1-9]{1}[a-zA-Z0-9\/-]{0,15})$"
Mandatory. Document number created by the system
createdAt
Date (dd-MM-yyyy)
Date : minLength: 10
maxLength: 10,
pattern: "^[0-3][0-9]\-[0-1][0-9]\-[2][0][1-2][0-9]$". Future dates are not acceptable.
For Eg.- DD-MM-YYYY
Mandatory. Document created date
Document Period Details Schema
startDate
Date (dd-MM-yyyy)
Date : minLength: 10
maxLength: 10,
pattern: "^[0-3][0-9]\-[0-1][0-9]\-[2][0][1-2][0-9]$". Future dates are not acceptable.
For Eg.- DD-MM-YYYY
Optional. Start Date for the Transaction. The start date of the invoice to be passed here.
It is the date of initiation of the transaction.
For example:
If the goods are supplied on the 1st day of the month and the invoice for the same is generated at the end of the month. Then the start date of the invoice will be the 1st day of the month.
endDate
Date (dd-MM-yyyy)
Date : minLength: 10
maxLength: 10,
pattern: "^[0-3][0-9]\-[0-1][0-9]\-[2][0][1-2][0-9]$". Future dates are not accepted.
For Eg.- DD-MM-YYYY
Optional. End date for the Transaction. This is the end date of a summary Invoice generated for a transaction spanning across more than one day.
Summary Invoice can be also called a consolidated invoice. It is an invoice that aggregates many transactions onto a single document, enabling a single payment each month. This is mostly followed by the enterprises who have multiple transactions with their customers in a month for which consolidating monthly transactions of the customers becomes easier.
Please note, this is not the invoice payment due date.
Custom Fields Schema
name
String
NA
Optional. Name for the custom key. These are sample custom fields. In case the user wants to add certain information at the invoice level which should be printed on the invoice, the user can define their own custom fields and add in this object.
Eg: if a maintenance company wants to add the sq ft. area of the property on the top of the invoice
Or an insurance company wants to add the insurance number on top of the invoice.
In these cases, the user can add any number of custom fields and put them in the object.
value
String
NA
Optional. Value for the custom key.
Seller Details
tradeName
String
minLength: 3
maxLength: 100
pattern: "^([^\\\"])*$". The characters can be alphanumeric or special characters.
Optional. Trade Name. Trade name of the supplier to be passed here.
A trade name in GST is the name through which the business is normally called and the name used for advertising and marketing of the company.
Eg.- ClearTax’s legal name is Defmacro Software Pvt. Ltd. However, it is normally known by ClearTax.
legalName
String
minLength: 3
maxLength: 100
pattern: "^([^\\\"])*$"
Mandatory. Legal Name. The name entered at the time of the formation of the business or incorporation of the company should pass.
address
Address (Object)
NA
Mandatory. Address Details. This section includes parameters such as address line 1, line 2, pincode, state code, etc.
gstin
String
minLength: 15
maxLength: 15
pattern: "([0-9]{2}[0-9A-Z]{13})"
Mandatory except for Cash Memo. GSTIN. The seller’s GSTIN should be tagged here.
GSTIN is a unique 15-digit Goods and Services Tax Identification Number or GST registration number.
The dealers who are registered under the GST law are provided with the GSTIN.
pan
String
minLength: 10
maxLength: 10
pattern: "([0-9A-Z]{10})"
Optional. Seller’s Permanent Account Number (PAN) to be passed here.
phone
String
minLength: 6
maxLength: 12
pattern: "^([0-9]{6,12})$"
Optional. Supplier’s phone number details to be passed here.
String
minLength: 6
maxLength: 100
pattern: "^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+$"
Optional. Seller’s email ID details need to be passed here. Every invoice needs the business information on it, and apart from the business name, address, and phone number, the email address of the supplier is also necessary.
logoImage
String
The image URL or base64 of the image is to be passed here.
Optional. A logo image of the supplier is to be printed on the invoice.
The logo image on the invoice helps make the document easily recognisable.
The image provided is to be printed on the PDF.
The image can be provided in 3 forms to the team: A static image during onboarding will be added to the settings of user. The URL of the image can be passed here. Base64 of the Image
Address
line1
String
minLength: 1
maxLength: 100
pattern: "^([^\\\"])*$"
Mandatory. Address Line 1. Primary address information of the business is required here.
The document will show the first line of the address of the business in this field. If the address exceeds the maximum length, it can be continued in line 2.
line2
String
minLength: 3
maxLength: 100
pattern: "^([^\\\"])*$"
Optional. Address Line 2. If the address is not completed in line 1, continue it in line 2.
location
String
minLength: 3
maxLength: 50
pattern: "^([^\\\"])*$"
Mandatory. Location. City should be passed here.
pincode
String
minimum: 100000
maximum: 999999 ENUM
Mandatory. The pincode number needs to be passed here.
stateCode
String
ENUM
Mandatory. The state code of the GSTIN needs to be passed here.
Dispatch Details
gstin
String
minLength: 15
maxLength: 15
pattern: "([0-9]{2}[0-9A-Z]{13})"
Optional. GSTIN of the person dispatching the goods.
pan
String
minLength: 10
maxLength: 10
pattern: "([0-9A-Z]{10})"
Optional. Permanent Account Number (PAN) of the person dispatching the goods.
tradeName
String
minLength: 3
maxLength: 100
pattern: "^([^\\\"])*$"
Optional. Trade name of the entity dispatching the goods
legalName
String
minLength: 3
maxLength: 100
pattern: "^([^\\\"])*$"
Mandatory. Legal name of the entity dispatching the goods
address
Address (Object)
NA
Conditional. This section includes parameters such as address line 1, line 2, pincode, state code, etc.
This is required only if the ‘dispatch from’ address is different from the seller’s address. It is not applicable for advance receipt of the goods.
Buyer Details
name
String
minLength: 3
maxLength: 100
pattern: "^([^\\\"])*$"
Mandatory for B2B, EXPWP, EXPWOP, SEZWP, SEZWOP, DEXP Optional for B2C, BOS and Cash Memo
tradeName
String
minLength: 3
maxLength: 100
pattern: "^([^\\\"])*$"
Optional. A trade name in GST is the name through which the business is normally called and the name used for advertising and marketing of the company.
legalName
String
minLength: 3
maxLength: 100
pattern: "^([^\\\"])*$"
Conditional (Mandatory for non B2C). Legal Name of the buyer. The name entered at the time of the formation of the business or incorporation of the company should pass.
address
Address (Object)
NA
Conditional (Mandatory for non B2C). Address Details. This section includes parameters such as address line 1, line 2, pincode, state code, etc.
gstin
String
minLength: 15
maxLength: 15
pattern: "([0-9]{2}[0-9A-Z]{13})". For export buyer’s, GSTIN should be “URP”
Optional. GSTIN of the buyer. GSTIN is a unique 15-digit Goods and Services Tax Identification Number or GST registration number.
pan
String
minLength: 10
maxLength: 10
pattern: "([0-9A-Z]{10})"
Optional. Buyer’s Permanent Account Number (PAN).
phone
String
minLength: 6
maxLength: 12
pattern: "^([0-9]{6,12})$"
Optional. Buyer’s phone number.
String
minLength: 6
maxLength: 100
pattern: "^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+$"
Optional. Email of the buyer.
placeOfSupply
String
ENUM
Mandatory . The place of supply of the goods or services should be passed here.
The place of supply of goods or services under GST decides whether the transaction should be considered as intrastate to charge CGST & SGST/UTGST or considered as interstate to charge IGST.
Shipping Details
name
String
minLength: 3
maxLength: 100
pattern: "^([^\\\"])*$"
Optional. Name of the person to whom the goods are shipped.
tradeName
String
minLength: 3
maxLength: 100
pattern: "^([^\\\"])*$"
Optional. Trade name of the organisation shipping the goods. A trade name in GST is the name through which the business is normally called and the name used for advertising and marketing of the company.
legalName
String
minLength: 3
maxLength: 100
pattern: "^([^\\\"])*$"
Mandatory. The legal name of the person to whom the goods are shipped. The name entered at the time of the formation of the business or incorporation of the company (customer) should pass.
address
Address (Object)
NA
Conditional. This section includes parameters such as address line 1, line 2, pincode, state code, etc.
This is required only if the ‘ship to’ address is different from the buyer’s address. It is not applicable for advance receipt of the goods.
gstin
String
minLength: 15
maxLength: 15
pattern: "([0-9]{2}[0-9A-Z]{13})"
Optional. GSTIN of the person to whom the goods are shipped.
phone
String
minLength: 6
maxLength: 12
pattern: "^([0-9]{6,12})$"
Optional. Phone numbers of individuals who receive the shipped goods
pan
String
minLength: 10
maxLength: 10
pattern: "([0-9A-Z]{10})"
Optional. Permanent Account Number (PAN) of individuals who receive the shipped goods.
Export Details
countryCode
Country Code(ENUM)
minLength : 2 maxLength: 2, pattern: "([A-Z]{2})"
Optional. Country codes need to be passed here in case the supply type is EXPWP or EXPWOP, i.e. in the case of exports. Using the country codes, one can easily find out information about a shipment and its country.
shippingPortCode
Shipping Port Code(ENUM)
minLength: 6 maxLength: 6
Optional. Shipping Port Code. The shipping bill is a document for customs clearance for the export of goods.
The shipping bill includes the shipping port code, shipping bill date and shipping bill number.
Exporters supplying goods with payment of IGST will need shipping bill details for claiming refund of IGST so paid.
This is because the shipping bill having GST invoice details is considered as an application for claiming a refund of IGST paid on such exports.
conversionFactor
Decimal
Only numbers accepted.
Decimals are allowed.
To be filled only if the supply type is “EXPWP” or “EXPWOP”.
Optional. The conversion factor means the exchange rate needs to be passed here.
The exchange rate is specified on the Bill of Export issued by Custom authorities.
If exchange rates are known, currency conversions can be done by dividing the current currency by the exchange rate.
shippingBillNumber
String
minLength: 1
maxLength: 20
pattern: "^([^\\\"])*$" Inputs are required only in the case of exports of goods.
Optional. The shipping bill is a document for customs clearance for the export of goods.
The shipping bill includes the shipping port code, shipping bill date and shipping bill number.
Exporters supplying goods with payment of IGST will need shipping bill details for claiming refund of IGST so paid. This is because the shipping bill with GST invoice details is considered as an application for claiming a refund of IGST paid on such exports.
shippingBillDate
Date (dd-MM-yyyy)
minLength: 10
maxLength: 10
pattern: "^[0-3][0-9]\-[0-1][0-9]\-[2][0][1-2][0-9]$" Future dates are not acceptable.
Input is required only in the case of exports of goods.
Optional. The shipping bill date is the date mentioned on the shipping bill.
The shipping bill is an essential document required for getting customs clearance to export goods.
The shipping bill includes the shipping port code, shipping bill date and shipping bill number.
Exporters supplying goods with payment of IGST will need shipping bill details for claiming refund of IGST so paid.
This is because the shipping bill with GST invoice details is considered as an application for claiming a refund of IGST paid on such exports.
exportDuty
Decimal
Inputs are required only in the case of exports.
Optional. The tax levied on the export of goods is called an export duty.
The tax rate needs to be passed here.
Additional Discounts
reason
Reason
Alpha-Numeric value
Optional. The reason for additional discount given to the customer at invoice level should be passed here.
For example, target discount, festival sale discount, etc.
amount
Decimal
Only Numeric
Optional. The additional discount amount.
Additional Charges
reason
Reason
Alpha-Numeric value
Optional. The reason for additional charges levied to the customer should be passed here.
For example, Shipping charges or Packing Charges etc.
amount
Decimal
Only Numeric
Optional. Additional charges.
Payment Instrument and Terms
accountName
String
minLength: 1
maxLength: 100
pattern: "^([^\\\"])*$"
Optional. Name of the bank account of where the payment of the invoice would be expected should be passed here.
The bank account name mentioned in the document will enable the buyer to make payment to the correct bank account.
ifscCode
String
minLength: 1
maxLength: 11
pattern: "^([^\\\"])*$"
Optional. IFSC code of the respective bank account should be entered.
The IFSC code mentioned in the document will enable the customer to make payment to the supplier in their bank account.
accountNumber
String
minLength: 1
maxLength: 18
pattern: "^([^\\\"])*$"
Optional. A valid bank account number of where the payment of the invoice would be expected should be passed here.
The bank account number mentioned in the document will enable the buyer to make payment to the correct bank account.
upiId
String
yourname@bankname
Optional. The UPI ID of the seller should be passed here.
By sending the UPI ID, the seller sends a virtual payment address of their bank account to the customer. The customer can use the same UPI ID while making payments to the seller’s bank account.
paymentTerms
String
minLength: 1
maxLength: 100
pattern: "^([^\\\"])*$"
Optional. The terms of payment should be entered.
Eg: Cash payments are not allowed.
Cash on Delivery.
paymentInstruction
String
minLength: 1
maxLength: 100
pattern: "^([^\\\"])*$" Eg: The amount of advance and the installment details if any.
Optional. Payment instructions should be passed here.
creditDays
Integer
minimum: 0
maximum: 9999
Optional. The number of credit days should be passed here.
Credit days are the number of days which the customer is allowed to wait before paying the amount of an invoice.
creditTransferTerms
String
minLength: 1
maxLength: 100
Optional. The payment terms should be mentioned by the supplier.
Eg: Interest rate in case of delay in payment, payment due in advance, payment due upon receipt, etc.
directDebitTerms
String
minLength: 1
maxLength: 100
pattern: "^([^\\\"])*$"
Optional. Direct debit is a procedure where sellers are allowed to automatically take funds from the bank account of buyers as per the agreed terms. If there is any ‘direct debit’ agreement between the seller and buyer, the terms of the same should be mentioned here.
Payment Received Details
payerName
String
minLength: 1
maxLength: 100
pattern: "^([^\\\"])*$"
Optional. The name of the payer.
paymentMode
String
minLength: 1
maxLength: 18
pattern: "^([^\\\"])*$"
Optional. Mode of payment should be passed here.
For Eg: Cash UPI Net Banking
paymentTransactionId
String
NA
Optional. Payment transaction ID should be passed here.
paymentDate
DD-MM-YYYY
minLength: 10
maxLength: 10,
pattern: "^[0-3][0-9]\-[0-1][0-9]\-[2][0][1-2][0-9]$".
Optional. Date of payment of the supply should be passed here.
paidAmount
Decimal
minimum: 0
maximum: 99999999999999.99
Optional. Amount received from the customer should be passed here.
Invoice Metadata Details
termsAndCondition
String
NA
Optional. Terms and conditions for printing on the document to be passed here.
notes
String
NA
Optional. Notes for the invoice should be passed here.
documentLinkingId
String
All documents created and linked on the “Linked Document Schema” should have the same documentLinkingId
Optional. For all the documents that are linked in the “Linked Document Schema” you can use this field as an alias to search for all related documents.
Eg: your company might have a Job id or Project id and all documents created against it are linked. You could use the same alias here and use it to search all documents related to that Job or Project.
signatureImage
String
The signature image should be provided
Optional. Signature image of the supplier should be passed here.
The image can be provided in 3 forms to the team: A static image during onboarding will be added to the settings of user. The URL of the image can be passed here. Base64 of the image.
printTemplateId
String
Note : Custom Print Template ID please reachout to ClearTax Support
Optional. You will be provided with a unique printTemplateid for your documents. Where all the information is printed on that template id. Please request the engineering team at Clear for the respective value.
Reference Document Details
linkedDocumentsDetails
List
minLength: 1 maxLength: 16.
It should end with "/" or "-" only.
Conditional. It is a conditional field. This section includes parameters related such as document type, document number and document date of the original Invoice. Mandatory for Credit Note, Debit Note and Refund Notes
orderReferenceDetails
List
NA
Optional. This section includes parameters such as contract reference number, purchase order reference number, project reference number, etc.
Linked Document Details
documentNumber
String
minLength: 1 maxLength: 16.
It should end with "/" or "-" only. The first letter cannot be 0, “/”, “-”.
Mandatory. The document number of the documents linked with the transaction should be passed here.
Use this field to link connected documents to each other.
Eg: Invoice 1234 could be connected to Credit Note 4567 and an Advance Voucher of 7890.
documentDate
Date (dd-MM-yyyy)
minLength: 10
maxLength: 10,
pattern: "^[0-3][0-9]\/[0-1][0-9]\/[2][0][1-2][0-9]$". Mandatory for Credit Notes,Debit Notes and Refund Notes.
Future dates are not acceptable.
For Eg: DD-MM-YYYY
Optional. The date of the documents linked with the transaction should be passed here.
Use this field to link connected documents to each other.
Eg: Invoice 1234 could be connected to Credit Note 4567 and an Advance Voucher of 7890.
documentNumberType
Document Type (ENUM)
Document Type : Invoice, Credit Note, Debit Note
Mandatory. The type of the document linked should be passed here.
It can be an Invoice, Cash Memo, Credit Note, etc.
Use this field to link connected documents to each other.
Eg: Invoice 1234 could be connected to Credit Note 4567 and an Advance Voucher of 7890.
Order Reference Details
receiptAdviceNo
String
minLength: 1
maxLength: 20
pattern: "^([^\\\"])*$" The characters can be alphanumeric
Optional. Receipt advice number of goods supplied should be passed here.
receiptAdviceDate
Date (dd-MM-yyyy)
minLength: 10
maxLength: 10
pattern: "^[0-3][0-9]\-[0-1][0-9]\-[2][0][1-2][0-9]$"
Optional. Receipt advice date of the goods supplied should be passed here.
batchReferenceNo
String
minLength: 1
maxLength: 20
pattern: "^([^\\\"])*$"
Optional. The reference number of the batch of sales should be passed here.
Use this in accordance to the terminology used in your organisation. The terminology may vary so you can choose to map it according to these fields.
contractReferenceNo
String
minLength: 1
maxLength: 20
pattern: "^([^\\\"])*$"
Optional. The number of the contract to be referenced should be passed here.
Use this in accordance to the terminology used in your organisation. The terminology may vary so you can choose to map it according to these fields.
otherReferenceNo
String
minLength: 1
maxLength: 20
pattern: "^([^\\\"])*$"
Optional. Any other reference number of the contract to be referenced should be passed here.
Use this in accordance to the terminology used in your organisation. The terminology may vary so you can choose to map it according to these fields.
projectReferenceNo
String
minLength: 1
maxLength: 20
pattern: "^([^\\\"])*$"
Optional. The project number to be referenced in the invoice should be passed here.
Use this in accordance to the terminology used in your organisation. The terminology may vary so you can choose to map it according to these fields.
poReferenceNo
String
minLength: 1
maxLength: 16
pattern: "^([^\\\"])*$"
Optional. The number of the purchase order to be referenced should be passed here.
Use this in accordance to the terminology used in your organisation. The terminology may vary so you can choose to map it according to these fields.
poReferenceDate
Date (dd-MM-yyyy)
minLength: 10
maxLength: 10
pattern: "^[0-3][0-9]\-[0-1][0-9]\-[2][0][1-2][0-9]$"
Optional. The date of the purchase order to be referenced should be passed here. Use this in accordance to the terminology used in your organisation. The terminology may vary so you can choose to map it according to these fields.
Additional Document Details
id
String
-
Optional. ID
attachmentType
String
minLength: 3
maxLength: 100
pattern: "^([^\\\"])*$" The attachment type can be URL, doc, QR code.
Mandatory. The attachment type should be passed here.
The attachment type can be URL or doc or QR code.
value
String
NA
Mandatory. Value.
description
String
minLength: 3
maxLength: 1000
pattern: "^([^\\\"])*$"
Optional. Description of the additional document attached should be passed here.
Line Item Details
serialNumber
Number
minLength: 1
maxLength: 6
pattern: "^([0-9]{1,6})$"
Optional. The serial number of items should be entered. Ideally start with 1 to the number of items to be put in the invoice.
name
String
Min length: 3
Max length: 3006
Pattern: "^([^\"])*$"
Mandatory. The name of the item should be passed here. It will be the data that should be shown in the invoice item table
description
String
minLength: 3
maxLength: 300
pattern: "^([^\\\"])*$" If not provided, then it will be blank.
Optional. The item description should be passed here.
Examples for the description would be refrigerators, televisions, washing machines, etc.
isService
Boolean
minLength: 1
maxLength: 1,
Values: "Y", "N"
Optional. True if IsService, False for Goods.
hsnCode
String
minLength: 6
maxLength: 8
pattern: "^(?!0+$)([0-9]{4}|[0-9]{6}|[0-9]{8})$" If supply is of service, then the HSN code should start with "99"
Conditional. HSN code for the goods and SAC code for services should be passed here.
skuCode
String
Alpha-Numeric
Optional. The SKU code of the item should be passed here. The SKU code is created & maintained by the user system.
taxRate
Decimal
minimum: 0,
maximum: 999.999 Applicable, if supply is taxable.
The tax rate slab has a total of 11 tax rates (0, 0.1, 0.25, 1, 1.5, 3, 5, 7.5, 12, 18, 28)
If the CGST & SGST rate is provided, then the tax rate is the SGST rate + CGST rate.
If the IGST rate is provided then the tax rate is the IGST rate.
Conditional. Tax rate for the supply should be passed here.
pricePerUnit
Decimal
minimum: 0
maximum: 999999999999.999
Optional. Price per unit of the items should be passed here. The price mentioned here is the price without tax.
discountPerUnit
Decimal
minimum: 0
maximum: 999999999999.99
Optional. The discount per unit of the item should be passed here.
taxableAmount
Decimal
minimum: 0
maximum: 999999999999.99 Taxable value can be computed as->
(Quantity x Price per unit) - Total discount amount.
Conditional. Taxable amounts should be passed here.
If this is not provided then it will be auto computed, given if price per unit is present
cessRate
Decimal
minimum: 0
maximum: 999.999
Optional. Cess rate as per the item should be passed here.
Where the goods or service attracts GST cess, it should be calculated on the basis of the taxable value of the supply and as provided in the GST cess rate schedule.
For example, motor vehicles used for transport shall be charged a cess of 15%.
stateCessRate
Decimal
minimum: 0
maximum: 999.999
Optional. State cess rate should be entered, if any applicable.
cessNonAdvolAmount
Decimal
minimum: 0
maximum: 999999999999.99 Eg: The export of shellac and lac based products attract cess at the rate of Rs. 2.30 per quintal.
Optional. “Cess non-advol amount” means non-advolerum cess, i.e. it is charged fixed in terms of quantity and not charged as a percentage on value.
Notified cess as per quantity will be passed here.
stateCessNonAdvolAmount
Decimal
minimum: 0
maximum: 999999999999.99 Eg: The export of shellac and lac based products attract cess at the rate of Rs. 2.30 per quintal.
Optional. “Cess non-advol amount” means non-advolerum cess, i.e. it is charged fixed in terms of quantity and not charged as a percentage on value.
Notified cess as per quantity will be passed here.
quantity
Decimal
minimum: 0
maximum: 999999999999.99 For services - it will be “0” or “1”
Optional. The quantity of the supply item should be passed here.
unitOfMeasurement
UOM (ENUM)
minLength: 3
maxLength: 8 Mandatory in case of the supply of goods.
Conditional. The unit of measurement of goods should be passed here.
For example: For 10 kilograms of wheat, the unit of measurement is ‘Kilogram’ and the UQC is “KGS”.
otherCharges
Decimal
minimum: 0
maximum: 999999999999.99
Optional. The other charges should be passed here.
taxCategory
Tax Category (ENUM)
ENUM: NIL_RATED
NONGST
EXEMPT
Optional. Default value in case of Bill of Supply is taken as NIL_RATED
customFields
List (Custom Fields)
NA
Optional. It is a section where the user can add any number of custom fields and put them in the object.
discount
Decimal
minimum: 0
maximum: 99999999999999.99
Optional. The discount amount of supply should be passed here.
igstAmount
Decimal
minimum: 0
maximum: 99999999999999.99 If “Intrastate supply attracts IGST” is equal to “true”, then IGST will be applicable ( even if the place of supply and supplier state are the same). If IGST is applicable in SEZ transactions or any other transactions, always IGST will be applicable. In case SEZ developer is the supplier, then only IGST tax rates are applicable irrespective of supplier state code and place of supply code. If applicable, then compute it as->
Taxable value x Tax Rate.
Optional. IGST amount as per the item should be passed here.
Applicable if the place of supply is different from the supplier state.
sgstAmount
Decimal
minimum: 0
maximum: 99999999999999.99 Applicable when the place of supply = supplier state except if igstOnIntraStateTransaction is “true”.
Not applicable, if supply type is “Bill of supply”
If applicable, then compute it as->
Taxable value x taxable rate/2
Optional. SGST amount as per the item should be passed here.
cgstAmount
Decimal
minimum: 0
maximum: 99999999999999.99 This field is applicable when the place of supply = supplier state except when igstOnIntraStateTransaction is “true”.
It is not applicable if the supply type is “Bill of supply” If applicable, then compute it as ->
Taxable value x taxable rate/2
Optional.CGST amount as per the item should be passed here.
cessAmount
Decimal
minimum: 0
maximum: 99999999999999.99
Optional. Cess amount should be passed here.
stateCessAmount
Decimal
minimum: 0
maximum: 99999999999999.99 Should be computed as->
Taxable value *state cess rate
Optional. The state cess amount of the supply should be passed here.
Where the goods or service attracts GST cess, it should be calculated on the basis of the taxable value of the supply and as provided in the GST cess rate schedule.
grossAmount
Decimal
minimum: 0
maximum: 99999999999999.99
Optional. The gross total amount of the supply should be passed here.oss Amount
totalItemValue
Decimal
minimum: 0
maximum: 99999999999999.99
Conditional. Total value of the item should be passed here.
Value Details
totalTaxableAmount
Decimal
minimum: 0
maximum: 99999999999999.99
Optional. The total taxable amount is to be passed here.
totalCgstAmount
Decimal
minimum: 0
maximum: 99999999999999.99
Optional. The total CGST amount should be passed here.
totalIgstAmount
Decimal
minimum: 0
maximum: 99999999999999.99
Optional. The total IGST amount should be passed here.
totalSgstAmount
Decimal
minimum: 0
maximum: 99999999999999.99
Optional. The total SGST amount should be passed here.
totalCessAmount
Decimal
minimum: 0
maximum: 99999999999999.99
Optional. The total cess amount should be passed here.
totalStateCessAmount
Decimal
minimum: 0
maximum: 99999999999999.99
Optional. The total state cess amount should be passed here.
totalDiscountAmount
Decimal
minimum: 0
maximum: 99999999999999.99
Optional. The total discount amount should be passed here.
totalAdditionalChargeAmount
Decimal
minimum: 0
maximum: 99999999999999.99
Optional. Total of additional charges levied to be passed here.
totalRoundOffAmount
Decimal
minimum: -99.99
maximum: 99.99
Optional. The total round off amount should be passed here.
totalAmount
Decimal
minimum: 0
maximum: 99999999999999.99
Optional. The total amount of supply to be passed here.
totalTaxAmount
Decimal
minimum: 0
maximum: 99999999999999.99
Optional. The total tax amount should be passed here.
totalAmountInForeignCurrency
Decimal
minimum: 0
maximum: 99999999999999.99
Optional. The amount in foreign currency to be passed here.
This is applicable in the case of exports.
Transporter Details
name
String
minLength: 3
maxLength: 100
pattern: "^([^\\\"])*$"
Mandatory for B2B, EXPWP, EXPWOP, SEZWP, SEZWOP, DEXP Optional for B2C, BOS and Cash Memo
tradeName
String
minLength: 3
maxLength: 100
pattern: "^([^\\\"])*$"
Optional. A trade name in GST is the name through which the business is normally called and the name used for advertising and marketing of the company.
legalName
String
minLength: 3
maxLength: 100
pattern: "^([^\\\"])*$"
Conditional (Mandatory for non B2C). Legal Name of the buyer. The name entered at the time of the formation of the business or incorporation of the company should pass.
address
Address (Object)
NA
Conditional (Mandatory for non B2C). Address Details. This section includes parameters such as address line 1, line 2, pincode, state code, etc.
gstin
String
minLength: 15
maxLength: 15
pattern: "([0-9]{2}[0-9A-Z]{13})". For export buyer’s, GSTIN should be “URP”
Optional. GSTIN of the Transporter. GSTIN is a unique 15-digit Goods and Services Tax Identification Number or GST registration number.
pan
String
minLength: 10
maxLength: 10
pattern: "([0-9A-Z]{10})"
Optional. Transporter’s Permanent Account Number (PAN).
phone
String
minLength: 6
maxLength: 12
pattern: "^([0-9]{6,12})$"
Optional. Transporter’s phone number.
String
minLength: 6
maxLength: 100
pattern: "^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+$"
Optional. Email of the Transporter.
logoImage
String
The image URL or base64 of the image is to be passed here.
Optional. A logo image of the supplier is to be printed on the invoice.
The logo image on the invoice helps make the document easily recognisable.
The image provided is to be printed on the PDF.
The image can be provided in 3 forms to the team: A static image during onboarding will be added to the settings of user. The URL of the image can be passed here. Base64 of the Image
Transportation Details
distance
String
minimum: 1
maximum: 4000
Mandatory.
Distance between source and destination PIN codes.
If the value is "0" then the distance will be auto-computed by NIC based on the availability of pin-codes in NIC database.
grossWeight
String
minLength: 3
maxLength: 100
Optional. Gross weight of the goods being transported.
packageInformation
String
minLength: 3
maxLength: 100
Optional. Package information of the goods being transported
pickupDate
Date (dd-MM-yyyy)
minLength: 10
maxLength: 10
pattern: "^[0-3][0-9]\-[0-1][0-9]\-[2][0][1-2][0-9]$"
Optional. Pickup date of the goods being transported
transportMode
String
minLength: 1
maxLength: 1
enum: [ "1", "2", "3", "4" ]
Optional. Mode of transport (Road-1, Rail-2, Air-3, Ship-4)
transportationDate
Date (dd-MM-yyyy)
minLength: 10
maxLength: 10
pattern: "^[0-3][0-9]\-[0-1][0-9]\-[2][0][1-2][0-9]$"
Optional. Transportation Date
transportationDocDate
Date (dd-MM-yyyy)
minLength: 10
maxLength: 10
pattern: "^[0-3][0-9]\-[0-1][0-9]\-[2][0][1-2][0-9]$"
Optional. Transport Document Date
transportationDocNo
String
minLength: 1 maxLength: 16
pattern: "^([a-zA-Z1-9]{1}[a-zA-Z0-9\/-]{0,15})$"
Optional. Transport Document Number.
vehicleNumber
String
Valid Vehicle Number
Conditional. Vehicle number, should be passed mandatorily when transport mode is ROAD
vehicleType
String
ENUM : REGULAR
ODC
Optional. Vehicle Type
E-Invoice Details
acknowledgementDate
String
minLength: 3
maxLength: 100
Conditional. Acknowledgment date of the E-Invoice
acknowledgementNumber
String
minLength: 3
maxLength: 100
Conditional. Acknowledgment number of the E-Invoice
irn
String
minLength: 3
maxLength: 100
Conditional. Invoice Reference Number of the E-Invoice
paymentQrCode
String
minLength: 3
maxLength: 5000
Conditional. Payment QR Code of the invoice (in case of B2C transactions)
signedInvoice
String
minLength: 3
maxLength: 5000
Conditional. Signed invoice of the E-Invoice
signedQRCode
String
minLength: 3
maxLength: 5000
Conditional. Signed QR Code of the E-Invoice
E-WayBill Details
ewaybillDate
DateTimeFormat (dd-MM-yyyy HH:mm:ss)
Date: minLength: 10
maxLength: 10,
pattern: "^[0-3][0-9]\-[0-1][0-9]\-[2][0][1-2][0-9]$" Time: minLength: 8 maxLength: 8, Format: 24 hours
Conditional. E-WayBill generation date
ewaybillNumber
String
minLength: 3
maxLength: 100
Conditional. E-WayBill number
ewaybillStatus
String
minLength: 3
maxLength: 100
Conditional. E-WayBill status
validTill
DateTimeFormat (dd-MM-yyyy HH:mm:ss)
Date: minLength: 10
maxLength: 10,
pattern: "^[0-3][0-9]\-[0-1][0-9]\-[2][0][1-2][0-9]$" Time: minLength: 8 maxLength: 8, Format: 24 hours
Conditional. E-WayBill validity date
Warning Details
code
String
minLength: 3
maxLength: 100
Optional. Warning error code
message
String
minLength: 3
maxLength: 100
Optional. Warning error message
source
String
ENUM : CLEARTAX, GOVT
Optional. Warning error source
Sample Response (Success)
HTTP Status Code - 200
Sample Response (Error)
HTTP Status Code - 401
If the authentication token is missing or incorrect
API Validations
There are no validations other than authentication in this API.
API Constraints
This API needs to be authenticated with a valid auth token. If the auth token is missing, null, empty, invalid, incomplete or incorrect, the API will return HTTP Status Code 401.
Once the authentication part is complete, the API/Product will check for the document ID passed in URL along with the GSTIN present in the headers to validate if the mentioned document is present in that account, to retrieve the details.
Last updated