cURL
curl --request GET \
--url https://backend.unihop.app/api/v1/orders/{uid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://backend.unihop.app/api/v1/orders/{uid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://backend.unihop.app/api/v1/orders/{uid}', 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/orders/{uid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://backend.unihop.app/api/v1/orders/{uid}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://backend.unihop.app/api/v1/orders/{uid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.unihop.app/api/v1/orders/{uid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"uid": "job_123abc456def",
"status": "DROPOFF_COMPLETE",
"partner_reference": "partner_ref_78910",
"price": {
"value": 123,
"currency": "USD"
},
"distance": {
"value": 123,
"unit": "<string>"
},
"partner_payload": {
"custom_field": "custom_value"
},
"pickup_name": "<string>",
"dropoff_name": "<string>",
"delivery_date": "<string>",
"delivery_start_time": "<string>",
"driver_id": 123,
"driver_name": "<string>",
"driver_location": {
"lat": 123,
"lng": 123
},
"driver_dropoff_phone_number": "<string>",
"driver_pickup_phone_number": "<string>",
"driver_vehicle_make": "<string>",
"driver_vehicle_model": "<string>",
"driver_vehicle_year": 123,
"dropoff_time_estimated": "<string>",
"pickup_address_street": "<string>",
"pickup_address_city": "<string>",
"pickup_address_country": "<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>",
"email": "<string>",
"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": "<string>",
"package_description": "<string>",
"package_minimum_vehicle_size": "<string>",
"package_delivery_mode": "<string>",
"package_requirements": [
"<string>"
],
"items_count": 123,
"items": [
{}
],
"weight": 123,
"dimentions": {
"height": 123,
"length": 123,
"width": 123
},
"package_value": 123,
"pickup_start_time": "<string>",
"dropoff_start_time": "<string>",
"delivery_end_time": "<string>",
"dropoff_verification_image_url": "<string>",
"dropoff_signature_image_url": "<string>",
"cancellation_reason": "<string>",
"tip": 123,
"tracking_url": "https://track.unihop.app/ord_123456",
"expected_cancelation_fee": {
"amount": "0.00",
"currency": "<string>"
}
}
}{
"error": "<string>",
"message": "<string>"
}Endpoints
Get Order
Returns a single order by its unique identifier.
GET
/
orders
/
{uid}
cURL
curl --request GET \
--url https://backend.unihop.app/api/v1/orders/{uid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://backend.unihop.app/api/v1/orders/{uid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://backend.unihop.app/api/v1/orders/{uid}', 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/orders/{uid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://backend.unihop.app/api/v1/orders/{uid}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://backend.unihop.app/api/v1/orders/{uid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.unihop.app/api/v1/orders/{uid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"uid": "job_123abc456def",
"status": "DROPOFF_COMPLETE",
"partner_reference": "partner_ref_78910",
"price": {
"value": 123,
"currency": "USD"
},
"distance": {
"value": 123,
"unit": "<string>"
},
"partner_payload": {
"custom_field": "custom_value"
},
"pickup_name": "<string>",
"dropoff_name": "<string>",
"delivery_date": "<string>",
"delivery_start_time": "<string>",
"driver_id": 123,
"driver_name": "<string>",
"driver_location": {
"lat": 123,
"lng": 123
},
"driver_dropoff_phone_number": "<string>",
"driver_pickup_phone_number": "<string>",
"driver_vehicle_make": "<string>",
"driver_vehicle_model": "<string>",
"driver_vehicle_year": 123,
"dropoff_time_estimated": "<string>",
"pickup_address_street": "<string>",
"pickup_address_city": "<string>",
"pickup_address_country": "<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>",
"email": "<string>",
"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": "<string>",
"package_description": "<string>",
"package_minimum_vehicle_size": "<string>",
"package_delivery_mode": "<string>",
"package_requirements": [
"<string>"
],
"items_count": 123,
"items": [
{}
],
"weight": 123,
"dimentions": {
"height": 123,
"length": 123,
"width": 123
},
"package_value": 123,
"pickup_start_time": "<string>",
"dropoff_start_time": "<string>",
"delivery_end_time": "<string>",
"dropoff_verification_image_url": "<string>",
"dropoff_signature_image_url": "<string>",
"cancellation_reason": "<string>",
"tip": 123,
"tracking_url": "https://track.unihop.app/ord_123456",
"expected_cancelation_fee": {
"amount": "0.00",
"currency": "<string>"
}
}
}{
"error": "<string>",
"message": "<string>"
}⌘I

