Overview

Sequence Diagram

The format and details of a Generate E-way bill  API request is depicted in following table.


URL

<URL>/ewayapi/

Content-Type

application/json

Method

POST

Request Payload

Request Header

Attributes Description
client-id

Client-id to be provided by E-WAY BILL SYSTEM

client-secret

Secret to be provided by E-WAY BILL SYSTEM

gstin

GSTIN of  Requester(Tax payer or Transporter)

authtoken

Authentication token returned by the E-way bill system

Request Payload

Attributes

Description

Values

action

GENEWAYBILL

Encrypt (Base64(Request JSON),sek)

Encrypted E-way bill JSON string

 

Response Payload

Attributes

Description

Value

status

Status of request

0 – for Failure ;1 – for Success

Encrypt(Base64(
Response JSON),sek)

Response of E-way bill JSON string, The response will have eway bill number and generated date if it is successfully generated. Otherwise the response will have error codes

Sample JSON (Request)

{
"action":"GENEWAYBILL", "data":"DdBLir97J1B/n5Q/R/Xy1OZ1mor5CZ68vBqTAg6V81onvGsuetIH40Mxr2gN77SfGsNF93M+GgAGDESR/CxAFYKuv23DfymHyMOihu6vlKWW9hDylrq5JFgQwbGqd94wsgs F0B+ldH+Sx5fgD8OPzqePmT8ryTQOk2/7XOGT7YDmUWGP9Plm/KQuC3qIguNkk5rISFaeLLW2Fm/5jQFSvSwzhpAPvzGV8z/rumBXMope6BUPmW+wlX85Codir+YqO29uHEkdTbbxPy G3IJHybS9UQ3jrdrqywHGuNd8x95ZO80J/3mhKGFhba/t+ToM3f8F6+pFRAhPeXp/U+oTz7D2vG6LzExflq8wBFmcw9rZRmEkiHKs/lVnIg7T7f56ekY9j88cdPRIGblnnHV+tUIdkv Ja9OVS8YORULMdzyuVxS6/58ox+iZ1Qz+U9pZICnakvdOQyDhe1nX+ZDRwEQFsUM/ImaBN1/JO+ka4ZzjOCPvnRIUFkhJUSSJ2ggL/M2BadD8AxXcz8u0Fhuqy2y773kpTLMfwdgxRO qYNx534966te92jUlo/b43xWu35qVO5mlT/badDYRrXU0Cmd/FWlIGMvuB76vQqbe17tdFRN75041n/QhUoq6Ckkc6V2fcTZuKC96K6GSC0U2kGCdCrexVyx1/PKHTURFD7k3CBcXNn YfTuDa/dcp76omKo+0+wS/14EqPBlz2oFGcbcPxJ1f6tnoHQRjoUnUxdd3Y5LJDuh1m0i7C5Q/AfQg+B1NldoO6GYJS6mOq5NfI6lGEyIfYu9i7nG8i329hbhZp6ePwtvEQK51HRRKj aZiCvg4TyXrUd1o2DPp1kE633yRded7P75dbE4gDeD/uObH2J6TXPWMc+H4pnIMyukSWSYzsjLvggGuqDRcA9W9N4k7KN7eUGWCnJ/k4gNfp8wdPvHSEI8q/KePyrcxVDUbKp5iMZM3 quQ9SBfkGawZOQI7dZVJDq4Akw95LXfv6+zhS/m4Se9gqK2u004zJk4uDEkyeB1atQEK4hCCT0Bq2d8CnPOsb4mzn0kCPSpXlVikLEBAmdxOn87HQhtnxWLh5yt8HZjQ5y6/Q61yTDT 193CysFP8q8DY1v9zkJ9vtRy9+uyEuWZXg0AU2InVqJ4CYVQijcE1WvecVOJWK75SCudST2DrB/nk0cYOrwlnHaPzXzeoq2GH3GD5GMTvIp70lj3cz6J50COnUiAGhhQGUeujPXKc2/ 58SJB0zNTsoIV0HDEUiJHSCUm+rXQRTCjzT+fIjUa/dFD7wyBZFnfXTKkiGl7MJrBjJQdrK0kpv1xFIL9wlLkbirAZ6OkCpaYsn2UF+DrBruegwpuHA/cjzJj8YOmDa5kUcUHnsQ3SX Qf2+M="
}

“data” JSON corresponds to the data element of Generate E-WAY BILL Request above

{
"supplyType":"O",
"subSupplyType":"1",
"subSupplyDesc":"",
"docType":"INV",
"docNo":"123-8",
"docDate":"15/12/2017",
"fromGstin":"29AAACG0569P1Z3",
"fromTrdName":"welton",
"fromAddr1":"2ND CROSS NO 59  19  A",
"fromAddr2":"GROUND FLOOR OSBORNE ROAD",
"fromPlace":"FRAZER TOWN",
"fromPincode":560042,
"actFromStateCode":29,
"fromStateCode":29,
"toGstin":"02EHFPS5910D2Z0",
"toTrdName":"sthuthya",
"toAddr1":"Shree Nilaya",
"toAddr2":"Dasarahosahalli",
"toPlace":"Beml Nagar",
"toPincode":689788,
"actToStateCode":29,
"toStateCode":28,
"totalValue":5609889,
"cgstValue":0,
"sgstValue":0,
"igstValue":168296.67,
"cessValue":224395.56,
"totInvValue":435678,
"transporterId":"",
"transporterName":"",
"transDocNo":"",
"transMode":"1",
"transDistance":"656",
"transDocDate":"",
"vehicleNo":"PVC1234",
"vehicleType":"R",
"itemList":
[{
"productName":"Wheat",
"productDesc":"Wheat",
"hsnCode":1001,
"quantity":4,
"qtyUnit":"BOX",
"cgstRate":0,
"sgstRate":0,
"igstRate":3,
"cessRate":4,
"cessAdvol":0,
"taxableAmount":5609889
}
]
}

Sample JSON (Response)

{
"status":"1",
"data":"ew0KCSJld2F5QmlsbE5vIjogMTIzNDU2Nzg5LA0KCSJld2F5QmlsbERhdGUiOiAiMTYgLyAwOSAvIDIwMTcgMTA6IDMwOiAwMCBBTSINCn0="
}


“data” JSON corresponds to the data element of Generate E-WAY BILL Response(Success) above

{
"ewayBillNo":123456789,
"ewayBillDate":"16/09/2017 10:30:00 AM",
"validUpto":"17/09/2017 12.00:00 PM"
}

JSON(in case of error)


"status": "0",
"error":{"errorCodes": 240}
}

JSON Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "supplyType": {
      "type": "string",
      "maxLength": 1,
      "minLength": 1,
      "enum": [ "O","I" ],
      "description": "Supply Type"
    },
    "subSupplyType": {
      "type": "string",
      "description": "Sub Supply Type"
    },
    "subSupplyDesc": {
      "type": "string",
      "maxLength": 20,
      "description": "Other Sub Supply Description"
    },
    "docType": {
      "type": "string",
          "enum": [ "INV", "CHL", "BIL","BOE","CNT","OTH" ],
      "description": "Document Type"
    },
    "docNo": {
      "type": "string",
      "maxLength": 16,
      "description": "Document Number (Alphanumeric with / and - are allowed)"
    },
    "docDate": {
      "type": "string",
      "pattern": "[0-3][0-9]/[0-1][0-9]/[2][0][1-2][0-9]",
      "description": "Document Date"
    },
    "fromGstin": {
      "type": "string",
      "maxLength": 15,
      "minLength": 15,
      "pattern": "[0-9]{2}[0-9|A-Z]{13}",
      "description": "From GSTIN (Supplier or Consignor)"
    },
    "fromTrdName": {
      "type": "string",
      "maxLength": 100,
      "description": "From Trade Name (Consignor Trade name)"
    },
    "fromAddr1": {
      "type": "string",
      "maxLength": 120,
      "description": "From Address Line 1 (Valid Special Chars #,-,/)"
    },
    "fromAddr2": {
      "type": "string",
      "maxLength": 120,
      "description": "From Address Line 2(Valid Special Chars # , - ,/)"
    },
    "fromPlace": {
      "type": "string",
      "maxLength": 50,
      "description": "From Place"
    },
    "actFromStateCode": {
      "type": "integer",
      "maximum": 99,
      "description": "Actual From State Code"
    },
    "fromPincode": {
      "type": "integer",
      "maximum": 999999,
      "minimum": 100000,
      "description": "From Pincode"
    },
    "fromStateCode": {
      "type": "integer",
      "maximum": 99,
      "description": "From State Code"
    },
    "toGstin": {
      "type": "string",
      "maxLength": 15,
      "minLength": 15,
      "pattern": "[0-9]{2}[0-9|A-Z]{13}",
      "description": "To GSTIN (Consignee or Recipient)"
    },
    "toTrdName": {
      "type": "string",
      "maxLength": 100,
      "description": "To Trade Name (Consignee Trade name or Recipient Trade name)"
    },
    "toAddr1": {
      "type": "string",
      "maxLength": 120,
      "description": "To Address Line 1 (Valid Special Chars #,-,/)"
    },
    "toAddr2": {
      "type": "string",
      "maxLength": 120,
      "description": "To Address Line 2 (Valid Special Chars #,-,/)"
    },
    "toPlace": {
      "type": "string",
      "maxLength": 50,
      "description": "To Place"
    },
    "toPincode": {
      "type": "integer",
      "description": "To Pincode"
    },
    "actToStateCode": {
      "type": "integer",
      "maximum": 99,
      "description": "Actual To State Code"
    },
    "toStateCode": {
      "type": "integer",
      "maximum": 99,
      "description": "To State Code"
    },
    "totalValue": {
      "type": "number",
      "multipleOf": 0.01,
      "description": "Sum of Taxable value and Tax value"
    },
     "cgstValue": {
      "type": "number",
      "multipleOf": 0.01,
      "description": "CGST value"
    },
    "sgstValue": {
      "type": "number",
      "multipleOf": 0.01,
      "description": "SGST value"
    },
    "igstValue": {
      "type": "number",
      "multipleOf": 0.01,
      "description": "IGST value"
    },
    "cessValue": {
      "type": "number",
      "multipleOf": 0.01,
      "description": "Cess value"
    },
    "totInvValue": {
      "type": "number",
       "multipleOf": 0.01,
      "description": "Total Invoice Value"
    },
      "transMode": {
      "type": "string",
      "enum": ["1","2","3","4"],
      "description": "Mode of transport (Road-1, Rail-2, Air-3, Ship-4) "
    },
    "transDistance": {
    "type": "string",
     "description": "Distance (<4000 km) "
    },
    "transporterName": {
      "type": "string",
      "maxLength": 100,
      "description": "Name of the transporter"
    },
    "transporterId": {
     "type": "string",
     "pattern": "[0-9]{2}[0-9|A-Z]{13}",     "description": "15 Digit Transporter GSTIN/TRANSIN"
    },
    "transDocNo": {
    "type": "string",
    "maxLength": 15,
      "description": "Transport Document Number (Alphanumeric with / and – are allowed)"
    },
    "transDocDate": {
    "type": "string",
    "description": "Transport Document Date"
    },
    "vehicleNo": {
      "type": "string",
      "minLength": 7,
      "maxLength": 15,      "description": "Vehicle Number"
    },
    "vehicleType": {
    "type": "string",
    "description": "Vehicle Type"
    },
    "itemList": {
      "type": "array",
      "items": [
        {
          "type": "object",
          "properties": {
            "productName": {
            "type": "string",
            "maxLength": 100,
            "description": "Product / Item Name"
            },
            "productDesc": {
            "type": "string",
            "maxLength": 100,
             "description": "Product / Item description"
            },
            "hsnCode": {
            "type": "number",
             "description": "HSN Code"
            },
            "quantity": {
            "type": "number",
         "description":"Quantity"
            },
            "qtyUnit": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
         "description": "Unit"
            },
            "taxableAmount": {
            "type": "number",
            "multipleOf": 0.01,
            "description":"Taxable Amount"
            },
            "sgstRate": {
            "type": "number",
            "multipleOf": 0.001,
            "description":"SGST Rate of Tax"
            },
            "cgstRate": {
             "type": "number",
             "multipleOf": 0.001,
         "description":"CGST Rate of Tax"
            },
            "igstRate": {
             "type": "number",
             "multipleOf": 0.001,
 "description":"IGST Rate of Tax"
            },
            "cessRate": {
             "type": "number",
             "multipleOf": 0.001,
             "description":"Cess Rate of Tax"
            },
           "cessAdvol": {
             "type": "number",
             "description":"Cess Non-Advolerum"
            }

          },
"required": [
"hsnCode",
"taxableAmount"
]
}
]
}
},
"required": [
"supplyType",
"subSupplyType",
"docType",
"docNo",
"docDate",
"fromGstin",
"fromPincode",
"fromStateCode",
"toGstin",
"toPincode",
"toStateCode",
"transDistance",
"itemList",
"actToStateCode",
"actFromStateCode"
] }

Data Structure

Parameter Name Type Description Values Sample Data Allowed character

supplyType

Text(1)

Supply whether it is outward/inward.

Refer Code List

O

 

subSupplyType

Text(2)

Sub types of Supply

Refer Code List

2

 

subSypplyDesc

Text(20)

Su Supply Description if selected “Others” in subSupplyType

 

 

 

docType

Text(3)

Document Type

Refer Code List

CHL

 

docNo

Text(16)

Document No

 

12

Alphanum, -, /

docDate

Text

Document Date

dd/mm/yyyy format

12/09/2017

 

fromGstin

Text(15)

GSTIN of the Consignor

 

29AAAAA0300L1Z8

Alphanum

fromTrdName

Text(100)

LegalName of consignor

 

ABHYUDHYA CO OP BANK

Alphanumeric

fromAddr1

Text(120)

Address of consignor - Line 1

 

Shambhai Fortune

Alphanumeric

fromAddr2

Text(120)

Address of consignor - Line 2

 

Behind KSRTC Bus Stop

Alphanumeric

fromPlace

Text(50)

Place of consignor

 

Bengaluru

Alphabetic

fromPincode

Number(6)

Pincode of consignor

 

576101

Number

fromStateCode

Number(2)

State of consignor

Refer Code List

29

 

actFromStateCode

Number(2)

State of Supply

Refer Code List

4

 

toGstin

Text(15)

GSTIN of consignee

 

29ACGPI2251K1ZJ

Alphanumeric

toTrdname

Text(100)

Legalname of consignee

 

INDER CHHAJER

Alphanumeric

toAddr1

Text(120)

Address of consignee - Line 1

 

PRIYADARSHANI LAYOUT

Alphanumeric

toAddr2

Text(120)

Address of consignee- Line 2

 

MUDALAYAPALYA

Alphanumeric

toPlace

Text(50)

Place of consignee

 

Bengaluru

Alphabetic

toPincode

Number(6)

Pincode of the consignee

 

560072

Number

toStateCode

Number(2)

State of Supply

Refer Code List

4

 

actToStateCode

Number(2)

State of Supply

Refer Code List

4

 

totalValue

Decimal(18,2)

Total Amount/ Taxable Amount

 

2000

 

totInvValue

Decimal(18,2)

Total Invoice Value

 

 

 

cgstValue

Decimal(18,2)

CGST Amount

 

0

 

sgstValue

Decimal(18,2)

SGST Amount

 

0

 

igstValue

Decimal(18,2)

IGST Amount

 

240

 

cessValue

Decimal(18,2)

CESS Amount

 

20

 

transMode

Number(1)

Mode of transportation

Refer Code List

1

 

VehicleType

Char(1)

Type of Vehcile

R or O

R

 

transDistance

Number(5)

Distance of transportation

 

10

Max Value = 4000

transporterId

Text(15)

Transporter Id

 

29BQSPA3829E1Z0

 

transporterName

Text(100)

Transporter Name

 

TAPURI

 

transDocNo

Text(15)

Transporter Doc No

 

11

 

transDocDate

Text

Transporter Doc Date

dd/mm/yyyy format

13/09/2017

 

vehicleNo

Text(15)

Vehicle No.

Pl refer Code List

KA12BL4567

Vehicle No. to begin with state code as given in the Code list

productName

Text(100)

Name of the Product

 

Steel

 

productDesc

 Text(100)

Description of the Product

 

5mm Rod

 

hsnCode

Number(8)

HSN Code of the Product

 

10101

 

quantity

Decimal(8,2)

Quantity of Product in Numbers

 

QTS

 

qtyUnit

Text(3)

Unit of the Product, like Liter,Kg etc

Refer Code List

200

 

taxableAmount

Decimal(18,2)

Total Amount/ Taxable Amount

 

100000

 

cgstRate

Decimal(6,3)

CGST Rate

 

9

 

sgstRate

Decimal(6,3)

SGST Rate

 

9

 

igstRate

Decimal(6,3)

IGST Rate

 

18

 

cessRate

Decimal(6,3)

CESS Rate

 

0

 

cessAdvol

Decimal(6,3)

cessAdvol

 

0

 

Validations

  1. In case of tax payer generating as supplier, the GSTIN of the requesting tax payer should be fromGstin
  2. In case of tax payer generating as recipient, the GSTIN of the requesting tax payer should be - toGstin
  3. In case of transporter(enrolled transporter / GSTIN updated as transporter in e-way bill portal) generating e-way bill, the GSTIN/TRANSIN of the requesting person should be -transporterId
  4. Enrolled transporter(TRANSIN) cannot be supplier (- fromGstin) or buyer (- toGstin)
  5. The following fields should have the one of the values given in the master codes
    1. Supply Type
    2. Sub Supply Type
    3. Document Type
    4. Transportation Mode
    5. Unit Quantity Code
  6. The Document Date should be less than or equal to current date
  7. The Transport document Date should be greater than equal to document date
  8. - fromGstin and - toGstin should be valid GSTIN number of the supplier and recipient. In case of unregistered person involved in the transaction, pass URP in these fields.
  9. In case of ‘Bill to – ship to’ transaction, - toGstin,- toTrdName and - toStateCode should be passed with ‘Bill To’ party and - toAddr1, - toAddr2, - toPlace, - toPincode and - actToStateCode  values should be passed with ‘Ship To’ party.
  10. In case of ‘Bill From – Dispatch From’ transaction, - fromGstin, - fromTrdName and - fromStateCode should be passed with ‘Bill From’ party and - fromAddr1, - fromAddr2, - fromPlace, - fromPincode and - actFromStateCode values should be passed with ‘Dispatch from’ party.
  11. HSN Code should be valid as per the GST master
  12. In case of intra-state transaction, where both - fromGstin and - toGstin belong to same state(fromStateCode and toStateCode should be same), the SGST and CGST tax rate and value has to be passed
  13. In case of inter-state transaction, where both - fromGstin and - toGstin  belong to different states(fromStateCode and toStateCode should be different), the IGST tax rate and value has to be passed
  14. In case of one of the party is SEZ unit, then  IGST tax rate and value has to be passed
  15. In case of road is a transportation mode , the vehicle number should be passed and transport document number is optional
  16. In case of rail, air or ship is a transportation mode, the transport document number  is must
  17. In case of export, the state and pin of shipping address has to be ‘Other Country’ and 999999.
  18. In case of import, the state and pin of shipping address has to be ‘Other Country’ and 999999.
  19. If PART-B (transportation mode, vehicle number or transport document number) is not passed, the system generate unique number and return without validity period
  20. If the transportation is done through the transporter, trans_id field should have valid TRANSID or GSTIN
  21. In case of road transportation, if the vehicle is ‘over dimension cargo’, pass O, otherwise R (regular).
  22. In case of non-advelarom tax of cess, directly pass the calculated value in cess_value along with advelarom cess tax value, if any.
  23. If vehicle number is passed, the format of the vehicle should be valid and as per the format
  24. In case of sub supply type is others, then pass the - subSupplyDesc accordingly.
  25. In case of import or export, the actual distance being travelled in the country has to be passed.
  26. The actual distance from source to destination cannot be greater than 4000.

Frequently Asked Questions

  1. Whether Bill-To, Ship-To scenario is handled by API
  2. A. As of now this scenario is not available through API

  3. Is there any limit for the number of items in a E Way Bill?
  4. A. Yes, Number of items per E Way Bill is limited to 250

  5. Can I generate multiple E Way Bill for the same document?
  6. A. Yes, Multiple E Way Bills can be generated for same document, E Way Bills other than the one required can be cancelled using Cancel API within stipulated time

  7. How to handle a scenario where goods are to be transported in multiple vehicles
  8. A. Delivery Challans may be created for the goods being carried in each of the vehicles and using the respective delivery challan, one E Way Bill per vehicle can be generated. Last vehicle can carry the Invoice