Create e-way bill
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",
"data": {
"ewaybill_number": "381012345678",
"ewaybill_date": "25-11-2026 14:05:00",
"valid_until": "26-11-2026 23:59:00",
"status": "success",
"alert": ""
}
}{
"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": {}
}E-Way Bills
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.
POST
/
v2
/
ewaybill
/
{doc_hash_id}
Create e-way bill
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",
"data": {
"ewaybill_number": "381012345678",
"ewaybill_date": "25-11-2026 14:05:00",
"valid_until": "26-11-2026 23:59:00",
"status": "success",
"alert": ""
}
}{
"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": {}
}To create an EwayBill first connect to EwayBill Portal.
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.
Body
application/json

