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",
"vehicle_type": "Regular",
"transaction_type": "Regular",
"ship_to_gstin": "29ABCDE1234F1Z5",
"sub_supply_type_description": "Supply of goods",
"transporter_id": "123456",
"transporter_name": "Transporter Name",
"vehicle_number": "KA01AB1234",
"transporter_doc_number": "123456"
}
'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",
"vehicle_type": "Regular",
"transaction_type": "Regular",
"ship_to_gstin": "29ABCDE1234F1Z5",
"sub_supply_type_description": "Supply of goods",
"transporter_id": "123456",
"transporter_name": "Transporter Name",
"vehicle_number": "KA01AB1234",
"transporter_doc_number": "123456"
}
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',
vehicle_type: 'Regular',
transaction_type: 'Regular',
ship_to_gstin: '29ABCDE1234F1Z5',
sub_supply_type_description: 'Supply of goods',
transporter_id: '123456',
transporter_name: 'Transporter Name',
vehicle_number: 'KA01AB1234',
transporter_doc_number: '123456'
})
};
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));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.getswipe.in/api/partner/v2/ewaybill/{doc_hash_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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',
'vehicle_type' => 'Regular',
'transaction_type' => 'Regular',
'ship_to_gstin' => '29ABCDE1234F1Z5',
'sub_supply_type_description' => 'Supply of goods',
'transporter_id' => '123456',
'transporter_name' => 'Transporter Name',
'vehicle_number' => 'KA01AB1234',
'transporter_doc_number' => '123456'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.getswipe.in/api/partner/v2/ewaybill/{doc_hash_id}"
payload := strings.NewReader("{\n \"supply_type\": \"Outward\",\n \"sub_supply_type\": \"Supply\",\n \"transporter_doc_date\": \"05-03-2025\",\n \"dispatch_from\": {\n \"addr_id\": -1,\n \"address_line1\": \"123 Street\",\n \"address_line2\": \"Apt 4B\",\n \"city\": \"City Name\",\n \"state\": \"State Name\",\n \"country\": \"Country Name\",\n \"pincode\": \"123456\"\n },\n \"dispatch_to\": {\n \"addr_id\": -1,\n \"address_line1\": \"123 Street\",\n \"address_line2\": \"Apt 4B\",\n \"city\": \"City Name\",\n \"state\": \"State Name\",\n \"country\": \"Country Name\",\n \"pincode\": \"123456\"\n },\n \"transport_mode\": \"Road\",\n \"vehicle_type\": \"Regular\",\n \"transaction_type\": \"Regular\",\n \"ship_to_gstin\": \"29ABCDE1234F1Z5\",\n \"sub_supply_type_description\": \"Supply of goods\",\n \"transporter_id\": \"123456\",\n \"transporter_name\": \"Transporter Name\",\n \"vehicle_number\": \"KA01AB1234\",\n \"transporter_doc_number\": \"123456\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.getswipe.in/api/partner/v2/ewaybill/{doc_hash_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"supply_type\": \"Outward\",\n \"sub_supply_type\": \"Supply\",\n \"transporter_doc_date\": \"05-03-2025\",\n \"dispatch_from\": {\n \"addr_id\": -1,\n \"address_line1\": \"123 Street\",\n \"address_line2\": \"Apt 4B\",\n \"city\": \"City Name\",\n \"state\": \"State Name\",\n \"country\": \"Country Name\",\n \"pincode\": \"123456\"\n },\n \"dispatch_to\": {\n \"addr_id\": -1,\n \"address_line1\": \"123 Street\",\n \"address_line2\": \"Apt 4B\",\n \"city\": \"City Name\",\n \"state\": \"State Name\",\n \"country\": \"Country Name\",\n \"pincode\": \"123456\"\n },\n \"transport_mode\": \"Road\",\n \"vehicle_type\": \"Regular\",\n \"transaction_type\": \"Regular\",\n \"ship_to_gstin\": \"29ABCDE1234F1Z5\",\n \"sub_supply_type_description\": \"Supply of goods\",\n \"transporter_id\": \"123456\",\n \"transporter_name\": \"Transporter Name\",\n \"vehicle_number\": \"KA01AB1234\",\n \"transporter_doc_number\": \"123456\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.getswipe.in/api/partner/v2/ewaybill/{doc_hash_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"supply_type\": \"Outward\",\n \"sub_supply_type\": \"Supply\",\n \"transporter_doc_date\": \"05-03-2025\",\n \"dispatch_from\": {\n \"addr_id\": -1,\n \"address_line1\": \"123 Street\",\n \"address_line2\": \"Apt 4B\",\n \"city\": \"City Name\",\n \"state\": \"State Name\",\n \"country\": \"Country Name\",\n \"pincode\": \"123456\"\n },\n \"dispatch_to\": {\n \"addr_id\": -1,\n \"address_line1\": \"123 Street\",\n \"address_line2\": \"Apt 4B\",\n \"city\": \"City Name\",\n \"state\": \"State Name\",\n \"country\": \"Country Name\",\n \"pincode\": \"123456\"\n },\n \"transport_mode\": \"Road\",\n \"vehicle_type\": \"Regular\",\n \"transaction_type\": \"Regular\",\n \"ship_to_gstin\": \"29ABCDE1234F1Z5\",\n \"sub_supply_type_description\": \"Supply of goods\",\n \"transporter_id\": \"123456\",\n \"transporter_name\": \"Transporter Name\",\n \"vehicle_number\": \"KA01AB1234\",\n \"transporter_doc_number\": \"123456\"\n}"
response = http.request(request)
puts response.read_body{
"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 Eway 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",
"vehicle_type": "Regular",
"transaction_type": "Regular",
"ship_to_gstin": "29ABCDE1234F1Z5",
"sub_supply_type_description": "Supply of goods",
"transporter_id": "123456",
"transporter_name": "Transporter Name",
"vehicle_number": "KA01AB1234",
"transporter_doc_number": "123456"
}
'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",
"vehicle_type": "Regular",
"transaction_type": "Regular",
"ship_to_gstin": "29ABCDE1234F1Z5",
"sub_supply_type_description": "Supply of goods",
"transporter_id": "123456",
"transporter_name": "Transporter Name",
"vehicle_number": "KA01AB1234",
"transporter_doc_number": "123456"
}
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',
vehicle_type: 'Regular',
transaction_type: 'Regular',
ship_to_gstin: '29ABCDE1234F1Z5',
sub_supply_type_description: 'Supply of goods',
transporter_id: '123456',
transporter_name: 'Transporter Name',
vehicle_number: 'KA01AB1234',
transporter_doc_number: '123456'
})
};
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));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.getswipe.in/api/partner/v2/ewaybill/{doc_hash_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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',
'vehicle_type' => 'Regular',
'transaction_type' => 'Regular',
'ship_to_gstin' => '29ABCDE1234F1Z5',
'sub_supply_type_description' => 'Supply of goods',
'transporter_id' => '123456',
'transporter_name' => 'Transporter Name',
'vehicle_number' => 'KA01AB1234',
'transporter_doc_number' => '123456'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.getswipe.in/api/partner/v2/ewaybill/{doc_hash_id}"
payload := strings.NewReader("{\n \"supply_type\": \"Outward\",\n \"sub_supply_type\": \"Supply\",\n \"transporter_doc_date\": \"05-03-2025\",\n \"dispatch_from\": {\n \"addr_id\": -1,\n \"address_line1\": \"123 Street\",\n \"address_line2\": \"Apt 4B\",\n \"city\": \"City Name\",\n \"state\": \"State Name\",\n \"country\": \"Country Name\",\n \"pincode\": \"123456\"\n },\n \"dispatch_to\": {\n \"addr_id\": -1,\n \"address_line1\": \"123 Street\",\n \"address_line2\": \"Apt 4B\",\n \"city\": \"City Name\",\n \"state\": \"State Name\",\n \"country\": \"Country Name\",\n \"pincode\": \"123456\"\n },\n \"transport_mode\": \"Road\",\n \"vehicle_type\": \"Regular\",\n \"transaction_type\": \"Regular\",\n \"ship_to_gstin\": \"29ABCDE1234F1Z5\",\n \"sub_supply_type_description\": \"Supply of goods\",\n \"transporter_id\": \"123456\",\n \"transporter_name\": \"Transporter Name\",\n \"vehicle_number\": \"KA01AB1234\",\n \"transporter_doc_number\": \"123456\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.getswipe.in/api/partner/v2/ewaybill/{doc_hash_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"supply_type\": \"Outward\",\n \"sub_supply_type\": \"Supply\",\n \"transporter_doc_date\": \"05-03-2025\",\n \"dispatch_from\": {\n \"addr_id\": -1,\n \"address_line1\": \"123 Street\",\n \"address_line2\": \"Apt 4B\",\n \"city\": \"City Name\",\n \"state\": \"State Name\",\n \"country\": \"Country Name\",\n \"pincode\": \"123456\"\n },\n \"dispatch_to\": {\n \"addr_id\": -1,\n \"address_line1\": \"123 Street\",\n \"address_line2\": \"Apt 4B\",\n \"city\": \"City Name\",\n \"state\": \"State Name\",\n \"country\": \"Country Name\",\n \"pincode\": \"123456\"\n },\n \"transport_mode\": \"Road\",\n \"vehicle_type\": \"Regular\",\n \"transaction_type\": \"Regular\",\n \"ship_to_gstin\": \"29ABCDE1234F1Z5\",\n \"sub_supply_type_description\": \"Supply of goods\",\n \"transporter_id\": \"123456\",\n \"transporter_name\": \"Transporter Name\",\n \"vehicle_number\": \"KA01AB1234\",\n \"transporter_doc_number\": \"123456\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.getswipe.in/api/partner/v2/ewaybill/{doc_hash_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"supply_type\": \"Outward\",\n \"sub_supply_type\": \"Supply\",\n \"transporter_doc_date\": \"05-03-2025\",\n \"dispatch_from\": {\n \"addr_id\": -1,\n \"address_line1\": \"123 Street\",\n \"address_line2\": \"Apt 4B\",\n \"city\": \"City Name\",\n \"state\": \"State Name\",\n \"country\": \"Country Name\",\n \"pincode\": \"123456\"\n },\n \"dispatch_to\": {\n \"addr_id\": -1,\n \"address_line1\": \"123 Street\",\n \"address_line2\": \"Apt 4B\",\n \"city\": \"City Name\",\n \"state\": \"State Name\",\n \"country\": \"Country Name\",\n \"pincode\": \"123456\"\n },\n \"transport_mode\": \"Road\",\n \"vehicle_type\": \"Regular\",\n \"transaction_type\": \"Regular\",\n \"ship_to_gstin\": \"29ABCDE1234F1Z5\",\n \"sub_supply_type_description\": \"Supply of goods\",\n \"transporter_id\": \"123456\",\n \"transporter_name\": \"Transporter Name\",\n \"vehicle_number\": \"KA01AB1234\",\n \"transporter_doc_number\": \"123456\"\n}"
response = http.request(request)
puts response.read_body{
"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 , where is your auth token.
Path Parameters
The hash id of the document
Body
Indicates whether the supply is outward (from the sender) or inward (to the sender)
Outward, Inward "Outward"
Specifies the nature of supply, such as sale, transfer, or job work.
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"
The date on which the transporter issued the document(DD-MM-YYYY)
"05-03-2025"
Dispatch From Address
Show child attributes
Show child attributes
Dispatch To Address
Show child attributes
Show child attributes
Mode of transportation used (e.g., road, rail, air, or ship)
Road, Rail, Air, Ship or Ship Cum Road/Rail "Road"
Specifies whether the vehicle is regular or special (e.g., over-dimensional cargo).
Regular, Over Dimensional Cargo "Regular"
Defines the type of transaction, such as regular, bill-to-ship-to, or bill-from-dispatch-from.
Regular, Bill To - Ship To, Bill From - Dispatch From, Combination of 2 and 3 "Regular"
GSTIN of the consignee, or 'URP' if unregistered. Mandatory when transaction_type is 'Bill To - Ship To' or 'Combination of 2 and 3'.
15"29ABCDE1234F1Z5"
Additional description of the sub-supply type.
"Supply of goods"
A unique identification number assigned to the transporter.
"123456"
The name of the transporter handling the shipment.
"Transporter Name"
The registration number of the vehicle carrying the goods.
"KA01AB1234"
A reference number of the document issued by the transporter.
"123456"