This API is used to generate the e-waybill using Invoice Registration Number (IRN). The details and parameters of the requests and responses are explained.
The format and details of EWB Generation by IRN API request is depicted in following table.
URL | |
---|---|
Content-Type |
application/json |
Method |
POST |
Request Header
Attributes | Description |
---|---|
client_id | Client id to be provided by e-invoice system |
client_secret |
Client secret to be provided by e-invoice system |
Gstin | GSTIN of authenticated user |
sup_gstin |
(Optional) Supplier GSTIN, only in case E Comm. operator is generating the E Way Bill |
user_name |
User name of the authenticated user |
AuthToken |
Authentication token returned by the e-invoice system |
Request Payload
Attributes | Description |
---|---|
Data | Base 64 encoded string of encrypted invoice JSON using SEK |
Attributes | Description |
---|---|
Status | Status of the generate IRN request (values 1- Success and 0-Failure) |
Data | If Status is ‘1’ |
EwbNo | e-waybill Number |
EwbDt | e-waybill date |
EwbValidTill | e-waybill validity |
Remarks | Additional information such as, If distance is passed is 0, shows actual distance calculated for the pair of PIN codes |
Error Details | If Status is ‘0’ |
ErrorCode | Unique error code |
ErrorMessage | Error Description |
InfoDtls | Any additional message to be conveyed would be passed. |
{ "Irn": "", "Distance": 100, "TransMode": "1", "TransId":"12AWGPV7107B1Z1", "TransName": "trans name", "TransDocDt": "01/08/2020", "TransDocNo": "TRAN/DOC/11", "VehNo": "KA12ER1234", "VehType": "R", "ExpShipDtls": { "Addr1": "7th block, kuvempu layout", "Addr2": "kuvempu layout", "Loc": "Banagalore", "Pin": 562160, "Stcd": "29" } }
{ "EwbNo":111008683051, "EwbDt":"2020-04-24 11:28:00", "EwbValidTill":"2020-04-26 23:59:00", "Remarks":"Pin-Pin calc distance: 997KM" }
JSON(in case of error)
{ "$schema": "http://json-schema.org/draft-07/schema#", "Irn": { "type": "string", "minLength": 64, "maxLength": 64, "description": "Irn Number" }, "TransId": { "type": "string", "minLength": 15, "maxLength": 15, "description": "Transin/GSTIN" }, "TransName": { "type": "string", "minLength": 3, "maxLength": 100, "description": "Name of the transporter" }, "TransMode": { "type": "string", "maxLength": 1, "minLength": 1, "enum": ["1", "2", "3", "4"], "description": "Mode of transport (Road-1, Rail-2, Air-3, Ship-4)" }, "Distance": { "type": "number", "minimum": 1, "maximum": 9999, "description": "Distance between source and destination PIN codes" }, "TransDocNo": { "type": "string", "minLength": 1, "maxLength": 15, "pattern": "^([0-9A-Z/-]){1,15}$", "description": "Tranport Document Number" }, "TransDocDt": { "type": "string", "minLength": 10, "maxLength": 10, "pattern": "[0-3][0-9]/[0-1][0-9]/[2][0][1-2][0-9]", "description": "Transport Document Date" }, "VehNo": { "type": "string", "minLength": 4, "maxLength": 20, "description": "Vehicle Number" }, "VehType": { "type": "string", "minLength": 1, "maxLength": 1, "enum": ["O", "R"], "description": "Whether O-ODC or R-Regular " }, "ExpShipDtls": { "type": "object", "properties": { "Addr1": { "type": "string", "minLength": 3, "maxLength": 100, "description": "Address1 of the entity to whom the supplies are shipped to. (Building/Flat no.,Road/Street etc.)" }, "Addr2": { "type": "string", "minLength": 3, "maxLength": 100, "description": "Address 2 of the entity to whom the supplies are shipped to. (Floor no., Name of the premises/building)." }, "Loc": { "type": "string", "minLength": 3, "maxLength": 100, "description": "Place (City,Town,Village) entity to whom the supplies are shipped to." }, "Pin": { "type": "number", "minimum": 100000, "maximum": 999999, "description": "Pincode" }, "Stcd": { "type": "string", "minLength": 1, "maxLength": 2, "description": "State Code to which supplies are shipped to. Refer the master" } }, "required": [ "Addr1", "Loc", "Pin", "Stcd" ] }, "required": [ "Distance", ] }