Calculate what this merchant is charged for a delivery
curl --request POST \
--url https://api-test.drop-hub.com/v2/external/shipment-price-estimates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pickup": {
"latitude": 24.7136,
"longitude": 46.6753
},
"delivery": {
"latitude": 24.774265,
"longitude": 46.738586
},
"destinationCityCode": "RUH"
}
'import requests
url = "https://api-test.drop-hub.com/v2/external/shipment-price-estimates"
payload = {
"pickup": {
"latitude": 24.7136,
"longitude": 46.6753
},
"delivery": {
"latitude": 24.774265,
"longitude": 46.738586
},
"destinationCityCode": "RUH"
}
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({
pickup: {latitude: 24.7136, longitude: 46.6753},
delivery: {latitude: 24.774265, longitude: 46.738586},
destinationCityCode: 'RUH'
})
};
fetch('https://api-test.drop-hub.com/v2/external/shipment-price-estimates', 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-test.drop-hub.com/v2/external/shipment-price-estimates",
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([
'pickup' => [
'latitude' => 24.7136,
'longitude' => 46.6753
],
'delivery' => [
'latitude' => 24.774265,
'longitude' => 46.738586
],
'destinationCityCode' => 'RUH'
]),
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-test.drop-hub.com/v2/external/shipment-price-estimates"
payload := strings.NewReader("{\n \"pickup\": {\n \"latitude\": 24.7136,\n \"longitude\": 46.6753\n },\n \"delivery\": {\n \"latitude\": 24.774265,\n \"longitude\": 46.738586\n },\n \"destinationCityCode\": \"RUH\"\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-test.drop-hub.com/v2/external/shipment-price-estimates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pickup\": {\n \"latitude\": 24.7136,\n \"longitude\": 46.6753\n },\n \"delivery\": {\n \"latitude\": 24.774265,\n \"longitude\": 46.738586\n },\n \"destinationCityCode\": \"RUH\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-test.drop-hub.com/v2/external/shipment-price-estimates")
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 \"pickup\": {\n \"latitude\": 24.7136,\n \"longitude\": 46.6753\n },\n \"delivery\": {\n \"latitude\": 24.774265,\n \"longitude\": 46.738586\n },\n \"destinationCityCode\": \"RUH\"\n}"
response = http.request(request)
puts response.read_body{
"distanceMetres": 2,
"price": 1,
"currency": "SAR"
}{
"type": "https://api.drop-hub.com/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drop-hub.com/problems/authentication-required",
"title": "Authentication required",
"status": 401,
"detail": "Authentication is required for this resource.",
"instance": "/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "AUTHENTICATION_REQUIRED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drop-hub.com/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drop-hub.com/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drop-hub.com/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drop-hub.com/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drop-hub.com/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drop-hub.com/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}External Price Estimates
Calculate what this merchant is charged for a delivery
Calculates authoritative route distance and returns the delivery price agreed with this merchant. DropHub internally verifies an eligible carrier and available driver; merchants never select or receive a carrier identifier. No calculation is persisted.
POST
/
v2
/
external
/
shipment-price-estimates
Calculate what this merchant is charged for a delivery
curl --request POST \
--url https://api-test.drop-hub.com/v2/external/shipment-price-estimates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pickup": {
"latitude": 24.7136,
"longitude": 46.6753
},
"delivery": {
"latitude": 24.774265,
"longitude": 46.738586
},
"destinationCityCode": "RUH"
}
'import requests
url = "https://api-test.drop-hub.com/v2/external/shipment-price-estimates"
payload = {
"pickup": {
"latitude": 24.7136,
"longitude": 46.6753
},
"delivery": {
"latitude": 24.774265,
"longitude": 46.738586
},
"destinationCityCode": "RUH"
}
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({
pickup: {latitude: 24.7136, longitude: 46.6753},
delivery: {latitude: 24.774265, longitude: 46.738586},
destinationCityCode: 'RUH'
})
};
fetch('https://api-test.drop-hub.com/v2/external/shipment-price-estimates', 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-test.drop-hub.com/v2/external/shipment-price-estimates",
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([
'pickup' => [
'latitude' => 24.7136,
'longitude' => 46.6753
],
'delivery' => [
'latitude' => 24.774265,
'longitude' => 46.738586
],
'destinationCityCode' => 'RUH'
]),
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-test.drop-hub.com/v2/external/shipment-price-estimates"
payload := strings.NewReader("{\n \"pickup\": {\n \"latitude\": 24.7136,\n \"longitude\": 46.6753\n },\n \"delivery\": {\n \"latitude\": 24.774265,\n \"longitude\": 46.738586\n },\n \"destinationCityCode\": \"RUH\"\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-test.drop-hub.com/v2/external/shipment-price-estimates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pickup\": {\n \"latitude\": 24.7136,\n \"longitude\": 46.6753\n },\n \"delivery\": {\n \"latitude\": 24.774265,\n \"longitude\": 46.738586\n },\n \"destinationCityCode\": \"RUH\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-test.drop-hub.com/v2/external/shipment-price-estimates")
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 \"pickup\": {\n \"latitude\": 24.7136,\n \"longitude\": 46.6753\n },\n \"delivery\": {\n \"latitude\": 24.774265,\n \"longitude\": 46.738586\n },\n \"destinationCityCode\": \"RUH\"\n}"
response = http.request(request)
puts response.read_body{
"distanceMetres": 2,
"price": 1,
"currency": "SAR"
}{
"type": "https://api.drop-hub.com/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drop-hub.com/problems/authentication-required",
"title": "Authentication required",
"status": 401,
"detail": "Authentication is required for this resource.",
"instance": "/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "AUTHENTICATION_REQUIRED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drop-hub.com/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drop-hub.com/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drop-hub.com/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drop-hub.com/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drop-hub.com/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drop-hub.com/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}Authorizations
OAuth 2.0 client-credentials flow for external machine-to-machine integrations.
Headers
Preferred response language when a localized representation is available.
Maximum string length:
64Example:
"en"
Body
application/json
Response
Current transient price estimate
What this merchant will be charged for this delivery. DropHub's carrier decision and commercial margin are internal and deliberately absent.
⌘I
