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 |
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’ |
Irn | SHA256 hash of Gstin, DocDtls.No, DocDtls.Typ, financial year of DocDtls.Dt |
EwbNo | e-waybill Number |
EwbDt | e-waybill date |
EwbValidTill | e-waybill validity |
Error Details | If Status is ‘0’ |
ErrorCode | Unique error code |
ErrorMessage | Error Description |
InfoDtls | Any additional message to be conveyed would be passed. |
{ "Irn": "825a63fc30ab5e948c47d460f0bc3ca615b8389d98bf38f56ff49df6160de06e", "TransId": "29DPZPS4403C1ZF", "TransMode": "1", "TransDocNo": "12/22", "TransDocDt": "06/02/2020", "VehNo": "KA01AB1234", "Distance": "120", "VehType": "R", "TransName": "ree" }
{ "EwbNo":111008683051, "EwbDt":"2020-04-24 11:28:00", "EwbValidTill":"2020-04-26 23:59:00" }
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": "string", "maxLength": 1, "minLength": 4, "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 " }, "required": [ "Distance", "TransMode" ] }