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(Taxpayer 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)

Generate E-WAY BILL Request

{
"action":"GENEWAYBILL", "data":"iJiJGXqU1pcj7lUobPrYFVPaeiD0OGPaB3lVFNTXTMiHpW7VUcvgSWGXsGETQU4v3RuT23wXUVcZnrglGH
jXV10rh8DsUZO+kufS5MMF+E1RcTRJN70TeDPd3Ya84X6+ijRcPFJUJyjvLD2muWYF+UixgkaNybUDK2eQ
9IKPtabvsblCRCjVISuNjMfV0nrjtqYSWT8fcTk323OxYaqPhGWH/9T24vE8NnkNWUjIpfwPgFkiVKZ2xV
cLESXGYSnffA6UBZPng/tBj/qk6EXsNjeC6/P7E+KOKin7aeNw83MOmlnGi/zPIm3pOoBG9w6Bj5ZfDWFs
sjHpBNWw6isecadXLlIlvtjkVzZ+cDOxWYw8AaYWLItgAy5ZUxyxBlRpv+lWMVarsfHimL+GYX3zo3hOWv
Q8VfYPW/5qRoFsPL4aYJgaR5kHrw+yl672jIuoj1iZ5Qf3nDeFWrotBVDjrmON/IlckqoL3ATBf6nmpyby
MJrSGdjQikNrO/2/+F5nJLTILwru6x2XD6r45v9v6aJXE13QWHE84E6wcloNGOObvUBV+/BadIn4zqXr48
eIGmjGJ4p9OTnqyzaecHnKOOpfX3SIaHJKnEUx97OZ2ErAHAPI7OtWled92lzzH/2sue6C5W4q27Jt5SFj
r2Tyxxz3WUiJ58BKLSfs4kVHmLJXROoXsSplgRVG04QpiL80ticEafWoCbAVhBC2Xkabkc8GmTFg5ak9VZ
xNh9vdAZbJ5zL0K+3fw8osIYG8CermgPkQUaQo2kpK/gEkINapvxbvTLqrVrV171aHUdFk5PW2G2nc9N0u
Pi0nplxz/habvDgkRQPFr+MJjAA437/Y7HnI5B34jMk3EhtqWHZNLNAf6HuMK0pl5boJtSl4qfpXpjg5uU
AoAPA0/gXc3l4VOsR1NpqOI1zjSxraW5sJB53USaEqdunQNrDpr/GQITARl/D86gZoMf+Bi7Jdt108AI7E
K0mYALn4gMvy1I3gDCQ+NXl5wStfCO1ih/OrL2wfihoH8bHFeW6xxCgvbenLxrAQfhiBkgAQkp2wXsHNxW
4JbNh5rDlwc1VqP63WQ7/QVIkRGe/HS6uOn5JVlUNvKVNWIe6Qpm8eThMD/GEL1IJAV6oQOr7+OOEn2oIR
7olJ5yu652iH6tq0Xcx2C0ZmhHRms54w5bVWZu+/bOhMptSKIs/N67JGJ8hj85E2+yOgwdTn+Nvi+W7d2W
3jVFF7XP7+CbfxZdi5RVyir4fddH8YbsLzj9FjP1uRcBqK2egzQ90UWKXCtqCi6QMORfFu5LDgwMCNJ75T
H+1nVRaeXYhVDAQEeYWkG2yKVfME0BUoHQ54w5a0M1XoxMi9wU9LbuCAt5UG2wi39x2gKc78IddcABdtwx2K23hdoUZp/25Y"
}

"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)

Generate E-WAY BILL 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"
        },
    "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}[A-Z]{5}[0-9]{4}[A-Z][0-9][A-Z][0-9|A-Z]",
      "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"
    },
        "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}[A-Z]{5}[0-9]{4}[A-Z][0-9][A-Z][0-9|A-Z]",
      "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"
    },
          "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",
      "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",
           "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",
"transMode",
"transDistance",
"itemList",
"actToStateCode",
"actFromStateCode"
]
}

Data Structure

Parameter Name Type Description Values Sample Data Allowed character

userGstin

Text (15)

GSTIN of API User

 

29ACGPI2251K1ZJ

Alphanum

supplyType

Text(1)

Supply whether it is outward/inward.

Refer Code List

O

 

subSupplyType

Number(2)

Sub types of Supply

Refer Code List

2

 

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

 

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

 

totalValue

Decimal(18,2)

Total Amount/ Taxable Amount

 

2000

 

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

 

Status

Number(1)

Status code

1-Success, 0 - Fail

 

 

errorCodes

Text(200)

Refer Error Codes

 

 

 

ewayBillNo

Number(12)

Unique E-Way Bill No

 

 

 

ewayBillDate

Text(22)

Date and Time of E-Way Bill Generation

dd/mm/yyyy hh:mm:ss AM/PM