curl --request POST \
--url https://app.getswipe.in/api/partner/v2/ewaybill/{doc_hash_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"supply_type": "Outward",
"sub_supply_type": "Supply",
"transporter_doc_date": "05-03-2025",
"dispatch_from": {
"addr_id": -1,
"address_line1": "123 Street",
"address_line2": "Apt 4B",
"city": "City Name",
"state": "State Name",
"country": "Country Name",
"pincode": "123456"
},
"dispatch_to": {
"addr_id": -1,
"address_line1": "123 Street",
"address_line2": "Apt 4B",
"city": "City Name",
"state": "State Name",
"country": "Country Name",
"pincode": "123456"
},
"transport_mode": "Road"
}
'import requests
url = "https://app.getswipe.in/api/partner/v2/ewaybill/{doc_hash_id}"
payload = {
"supply_type": "Outward",
"sub_supply_type": "Supply",
"transporter_doc_date": "05-03-2025",
"dispatch_from": {
"addr_id": -1,
"address_line1": "123 Street",
"address_line2": "Apt 4B",
"city": "City Name",
"state": "State Name",
"country": "Country Name",
"pincode": "123456"
},
"dispatch_to": {
"addr_id": -1,
"address_line1": "123 Street",
"address_line2": "Apt 4B",
"city": "City Name",
"state": "State Name",
"country": "Country Name",
"pincode": "123456"
},
"transport_mode": "Road"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
supply_type: 'Outward',
sub_supply_type: 'Supply',
transporter_doc_date: '05-03-2025',
dispatch_from: {
addr_id: -1,
address_line1: '123 Street',
address_line2: 'Apt 4B',
city: 'City Name',
state: 'State Name',
country: 'Country Name',
pincode: '123456'
},
dispatch_to: {
addr_id: -1,
address_line1: '123 Street',
address_line2: 'Apt 4B',
city: 'City Name',
state: 'State Name',
country: 'Country Name',
pincode: '123456'
},
transport_mode: 'Road'
})
};
fetch('https://app.getswipe.in/api/partner/v2/ewaybill/{doc_hash_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message": "Eway Bill created successfully"
}{
"success": false,
"error_code": "INVALID_HASH_ID",
"message": "Some error occurred",
"errors": {}
}{
"success": false,
"error_code": "INVALID_HASH_ID",
"message": "Some error occurred",
"errors": {}
}{
"success": false,
"error_code": "INVALID_HASH_ID",
"message": "Some error occurred",
"errors": {}
}Create e-way bill
Generates an e-way bill for an existing document, identified by its hash_id. Requires the transport details: supply type, transport mode, dispatch addresses, and transporter document date. Your account must be connected to the e-way bill portal; portal rejections are returned as PORTAL_ERROR_{code}. By default this points to the government sandbox portal.
curl --request POST \
--url https://app.getswipe.in/api/partner/v2/ewaybill/{doc_hash_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"supply_type": "Outward",
"sub_supply_type": "Supply",
"transporter_doc_date": "05-03-2025",
"dispatch_from": {
"addr_id": -1,
"address_line1": "123 Street",
"address_line2": "Apt 4B",
"city": "City Name",
"state": "State Name",
"country": "Country Name",
"pincode": "123456"
},
"dispatch_to": {
"addr_id": -1,
"address_line1": "123 Street",
"address_line2": "Apt 4B",
"city": "City Name",
"state": "State Name",
"country": "Country Name",
"pincode": "123456"
},
"transport_mode": "Road"
}
'import requests
url = "https://app.getswipe.in/api/partner/v2/ewaybill/{doc_hash_id}"
payload = {
"supply_type": "Outward",
"sub_supply_type": "Supply",
"transporter_doc_date": "05-03-2025",
"dispatch_from": {
"addr_id": -1,
"address_line1": "123 Street",
"address_line2": "Apt 4B",
"city": "City Name",
"state": "State Name",
"country": "Country Name",
"pincode": "123456"
},
"dispatch_to": {
"addr_id": -1,
"address_line1": "123 Street",
"address_line2": "Apt 4B",
"city": "City Name",
"state": "State Name",
"country": "Country Name",
"pincode": "123456"
},
"transport_mode": "Road"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
supply_type: 'Outward',
sub_supply_type: 'Supply',
transporter_doc_date: '05-03-2025',
dispatch_from: {
addr_id: -1,
address_line1: '123 Street',
address_line2: 'Apt 4B',
city: 'City Name',
state: 'State Name',
country: 'Country Name',
pincode: '123456'
},
dispatch_to: {
addr_id: -1,
address_line1: '123 Street',
address_line2: 'Apt 4B',
city: 'City Name',
state: 'State Name',
country: 'Country Name',
pincode: '123456'
},
transport_mode: 'Road'
})
};
fetch('https://app.getswipe.in/api/partner/v2/ewaybill/{doc_hash_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message": "Eway Bill created successfully"
}{
"success": false,
"error_code": "INVALID_HASH_ID",
"message": "Some error occurred",
"errors": {}
}{
"success": false,
"error_code": "INVALID_HASH_ID",
"message": "Some error occurred",
"errors": {}
}{
"success": false,
"error_code": "INVALID_HASH_ID",
"message": "Some error occurred",
"errors": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is an API key from the API Integration section of your dashboard. Keys are scoped to the company they are generated in — for testing, add a separate test company and generate the key there, so requests never touch your real books.
Path Parameters
The hash id of the document
Body
Supply Type
Outward, Inward "Outward"
Sub Supply Type
Supply, Export, Job Work, SKD/CKD/Lots, Recipient Not Known, For Own Use, Job Work Returns, Sales Returns, Exhibition or fairs, Line Sales, Others "Supply"
DD-MM-YYYY
"05-03-2025"
Dispatch From Address
Show child attributes
Show child attributes
Dispatch To Address
Show child attributes
Show child attributes
Transport Mode
Road, Rail, Air, Ship or Ship Cum Road/Rail "Road"
Vehicle Type
Regular, Over Dimensional Cargo "Regular"
Transaction Type
Regular, Bill To - Ship To, Bill From - Dispatch From, Combination of 2 and 3 "Regular"
Ship To GSTIN of the consignee, or 'URP' if unregistered. Required for 'Bill To - Ship To' and 'Combination of 2 and 3' transaction types.
"29ABCDE1234F1Z5"
Sub Supply Type Description
"Supply of goods"
Transporter ID
"123456"
Transporter Name
"Transporter Name"
Vehicle Number
"KA01AB1234"
Transporter Document Number
"123456"

