curl --request PATCH \
--url https://{defaultHost}/v1/shipments/{id}/quote \
--header 'Authorization: Bearer <token>'import requests
url = "https://{defaultHost}/v1/shipments/{id}/quote"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{defaultHost}/v1/shipments/{id}/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://{defaultHost}/v1/shipments/{id}/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
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://{defaultHost}/v1/shipments/{id}/quote"
req, _ := http.NewRequest("PATCH", 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.patch("https://{defaultHost}/v1/shipments/{id}/quote")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/shipments/{id}/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3565d27b-39ea-4cec-98f7-7cd1627dc6a8",
"object": "shipment",
"carrier": null,
"carrier_messages": [
{
"carrier": "Shippo",
"messages": [
"Carrier account shippo_sendle_account doesn't support one or more shipment options",
"Carrier account shippo_correos_account doesn't support one or more shipment options",
"Carrier account shippo_dpd_de_account doesn't support one or more shipment options",
"Carrier account shippo_dpd_uk_account doesn't support one or more shipment options",
"Carrier account shippo_colissimo_account doesn't support one or more shipment options",
"Carrier account shippo_deutsche_post_account doesn't support one or more shipment options",
"Carrier account shippo_canada_post_master doesn't support one or more shipment options",
"Carrier account COURIERSPLEASE_SHIPPO_TIER_1 doesn't support one or more shipment options",
"Carrier account shippo_chronopost_account doesn't support one or more shipment options",
"Carrier account shippo_hermes_uk_account doesn't support one or more shipment options"
]
},
{
"carrier": "UPS",
"messages": [
"Shipment origin is out of service area for UPS Master account from CA",
"Hard: Too Many Requests"
]
},
{
"carrier": "DHLExpress",
"messages": [
"Shippo's DHL Express master account doesn't support shipments to inside of the US"
]
},
{
"carrier": "ShippoCommon",
"messages": [
"Shipment origin or destination state is out of the service area for LSO."
]
}
],
"contact_validations": {
"from_contact": {
"valid": false,
"messages": []
},
"to_contact": {
"valid": false,
"messages": []
}
},
"dimensions": {
"length": 10,
"width": 8,
"height": 5,
"unit": "in"
},
"eta": null,
"inherit_weight": false,
"label_file_type": "PDF",
"label_url": null,
"live_mode": true,
"rates": [
{
"id": "20c81380f19143c2bc35e16dd34f2f5d",
"amount": 644,
"currency": "usd",
"provider": "USPS",
"service_name": "Ground Advantage",
"estimated_days": 2,
"tags": [
"cheapest",
"bestvalue"
],
"duration_terms": "Delivery in 2 to 5 days.",
"provider_logo_url": "https://shippo-static.s3.amazonaws.com/providers/75/USPS.png"
},
{
"id": "e4456d3eac6d4297a28fa0e2bf3deeab",
"amount": 3015,
"currency": "usd",
"provider": "USPS",
"service_name": "Priority Mail Express",
"estimated_days": 1,
"tags": [
"fastest"
],
"duration_terms": "Overnight delivery to most U.S. locations.",
"provider_logo_url": "https://shippo-static.s3.amazonaws.com/providers/75/USPS.png"
},
{
"id": "ff4b976edda046ceb3250a07cc9fc763",
"amount": 781,
"currency": "usd",
"provider": "USPS",
"service_name": "Priority Mail",
"estimated_days": 2,
"tags": [],
"duration_terms": "Delivery within 1, 2, or 3 days based on where your package started and where it’s being sent.",
"provider_logo_url": "https://shippo-static.s3.amazonaws.com/providers/75/USPS.png"
}
],
"selected_rate": null,
"shipping_date": 1789344000,
"status": "quoted",
"tracking_number": null,
"tracking_status": null,
"tracking_url": null,
"weight": "2.0",
"weight_unit": "lb",
"carrier_parcel_template_token": null,
"from_contact": "2213ed29-1360-464d-aeb6-19e3c4f30951",
"fulfillment": "7c2c1660-68ba-40ff-92fb-91a95124b65f",
"parcel_template": null,
"shipping_provider": "e8a0baf2-e101-47e1-b339-0ab6a09430a3",
"to_contact": "4448c6d2-e2d8-4c88-b6de-51744227a339",
"created_at": 1789424623,
"updated_at": 1789424623
}Quote
Fetches shipping rates for a specific shipment.
curl --request PATCH \
--url https://{defaultHost}/v1/shipments/{id}/quote \
--header 'Authorization: Bearer <token>'import requests
url = "https://{defaultHost}/v1/shipments/{id}/quote"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{defaultHost}/v1/shipments/{id}/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://{defaultHost}/v1/shipments/{id}/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
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://{defaultHost}/v1/shipments/{id}/quote"
req, _ := http.NewRequest("PATCH", 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.patch("https://{defaultHost}/v1/shipments/{id}/quote")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/shipments/{id}/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3565d27b-39ea-4cec-98f7-7cd1627dc6a8",
"object": "shipment",
"carrier": null,
"carrier_messages": [
{
"carrier": "Shippo",
"messages": [
"Carrier account shippo_sendle_account doesn't support one or more shipment options",
"Carrier account shippo_correos_account doesn't support one or more shipment options",
"Carrier account shippo_dpd_de_account doesn't support one or more shipment options",
"Carrier account shippo_dpd_uk_account doesn't support one or more shipment options",
"Carrier account shippo_colissimo_account doesn't support one or more shipment options",
"Carrier account shippo_deutsche_post_account doesn't support one or more shipment options",
"Carrier account shippo_canada_post_master doesn't support one or more shipment options",
"Carrier account COURIERSPLEASE_SHIPPO_TIER_1 doesn't support one or more shipment options",
"Carrier account shippo_chronopost_account doesn't support one or more shipment options",
"Carrier account shippo_hermes_uk_account doesn't support one or more shipment options"
]
},
{
"carrier": "UPS",
"messages": [
"Shipment origin is out of service area for UPS Master account from CA",
"Hard: Too Many Requests"
]
},
{
"carrier": "DHLExpress",
"messages": [
"Shippo's DHL Express master account doesn't support shipments to inside of the US"
]
},
{
"carrier": "ShippoCommon",
"messages": [
"Shipment origin or destination state is out of the service area for LSO."
]
}
],
"contact_validations": {
"from_contact": {
"valid": false,
"messages": []
},
"to_contact": {
"valid": false,
"messages": []
}
},
"dimensions": {
"length": 10,
"width": 8,
"height": 5,
"unit": "in"
},
"eta": null,
"inherit_weight": false,
"label_file_type": "PDF",
"label_url": null,
"live_mode": true,
"rates": [
{
"id": "20c81380f19143c2bc35e16dd34f2f5d",
"amount": 644,
"currency": "usd",
"provider": "USPS",
"service_name": "Ground Advantage",
"estimated_days": 2,
"tags": [
"cheapest",
"bestvalue"
],
"duration_terms": "Delivery in 2 to 5 days.",
"provider_logo_url": "https://shippo-static.s3.amazonaws.com/providers/75/USPS.png"
},
{
"id": "e4456d3eac6d4297a28fa0e2bf3deeab",
"amount": 3015,
"currency": "usd",
"provider": "USPS",
"service_name": "Priority Mail Express",
"estimated_days": 1,
"tags": [
"fastest"
],
"duration_terms": "Overnight delivery to most U.S. locations.",
"provider_logo_url": "https://shippo-static.s3.amazonaws.com/providers/75/USPS.png"
},
{
"id": "ff4b976edda046ceb3250a07cc9fc763",
"amount": 781,
"currency": "usd",
"provider": "USPS",
"service_name": "Priority Mail",
"estimated_days": 2,
"tags": [],
"duration_terms": "Delivery within 1, 2, or 3 days based on where your package started and where it’s being sent.",
"provider_logo_url": "https://shippo-static.s3.amazonaws.com/providers/75/USPS.png"
}
],
"selected_rate": null,
"shipping_date": 1789344000,
"status": "quoted",
"tracking_number": null,
"tracking_status": null,
"tracking_url": null,
"weight": "2.0",
"weight_unit": "lb",
"carrier_parcel_template_token": null,
"from_contact": "2213ed29-1360-464d-aeb6-19e3c4f30951",
"fulfillment": "7c2c1660-68ba-40ff-92fb-91a95124b65f",
"parcel_template": null,
"shipping_provider": "e8a0baf2-e101-47e1-b339-0ab6a09430a3",
"to_contact": "4448c6d2-e2d8-4c88-b6de-51744227a339",
"created_at": 1789424623,
"updated_at": 1789424623
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Success
The UUID of the specific object.
A string describing the object type returned.
The file type for the shipping label – one of PDF, PDF_A4, PDF_A6, PDF_4x6, PDF_4x8, PNG, ZPLII.
Expandable – The associated parcel template ID.
The weight of the parcel.
The unit of the weight – one of g, kg, lb, oz.
When true, inherit the weight from the fulfillment.
The date the shipment will be tendered to the carrier. Measured in seconds since the Unix epoch.
The dimensions of the parcel. Defaults to the parcel template's dimensions when parcel_template is set and no dimensions are given, and to the carrier's own preset when carrier_parcel_template_token resolves to a fixed-size package.
Show child attributes
Show child attributes
The token of a carrier parcel template (e.g. USPS_SmallFlatRateBox), resolved against this shipment's own shipping provider. Defaults to the parcel template's token when parcel_template is set, and can be cleared or overridden by passing it explicitly. When it resolves to a fixed-size package its dimensions are used, and quoted rates cover only that carrier — read the carrier itself from the parcel template, or from the selected rate once one is chosen. Cannot be changed after the label is purchased.
The current status of this shipment – one of draft, quoted, purchased, voided.
Whether or not this shipment was created in live mode.
The URL for the purchased shipping label.
The tracking number for this shipment.
The URL to track this shipment.
The shipping carrier of the selected rate.
Messages from carriers about this shipment.
Show child attributes
Show child attributes
Contact validation results returned by the shipping provider. Only available after quoting.
Show child attributes
Show child attributes
The current tracking status – one of unknown, pre_transit, in_transit, delivered, returned, failure.
The estimated time of arrival.
The available shipping rates for this shipment.
Show child attributes
Show child attributes
The selected shipping rate for this shipment.
Show child attributes
Show child attributes
Expandable – The associated fulfillment ID.
Expandable – The associated shipping provider ID.
Expandable – The associated contact ID.
Expandable – The associated contact ID.
Time at which the object was created. Measured in seconds since the Unix epoch.
Time at which the object was last updated. Measured in seconds since the Unix epoch.
Was this page helpful?