ClearTax Docs
Subscribe for Updates
  • Introduction to ClearTax APIs
  • ☁️Clear Finance Cloud
    • Introduction to Clear Finance Cloud
    • Learn Clear Finance Cloud Basics
      • API client
      • Access token
      • FTP client
      • How to get Custom Upload Template ID?
    • CFC API Reference
      • Resources and Masters
        • Sale Document Line Object
        • Purchase Document Line Object
      • Generate Access Token API
      • Ingestion API
        • Ingest Documents via File
          • Get Pre-signed URL
          • Upload File to Storage
          • Trigger File Ingestion
          • Get File Ingestion Status
        • (Deprecated) Ingest Documents via JSON
    • Notifications
  • 🇮🇳GLS API
    • GLS API Reference
      • Resources and Masters
      • Advanced Ingestion API Reference
        • Get Pre-signed URL
        • Upload File to Storage
        • Create Ingestion Activity
        • Get Ingestion Activity Status
  • 🇮🇳GST API
    • Introduction to GST API
    • GST 2.0 API Reference
      • Upload Documents
    • GST FTP Magnet
  • 🇮🇳Max ITC API
    • Introduction to Max ITC API
    • Getting Started with Max ITC API
    • Max ITC API Reference
      • Resources and Masters
        • Input and output templates
        • Error Code Master
        • Learn Max ITC API Architecture
      • Max ITC APIs
        • Fetch Max ITC Configuration
        • Upload Purchase Documents
          • Ingest PR via File
          • (Deprecated) Ingest PR via JSON
        • Trigger Max ITC Workflow
        • Get Max ITC Results
        • Postman Collection
    • Max ITC FTP Magnet
  • 🇮🇳TDS API
    • Introduction to TDS API
    • TDS API Reference
      • Resources and Masters
        • Deduction Document Line Objects
        • Output Template(Error)
      • TDS APIs
        • Upload Deductions
          • Ingest Deductions via File
            • Get Pre-signed URL
            • Upload File to Storage
            • Trigger File Ingestion
            • Get File Ingestion Status
          • (Deprecated) Ingest Deductions via JSON
  • 🇮🇳E-Invoicing API
    • Introduction to E-Invoicing API
    • Learn E-Invoicing API Basics
      • How to get E-Invoicing User Auth Token?
      • How to scan the E-Invoice QR code?
      • How to add GSTIN to E-Invoicing?
        • Clear IRP API Credentials
    • Learn E-waybill API Basics
    • E-Invoicing API Reference
      • Setting up your account
      • Clear Schema
        • Generate IRN
        • Cancel IRN
        • Get E-Invoice PDF
        • Get E-Invoice by IRN
        • Generate E-Waybill by IRN
        • Generate E-Waybill for Non-IRN documents
        • Bulk Generate E-Waybill for Non-IRN documents
        • Cancel E-Waybill
        • Get E-Waybill PDF
        • Update E-Waybill Transporter ID
        • Update E-Waybill Part-B
        • Extend E-Waybill Validity
        • Generate/Regenerate Consolidated EWB
        • Get Consolidated EWB PDF
        • Initiate Multi-Vehicle E-Waybills
        • Update EWB Status from NIC
        • Download E-waybills by Others
        • Get E-Waybill Download Status
        • Get E-Waybills
        • Get latest E-Waybill status from Government
        • Generate B2C Payment QR Code
          • Generate B2C Payment QR Code (Lite)
        • Get Signed PDF
        • Sign PDF API Base 64 Encoded
        • Send an E-Invoice via Email
        • Get Invoice Details
      • Government Schema
        • Generate IRN
        • Cancel IRN
        • Get Invoice by IRN
        • Generate E-Waybill by IRN
      • Resources and Masters
        • E-Invoice Object
        • Country Code Master
        • State Code Master
        • Pincode Master
        • Pincode State Mapping Pattern
        • Port Code Master
        • Currency Code Master
        • UQC Master
        • Tax Rates
        • Error Codes
    • E-Invoicing FTP Magnet
  • 🇮🇳Invoicing API
    • Invoicing API Reference
      • Create an Invoice
      • Create Document (Non-Sale)
      • Download PDF of a Document
      • Get Document details
      • Resources and Master
        • Country Master
        • State Master
        • Pincode Master
        • Port Master
        • Currency Master
        • Unit Master
        • Document Types
        • Supply Types
  • 🇲🇾E-INVOICING MALAYSIA API
    • E-Invoicing Malaysia API Reference
      • Resources and Masters
        • Error resolution guide
        • Frequently asked questions (FAQs)
        • E-Invoice Object
      • Generate Access Token API
      • Malaysia E-Invoicing APIs
        • Generate E-Invoice for a Document
        • Status Check for Submitted E-Invoice
        • Cancel E-Invoice
        • Upload E-Invoice
        • Get Documents
        • Get E-Invoice PDF
        • Get Document via UUID
        • Delete Invoice
        • Send Bulk Email
        • Search Taxpayer Tin API
  • E-Invoicing FTP Magnet (XML)
  • E-Invoicing FTP Magnet (Excel)
  • 🇸🇦E-Invoicing KSA API
    • Introduction to E-Invoicing KSA API
    • Learn E-Invoicing KSA API Basics
      • How to get E-Invoicing KSA Auth Token?
      • How to add a VAT number to KSA E-Invoicing Account?
      • How to add Branch for existing Vat to KSA E-Invoicing Account ?
      • How to register a device for a VAT?
      • How to generate OTP on ERAD Portal?
      • How to get Print Template ID?
      • KSA E-Invoicing Integration Architecture
    • E-Invoicing KSA API Reference
      • Resources and Masters
        • E-Invoice Object
        • Error Details Object
        • Data Types
        • Code Lists
        • Common Errors and Resolution
      • Authentication
      • Generate Access Token API
      • KSA E-Invoicing APIs
        • Generate E-Invoice
          • Additional Standard (B2B) E-Invoice Examples
          • Additional Simplified (B2C) E-Invoice Examples
        • Generate E-Invoice Async
        • Generate E-Invoice via XML
        • Send Signed E-Invoice XML To ZATCA
        • Get Bulk Invoice Lite
        • Get Invoice
        • Get E-Invoice PDF
        • Get E-Invoice PDF/A-3 with PDF API
        • Register Device
        • Get PCSID Generation Status
        • Renew PCSID
        • Generate E-Invoice (Phase I)
        • Generate QR Code (Phase I)
        • Generate Device ID
        • Generate CSID and PCSID
        • Send E-Invoice via Email
        • Add Business units API
    • E-Invoicing KSA FTP Magnet
    • E-Invoicing KSA XML reporting FTP Magnet
  • 🧩Add-ons and Extensions
    • SAP Add-on
      • SAP Connectivity Checklist
        • Steps to import SSL/TLS certificates in SAP
        • Steps to check ICM settings in SAP
        • Steps to test connectivity in SAP
        • Steps to troubleshoot connectivity issues in SAP
    • Tally Add-on
  • Microsoft Dynamics 365(F&O)
  • General
    • Go-Live Cutover Activity Checklist
    • How to check DNS resolution?
    • How to check hostname reachability?
    • How to check if hostname is trusted?
    • How to get the SSL certificate of a host?
  • ⭐GST GSP API
    • Introduction to GST GSP API
    • Getting Started with GST GSP API
    • GST GSP API Reference
      • Sample API
    • Migrating from Karvy GST GSP
  • ⭐E-Waybill GSP API
    • Introduction to E-Waybill GSP API
    • Getting Started with EWB GSP API
      • How to register EWB GSP on NIC?
      • Sandbox GSTIN for EWB GSP
    • E-Waybill GSP API Reference
      • Sample API
    • Migrating from Karvy EWB GSP
  • ⭐E-Invoicing GSP API
    • Introduction to E-Invoicing GSP API
    • Getting Started with EINV GSP API
      • How to register EINV GSP on IRP?
      • Sandbox GSTIN for EINV GSP
    • E-Invoicing GSP API Reference
      • Sample API
  • Subscribe for Updates
  • 🚫(Deprecated) GST 1.0 API
    • (Deprecated) Introduction to GST API
    • (Deprecated) Learn GST API Basics
    • (Deprecated) Getting Started with GST API
      • (Deprecated) How to set up ClearTax account?
      • (Deprecated) How to authenticate API requests?
      • (Deprecated) How to upload an invoice from File?
      • (Deprecated) How to create custom import template?
    • (Deprecated) GST 1.0 API Reference
      • Taxpayer Information
      • (Deprecated) Invoices
      • (Deprecated) Bills of Supply
      • (Deprecated) Credit Debit Notes (CDN)
      • (Deprecated) Advances
      • (Deprecated) Resources and Masters
        • (Deprecated) How to read GST error response
        • (Deprecated) Unit of Measurement master
        • (Deprecated) State master
        • (Deprecated) Document Classification/Section Name master
      • (Deprecated) Items
      • (Deprecated) Contacts
      • (Deprecated) GST File Upload API Reference
  • 🚫Deprecated E-Waybill API
    • (Deprecated) Introduction to E-Waybill API
    • (Deprecated) Learn E-Waybill API Basics
    • (Deprecated) Getting Started with E-Waybill API
    • (Deprecated) E-Waybill API Reference
      • (Deprecated) Resources and Masters
        • (Deprecated) Unit Master
        • (Deprecated) State Master
        • (Deprecated) Error Master
      • (Deprecated) E-Waybill JSON API Reference
        • (Deprecated) Generating E-Waybill
        • (Deprecated) Getting E-Waybill
        • (Deprecated) Updating E-Waybill
        • (Deprecated) Extending Validity of E-Waybill
        • (Deprecated) Multi-vehicle E-Waybill
        • (Deprecated) Printing E-Waybill
        • (Deprecated) Cancelling E-Waybill
        • (Deprecated) Generating Consolidated E-Waybill
        • (Deprecated) Getting Consolidated E-Waybill
        • (Deprecated) Regenerating Consolidated E-Waybill
        • (Deprecated) Printing Consolidated E-Waybill
      • (Deprecated) E-Waybill File Upload API Reference
        • (Deprecated) Creating or Updating Documents
        • (Deprecated) Getting Upload Status
        • (Deprecated) Getting Upload Validation
        • (Deprecated) Getting Upload History
        • (Deprecated) Rate Limiting & Best Practices
    • (Deprecated) E-Waybill FTP Magnet
Powered by GitBook
On this page
  • Request URL
  • Request Headers
  • Export Shipping Details
  • Dispatch From Details Object

Was this helpful?

  1. E-Invoicing API
  2. E-Invoicing API Reference
  3. Government Schema

Generate E-Waybill by IRN

You can use this API to generate the e-waybill using Invoice Registration Number (IRN).

Request URL

POST: {{HOST}}/einv/v1/govt/api/einvewb/ewaybill

Request Headers

Parameter
Type
Description

x-cleartax-auth-token

String

Mandatory. The access token generated for the workspace.

x-cleartax-product

String

Should always be "EInvoice" without the double quotes.

gstin

String

Users GSTIN

Content-Type

String

Mandatory. This will always be "application/json".

Request Parameters:

Parameters

Parameter Type

Type

Validation

Description

Irn

Body

String

minLength: 64

maxLength: 64

Mandatory. IRN generated for the invoice.

TransId

Body

String

minLength: 15

maxLength: 15

pattern: "([0-9]{2}[0-9A-Z]{13})"

Conditional. Transporter GSTIN or CEN (Common Enrollment Number)

TransName

Body

String

minLength: 3

maxLength: 100

pattern: "^([^\\\"])*$"

Optional. Name of the transporter

TransMode

Body

String

minLength: 1

maxLength: 1

enum: ["1", "2", "3", "4"]

Conditional. Mode of transport (Road-1, Rail-2, Air-3, Ship-4)

Distance

Body

Number

minimum: 1

maximum: 4000

Mandatory. Distance between source and destination PIN codes

TransDocNo

Body

String

minLength: 1

maxLength: 15

pattern: "^([a-zA-Z0-9\/-]{1,15})$"

Optional. Tranport Document Number

TransDocDt

Body

String

minLength: 10

maxLength: 10

pattern: "^[0-3][0-9]\/[0-1][0-9]\/[2][0][1-2][0-9]$"

Optional. Transport Document Date

VehNo

Body

String

minLength: 4

maxLength: 20

pattern: "^([A-Z|a-z|0-9]{4,20})$"

Conditional. Vehicle Number

VehType

Body

String

minLength: 1, maxLength: 1,

enum: ["O", "R"],

Conditional. Whether O-ODC or R-Regular

ExpShipDtls

Body

Object

Optional. ExpShipDtls Object.

DispDtls

Body

Object

Optional. Dispatch From Details Object

Export Shipping Details

In case of export of goods, if the E-Waybill has to be generated, then the address of port should have been passed as the shipping address during the generation of IRN.

If during the generation of IRN for export, the shipping address of India is not passed, then the shipping address of the port may be sent now and get the e-way bill generated.

Parameters

Type

Validation

Description

Addr1

string

minLength: 1

maxLength: 100

pattern: "^([^\\\"])*$"

Mandatory. Address1 of the entity to whom the supplies are shipped to. (Building/Flat no., Road/Street etc.)

Addr2

string

minLength: 3

maxLength: 100

pattern: "^([^\\\"])*$"

Optional. Address 2 of the entity to whom the supplies are shipped to. (Floor no., Name of the premises/building).

Loc

string

minLength: 3

maxLength: 100

pattern: "^([^\\\"])*$"

Mandatory. Place (City, Town, Village) entity to whom the supplies are shipped to.

Pin

number

minimum: 100000

maximum: 999999

Mandatory. Pincode

Stcd

string

minLength: 1

maxLength: 2

pattern: "^(?!0+$)([0-9]{1,2})$"

Dispatch From Details Object

If the dispatching address and/or shipping address have not been passed during the generation of IRN, then the respective addresses can be passed here.

Parameters

Type

Validation

Description

Nm

string

minLength: 3,

maxLength: 100,

pattern: "^([^\\\"])*$"

Mandatory. Name of the company from which the goods are dispatched

Addr1

string

minLength: 1

maxLength: 100

pattern: "^([^\\\"])*$"

Mandatory. Address 1 of the entity from which goods are dispatched. (Building/Flat No. Road/Street etc.)

Addr2

string

minLength: 3

maxLength: 100

pattern: "^([^\\\"])*$"

Optional. Address 2 of the entity from which goods are dispatched. (Floor no., Name of the premises/building)

Loc

string

minLength: 3

maxLength: 100

pattern: "^([^\\\"])*$"

Mandatory. Location

Pin

number

minimum: 100000

maximum: 999999

Mandatory. Pincode

Stcd

string

minLength: 1

maxLength: 2

pattern: "^(?!0+$)([0-9]{1,2})$"

Sample Request Body


  {
  "Irn": "5ba7b2fdc8546f70eed26f1dcd48a5f5365bab997e8bc09ec43d2ba291def8c8",
  "Distance": 80,
  "TransMode": "1",
  "TransId":"12AWGPV7107B1Z1",  
  "TransName": "trans name",
  "TransDocDt": "12/12/2020",
  "TransDocNo": "TRAN/DOC/11",
  "VehNo": "KA12ER1234",
  "VehType": "R",
  "ExpShipDtls": {
    "Addr1": "7th block, kuvempu layout",
    "Addr2": "kuvempu layout",
    "Loc": "Banagalore",
    "Pin": 562160,
    "Stcd": "29"
  },
  "DispDtls": {
    "Nm": "ABC company pvt ltd",
    "Addr1": "7th block, kuvempu layout",
    "Addr2": "kuvempu layout",
    "Loc": "Banagalore",
    "Pin": 562160,
    "Stcd": "29"
  }
} 

Response Parameters

Parameter

Type

Description

EwbNo

String

e-waybill Number

EwbDt

String

e-waybill date

EwbValidTill

String

e-waybill validity

Remarks

String

Remarks, if any.

Sample Response

{
    "Success": "Y",
    "EwbNo": 161008717805,
    "EwbDt": "2020-09-17 12:14:00",
    "EwbValidTill": "2020-09-18 23:59:00",
    "Remarks":"Pin-Pin calc distance: 997KM"
}
{
  "Irn": "834ecbf400d73ae25e9e5bbd2fb090510b476b8b3ded109fab7d819314c9b7c3",
  "TransId": "12AWGPV7107B1Z1",
  "TransName": "XYZ EXPORTS",
  "TransMode": "1",
  "Distance": 100,
  "TransDocNo": "DOC01",
  "TransDocDt": "08/08/2020",
  "VehNo": "ka123456",
  "VehType": "R",
  "EwbStatus": "FAILED",
  "errors": {
    "errors": [
      {
        "error_code": "4002",
        "error_message": "EwayBill is already generated for this IRN",
        "error_source": "GOVT"
      }
    ]
  }
}
PreviousGet Invoice by IRNNextResources and Masters

Last updated 1 year ago

Was this helpful?

Mandatory. State Code to which supplies are shipped to. .

Mandatory. State Code of the Seller. .

🇮🇳
Refer to the state master
Refer to the state master