E-Invoice/E-WayBill APIs
API – Generate E-Waybill
This API is used to generate e-waybill for outward and inward supplies where IRN is not required.
URL
POST https://app.octagst.com/api/einvoice/generateewaybill?gstin={value}
Query Parameters
Name | Description | Type | Value |
---|---|---|---|
gstin | It specifies GSTIN of requester | Mandatory |
Request
Structure
Parameter | Data Type | Type | Description |
---|---|---|---|
supplyType | String(1) | Mandatory | Supply TypeO :Outwrad SupplyI : Inward Supply |
subSupplyType | String(2) | Mandatory | Sub Supply Type1 : Supply2 : Import3 : Export 4 : Job Work 5 : For Own Use 6 : Job Work Returns 7 : Sales Return 8 : Others 9 : SKD/CKD 10 : Line Sales 11 : Recipient Not Known 12 : Exhibition or Fairs |
subSypplyDesc | String(20) | Optional | Sub Supply Description if selected “Others” in subSupplyType |
docType | String(3) | Mandatory | Document TypeINV : InvoiceBIL : Bill of SupplyBOE : Bill of EntryCHL : Delivery ChallanOTH : Others |
docNo | String(16) | Mandatory | Document NoA-Z , 0-9 , / , - |
docDate | String(10) | Mandatory | Document DateDD/MM/YYYY |
fromGstin | String(15) | Mandatory | GSTIN of the supplier/consignor |
fromTrdName | String(100) | Optional | Legal/Trade Name of supplier/consignor |
fromAddr1 | String(120) | Optional | Address of supplier/consignor - Line 1 |
fromAddr2 | String(120) | Optional | Address of supplier/consignor - Line 2 |
fromPlace | String(50) | Optional | Place of supplier/consignor (City/Town/Village) |
fromPincode | Number(6) | Mandatory | Pincode of supplier/consignor |
fromStateCode | Number(2) | Mandatory | State code of supplier/consignor |
actFromStateCode | Number(2) | Mandatory | Dispatch from State code of supply |
toGstin | String(15) | Mandatory | GSTIN of the recipient/consignee |
toTrdName | String(100) | Optional | Legal/Trade Name of recipient/consignee |
toAddr1 | String(120) | Optional | Address of recipient/consignee - Line 1 |
toAddr2 | String(120) | Optional | Address of recipient/consignee - Line 2 |
toPlace | String(50) | Optional | Place of recipient/consignee (City/Town/Village) |
toPincode | Number(6) | Mandatory | Pincode of recipient/consignee |
toStateCode | Number(2) | Mandatory | State code of recipient/consignee |
actToStateCode | Number(2) | Mandatory | ShipTo state code of supply |
transactionType | Number(1) | Mandatory | Document Type1 : Regular2 : Bill To - Ship To3 : Bill From - Dispatch From4 : Combinationn of 2 and 3 |
totalValue | Number(18,2) | Optional | Total taxable value. |
otherValue | Number(18,2) | Optional | Other charges |
totInvValue | Number(18,2) | Optional | Total document value |
igstValue | Number(18,2) | Optional | Total IGST Amount |
cgstValue | Number(18,2) | Optional | Total CGST Amount |
sgstValue | Number(18,2) | Optional | Total SGST Amount |
cessValue | Number(18, 2) | Optional | Total Cess Amount |
cessNonAdvolValue | Number(18,2) | Optional | Total Cess Non Advol Amount |
transporterId | String(15) | Optional | Transporter Id |
transporterName | String(100) | Optional | Transport Name |
transMode | String(1) | Optional | Transport Mode1 : Road2 : Rail3 : Air4 : Ship |
transDistance | Number(4) | Mandatory | Distance |
transDocNo | String(15) | Optional | Transporter Doc No |
transDocDate | String(10) | Optional | Transporter Doc DateDD/MM/YYYY |
vehicleNo | String(15) | Optional | Vehicle No |
vehicleType | String(1) | Optional | Vehicle TypeR : RegularO : Over-Dimensional Cargo (ODC) |
itemList | Item[] | Mandatory | This object contains list of line items. |
Item | Object | Mandatory | This object contains details of line item |
productName | String(100) | Optional | Product name |
productDesc | String(100) | Optional | Product/Item description |
hsnCode | String(8) | Mandatory | HSN Code |
quantity | Number(8,2) | Optional | Quantity |
qtyUnit | String(3) | Optional | UQC |
taxableAmount | Number(18,2) | Mandatory | Item Taxable Value |
igstRate | Number(6,3) | Optional | IGST Rate |
cgstRate | Number(6,3) | Optional | CGST Rate |
sgstRate | Number(6,3) | Optional | SGST Rate |
cessRate | Number(6,3) | Optional | Cess Rate |
cessNonadvol | Number(6,3) | Optional | Cess Rate- Nonadvol |
Please visit NIC eWayBill portal to know about field validations and get masters defined for State Codes, supply type, document types, UQC, HSN, etc.
Supply-Doc Type Mapping on NIC Portal →
Sample
Request payload should contain the JSON encoded invoice data:
{
"supplyType": "O",
"subSupplyType": "1",
"subSupplyDesc": null,
"docType": "INV",
"docNo": "7001-8",
"docDate": "15/12/2020",
"fromGstin": "29AKLPM8755F1Z2",
"fromTrdName": "Galaxy Mobile World Limited",
"fromAddr1": "2ND CROSS NO 59 19 A",
"fromAddr2": "GROUND FLOOR OSBORNE ROAD",
"fromPlace": "Bangalore",
"fromPincode": 560090,
"actFromStateCode": 29,
"fromStateCode": 29,
"toGstin": "27EHFPS5910D2Z0",
"toTrdName": "ABC India Limited",
"toAddr1": "Shree Nilaya",
"toAddr2": "Dasarahosahalli",
"toPlace": "Thane",
"toPincode": 560090,
"actToStateCode": 27,
"toStateCode": 27,
"transactionType": 0,
"otherValue": 0,
"totalValue": 5000,
"igstValue": 900,
"cgstValue": 0,
"sgstValue": 0,
"cessValue": 0,
"cessNonAdvolValue": 0,
"totInvValue": 5900,
"transporterId": "29AASFB9647G1ZU",
"transporterName": null,
"transDocNo": null,
"transMode": "1",
"transDistance": 1300,
"transDocDate": null,
"vehicleNo": "KA271C4869",
"vehicleType": "R",
"itemList": [
{
"productName": "Delta G10B",
"productDesc": "Delta 4G Phone with 2M Camera",
"hsnCode": 851712,
"quantity": 1,
"qtyUnit": "NOS",
"taxableAmount": 5000,
"igstRate": 18,
"cgstRate": 0,
"sgstRate": 0,
"cessRate": 0,
"cessNonadvol": 0
}
]
}
Response
Response payload will contain the success status along with eWayBill information.
Structure
Parameter | Data Type | Description |
---|---|---|
Success | Boolean | true in case of success |
EwbStatus | String | EWB StatusACT : ActiveCNL : Cancelled |
EwbNo | String | e-waybill Number(present only if e-waybill is generated along with e-invoice) |
EwbTime | String | e-waybill generation Date & timeDD/MM/YYYY HH:MM:SS |
EwbValidTill | String | e-waybill validity Date & time DD/MM/YYYY HH:MM:SS |
Errors | Error[] | List of errors, will be present only when Success is false |
Error
Parameter | Data Type | Description |
---|---|---|
Code | String | Error Code |
Message | String | Error message |
Sample – Success
{
"Success": true,
"EwbStatus": "ACT",
"EwbNo": "191008688443",
"EwbTime": "27/11/2020 17:23:45",
"EwbValidTill": "29/11/2020 17:23:45"
}
Sample – Failure
If the API request fails for some reasons, the response payload will contain the failure status and a list of errors.
{
"Success": false,
"Errors": [
{
"Code": "ERR_CODE_1",
"Message": "ERR MESSAGE 1"
},
{
"Code": "ERR_CODE_n",
"Message": "ERR MESSAGE n"
}
]
}