Skip to main content
POST
/
v2
/
ewaybill
/
{doc_hash_id}
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": {}
}
To create an EwayBill first connect to EwayBill Portal.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer , where is your auth token.

Path Parameters

doc_hash_id
string
required

The hash id of the document

Body

application/json
supply_type
enum<string>
required

Indicates whether the supply is outward (from the sender) or inward (to the sender)

Available options:
Outward,
Inward
Example:

"Outward"

sub_supply_type
enum<string>
required

Specifies the nature of supply, such as sale, transfer, or job work.

Available options:
Supply,
Export,
Job Work,
SKD/CKD/Lots,
Recipient Not Known,
For Own Use,
Job Work Returns,
Sales Returns,
Exhibition or fairs,
Line Sales,
Others
Example:

"Supply"

transporter_doc_date
string
required

The date on which the transporter issued the document(DD-MM-YYYY)

Example:

"05-03-2025"

dispatch_from
object
required

Dispatch From Address

dispatch_to
object
required

Dispatch To Address

transport_mode
enum<string>
required

Mode of transportation used (e.g., road, rail, air, or ship)

Available options:
Road,
Rail,
Air,
Ship or Ship Cum Road/Rail
Example:

"Road"

vehicle_type
enum<string>

Specifies whether the vehicle is regular or special (e.g., over-dimensional cargo).

Available options:
Regular,
Over Dimensional Cargo
Example:

"Regular"

transaction_type
enum<string>

Defines the type of transaction, such as regular, bill-to-ship-to, or bill-from-dispatch-from.

Available options:
Regular,
Bill To - Ship To,
Bill From - Dispatch From,
Combination of 2 and 3
Example:

"Regular"

ship_to_gstin
string

GSTIN of the consignee, or 'URP' if unregistered. Mandatory when transaction_type is 'Bill To - Ship To' or 'Combination of 2 and 3'.

Maximum string length: 15
Example:

"29ABCDE1234F1Z5"

sub_supply_type_description
string

Additional description of the sub-supply type.

Example:

"Supply of goods"

transporter_id
string

A unique identification number assigned to the transporter.

Example:

"123456"

transporter_name
string

The name of the transporter handling the shipment.

Example:

"Transporter Name"

vehicle_number
string

The registration number of the vehicle carrying the goods.

Example:

"KA01AB1234"

transporter_doc_number
string

A reference number of the document issued by the transporter.

Example:

"123456"

Response

Success

success
boolean

Success

Example:

true

message
string

Message

Example:

"Eway Bill created successfully"