Estimate a one-token shipment
curl --request POST \
--url https://catchbackcards.com/api/partner/v2/tokens/{tokenId}/shipment/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"holder": "0x8f3c...e21a",
"address": {
"name": "Alice Tester",
"address1": "1 Market St",
"city": "San Francisco",
"state": "CA",
"zip": "94105",
"country": "US",
"phone": "4155550100"
}
}
'import requests
url = "https://catchbackcards.com/api/partner/v2/tokens/{tokenId}/shipment/estimate"
payload = {
"holder": "0x8f3c...e21a",
"address": {
"name": "Alice Tester",
"address1": "1 Market St",
"city": "San Francisco",
"state": "CA",
"zip": "94105",
"country": "US",
"phone": "4155550100"
}
}
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({
holder: '0x8f3c...e21a',
address: {
name: 'Alice Tester',
address1: '1 Market St',
city: 'San Francisco',
state: 'CA',
zip: '94105',
country: 'US',
phone: '4155550100'
}
})
};
fetch('https://catchbackcards.com/api/partner/v2/tokens/{tokenId}/shipment/estimate', 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://catchbackcards.com/api/partner/v2/tokens/{tokenId}/shipment/estimate",
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([
'holder' => '0x8f3c...e21a',
'address' => [
'name' => 'Alice Tester',
'address1' => '1 Market St',
'city' => 'San Francisco',
'state' => 'CA',
'zip' => '94105',
'country' => 'US',
'phone' => '4155550100'
]
]),
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://catchbackcards.com/api/partner/v2/tokens/{tokenId}/shipment/estimate"
payload := strings.NewReader("{\n \"holder\": \"0x8f3c...e21a\",\n \"address\": {\n \"name\": \"Alice Tester\",\n \"address1\": \"1 Market St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"US\",\n \"phone\": \"4155550100\"\n }\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://catchbackcards.com/api/partner/v2/tokens/{tokenId}/shipment/estimate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"holder\": \"0x8f3c...e21a\",\n \"address\": {\n \"name\": \"Alice Tester\",\n \"address1\": \"1 Market St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"US\",\n \"phone\": \"4155550100\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://catchbackcards.com/api/partner/v2/tokens/{tokenId}/shipment/estimate")
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 \"holder\": \"0x8f3c...e21a\",\n \"address\": {\n \"name\": \"Alice Tester\",\n \"address1\": \"1 Market St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"US\",\n \"phone\": \"4155550100\"\n }\n}"
response = http.request(request)
puts response.read_body{
"rates": [
{
"carrier": "USPS",
"service": "Priority Mail",
"token": "usps_priority",
"amount": 9.85,
"estimated_days": 3,
"total": 9.85
}
]
}{
"error": "Some address fields are invalid.",
"code": "BAD_ADDRESS",
"fields": {
"phone": "phone is required outside the US"
}
}{
"error": "Missing or malformed API key"
}{
"error": "That wallet does not hold every token: one shipment is for one holder.",
"code": "NOT_HOLDER",
"token_ids": [
"90311820476190023716442901288201455"
]
}{
"error": "Unknown token",
"code": "UNKNOWN_TOKEN",
"token_ids": [
"90311820476190023716442901288201455"
]
}{
"error": "These tokens are not live.",
"code": "TOKEN_NOT_LIVE",
"token_ids": [
"90311820476190023716442901288201455"
]
}{
"error": "Too many requests. Slow down.",
"code": "RATE_LIMITED",
"retry_after_seconds": 23
}{
"error": "Something went wrong; retry with the same Idempotency-Key."
}{
"error": "Could not read the token owner; try again shortly.",
"code": "CHAIN_UNAVAILABLE"
}Shipments
Estimate a one-token shipment
Rate limit: 30 a minute, shared with Estimate a shipment.
Carrier rates to ship one token’s item to its holder. Charges nothing and stores nothing. Same as Estimate a shipment, with the token in the path.
POST
/
api
/
partner
/
v2
/
tokens
/
{tokenId}
/
shipment
/
estimate
Estimate a one-token shipment
curl --request POST \
--url https://catchbackcards.com/api/partner/v2/tokens/{tokenId}/shipment/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"holder": "0x8f3c...e21a",
"address": {
"name": "Alice Tester",
"address1": "1 Market St",
"city": "San Francisco",
"state": "CA",
"zip": "94105",
"country": "US",
"phone": "4155550100"
}
}
'import requests
url = "https://catchbackcards.com/api/partner/v2/tokens/{tokenId}/shipment/estimate"
payload = {
"holder": "0x8f3c...e21a",
"address": {
"name": "Alice Tester",
"address1": "1 Market St",
"city": "San Francisco",
"state": "CA",
"zip": "94105",
"country": "US",
"phone": "4155550100"
}
}
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({
holder: '0x8f3c...e21a',
address: {
name: 'Alice Tester',
address1: '1 Market St',
city: 'San Francisco',
state: 'CA',
zip: '94105',
country: 'US',
phone: '4155550100'
}
})
};
fetch('https://catchbackcards.com/api/partner/v2/tokens/{tokenId}/shipment/estimate', 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://catchbackcards.com/api/partner/v2/tokens/{tokenId}/shipment/estimate",
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([
'holder' => '0x8f3c...e21a',
'address' => [
'name' => 'Alice Tester',
'address1' => '1 Market St',
'city' => 'San Francisco',
'state' => 'CA',
'zip' => '94105',
'country' => 'US',
'phone' => '4155550100'
]
]),
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://catchbackcards.com/api/partner/v2/tokens/{tokenId}/shipment/estimate"
payload := strings.NewReader("{\n \"holder\": \"0x8f3c...e21a\",\n \"address\": {\n \"name\": \"Alice Tester\",\n \"address1\": \"1 Market St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"US\",\n \"phone\": \"4155550100\"\n }\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://catchbackcards.com/api/partner/v2/tokens/{tokenId}/shipment/estimate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"holder\": \"0x8f3c...e21a\",\n \"address\": {\n \"name\": \"Alice Tester\",\n \"address1\": \"1 Market St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"US\",\n \"phone\": \"4155550100\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://catchbackcards.com/api/partner/v2/tokens/{tokenId}/shipment/estimate")
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 \"holder\": \"0x8f3c...e21a\",\n \"address\": {\n \"name\": \"Alice Tester\",\n \"address1\": \"1 Market St\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"US\",\n \"phone\": \"4155550100\"\n }\n}"
response = http.request(request)
puts response.read_body{
"rates": [
{
"carrier": "USPS",
"service": "Priority Mail",
"token": "usps_priority",
"amount": 9.85,
"estimated_days": 3,
"total": 9.85
}
]
}{
"error": "Some address fields are invalid.",
"code": "BAD_ADDRESS",
"fields": {
"phone": "phone is required outside the US"
}
}{
"error": "Missing or malformed API key"
}{
"error": "That wallet does not hold every token: one shipment is for one holder.",
"code": "NOT_HOLDER",
"token_ids": [
"90311820476190023716442901288201455"
]
}{
"error": "Unknown token",
"code": "UNKNOWN_TOKEN",
"token_ids": [
"90311820476190023716442901288201455"
]
}{
"error": "These tokens are not live.",
"code": "TOKEN_NOT_LIVE",
"token_ids": [
"90311820476190023716442901288201455"
]
}{
"error": "Too many requests. Slow down.",
"code": "RATE_LIMITED",
"retry_after_seconds": 23
}{
"error": "Something went wrong; retry with the same Idempotency-Key."
}{
"error": "Could not read the token owner; try again shortly.",
"code": "CHAIN_UNAVAILABLE"
}Authorizations
Your API key (cb_live_…), sent as a bearer token, with the scope nft:orders. Keep it on your servers: never in a browser, app or wallet. Use a separate key per environment. A request from a country on our sanctions list gets a 403 with Access denied, whether or not it has a valid key. See Authentication and keys.
Path Parameters
Body
application/json

