# E-Invoice Object

An E-Invoice object has the following schema:

| Parameter   | Type   | Field Validations  | Description                                                                                                                                                                                                           |
| ----------- | ------ | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Version     | String | NA                 | Mandatory. Version. Eg: "1.1"                                                                                                                                                                                         |
| Irn         | String | NA                 | Optional. This is NOT required to be sent in the request payload.                                                                                                                                                     |
| TranDtls    | Object | NA                 | Mandatory. Transaction details object.                                                                                                                                                                                |
| DocDtls     | Object | NA                 | Mandatory. Document details object.                                                                                                                                                                                   |
| SellerDtls  | Object | NA                 | Mandatory. Seller details object.                                                                                                                                                                                     |
| BuyerDtls   | Object | NA                 | Mandatory. Buyer details object.                                                                                                                                                                                      |
| DispDtls    | Object | NA                 | Conditional. Dispatch From details object. Required only if the Dispatch From address is different from Seller Details address.                                                                                       |
| ShipDtls    | Object | NA                 | Conditional. Ship To details object. Required only if the Ship To address is different from Buyer Details address.                                                                                                    |
| ItemList    | List   | NA                 | <p>Mandatory. List of one or more Item objects.</p><p>Maximum 1000 line items are supported per document. This limit can be extended to 5000 line items by requesting the same from the NIC (Government) support.</p> |
| ValDtls     | Object | NA                 | Mandatory. Value details object.                                                                                                                                                                                      |
| PayDtls     | Object | NA                 | Optional. Payment details object.                                                                                                                                                                                     |
| RefDtls     | Object | NA                 | Optional. Reference details object.                                                                                                                                                                                   |
| AddlDocDtls | Object | NA                 | Optional. Additional Document details object.                                                                                                                                                                         |
| ExpDtls     | Object | NA                 | Conditional. Export details object. Required only if the document type is Export.                                                                                                                                     |
| EwbDtls     | Object | NA                 | Optional. Eway Bill Details object.                                                                                                                                                                                   |

### **Transaction Details Object**

<table><thead><tr><th width="200">Parameter</th><th>Type</th><th>Validations</th><th>Description</th></tr></thead><tbody><tr><td>TaxSch</td><td>String</td><td>minLength: 3<br>maxLength: 10</td><td>Mandatory. Tax Schema. The value should be "GST"</td></tr><tr><td>SupTyp</td><td>String</td><td><p>minLength: 3<br>maxLength: 10</p><p>enum: "B2B", "SEZWP", "SEZWOP", "EXPWP", "EXPWOP", "DEXP"</p></td><td><p>Mandatory. Type of Supply: </p><p>B2B-Business to Business, </p><p>SEZWP - SEZ with payment, </p><p>SEZWOP - SEZ without payment, </p><p>EXPWP - Export with Payment, </p><p>EXPWOP - Export without payment,</p><p>DEXP - Deemed Export. </p><p>If supply type code is SEZWP or SEZWOP, then the Receiver GSTIN can be only SEZ Developer or SEZ Unit.</p></td></tr><tr><td>RegRev</td><td>String</td><td><p>minLength: 1<br>maxLength: 1</p><p>enum: "Y", "N"</p></td><td>Optional. Y - whether the tax liability is payable under reverse charge. Default: N</td></tr><tr><td>EcmGstin</td><td>String</td><td><p>minLength: 15</p><p>maxLength: 15</p><p>pattern: "^([0-9]{2}[0-9A-Z]{13})$"</p></td><td>Optional. GSTIN of e-Commerce operator</td></tr><tr><td>IgstOnIntra</td><td>String</td><td><p>minLength: 1<br>maxLength: 1</p><p>enum: "Y", "N"</p></td><td>Optional. Y - indicates the supply is intrastate but chargeable to IGST. Default: N</td></tr></tbody></table>

### **Document Details Object**

| Parameter | Type   | Validations                                                                                            | Description                                                                                                                                                                                            |
| --------- | ------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Typ       | String | <p>minLength: 3<br>maxLength: 3</p><p>enum: "INV", "CRN", "DBN"</p>                                  | <p>Mandatory. Document Type: </p><p>INV-INVOICE,                     CRN-CREDIT NOTE,          DBN-DEBIT NOTE </p>                                                                                     |
| No        | String | <p>minLength: 1</p><p>maxLength: 16</p><p>pattern: "^([a-zA-Z1-9]{1}[a-zA-Z0-9\/-]{0,15})$"</p>      | Mandatory. Document Number.                                                                                                                                                                            |
| Dt        | String | <p>minLength: 10</p><p>maxLength: 10,</p><p>pattern: "^[0-3][0-9]\/[0-1][0-9]\/[2][0][1-2][0-9]$"</p> | <p>Mandatory. Document Date. </p><p>Taxpayers with AATO greater than or equal to 100 crores have to report the invoices to the IRP portal within 30 days of it's issuance from 1st November 2023. </p> |

### **Seller Details Object**

| Parameter | Type   | Validations                                                                                 | Description                                                                     |
| --------- | ------ | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| Gstin     | String | <p>minLength: 15</p><p>maxLength: 15</p><p>pattern: "([0-9]{2}[0-9A-Z]{13})"</p>            | Mandatory. Supplier GSTIN taxpayer can be either Regular or SEZ Developer only. |
| LglNm     | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>                      | Mandatory. Seller Legal Name                                                    |
| TrdNm     | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>                      | Optional. Seller Trade name                                                     |
| Addr1     | String | <p>minLength: 1</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>                      | Mandatory. Seller Building/Flat no, Road/Street                                 |
| Addr2     | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>                      | Optional. Address 2 of the supplier (Floor no., Name of the premises/building)  |
| Loc       | String | <p>minLength: 3</p><p>maxLength: 50</p><p>pattern: "^([^\\\"])*$"</p>                       | Mandatory. Seller Location                                                      |
| Pin       | Number | <p>minimum: 100000</p><p>maximum: 999999</p>                                               | <p></p><p>Mandatory. Seller Pincode</p>                                         |
| Stcd      | String | <p>minLength: 1</p><p>maxLength: 2</p><p>pattern: "^(?!0+$)([0-9]{1,2})$"</p>               | Mandatory. State Code of the Seller. [Refer to the state master.](state-master) |
| Ph        | String | <p>minLength: 6</p><p>maxLength: 12</p><p>pattern: "^([0-9]{6,12})$"</p>                    | Optional. Seller Phone or Mobile No.                                            |
| Em        | String | <p>minLength: 6</p><p>maxLength: 100</p><p>pattern: "^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+$"</p> | Optional. Seller Email-Id                                                       |

### **Buyer Details Object**

| Parameter | Type   | Validations                                                                                 | Description                                                                                                                                                                         |
| --------- | ------ | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Gstin     | String | <p>minLength: 3</p><p>maxLength: 15</p><p>pattern: "^(([0-9]{2}[0-9A-Z]{13})|URP)$"</p>     | Mandatory. GSTIN of the buyer. If the document type is export, then the value should be "URP". Receiver GSTIN taxpayer type cannot be Tax Collector (Electronic Commerce Operator). |
| LglNm     | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>                      | Mandatory. Buyer Legal Name                                                                                                                                                         |
| TrdNm     | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>                      | Optional. Buyer Trade name                                                                                                                                                          |
| Pos       | String | <p>minLength: 1, maxLength: 2</p><p>pattern: "^(?!0+$)([0-9]{1,2})$"</p>                    | Mandatory. State code of Place of supply. If POS lies outside the country then POS should be 96                                                                                     |
| Addr1     | String | <p>minLength: 1</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>                      | Mandatory. Buyer Building/Flat no, Road/Street                                                                                                                                      |
| Addr2     | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>                      | Optional. Address 2 of the buyer (Floor no., Name of the premises/building)                                                                                                         |
| Loc       | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>                      | Mandatory. Buyer Location                                                                                                                                                           |
| Pin       | Number | <p>minimum: 100000</p><p>maximum: 999999</p>                                               | Mandatory. Buyer Pincode                                                                                                                                                            |
| Stcd      | String | <p>minLength: 1</p><p>maxLength: 2</p><p>pattern: "^(?!0+$)([0-9]{1,2})$"</p>               | Mandatory. Buyer State code. [Refer to the state master.](state-master)                                                                                                             |
| Ph        | String | <p>minLength: 6</p><p>maxLength: 12</p><p>pattern: "^([0-9]{6,12})$"</p>                    | Optional. Buyer Phone or Mobile No.                                                                                                                                                 |
| Em        | String | <p>minLength: 6</p><p>maxLength: 100</p><p>pattern: "^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+$"</p> | Optional. Buyer Email-Id                                                                                                                                                            |

### **Dispatch From Details Object**

| Parameter | Type   | Validations                                                                   | Description                                                                                                   |
| --------- | ------ | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| Nm        | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>        | Mandatory. Name of the company from which the goods are dispatched                                            |
| Addr1     | String | <p>minLength: 1</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>        | Mandatory. Address 1 of the entity from which goods are dispatched. (Building/Flat No. Road/Street etc.)      |
| Addr2     | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>        | Optional. Address 2 of the entity from which goods are dispatched. (Floor no., Name of the premises/building) |
| Loc       | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>        | Mandatory. Location                                                                                           |
| Pin       | Number | <p>minimum: 100000</p><p>maximum: 999999</p>                                 | Mandatory. Pincode                                                                                            |
| Stcd      | String | <p>minLength: 1</p><p>maxLength: 2</p><p>pattern: "^(?!0+$)([0-9]{1,2})$"</p> | Mandatory. State code. [Refer to the state master.](state-master)                                             |

### **Ship To Details Object**

| Parameter | Type   | Validations                                                                             | Description                                                                                                         |
| --------- | ------ | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| Gstin     | String | <p>minLength: 3</p><p>maxLength: 15</p><p>pattern: "^(([0-9]{2}[0-9A-Z]{13})|URP)$"</p> | Optional. GSTIN of entity to whom goods are shipped. If the document type is export, then the value shall be "URP". |
| LglNm     | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>                  | Mandatory. Legal Name                                                                                               |
| TrdNm     | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>                  | Optional. Trade name                                                                                                |
| Addr1     | String | <p>minLength: 1</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>                  | Mandatory. Address1 of the entity to whom the supplies are shipped to (Building/Flat no., Road/Street etc.)         |
| Addr2     | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>                  | Optional. Address 2 of the entity to whom the supplies are shipped to (Floor no., Name of the premises/building)    |
| Loc       | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>                  | Mandatory. Place (City, Town, Village) entity to whom the supplies are shipped to                                   |
| Pin       | Number | <p>minimum: 100000</p><p>maximum: 999999</p>                                           | Mandatory. Pincode                                                                                                  |
| Stcd      | String | <p>minLength: 1</p><p>maxLength: 2</p><p>pattern: "^(?!0+$)([0-9]{1,2})$"</p>           | Mandatory. State Code to which supplies are shipped to. [Refer to the state master.](state-master)                  |

### **Item Object**

| Parameter          | Type   | Validations                                                                                                                  | Description                                                                                                                                                                                  |
| ------------------ | ------ | ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| SlNo               | String | <p>minLength: 1</p><p>maxLength: 6</p><p>pattern: "^([0-9]{1,6})$"</p>                                                       | Mandatory. Serial Number of Item                                                                                                                                                             |
| PrdDesc            | String | <p>minLength: 3</p><p>maxLength: 300</p><p>pattern: "^([^\\\"])*$"</p>                                                       | Optional. Product Description                                                                                                                                                                |
| IsServc            | String | <p>minLength: 1</p><p>maxLength: 1, </p><p>Values: "Y", "N"</p>                                                              | <p></p><p>Mandatory. Specify whether the supply is service or not. Specify Y-for Service</p>                                                                                                 |
| HsnCd              | String | <p>minLength: 6</p><p>maxLength: 8</p><p>pattern: "^(?!0+$)([0-9]{4}|[0-9]{6}|[0-9]{8})$"</p>                                | Mandatory. HSN Code                                                                                                                                                                          |
| Barcde             | String | <p>minLength: 3</p><p>maxLength: 30</p><p>pattern: "^([^\\\"])*$"</p>                                                        | Optional. Bar Code                                                                                                                                                                           |
| Qty                | Number | <p>minimum: 0</p><p>maximum: 9999999999.999</p>                                                                              | Optional. Quantity                                                                                                                                                                           |
| FreeQty            | Number | <p>minLength: 0</p><p>maxLength: 9999999999.999</p>                                                                          | Optional. Free Quantity                                                                                                                                                                      |
| Unit               | String | <p>minLength: 3</p><p>maxLength: 8</p>                                                                                       | <p>Conditional. Mandatory for goods (HSN) and not for services (SAC)</p><p><a href="unit-master">Refer to Unit master.</a></p>                                                               |
| UnitPrice          | Number | <p>minimum: 0</p><p>maximum: 999999999999.999</p>                                                                            | Mandatory. Unit Price - Rate                                                                                                                                                                 |
| TotAmt             | Number | <p>minimum: 0</p><p>maximum: 999999999999.99</p>                                                                             | Mandatory. Total Amount (Unit Price \* Quantity)                                                                                                                                             |
| Discount           | Number | <p>minimum: 0</p><p>maximum: 999999999999.99</p>                                                                             | Optional. Discount on line item.                                                                                                                                                             |
| PreTaxVal          | Number | <p>minimum: 0, </p><p>maximum: 999999999999.99</p>                                                                           | Optional. Pre Tax value                                                                                                                                                                      |
| AssAmt             | Number | <p>minimum: 0</p><p>maximum: 999999999999.99</p>                                                                             | Mandatory. Assessable Amount (Total Amount - Discount)                                                                                                                                       |
| GstRt              | Number | <p>minimum: 0, </p><p>maximum: 999.999</p>                                                                                   | Mandatory. The GST rate, represented as percentage that applies to the invoiced item. It will be IGST rate (OR sum of CGST and SGST rates).                                                  |
| IgstAmt            | Number | <p>minimum: 0, </p><p>maximum: 999999999999.99</p>                                                                           | Conditional. Amount of IGST payable                                                                                                                                                          |
| CgstAmt            | Number | <p>minimum: 0, </p><p>maximum: 999999999999.99</p>                                                                           | Conditional. Amount of CGST payable                                                                                                                                                          |
| SgstAmt            | Number | <p>minimum: 0, </p><p>maximum: 999999999999.99</p>                                                                           | Conditional. Amount of SGST payable                                                                                                                                                          |
| CesRt              | Number | <p>minimum: 0</p><p>maximum: 999.999</p>                                                                                     | Optional. Cess Rate                                                                                                                                                                          |
| CesAmt             | Number | <p>minimum: 0, </p><p>maximum: 999999999999.99</p>                                                                           | Optional. Cess Amount(advolorem) on basis of rate and quantity of item                                                                                                                       |
| CesNonAdvlAmt      | Number | <p>Enum: </p><p>0 or </p><p>400 or </p><p>2076 or </p><p>2747 or </p><p>3668 or </p><p>4006 or </p><p>4170 or </p><p>400</p> | Optional. Cess Non-Advol Amount                                                                                                                                                              |
| StateCesRt         | Number | <p>minimum: 0</p><p>maximum: 999.999</p>                                                                                     | Optional. State Cess Rate                                                                                                                                                                    |
| StateCesAmt        | Number | <p>minimum: 0, </p><p>maximum: 999999999999.99</p>                                                                           | Optional. State Cess Amount                                                                                                                                                                  |
| StateCesNonAdvlAmt | Number | <p>minimum: 0, </p><p>maximum: 999999999999.99</p>                                                                           | Optional. State CESS Non advol Amount                                                                                                                                                        |
| OthChrg            | Number | <p>minimum: 0</p><p>maximum: 999999999999.99</p>                                                                             | Optional. Other Charges on line item.                                                                                                                                                        |
| TotItemVal         | Number | <p>minimum: 0</p><p>maximum: 999999999999.99</p>                                                                             | <p>Mandatory. Total Item Value = AssAmt + </p><p>IgstAmt + <br>CgstAmt + </p><p>SgstAmt + </p><p>CesAmt + </p><p>CesNonAdvlAmt + </p><p>StateCesAmt + StateCesNonAdvlAmt +</p><p>OthChrg</p> |
| OrdLineRef         | String | <p>minLength: 1</p><p>maxLength: 50</p><p>pattern: "^([^\\\"])*$"</p>                                                        | Optional. Order line referencee                                                                                                                                                              |
| OrgCntry           | String | <p>minLength: 2</p><p>maxLength: 2</p><p>pattern: "^([A-Z|a-z]{2})$"</p>                                                     | Optional. Origin Country Code. [Refer to Country master.](country-code-master)                                                                                                               |
| PrdSlNo            | String | <p>minLength: 1</p><p>maxLength: 20</p><p>pattern: "^([^\\\"])*$"</p>                                                        | Optional. Serial number in case of each item having a unique number.                                                                                                                         |
| BchDtls            | Object | List                                                                                                                         | Optional. Batch details object. See below.                                                                                                                                                   |
| AttribDtls         | Object | List                                                                                                                         | Optional. List of one or more Attribute Details object. See below.                                                                                                                           |

### Batch Details

| Parameter | Type   | Validations                                                                                          | Description                 |
| --------- | ------ | ---------------------------------------------------------------------------------------------------- | --------------------------- |
| Nm        | String | <p>minLength: 3						maxLength: 20</p><p>pattern: "^([^\\\"])*$"</p>                                 | Mandatory. Batch number     |
| ExpDt     | String | <p>minLength: 10</p><p>maxLength: 10</p><p>pattern: "^[0-3][0-9]\/[0-1][0-9]\/[2][0][1-2][0-9]$"</p> | Optional. Batch Expiry Date |
| WrDt      | String | <p>minLength: 10</p><p>maxLength: 10</p><p>pattern: "^[0-3][0-9]\/[0-1][0-9]\/[2][0][1-2][0-9]$"</p> | Optional. Warranty Date     |

### Attribute Details

| Parameter | Type   | Validations                                                            | Description                             |
| --------- | ------ | ---------------------------------------------------------------------- | --------------------------------------- |
| Nm        | String | <p>minLength: 1</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p> | Optional. Attribute details of the item |
| Val       | String | <p>minLength: 1</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p> | Optional. Attribute details of the item |

### **Value Details Object**

| Parameter   | Type   | Validations                                        | Description                                          |
| ----------- | ------ | -------------------------------------------------- | ---------------------------------------------------- |
| AssVal      | Number | <p>minimum: 0</p><p>maximum: 99999999999999.99</p> | Mandatory. Total Assessable value of all items       |
| CgstVal     | Number | <p>minimum: 0</p><p>maximum: 99999999999999.99</p> | Conditional. Total CGST value of all items           |
| SgstVal     | Number | <p>minimum: 0</p><p>maximum: 99999999999999.99</p> | Conditional. Total SGST value of all items           |
| IgstVal     | Number | <p>minimum: 0</p><p>maximum: 99999999999999.99</p> | Conditional. Total IGST value of all items           |
| CesVal      | Number | <p>minimum: 0</p><p>maximum: 99999999999999.99</p> | Optional. Total CESS value of all items              |
| StCesVal    | Number | <p>minimum: 0</p><p>maximum: 99999999999999.99</p> | Optional. Total State CESS value of all items        |
| Discount    | Number | <p>minimum: 0</p><p>maximum: 99999999999999.99</p> | Optional. Total invoice Discount                     |
| OthChrg     | Number | <p>minimum: 0</p><p>maximum: 99999999999999.99</p> | Optional. Other charges                              |
| RndOffAmt   | Number | <p>minimum: -99.99</p><p>maximum: 99.99</p>        | Optional. Rounding off amount                        |
| TotInvVal   | Number | <p>minimum: 0</p><p>maximum: 99999999999999.99</p> | Mandatory.  Final Invoice value                      |
| TotInvValFc | Number | <p>minimum: 0</p><p>maximum: 99999999999999.99</p> | Optional. Final Invoice value in Additional Currency |

### **Payment Details Object**

| Parameter | Type   | Validations                                                            | Description                                                  |
| --------- | ------ | ---------------------------------------------------------------------- | ------------------------------------------------------------ |
| Nm        | String | <p>minLength: 1</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p> | Optional. Payee Name                                         |
| AccDet    | String | <p>minLength: 1</p><p>maxLength: 18</p><p>pattern: "^([^\\\"])*$"</p>  | Optional. Bank account number of payee                       |
| Mode      | String | <p>minLength: 1</p><p>maxLength: 18</p><p>pattern: "^([^\\\"])*$"</p>  | Optional. Mode of Payment: Cash, Credit, Direct Transfer     |
| FinInsBr  | String | <p>minLength: 1</p><p>maxLength: 11</p><p>pattern: "^([^\\\"])*$"</p>  | Optional. Branch or IFSC code                                |
| PayTerm   | String | <p>minLength: 1</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p> | Optional. Terms of Payment                                   |
| PayInstr  | String | <p>minLength: 1</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p> | Optional. Payment Instruction                                |
| CrTrn     | String | <p>minLength: 1</p><p>maxLength: 100</p>                               | Optional. Credit Transfer                                    |
| DirDr     | String | <p>minLength: 1</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p> | Optional. Direct Debit                                       |
| CrDay     | Number | <p>minimum: 0</p><p>maximum: 9999</p>                                  | Optional. Credit Days                                        |
| PaidAmt   | Number | <p>minimum: 0</p><p>maximum: 99999999999999.99</p>                     | Optional. The sum of amount which have been paid in advance. |
| PaymtDue  | Number | <p>minimum: 0</p><p>maximum: 99999999999999.99</p>                     | Optional. Outstanding amount that is required to be paid.    |
| PayeeUPI  | String | NA                                                                     | Mandatory for B2C QR Code. Payee UPI Id.                     |

### **Reference Details Object**

| Parameter   | Type   | Validations                                                            | Description                                                       |
| ----------- | ------ | ---------------------------------------------------------------------- | ----------------------------------------------------------------- |
| InvRm       | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p> | Optional. Invoice Remarks/Notes                                   |
| DocPerdDtls | Object | NA                                                                     | Optional. Document Period Details object.                         |
| PrecDocDtls | Array  | NA                                                                     | Optional. List of one or more Preceding Document Details objects. |
| ContrDtls   | Array  | NA                                                                     | Optional. List of one or more Contract Details objects.           |

### Document Period Details Object

| Parameter | Type   | Validation                                                                                           | Description                          |
| --------- | ------ | ---------------------------------------------------------------------------------------------------- | ------------------------------------ |
| InvStDt   | String | <p>minLength: 10</p><p>maxLength: 10</p><p>pattern: "^[0-3][0-9]\/[0-1][0-9]\/[2][0][1-2][0-9]$"</p> | Mandatory. Invoice Period Start Date |
| InvEndDt  | String | <p>minLength: 10</p><p>maxLength: 10</p><p>pattern: "^[0-3][0-9]\/[0-1][0-9]\/[2][0][1-2][0-9]$"</p> | Mandatory. Invoice Period End Date   |

### Preceding Document Details

| Parameter | Type   | Validations                                                                                          | Description                                      |
| --------- | ------ | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| InvNo     | String | <p>minLength: 1</p><p>maxLength: 16</p><p>pattern: "^[1-9a-zA-Z]{1}[0-9a-zA-Z\/-]{1,15}$"</p>        | Mandatory. Reference of original invoice, if any |
| InvDt     | String | <p>minLength: 10</p><p>maxLength: 10</p><p>pattern: "^[0-3][0-9]\/[0-1][0-9]\/[2][0][1-2][0-9]$"</p> | Mandatory. Date of preceding invoice             |
| OthRefNo  | String | <p>minLength: 1</p><p>maxLength: 20</p><p>pattern: "^([^\\\"])*$"</p>                                | Optional. Other Reference                        |

### Contract Details Object

| Parameter | Type   | Validations                                                                                          | Description                         |
| --------- | ------ | ---------------------------------------------------------------------------------------------------- | ----------------------------------- |
| RecAdvRef | String | <p>minLength: 1</p><p>maxLength: 20</p><p>pattern: "^([^\\\"])*$"</p>                                | Optional. Receipt Advice No.        |
| RecAdvDt  | String | <p>minLength: 10</p><p>maxLength: 10</p><p>pattern: "^[0-3][0-9]\/[0-1][0-9]\/[2][0][1-2][0-9]$"</p> | Optional. Date of Receipt Advice    |
| TendRefr  | String | <p>minLength: 1</p><p>maxLength: 20</p><p>pattern: "^([^\\\"])*$"</p>                                | Optional. Lot/Batch Reference No.   |
| ContrRefr | String | <p>minLength: 1</p><p>maxLength: 20</p><p>pattern: "^([^\\\"])*$"</p>                                | Optional. Contract Reference Number |
| ExtRefr   | String | <p>minLength: 1</p><p>maxLength: 20</p><p>pattern: "^([^\\\"])*$"</p>                                | Optional. Any other reference       |
| ProjRefr  | String | <p>minLength: 1</p><p>maxLength: 20</p><p>pattern: "^([^\\\"])*$"</p>                                | Optional. Project Reference Number  |
| PORefr    | String | <p>minLength: 1</p><p>maxLength: 16</p><p>pattern: "^([^\\\"])*$"</p>                                | Optional. PO Reference Number       |
| PORefDt   | String | <p>minLength: 10</p><p>maxLength: 10</p><p>pattern: "^[0-3][0-9]\/[0-1][0-9]\/[2][0][1-2][0-9]$"</p> | Optional. PO Reference Date         |

### Additional Document Details Object

| Parameter | Type   | Validations                                                             | Description                                    |
| --------- | ------ | ----------------------------------------------------------------------- | ---------------------------------------------- |
| Url       | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>  | Optional. Supporting document URL              |
| Docs      | String | <p>minLength: 3</p><p>maxLength: 1000</p><p>pattern: "^([^\\\"])*$"</p> | Optional. Supporting document in Base64 format |
| Info      | String | <p>minLength: 3</p><p>maxLength: 1000</p><p>pattern: "^([^\\\"])*$"</p> | Optional. Any additional InfoDtlsrmation       |

### **Export Details Object**

| Parameter | Type   | Validations                                                                                          | Description                                                                               |
| --------- | ------ | ---------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| ShipBNo   | String | <p>minLength: 1</p><p>maxLength: 20</p><p>pattern: "^([^\\\"])*$"</p>                                | Optional. Shipping Bill No.                                                               |
| ShipBDt   | String | <p>minLength: 10</p><p>maxLength: 10</p><p>pattern: "^[0-3][0-9]\/[0-1][0-9]\/[2][0][1-2][0-9]$"</p> | Optional. Shipping Bill Date                                                              |
| Port      | String | <p>minLength: 2</p><p>maxLength: 10</p><p>pattern: "^[0-9|A-Z|a-z]{2,10}$"</p>                       | <p>Optional. Port Code</p><p><a href="port-code-master">Refer to Port code master</a></p> |
| RefClm    | String | <p>minLength: 1</p><p>maxLength: 1</p><p>value: "Y", "N"</p>                                         | Optional. Claiming refund. Y/N                                                            |
| ForCur    | String | <p>minLength: 3</p><p>maxLength: 16</p><p>pattern: "^[A-Z|a-z]{3,16}$"</p>                           | Optional. Additional Currency Code. [Refer to currency master.](currency-code-master)     |
| CntCode   | String | <p>minLength: 2</p><p>maxLength: 2</p><p>pattern: "^([A-Z]{2})$"</p>                                 | Mandatory. Country Code. [Refer to Country master.](country-code-master)                  |
| ExpDuty   | Number | <p>minimum": 0,</p><p>maximum: 999999999999.99</p>                                                   | Optional. Export duty                                                                     |

### E-Waybill Details Object

| Parameter  | Type   | Validations                                                                                          | Description                                                                                                                                                                                                  |
| ---------- | ------ | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| TransId    | String | <p>minLength: 15</p><p>maxLength: 15</p><p>pattern: "^([0-9]{2}[0-9A-Z]{13})$"</p>                   | <p>Optional. </p><p>Transporter GSTIN or CEN (Common Enrollment Number)</p>                                                                                                                                  |
| TransName  | String | <p>minLength: 3</p><p>maxLength: 100</p><p>pattern: "^([^\\\"])*$"</p>                               | Optional. Name of the transporter                                                                                                                                                                            |
| TransMode  | String | <p>minLength: 1</p><p>maxLength: 1</p><p>enum: [ "1", "2", "3", "4" ]</p>                            | Optional. Mode of transport (Road-1, Rail-2, Air-3, Ship-4)                                                                                                                                                  |
| Distance   | Number | <p>minimum: 1</p><p>maximum: 4000</p>                                                                | <p>Mandatory. </p><p>Distance between source and destination PIN codes.</p><p>If the value is "0" then the distance will be auto-computed by NIC based on the availability of pin-codes in NIC database.</p> |
| TransDocNo | String | <p>minLength: 1</p><p>maxLength: 15 </p><p>pattern: "^([a-zA-Z0-9\/-]{1,15})$"</p>                   | Optional. Transport Document Number                                                                                                                                                                          |
| TransDocDt | String | <p>minLength: 10</p><p>maxLength: 10</p><p>pattern: "^[0-3][0-9]\/[0-1][0-9]\/[2][0][1-2][0-9]$"</p> | Optional. Transport Document Date                                                                                                                                                                            |
| VehNo      | String | <p>minLength: 4</p><p>maxLength: 20</p><p>pattern: "^([A-Z|a-z|0-9]{4,20})$"</p>                     | Optional. Vehicle Number                                                                                                                                                                                     |
| VehType    | String | <p>minLength: 1</p><p>maxLength: 1</p><p>enum: [ "O", "R" ]</p>                                      | Optional. Whether O-ODC or R-Regular                                                                                                                                                                         |

## Validations

**Validations in e-Invoicing System**

1. E-Invoice request JSON data has to be validated as per the e-Invoice JSON Schema given in the notification.
2. Version of the Schema is mandatory and should be latest as per the latest notification.
3. IRN should not be passed as part of the request; it is generated by the e-Invoice system and sent as response.
4. The following fields should have one of the values given in the master codes.
   * Supply Type of Transaction
   * Document Type
5. The category of transaction of "Business to Consumer (B2C)" invoices will not be considered and hence the API interface should not request for IRN for these transactions.
6. Document number should not be starting with 0, / and -. If so, then request is rejected.
7. Supplier should ensure that the unique invoice number is being generated for the financial year for each invoice, in his ERP/manual system. The financial year is derived from the date of invoice. The financial year starts from 1st April and ends on 31st March.
8. Duplicate IRN requests are not considered. That is, if the IRN is already generated on particular type of document and document number of the supplier for the financial year, then one more IRN cannot be generated on the same combination.
9. e-invoice(IRN) cannot be re-generated for the cancelled e-invoice(IRN) also.
10. Request for the IRN/e-Invoice can be made only by the supplier of the goods or services.
11. In case of e-commerce transactions, the e-Commerce Operator can request for the IRN/e-invoice on behalf of the supplier. In this case, the e-Commerce Operator should have been registered on the GST portal as e-Commerce Operator and pass eCom\_GSTIN accordingly.
12. In case the supplier is SEZ unit, then he cannot generate e-Invoice.
13. "Reverse Charges" can be set as "Y" in case of B2B invoices only and tax is being paid in reverse manner as per rule. Even in case of Reverse Charged invoices, the Supplier has to generate the IRN.
14. Recipient GSTIN should be registered and active. In case of transaction of direct export, recipient GSTIN has to be URP and state code has to be 96, PIN code should be 999999, POS should be 96.
15. First two digits of the Supplier / Recipient GSTIN should match with the state code passed in the Supplier / Recipient details accordingly except if supply type is exports wherein Recipient state code will be 96.
16. PIN Codes are validated against the States, they belong to.
17. If "Shipping party" is provided, then the transaction is considered as "Bill To-Ship To".
18. If "Dispatching party" is provided, then the transaction is considered as "Bill From " Dispatch From".
19. If both Shipping and Dispatching parties are provided, then the transaction is considered as "Combination of Both" (Bill From - Dispatch From and Bill To- Ship To).
20. In case of export transactions for goods, if e-way bill is required along with IRN, then the 'Ship-To' address should be of the place/port in India from where the goods are being exported. Otherwise E-way bill can be generated later based on IRN, by passing the 'Ship-To' address as the place/port address of India from where the goods are being exported
21. In case IGST on intrastate supply, tax rates and tax values related to IGST should be passed, and Supplier state code and POS state code should be same.
22. The state code of the Supplier GSTIN and POS will decide whether the supply type is Interstate or Intrastate. That is, if the State code of Supplier and POS is same, then it is intra-state, otherwise it is inter-state. However IGST on intrastate supply attribute will overrule this condition.
23. In case of Exports and SEZ, the supply is always Interstate
24. JSON payload size cannot exceed 2MB.

**Validations on Items:**

1. Serial number of the item is verified for duplicate values.
2. Each item needs to have valid HSN code with at least 4 digits. HSN Code should be valid as per the GST master.
3. If Is\_Service is selected, then the HSN codes must belong to services.
4. Each item should have valid Unit Quantity Code (UQC) as per the master codes, in case of goods.
5. Quantity and Unit Quantity Code are mandatory for Goods and optional for Services.
6. Tax rates are being validated. Only the allowed tax rates will be accepted.
7. In case of intra-state transaction, the sum of SGST and CGST tax rates should be entered as GST Rate.
8. In case of inter-state transaction, the IGST tax rate and value has to be passed.
9. In case of export transaction, IGST tax rate and value has to be passed.
10. In case the Recipient is SEZ unit, then IGST tax rate and value has to be passed irrespective of state of the Recipient.
11. Maximum number of items in each invoice should not exceed more than 1000 items and a minimum of 1 item should be available.

**Calculation of Values:**

1. The following summation validations are to be done for items
   * Taxable Value of Item = Gross Amount of Item - Discount
   * SGST Value of Item = Taxable Value of Item X GST Rate / 2, if intra-state CGST Value of Item = Taxable Value of Item X GST Rate / 2, if intra-state
   * IGST Value of Item = Taxable Value of Item X GST Rate, if inter-state
   * Cess Value of Item = Taxable Value of Item X Cess Rate
   * State Cess Value of Item = Taxable Value of Item X State Cess Rate
   * Total Value of Item = Taxable Value of Item + SGST Value of Item + CGST Value of Item + IGST Value of Item + Cess Value of Item + State Cess Value of Item + Non-Advol Cess Value of Item + State Cess Non-advol value of Item + Other charges.\
     (Note: Temporarily, the validation of 'Gross Amount of Item with Quantity and Selling Unit Price' has been withdrawn)
2. The following summation validations are to be done on Invoice total
   * Total Taxable Value = Taxable Value of all Items
   * Total SGST Value = SGST Value of all Items
   * Total CGST Value = CGST Value of all Items
   * Total IGST Value = IGST Value of all Items
   * Total Cess Value = Cess Value of all Items + Non-Advol Cess Value of all Items
   * Total State Cess Value = State Cess Value of all Items + State Cess Nonadvol Value of all Items
   * Total Invoice Value = Sum of All Total Value of Items - Invoice Discount + Invoice Other charges + Round-off amount
3. 3\. Tolerance limit for 'Passed value / amount' for all calculations shown under point 1 and 2 can be between actual calculated value / amount and calculated value / amount rounded up to next rupee.
   * Example: In Point 1 , if calculated value for IGST of item A is 2345.04 then tolerance limit for passed value of that item is between 2345.04 and 2346.00.
   * Example : In Point 2, if calculated value of IGST of all items is 10241.61 then tolerance limit for passed value of IGST of all items is between 10241.61 and 10242.00
   * Similarly, the same tolerance limit is allowed for all calculations under point 1 and 2 respectively.
4. The round-off value for ' Round\_off\_amount' attribute to adjust final 'Total\_Invoice\_Value\_INR' attribute can be between -99.99 and +99.99

**Validations on e-waybill:**

1. E-waybill can be generated only if E-way Bill related details are passed where distance is mandatory.
2. E-way Bill is not generated for document types of Debit Note and Credit Note and Services.
3. E Way Bill can be generated provided at least HSN of one item belongs to goods.
4. If only Transporter Id is provided, then only Part-A is generated. Transport Mode, Vehicle Type, Vehicle No, Transportation document number and date should be null or attributes should not have been passed.
5. If mode of transportation is "Road", then the Vehicle number and vehicle type should be passed. If mode of transportation is Ship, Air, Rail, then the transport document number and date should be passed. Vehicle type and vehicle number should be null or attributes should not have been passed.
6. The Vehicle no. should match with specified format and exist in Vahan database.
7. E-Waybill will not be generated if the Supplier or Recipient GSTIN is blocked due to non-filing of Returns.
8. Pincode of Recipient GSTIN is mandatory if Ship-To details are not entered.
9. The distance of transportation is validated against the auto-calculated PIN-PIN distance stored in the system. The allowed distance for transportation should be between +/- 10 % of auto-calculated PIN-PIN distance.
10. If the distance of transportation is passed as 0 (zero), then the system will consider it as request made by the tax payer, to consider the auto-calculated PIN-PIN distance for the generation of e-way bill and generate the e-way bill along with IRN.
11. If the PIN-PIN distance is not available in the system, the passed value of distance will be taken for generation of e-way bill.
12. The actual distance has to be passed in case the source and destination PIN codes are same and the allowed range of value is from 1 to 100.
13. In case of export of goods, if e-way bill has to be generated, then the address of port should have been passed as shipping address during generation of IRN.
14. In case incomplete information has been passed for generation of E Way Bill, then IRN will be generated and returned but not E Way Bill number. However subsequently, based on IRN, E Way Bill can be generated.
