Skip to main content
GET
/
customs
/
items
/
{CustomsItemId}
cURL
curl  https://api.goshippo.com/customs/items/55358464c7b740aca199b395536981bd \
-H "Authorization: ShippoToken <API_TOKEN>"
import shippo

s = shippo.Shippo(
api_key_header='ShippoToken <API_TOKEN>',
shippo_api_version='2018-02-08',
)


res = s.customs_items.get(customs_item_id='<id>')

if res is not None:
# handle response
pass
import { Shippo } from "shippo";

const shippo = new Shippo({
apiKeyHeader: "ShippoToken <API_TOKEN>",
shippoApiVersion: "2018-02-08",
});

async function run() {
const result = await shippo.customsItems.get("<id>");

// Handle the result
console.log(result);
}

run();
declare(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->customsItems->get(
customsItemId: '<id>',
page: 1,
shippoApiVersion: '2018-02-08'

);

if ($response->customsItem !== null) {
// handle response
}
using Shippo;
using Shippo.Models.Components;

var sdk = new ShippoSDK(
apiKeyHeader: "ShippoToken <API_TOKEN>",
shippoApiVersion: "2018-02-08"
);

var res = await sdk.CustomsItems.GetAsync(
customsItemId: "<id>",
page: 1,
shippoApiVersion: "2018-02-08"
);

// handle response
package hello.world;

import com.goshippo.shippo_sdk.Shippo;
import com.goshippo.shippo_sdk.models.operations.GetCustomsItemResponse;
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();

GetCustomsItemResponse res = sdk.customsItems().get()
.customsItemId("<id>")
.page(1L)
.shippoApiVersion("2018-02-08")
.call();

if (res.customsItem().isPresent()) {
// handle response
}
}
}
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};

fetch('https://api.goshippo.com/customs/items/{CustomsItemId}', 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/customs/items/{CustomsItemId}"

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/customs/items/{CustomsItemId}")

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
{
  "description": "T-Shirt",
  "mass_unit": "lb",
  "net_weight": "5",
  "origin_country": "<string>",
  "quantity": 20,
  "value_amount": "200",
  "value_currency": "USD",
  "eccn_ear99": "<string>",
  "metadata": "Order ID \"123454\"",
  "sku_code": "HM-123",
  "hs_code": "0901.21",
  "tariff_number": "<string>",
  "object_created": "2014-07-17T00:49:20.631Z",
  "object_id": "d799c2679e644279b59fe661ac8fa488",
  "object_owner": "shippotle@shippo.com",
  "object_updated": "2014-07-17T00:49:20.631Z",
  "test": true
}
{}

Authorizations

Authorization
string
header
default:ShippoToken
required

API key authentication using the ShippoToken scheme. Format: Authorization: ShippoToken <API_TOKEN> Example: Authorization: ShippoToken shippo_live_abc123

Headers

SHIPPO-API-VERSION
string
default:2018-02-08

Optional string used to pick a non-default API version to use. See our API version guide.

Example:

"2018-02-08"

Path Parameters

CustomsItemId
string
required

Object ID of the customs item

Query Parameters

page
integer<int64>
default:1

The page number you want to select

Response

Customs item

description
string
required

Text description of your item.

Example:

"T-Shirt"

mass_unit
enum<string>
required

The unit used for weight.

Available options:
g,
kg,
lb,
oz
Example:

"lb"

net_weight
string
required

Total weight of this item, i.e. quantity * weight per item.

Example:

"5"

origin_country
string
required

Country of origin of the item. Example: US or DE. All accepted values can be found on the Official ISO Website.

quantity
integer<int64>
required

Quantity of this item in the shipment you send. Must be greater than 0.

Example:

20

value_amount
string
required

Total value of this item, i.e. quantity * value per item.

Example:

"200"

value_currency
string
required

Currency used for value_amount. The official ISO 4217 currency codes are used, e.g. USD or EUR.

Example:

"USD"

eccn_ear99
string

Export Control Classification Number, required on some exports from the United States.

metadata
string

A string of up to 100 characters that can be filled with any additional information you want to attach to the object.

Example:

"Order ID \"123454\""

sku_code
string

SKU code of the item, which is required by some carriers.

Example:

"HM-123"

hs_code
string

HS code of the item, which is required by some carriers. If tariff_number is not provided, hs_code will be used. If both hs_code and tariff_number are provided, tariff_number will be used. 50 character limit.

Example:

"0901.21"

tariff_number
string

The tariff number of the item. If tariff_number is not provided, hs_code will be used. If both hs_code and tariff_number are provided, tariff_number will be used. 12 character limit.

object_created
string<date-time>

Date and time of object creation.

Example:

"2014-07-17T00:49:20.631Z"

object_id
string

Unique identifier of the given object.

Example:

"d799c2679e644279b59fe661ac8fa488"

object_owner
string

Username of the user who created the object.

Example:

"shippotle@shippo.com"

object_state
enum<string>

Indicates the validity of the enclosing object

Available options:
VALID,
INVALID
object_updated
string<date-time>

Date and time of last object update.

Example:

"2014-07-17T00:49:20.631Z"

test
boolean

Indicates whether the object has been created in test mode.