cURL
curl https://api.goshippo.com/live-rates/settings/parcel-template \
-H "Authorization: ShippoToken <API_TOKEN>" \
-H "Content-Type: application/json"import shippo
from shippo.models import operations
s = shippo.Shippo(
api_key_header='ShippoToken <API_TOKEN>',
shippo_api_version='2018-02-08',
)
res = s.rates_at_checkout.get_default_parcel_template(request=operations.GetDefaultParcelTemplateRequest())
if res is not None:
# handle response
passimport { Shippo } from "shippo";
const shippo = new Shippo({
apiKeyHeader: "ShippoToken <API_TOKEN>",
shippoApiVersion: "2018-02-08",
});
async function run() {
const result = await shippo.ratesAtCheckout.getDefaultParcelTemplate({});
// Handle the result
console.log(result);
}
run();using Shippo;
using Shippo.Models.Components;
var sdk = new ShippoSDK(
apiKeyHeader: "ShippoToken <API_TOKEN>",
shippoApiVersion: "2018-02-08"
);
var res = await sdk.RatesAtCheckout.GetDefaultParcelTemplateAsync(shippoApiVersion: "2018-02-08");
// handle responsedeclare(strict_types=1);
require 'vendor/autoload.php';
use Shippo\API;
$sdk = API\Shippo::builder()
->setSecurity(
'ShippoToken <API_TOKEN>'
)
->setShippoApiVersion('2018-02-08')
->build();
$response = $sdk->ratesAtCheckout->getDefaultParcelTemplate(
shippoApiVersion: '2018-02-08'
);
if ($response->defaultParcelTemplate !== null) {
// handle response
}package hello.world;
import com.goshippo.shippo_sdk.Shippo;
import com.goshippo.shippo_sdk.models.operations.GetDefaultParcelTemplateResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Shippo sdk = Shippo.builder()
.apiKeyHeader("ShippoToken <API_TOKEN>")
.shippoApiVersion("2018-02-08")
.build();
GetDefaultParcelTemplateResponse res = sdk.ratesAtCheckout().getDefaultParcelTemplate()
.shippoApiVersion("2018-02-08")
.call();
if (res.defaultParcelTemplate().isPresent()) {
// handle response
}
}
}const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.goshippo.com/live-rates/settings/parcel-template', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.goshippo.com/live-rates/settings/parcel-template"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.goshippo.com/live-rates/settings/parcel-template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"result": {
"distance_unit": "in",
"height": "6",
"length": "10",
"name": "My Custom Template",
"weight": "12",
"weight_unit": "lb",
"width": "8",
"object_created": "2013-12-11T19:38:09.729Z",
"object_id": "b958d3690bb04bb8b2986724872750f5",
"object_owner": "shippotle@shippo.com",
"object_updated": "2013-12-12T19:38:09.729Z",
"template": {
"carrier": "FedEx",
"distance_unit": "in",
"height": "1.5",
"is_variable_dimensions": false,
"length": "12.375",
"name": "FedEx® Small Box (S1)",
"token": "FedEx_Box_Small_1",
"width": "10.875"
}
}
}{}Rates at Checkout
Show current default parcel template
Retrieve and display the currently configured default parcel template for live rates.
GET
/
live-rates
/
settings
/
parcel-template
cURL
curl https://api.goshippo.com/live-rates/settings/parcel-template \
-H "Authorization: ShippoToken <API_TOKEN>" \
-H "Content-Type: application/json"import shippo
from shippo.models import operations
s = shippo.Shippo(
api_key_header='ShippoToken <API_TOKEN>',
shippo_api_version='2018-02-08',
)
res = s.rates_at_checkout.get_default_parcel_template(request=operations.GetDefaultParcelTemplateRequest())
if res is not None:
# handle response
passimport { Shippo } from "shippo";
const shippo = new Shippo({
apiKeyHeader: "ShippoToken <API_TOKEN>",
shippoApiVersion: "2018-02-08",
});
async function run() {
const result = await shippo.ratesAtCheckout.getDefaultParcelTemplate({});
// Handle the result
console.log(result);
}
run();using Shippo;
using Shippo.Models.Components;
var sdk = new ShippoSDK(
apiKeyHeader: "ShippoToken <API_TOKEN>",
shippoApiVersion: "2018-02-08"
);
var res = await sdk.RatesAtCheckout.GetDefaultParcelTemplateAsync(shippoApiVersion: "2018-02-08");
// handle responsedeclare(strict_types=1);
require 'vendor/autoload.php';
use Shippo\API;
$sdk = API\Shippo::builder()
->setSecurity(
'ShippoToken <API_TOKEN>'
)
->setShippoApiVersion('2018-02-08')
->build();
$response = $sdk->ratesAtCheckout->getDefaultParcelTemplate(
shippoApiVersion: '2018-02-08'
);
if ($response->defaultParcelTemplate !== null) {
// handle response
}package hello.world;
import com.goshippo.shippo_sdk.Shippo;
import com.goshippo.shippo_sdk.models.operations.GetDefaultParcelTemplateResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Shippo sdk = Shippo.builder()
.apiKeyHeader("ShippoToken <API_TOKEN>")
.shippoApiVersion("2018-02-08")
.build();
GetDefaultParcelTemplateResponse res = sdk.ratesAtCheckout().getDefaultParcelTemplate()
.shippoApiVersion("2018-02-08")
.call();
if (res.defaultParcelTemplate().isPresent()) {
// handle response
}
}
}const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.goshippo.com/live-rates/settings/parcel-template', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.goshippo.com/live-rates/settings/parcel-template"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.goshippo.com/live-rates/settings/parcel-template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"result": {
"distance_unit": "in",
"height": "6",
"length": "10",
"name": "My Custom Template",
"weight": "12",
"weight_unit": "lb",
"width": "8",
"object_created": "2013-12-11T19:38:09.729Z",
"object_id": "b958d3690bb04bb8b2986724872750f5",
"object_owner": "shippotle@shippo.com",
"object_updated": "2013-12-12T19:38:09.729Z",
"template": {
"carrier": "FedEx",
"distance_unit": "in",
"height": "1.5",
"is_variable_dimensions": false,
"length": "12.375",
"name": "FedEx® Small Box (S1)",
"token": "FedEx_Box_Small_1",
"width": "10.875"
}
}
}{}Authorizations
API key authentication using the ShippoToken scheme. Format: Authorization: ShippoToken <API_TOKEN> Example: Authorization: ShippoToken shippo_live_abc123
Headers
Optional string used to pick a non-default API version to use. See our API version guide.
Example:
"2018-02-08"
Response
Default parcel template
Show child attributes
Show child attributes
Was this page helpful?
⌘I