TypeScript
import { Configuration, QuotesApi } from "@zippendo/sdk"
const api = new QuotesApi(new Configuration({ accessToken: process.env.ZIPPENDO_API_TOKEN }))
const result = await api.createShippingQuote({ orgId: "...", createShippingQuoteRequest: { /* ... */ } })import os
import zippendo
config = zippendo.Configuration(access_token=os.environ["ZIPPENDO_API_TOKEN"])
with zippendo.ApiClient(config) as client:
result = zippendo.QuotesApi(client).create_shipping_quote("...", zippendo.CreateShippingQuoteRequest())<?php
$config = Zippendo\Sdk\Configuration::getDefaultConfiguration()->setAccessToken(getenv("ZIPPENDO_API_TOKEN"));
$api = new Zippendo\Sdk\Api\QuotesApi(new GuzzleHttp\Client(), $config);
$result = $api->createShippingQuote("...", new \Zippendo\Sdk\Model\CreateShippingQuoteRequest([]));client := zippendo.NewAPIClient(zippendo.NewConfiguration())
ctx := context.WithValue(context.Background(), zippendo.ContextAccessToken, os.Getenv("ZIPPENDO_API_TOKEN"))
result, _, err := client.QuotesAPI.CreateShippingQuote(ctx, "...").CreateShippingQuoteRequest(*zippendo.NewCreateShippingQuoteRequest()).Execute()require "zippendo"
Zippendo.configure { |c| c.access_token = ENV["ZIPPENDO_API_TOKEN"] }
result = Zippendo::QuotesApi.new.create_shipping_quote("...", Zippendo::CreateShippingQuoteRequest.new)curl --request POST \
--url https://api.zippendo.com/orgs/{orgId}/shipping-quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destination": {
"country": "DK",
"postalCode": "1620",
"province": "",
"city": "København",
"address1": "Vesterbrogade 1",
"address2": "2. sal"
},
"items": [
{
"name": "Uld trøje",
"quantity": 2,
"grams": 500,
"price": 29900
}
],
"currency": "DKK",
"totalPriceCents": 59800
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
destination: {
country: 'DK',
postalCode: '1620',
province: '',
city: 'København',
address1: 'Vesterbrogade 1',
address2: '2. sal'
},
items: [{name: 'Uld trøje', quantity: 2, grams: 500, price: 29900}],
currency: 'DKK',
totalPriceCents: 59800
})
};
fetch('https://api.zippendo.com/orgs/{orgId}/shipping-quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.zippendo.com/orgs/{orgId}/shipping-quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destination\": {\n \"country\": \"DK\",\n \"postalCode\": \"1620\",\n \"province\": \"\",\n \"city\": \"København\",\n \"address1\": \"Vesterbrogade 1\",\n \"address2\": \"2. sal\"\n },\n \"items\": [\n {\n \"name\": \"Uld trøje\",\n \"quantity\": 2,\n \"grams\": 500,\n \"price\": 29900\n }\n ],\n \"currency\": \"DKK\",\n \"totalPriceCents\": 59800\n}")
.asString();{
"rates": []
}{
"error": "Bad Request",
"message": "Invalid destination country"
}{
"error": "Not Found",
"message": "Organization not found"
}Quotes
Calculate shipping rates
Calculates shipping rates from configured shipping rules based on cart items and destination.
POST
/
orgs
/
{orgId}
/
shipping-quote
TypeScript
import { Configuration, QuotesApi } from "@zippendo/sdk"
const api = new QuotesApi(new Configuration({ accessToken: process.env.ZIPPENDO_API_TOKEN }))
const result = await api.createShippingQuote({ orgId: "...", createShippingQuoteRequest: { /* ... */ } })import os
import zippendo
config = zippendo.Configuration(access_token=os.environ["ZIPPENDO_API_TOKEN"])
with zippendo.ApiClient(config) as client:
result = zippendo.QuotesApi(client).create_shipping_quote("...", zippendo.CreateShippingQuoteRequest())<?php
$config = Zippendo\Sdk\Configuration::getDefaultConfiguration()->setAccessToken(getenv("ZIPPENDO_API_TOKEN"));
$api = new Zippendo\Sdk\Api\QuotesApi(new GuzzleHttp\Client(), $config);
$result = $api->createShippingQuote("...", new \Zippendo\Sdk\Model\CreateShippingQuoteRequest([]));client := zippendo.NewAPIClient(zippendo.NewConfiguration())
ctx := context.WithValue(context.Background(), zippendo.ContextAccessToken, os.Getenv("ZIPPENDO_API_TOKEN"))
result, _, err := client.QuotesAPI.CreateShippingQuote(ctx, "...").CreateShippingQuoteRequest(*zippendo.NewCreateShippingQuoteRequest()).Execute()require "zippendo"
Zippendo.configure { |c| c.access_token = ENV["ZIPPENDO_API_TOKEN"] }
result = Zippendo::QuotesApi.new.create_shipping_quote("...", Zippendo::CreateShippingQuoteRequest.new)curl --request POST \
--url https://api.zippendo.com/orgs/{orgId}/shipping-quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destination": {
"country": "DK",
"postalCode": "1620",
"province": "",
"city": "København",
"address1": "Vesterbrogade 1",
"address2": "2. sal"
},
"items": [
{
"name": "Uld trøje",
"quantity": 2,
"grams": 500,
"price": 29900
}
],
"currency": "DKK",
"totalPriceCents": 59800
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
destination: {
country: 'DK',
postalCode: '1620',
province: '',
city: 'København',
address1: 'Vesterbrogade 1',
address2: '2. sal'
},
items: [{name: 'Uld trøje', quantity: 2, grams: 500, price: 29900}],
currency: 'DKK',
totalPriceCents: 59800
})
};
fetch('https://api.zippendo.com/orgs/{orgId}/shipping-quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.zippendo.com/orgs/{orgId}/shipping-quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destination\": {\n \"country\": \"DK\",\n \"postalCode\": \"1620\",\n \"province\": \"\",\n \"city\": \"København\",\n \"address1\": \"Vesterbrogade 1\",\n \"address2\": \"2. sal\"\n },\n \"items\": [\n {\n \"name\": \"Uld trøje\",\n \"quantity\": 2,\n \"grams\": 500,\n \"price\": 29900\n }\n ],\n \"currency\": \"DKK\",\n \"totalPriceCents\": 59800\n}")
.asString();{
"rates": []
}{
"error": "Bad Request",
"message": "Invalid destination country"
}{
"error": "Not Found",
"message": "Organization not found"
}Authorizations
JWT access token or API token (prefixed with zipp_)
Path Parameters
Organization ID
Example:
"org_01HZX9K2QF"
Body
application/json
Show child attributes
Show child attributes
Cart items
Minimum array length:
1Show child attributes
Show child attributes
Example:
[
{
"name": "Uld trøje",
"quantity": 2,
"grams": 500,
"price": 29900
}
]
ISO 4217 currency code
Required string length:
3Example:
"DKK"
Total price in cents after discounts (optional, enables total-based conditions)
Required range:
x >= 0Example:
59800
Response
Default Response
Available shipping rates
Show child attributes
Show child attributes
Example:
[]
Was this page helpful?
⌘I