Create Delivery Request
curl --request POST \
--url https://api.usedroptrail.com/delivery-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_location": "<string>",
"to_location": "<string>",
"receiver_phone": "<string>",
"estimated_weight": 123,
"package_count": 123,
"description": "<string>",
"delivery_deadline": "<string>",
"is_interstate": true
}
'import requests
url = "https://api.usedroptrail.com/delivery-requests"
payload = {
"from_location": "<string>",
"to_location": "<string>",
"receiver_phone": "<string>",
"estimated_weight": 123,
"package_count": 123,
"description": "<string>",
"delivery_deadline": "<string>",
"is_interstate": True
}
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({
from_location: '<string>',
to_location: '<string>',
receiver_phone: '<string>',
estimated_weight: 123,
package_count: 123,
description: '<string>',
delivery_deadline: '<string>',
is_interstate: true
})
};
fetch('https://api.usedroptrail.com/delivery-requests', 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://api.usedroptrail.com/delivery-requests",
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([
'from_location' => '<string>',
'to_location' => '<string>',
'receiver_phone' => '<string>',
'estimated_weight' => 123,
'package_count' => 123,
'description' => '<string>',
'delivery_deadline' => '<string>',
'is_interstate' => true
]),
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://api.usedroptrail.com/delivery-requests"
payload := strings.NewReader("{\n \"from_location\": \"<string>\",\n \"to_location\": \"<string>\",\n \"receiver_phone\": \"<string>\",\n \"estimated_weight\": 123,\n \"package_count\": 123,\n \"description\": \"<string>\",\n \"delivery_deadline\": \"<string>\",\n \"is_interstate\": true\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://api.usedroptrail.com/delivery-requests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from_location\": \"<string>\",\n \"to_location\": \"<string>\",\n \"receiver_phone\": \"<string>\",\n \"estimated_weight\": 123,\n \"package_count\": 123,\n \"description\": \"<string>\",\n \"delivery_deadline\": \"<string>\",\n \"is_interstate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usedroptrail.com/delivery-requests")
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 \"from_location\": \"<string>\",\n \"to_location\": \"<string>\",\n \"receiver_phone\": \"<string>\",\n \"estimated_weight\": 123,\n \"package_count\": 123,\n \"description\": \"<string>\",\n \"delivery_deadline\": \"<string>\",\n \"is_interstate\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"created_at": "<string>",
"sender_id": "<string>",
"estimated_price": 123
}Delivery Requests
Create Delivery Request
Create a new delivery request
POST
/
delivery-requests
Create Delivery Request
curl --request POST \
--url https://api.usedroptrail.com/delivery-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_location": "<string>",
"to_location": "<string>",
"receiver_phone": "<string>",
"estimated_weight": 123,
"package_count": 123,
"description": "<string>",
"delivery_deadline": "<string>",
"is_interstate": true
}
'import requests
url = "https://api.usedroptrail.com/delivery-requests"
payload = {
"from_location": "<string>",
"to_location": "<string>",
"receiver_phone": "<string>",
"estimated_weight": 123,
"package_count": 123,
"description": "<string>",
"delivery_deadline": "<string>",
"is_interstate": True
}
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({
from_location: '<string>',
to_location: '<string>',
receiver_phone: '<string>',
estimated_weight: 123,
package_count: 123,
description: '<string>',
delivery_deadline: '<string>',
is_interstate: true
})
};
fetch('https://api.usedroptrail.com/delivery-requests', 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://api.usedroptrail.com/delivery-requests",
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([
'from_location' => '<string>',
'to_location' => '<string>',
'receiver_phone' => '<string>',
'estimated_weight' => 123,
'package_count' => 123,
'description' => '<string>',
'delivery_deadline' => '<string>',
'is_interstate' => true
]),
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://api.usedroptrail.com/delivery-requests"
payload := strings.NewReader("{\n \"from_location\": \"<string>\",\n \"to_location\": \"<string>\",\n \"receiver_phone\": \"<string>\",\n \"estimated_weight\": 123,\n \"package_count\": 123,\n \"description\": \"<string>\",\n \"delivery_deadline\": \"<string>\",\n \"is_interstate\": true\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://api.usedroptrail.com/delivery-requests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from_location\": \"<string>\",\n \"to_location\": \"<string>\",\n \"receiver_phone\": \"<string>\",\n \"estimated_weight\": 123,\n \"package_count\": 123,\n \"description\": \"<string>\",\n \"delivery_deadline\": \"<string>\",\n \"is_interstate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usedroptrail.com/delivery-requests")
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 \"from_location\": \"<string>\",\n \"to_location\": \"<string>\",\n \"receiver_phone\": \"<string>\",\n \"estimated_weight\": 123,\n \"package_count\": 123,\n \"description\": \"<string>\",\n \"delivery_deadline\": \"<string>\",\n \"is_interstate\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"created_at": "<string>",
"sender_id": "<string>",
"estimated_price": 123
}Create a new delivery request in the system. The request will be visible to delivery partners who can then place bids.
Request Body
string
required
Full pickup location address including street, city, state and postal code
string
required
Full delivery destination address including street, city, state and postal code
string
required
Phone number of the recipient in E.164 format (e.g. +1234567890)
number
required
Estimated weight of the package in kilograms (max 500kg)
integer
required
Number of packages in the delivery (max 50)
string
Detailed description of the package contents and any special handling instructions
string
ISO 8601 formatted deadline for delivery completion (must be in the future)
boolean
Whether the delivery crosses state lines. Additional fees may apply.
Response
string
The unique identifier for the delivery request
string
Current status of the delivery request. Initially set to “PENDING”
string
ISO 8601 timestamp when the request was created
string
ID of the user who created the request
number
Estimated delivery price in USD based on distance and weight
Example Request
{
"from_location": "123 Main St, Anytown, USA, 12345",
"to_location": "456 Elm St, Anytown, USA, 12345",
"receiver_phone": "+1234567890",
"estimated_weight": 10,
"package_count": 2,
"description": "Fragile items, please handle with care",
"delivery_deadline": "2025-01-31T12:00:00Z",
"is_interstate": false
}
⌘I