Skip to main content
POST
/
quote
cURL
curl --request POST \
  --url https://backend.unihop.app/api/v1/quote \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "pickup_address_street": "<string>",
  "pickup_address_city": "<string>",
  "pickup_address_country": "<string>",
  "pickup_name": "<string>",
  "dropoff_name": "<string>",
  "email": "jsmith@example.com",
  "currency": "<string>",
  "pickup_address_number": "<string>",
  "pickup_address_secondary_number": "<string>",
  "pickup_address_county": "<string>",
  "pickup_address_state": "<string>",
  "pickup_address_postal_code": "<string>",
  "pickup_address_latitude": 123,
  "pickup_address_longitude": 123,
  "pickup_phone_number": "<string>",
  "pickup_instructions": "<string>",
  "dropoff_start_time": "2023-11-07T05:31:56Z",
  "pickup_start_time": "2023-11-07T05:31:56Z",
  "weight": 1,
  "dropoff_address_street": "<string>",
  "dropoff_address_city": "<string>",
  "dropoff_address_country": "<string>",
  "dropoff_address_number": "<string>",
  "dropoff_address_secondary_number": "<string>",
  "dropoff_address_county": "<string>",
  "dropoff_address_state": "<string>",
  "dropoff_address_postal_code": "<string>",
  "dropoff_address_latitude": 123,
  "dropoff_address_longitude": 123,
  "dropoff_phone_number": "<string>",
  "dropoff_instructions": "<string>",
  "dropoff_email": "jsmith@example.com",
  "package_description": "<string>",
  "package_requirements": [],
  "items": [
    {
      "name": "<string>",
      "quantity": 123,
      "description": "<string>",
      "external_id": "<string>",
      "external_instance_id": "<string>",
      "price": 123,
      "barcode": "<string>"
    }
  ],
  "items_count": 123,
  "delivery_date": "2023-12-25",
  "delivery_start_time": "<string>",
  "delivery_end_time": "<string>",
  "package_value": 1,
  "tip": 1,
  "partner_reference": "<string>",
  "partner_payload": {}
}
'
import requests

url = "https://backend.unihop.app/api/v1/quote"

payload = {
"pickup_address_street": "<string>",
"pickup_address_city": "<string>",
"pickup_address_country": "<string>",
"pickup_name": "<string>",
"dropoff_name": "<string>",
"email": "jsmith@example.com",
"currency": "<string>",
"pickup_address_number": "<string>",
"pickup_address_secondary_number": "<string>",
"pickup_address_county": "<string>",
"pickup_address_state": "<string>",
"pickup_address_postal_code": "<string>",
"pickup_address_latitude": 123,
"pickup_address_longitude": 123,
"pickup_phone_number": "<string>",
"pickup_instructions": "<string>",
"dropoff_start_time": "2023-11-07T05:31:56Z",
"pickup_start_time": "2023-11-07T05:31:56Z",
"weight": 1,
"dropoff_address_street": "<string>",
"dropoff_address_city": "<string>",
"dropoff_address_country": "<string>",
"dropoff_address_number": "<string>",
"dropoff_address_secondary_number": "<string>",
"dropoff_address_county": "<string>",
"dropoff_address_state": "<string>",
"dropoff_address_postal_code": "<string>",
"dropoff_address_latitude": 123,
"dropoff_address_longitude": 123,
"dropoff_phone_number": "<string>",
"dropoff_instructions": "<string>",
"dropoff_email": "jsmith@example.com",
"package_description": "<string>",
"package_requirements": [],
"items": [
{
"name": "<string>",
"quantity": 123,
"description": "<string>",
"external_id": "<string>",
"external_instance_id": "<string>",
"price": 123,
"barcode": "<string>"
}
],
"items_count": 123,
"delivery_date": "2023-12-25",
"delivery_start_time": "<string>",
"delivery_end_time": "<string>",
"package_value": 1,
"tip": 1,
"partner_reference": "<string>",
"partner_payload": {}
}
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_address_street: '<string>',
pickup_address_city: '<string>',
pickup_address_country: '<string>',
pickup_name: '<string>',
dropoff_name: '<string>',
email: 'jsmith@example.com',
currency: '<string>',
pickup_address_number: '<string>',
pickup_address_secondary_number: '<string>',
pickup_address_county: '<string>',
pickup_address_state: '<string>',
pickup_address_postal_code: '<string>',
pickup_address_latitude: 123,
pickup_address_longitude: 123,
pickup_phone_number: '<string>',
pickup_instructions: '<string>',
dropoff_start_time: '2023-11-07T05:31:56Z',
pickup_start_time: '2023-11-07T05:31:56Z',
weight: 1,
dropoff_address_street: '<string>',
dropoff_address_city: '<string>',
dropoff_address_country: '<string>',
dropoff_address_number: '<string>',
dropoff_address_secondary_number: '<string>',
dropoff_address_county: '<string>',
dropoff_address_state: '<string>',
dropoff_address_postal_code: '<string>',
dropoff_address_latitude: 123,
dropoff_address_longitude: 123,
dropoff_phone_number: '<string>',
dropoff_instructions: '<string>',
dropoff_email: 'jsmith@example.com',
package_description: '<string>',
package_requirements: [],
items: [
{
name: '<string>',
quantity: 123,
description: '<string>',
external_id: '<string>',
external_instance_id: '<string>',
price: 123,
barcode: '<string>'
}
],
items_count: 123,
delivery_date: '2023-12-25',
delivery_start_time: '<string>',
delivery_end_time: '<string>',
package_value: 1,
tip: 1,
partner_reference: '<string>',
partner_payload: {}
})
};

fetch('https://backend.unihop.app/api/v1/quote', 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://backend.unihop.app/api/v1/quote",
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_address_street' => '<string>',
'pickup_address_city' => '<string>',
'pickup_address_country' => '<string>',
'pickup_name' => '<string>',
'dropoff_name' => '<string>',
'email' => 'jsmith@example.com',
'currency' => '<string>',
'pickup_address_number' => '<string>',
'pickup_address_secondary_number' => '<string>',
'pickup_address_county' => '<string>',
'pickup_address_state' => '<string>',
'pickup_address_postal_code' => '<string>',
'pickup_address_latitude' => 123,
'pickup_address_longitude' => 123,
'pickup_phone_number' => '<string>',
'pickup_instructions' => '<string>',
'dropoff_start_time' => '2023-11-07T05:31:56Z',
'pickup_start_time' => '2023-11-07T05:31:56Z',
'weight' => 1,
'dropoff_address_street' => '<string>',
'dropoff_address_city' => '<string>',
'dropoff_address_country' => '<string>',
'dropoff_address_number' => '<string>',
'dropoff_address_secondary_number' => '<string>',
'dropoff_address_county' => '<string>',
'dropoff_address_state' => '<string>',
'dropoff_address_postal_code' => '<string>',
'dropoff_address_latitude' => 123,
'dropoff_address_longitude' => 123,
'dropoff_phone_number' => '<string>',
'dropoff_instructions' => '<string>',
'dropoff_email' => 'jsmith@example.com',
'package_description' => '<string>',
'package_requirements' => [

],
'items' => [
[
'name' => '<string>',
'quantity' => 123,
'description' => '<string>',
'external_id' => '<string>',
'external_instance_id' => '<string>',
'price' => 123,
'barcode' => '<string>'
]
],
'items_count' => 123,
'delivery_date' => '2023-12-25',
'delivery_start_time' => '<string>',
'delivery_end_time' => '<string>',
'package_value' => 1,
'tip' => 1,
'partner_reference' => '<string>',
'partner_payload' => [

]
]),
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://backend.unihop.app/api/v1/quote"

payload := strings.NewReader("{\n \"pickup_address_street\": \"<string>\",\n \"pickup_address_city\": \"<string>\",\n \"pickup_address_country\": \"<string>\",\n \"pickup_name\": \"<string>\",\n \"dropoff_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"currency\": \"<string>\",\n \"pickup_address_number\": \"<string>\",\n \"pickup_address_secondary_number\": \"<string>\",\n \"pickup_address_county\": \"<string>\",\n \"pickup_address_state\": \"<string>\",\n \"pickup_address_postal_code\": \"<string>\",\n \"pickup_address_latitude\": 123,\n \"pickup_address_longitude\": 123,\n \"pickup_phone_number\": \"<string>\",\n \"pickup_instructions\": \"<string>\",\n \"dropoff_start_time\": \"2023-11-07T05:31:56Z\",\n \"pickup_start_time\": \"2023-11-07T05:31:56Z\",\n \"weight\": 1,\n \"dropoff_address_street\": \"<string>\",\n \"dropoff_address_city\": \"<string>\",\n \"dropoff_address_country\": \"<string>\",\n \"dropoff_address_number\": \"<string>\",\n \"dropoff_address_secondary_number\": \"<string>\",\n \"dropoff_address_county\": \"<string>\",\n \"dropoff_address_state\": \"<string>\",\n \"dropoff_address_postal_code\": \"<string>\",\n \"dropoff_address_latitude\": 123,\n \"dropoff_address_longitude\": 123,\n \"dropoff_phone_number\": \"<string>\",\n \"dropoff_instructions\": \"<string>\",\n \"dropoff_email\": \"jsmith@example.com\",\n \"package_description\": \"<string>\",\n \"package_requirements\": [],\n \"items\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 123,\n \"description\": \"<string>\",\n \"external_id\": \"<string>\",\n \"external_instance_id\": \"<string>\",\n \"price\": 123,\n \"barcode\": \"<string>\"\n }\n ],\n \"items_count\": 123,\n \"delivery_date\": \"2023-12-25\",\n \"delivery_start_time\": \"<string>\",\n \"delivery_end_time\": \"<string>\",\n \"package_value\": 1,\n \"tip\": 1,\n \"partner_reference\": \"<string>\",\n \"partner_payload\": {}\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://backend.unihop.app/api/v1/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pickup_address_street\": \"<string>\",\n \"pickup_address_city\": \"<string>\",\n \"pickup_address_country\": \"<string>\",\n \"pickup_name\": \"<string>\",\n \"dropoff_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"currency\": \"<string>\",\n \"pickup_address_number\": \"<string>\",\n \"pickup_address_secondary_number\": \"<string>\",\n \"pickup_address_county\": \"<string>\",\n \"pickup_address_state\": \"<string>\",\n \"pickup_address_postal_code\": \"<string>\",\n \"pickup_address_latitude\": 123,\n \"pickup_address_longitude\": 123,\n \"pickup_phone_number\": \"<string>\",\n \"pickup_instructions\": \"<string>\",\n \"dropoff_start_time\": \"2023-11-07T05:31:56Z\",\n \"pickup_start_time\": \"2023-11-07T05:31:56Z\",\n \"weight\": 1,\n \"dropoff_address_street\": \"<string>\",\n \"dropoff_address_city\": \"<string>\",\n \"dropoff_address_country\": \"<string>\",\n \"dropoff_address_number\": \"<string>\",\n \"dropoff_address_secondary_number\": \"<string>\",\n \"dropoff_address_county\": \"<string>\",\n \"dropoff_address_state\": \"<string>\",\n \"dropoff_address_postal_code\": \"<string>\",\n \"dropoff_address_latitude\": 123,\n \"dropoff_address_longitude\": 123,\n \"dropoff_phone_number\": \"<string>\",\n \"dropoff_instructions\": \"<string>\",\n \"dropoff_email\": \"jsmith@example.com\",\n \"package_description\": \"<string>\",\n \"package_requirements\": [],\n \"items\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 123,\n \"description\": \"<string>\",\n \"external_id\": \"<string>\",\n \"external_instance_id\": \"<string>\",\n \"price\": 123,\n \"barcode\": \"<string>\"\n }\n ],\n \"items_count\": 123,\n \"delivery_date\": \"2023-12-25\",\n \"delivery_start_time\": \"<string>\",\n \"delivery_end_time\": \"<string>\",\n \"package_value\": 1,\n \"tip\": 1,\n \"partner_reference\": \"<string>\",\n \"partner_payload\": {}\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://backend.unihop.app/api/v1/quote")

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_address_street\": \"<string>\",\n \"pickup_address_city\": \"<string>\",\n \"pickup_address_country\": \"<string>\",\n \"pickup_name\": \"<string>\",\n \"dropoff_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"currency\": \"<string>\",\n \"pickup_address_number\": \"<string>\",\n \"pickup_address_secondary_number\": \"<string>\",\n \"pickup_address_county\": \"<string>\",\n \"pickup_address_state\": \"<string>\",\n \"pickup_address_postal_code\": \"<string>\",\n \"pickup_address_latitude\": 123,\n \"pickup_address_longitude\": 123,\n \"pickup_phone_number\": \"<string>\",\n \"pickup_instructions\": \"<string>\",\n \"dropoff_start_time\": \"2023-11-07T05:31:56Z\",\n \"pickup_start_time\": \"2023-11-07T05:31:56Z\",\n \"weight\": 1,\n \"dropoff_address_street\": \"<string>\",\n \"dropoff_address_city\": \"<string>\",\n \"dropoff_address_country\": \"<string>\",\n \"dropoff_address_number\": \"<string>\",\n \"dropoff_address_secondary_number\": \"<string>\",\n \"dropoff_address_county\": \"<string>\",\n \"dropoff_address_state\": \"<string>\",\n \"dropoff_address_postal_code\": \"<string>\",\n \"dropoff_address_latitude\": 123,\n \"dropoff_address_longitude\": 123,\n \"dropoff_phone_number\": \"<string>\",\n \"dropoff_instructions\": \"<string>\",\n \"dropoff_email\": \"jsmith@example.com\",\n \"package_description\": \"<string>\",\n \"package_requirements\": [],\n \"items\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 123,\n \"description\": \"<string>\",\n \"external_id\": \"<string>\",\n \"external_instance_id\": \"<string>\",\n \"price\": 123,\n \"barcode\": \"<string>\"\n }\n ],\n \"items_count\": 123,\n \"delivery_date\": \"2023-12-25\",\n \"delivery_start_time\": \"<string>\",\n \"delivery_end_time\": \"<string>\",\n \"package_value\": 1,\n \"tip\": 1,\n \"partner_reference\": \"<string>\",\n \"partner_payload\": {}\n}"

response = http.request(request)
puts response.read_body
{
  "message": "Quote created successfully",
  "data": {
    "price": {
      "delivery_fee": 12.5,
      "tip": 23,
      "currency": "USD"
    },
    "distance": 0.61
  }
}
{
"error": "<string>",
"message": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Delivery details to quote

pickup_address_street
string
required

Street name of the pickup address.

pickup_address_city
string
required

City of the pickup address.

pickup_address_country
string
required

Country of the pickup address.

pickup_name
string
required

Name of the contact person at the pickup location.

dropoff_name
string
required

Name of the contact person at the dropoff location.

email
string<email>
required

Customer email address for notifications.

currency
string
required

The intended currency.

Maximum string length: 3
pickup_address_number
string

Street number of the pickup address.

pickup_address_secondary_number
string

Apartment or suite number for the pickup address.

pickup_address_county
string

County of the pickup address.

pickup_address_state
string

State of the pickup address.

pickup_address_postal_code
string

Postal or ZIP code of the pickup address.

pickup_address_latitude
number

Latitude coordinate of the pickup address.

pickup_address_longitude
number

Longitude coordinate of the pickup address.

pickup_phone_number
string

Phone number of the pickup contact person.

Maximum string length: 15
pickup_instructions
string

Additional instructions for the pickup.

Maximum string length: 512
dropoff_start_time
string<date-time>

Start of the dropoff window as an ISO 8601 UTC datetime with a trailing Z (YYYY-MM-DDTHH:MM:SSZ). Numeric offsets (e.g. +01:00) are not accepted. Required unless package_delivery_mode is NOW.

pickup_start_time
string<date-time>

Start of the pickup window as an ISO 8601 UTC datetime with a trailing Z (YYYY-MM-DDTHH:MM:SSZ). Numeric offsets (e.g. +01:00) are not accepted.

weight
number

Weight of the package in lbs.

Required range: x >= 0
dimensions
object

Dimensions of the package.

dropoff_address_street
string

Street name of the dropoff address.

dropoff_address_city
string

City of the dropoff address.

dropoff_address_country
string

Country of the dropoff address.

dropoff_address_number
string

Street number of the dropoff address.

dropoff_address_secondary_number
string

Apartment or suite number for the dropoff address.

dropoff_address_county
string

County of the dropoff address.

dropoff_address_state
string

State of the dropoff address.

dropoff_address_postal_code
string

Postal or ZIP code of the dropoff address.

dropoff_address_latitude
number

Latitude coordinate of the dropoff address.

dropoff_address_longitude
number

Longitude coordinate of the dropoff address.

dropoff_phone_number
string

Phone number of the dropoff contact person.

Maximum string length: 15
dropoff_instructions
string

Additional instructions for the dropoff.

Maximum string length: 512
dropoff_email
string<email>

Email address of the dropoff contact person.

package_minimum_vehicle_size
enum<string>

Minimum vehicle type required to transport the package.

Available options:
SEDAN,
CAR,
SUV,
PICKUP_TRUCK,
VAN,
TRUCK,
LARGE_VAN,
EXTRA_LARGE_VAN,
PICKUP
package_delivery_mode
enum<string>

Mode of delivery (NOW or SCHEDULED).

Available options:
NOW,
SCHEDULED
package_description
string

Description of the package contents.

Maximum string length: 512
package_requirements
enum<string>[]

Special delivery or pickup requirements.

Available options:
PHOTO_PROOF_OF_DELIVERY,
SIGNATURE_PROOF_OF_DELIVERY,
TWO_PERSON_TEAM
items
object[]

List of items included in the delivery.

items_count
integer

Total count of items.

delivery_date
string<date>

Delivery date (YYYY-MM-DD). Required unless package_delivery_mode is NOW. If a time component is included it is honoured; otherwise dropoff_start_time is used to determine the scheduled moment.

delivery_start_time
string<time>

Start time of the delivery window (HH:MM:SS).

delivery_end_time
string<time>

End time of the delivery window (HH:MM:SS).

package_value
number<float>

Monetary value of the package.

Required range: x >= 0
tip
number<float>

Optional tip for the delivery.

Required range: x >= 0
partner_reference
string

Custom reference provided by the partner.

Maximum string length: 256
partner_payload
object

Optional custom payload for partner systems.

delivery_style
enum<string> | null

The delivery style. Can be Standard or Special Handling. Please contact us to unlock more delivery styles and associated features.

Available options:
Standard,
Special Handling

Response

Quote returned successfully

Successful response returned for a delivery quote.

message
string
required
Example:

"Quote created successfully"

data
object
required