E-Invoice/E-WayBill APIs

API – Generate E-Waybill by IRN

This API is used to generate e-waybill for a given IRN.

URL

POST https://app.octagst.com/api/einvoice/generateewbbyirn?gstin={value}&pdf={value}

Query Parameters

NameDescriptionTypeValue
gstinIt specifies GSTIN of seller GSTINMandatory
pdfIt specifies whether to include eWayBill pdf in response or notOptionalyes,no (default)

Request Payload

Structure

ParameterData TypeTypeDescription
IrnString(64)MandatoryE-Invoice IRN
TransIdString(15)OptionalTransporter Id
TransNameString(100)OptionalTransport Name
TransModeString(1)OptionalTransport Mode
1: Road
2: Rail
3: Air
4: Ship
DistanceNumber(4)MandatoryDistance
TransDocNoString(15)OptionalTransporter Doc No
TransDocDtString(10)OptionalTransporter Doc Date
DD/MM/YYYY
VehNoString(20)OptionalVehicle No
VehTypeString(1)OptionalVehicle Type
R: Regular
O: Over-Dimensional Cargo (ODC)
ExpShipDtlsObjectOptionalThis object contains the shiping details
If the dispatching address and/or shipping address have not been passed during generation of IRN, then the respective addresses can be passed here.
Addr1String(100)MandatoryAddress-1
Addr2String(100)OptionalAddress-2
LocString(100)MandatoryLocation (City/Town/Village)
PinNumber(6)MandatoryPin code
StcdString(2)MandatoryState Code

Sample

{
  "Irn": "eb68a55abbf1a31ae19a6c9d82a0b22ba37785b6b76949585e5f928fea4042cb",
  "TransId": "24ACPPM5624F1ZK",
  "TransName": "Golden Transport",
  "TransMode": "1",
  "Distance": 300,
  "TransDocNo": "RS021",
  "TransDocDt": "29/11/2020",
  "VehNo": "RJ016789",
  "VehType": "R",
  "ExpShipDtls": {
    "Addr1": "Sidiginamola Village",
    "Addr2": "Ballari",
    "Loc": "Ballari",
    "Pin": 583138,
    "Stcd": "29"
  }
}

Success Response

Response payload will contain the success status along with e-waybill information.

{
  "Success": true,
  "EwbStatus": "ACT",
  "EwbNo": "191008688443",
  "EwbTime": "27/11/2020 17:23:45",
  "EwbValidTill": "29/11/2020 17:23:45",
  "EwbPdf": "utwf19...34566AAAElFTkSuQmCC"
}
ParameterData TypeDescription
SuccessBooleantrue in case of success
EwbStstusStringEWB Status
ACT: Active
CNL: Cancelled`
EwbNoStringe-waybill Number(present only if e-waybill is generated along with e-invoice)
EwbTimeStringe-waybill generation Date & time
DD/MM/YYYY HH:MM:SS
EwbValidTillStringe-waybill validity Date & time
DD/MM/YYYY HH:MM:SS
EwbPdfString (Binary data in Base64 encoding)e-waybill PDF file

Failure Response

If API request fails for some reason, 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"
    }
  ]
}