cURL
curl https://api.goshippo.com/customs/items/ \
-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.list()
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.customsItems.list();
// 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->list(
page: 1,
results: 25,
shippoApiVersion: '2018-02-08'
);
if ($response->customsItemPaginatedList !== 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.ListAsync(
page: 1,
results: 25,
shippoApiVersion: "2018-02-08"
);
// handle responsepackage hello.world;
import com.goshippo.shippo_sdk.Shippo;
import com.goshippo.shippo_sdk.models.operations.ListCustomsItemsResponse;
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();
ListCustomsItemsResponse res = sdk.customsItems().list()
.page(1L)
.results(25L)
.shippoApiVersion("2018-02-08")
.call();
if (res.customsItemPaginatedList().isPresent()) {
// handle response
}
}
}const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.goshippo.com/customs/items', 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"
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")
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{
"next": "baseurl?page=3&results=10",
"previous": "baseurl?page=1&results=10",
"results": [
{
"description": "T-Shirt",
"mass_unit": "lb",
"net_weight": "5",
"origin_country": "<string>",
"quantity": 20,
"value_amount": "200",
"value_currency": "USD",
"eccn_ear99": "<string>",
"eu_exempt_category": false,
"manufacturer_code": "ACME-TS-001",
"manufacturer_standard_code": "00012345678905",
"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_state": "VALID",
"object_updated": "2014-07-17T00:49:20.631Z",
"test": true
}
]
}{}Customs Items
List all customs items
Returns a list all customs items objects.
GET
/
customs
/
items
cURL
curl https://api.goshippo.com/customs/items/ \
-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.list()
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.customsItems.list();
// 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->list(
page: 1,
results: 25,
shippoApiVersion: '2018-02-08'
);
if ($response->customsItemPaginatedList !== 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.ListAsync(
page: 1,
results: 25,
shippoApiVersion: "2018-02-08"
);
// handle responsepackage hello.world;
import com.goshippo.shippo_sdk.Shippo;
import com.goshippo.shippo_sdk.models.operations.ListCustomsItemsResponse;
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();
ListCustomsItemsResponse res = sdk.customsItems().list()
.page(1L)
.results(25L)
.shippoApiVersion("2018-02-08")
.call();
if (res.customsItemPaginatedList().isPresent()) {
// handle response
}
}
}const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.goshippo.com/customs/items', 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"
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")
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{
"next": "baseurl?page=3&results=10",
"previous": "baseurl?page=1&results=10",
"results": [
{
"description": "T-Shirt",
"mass_unit": "lb",
"net_weight": "5",
"origin_country": "<string>",
"quantity": 20,
"value_amount": "200",
"value_currency": "USD",
"eccn_ear99": "<string>",
"eu_exempt_category": false,
"manufacturer_code": "ACME-TS-001",
"manufacturer_standard_code": "00012345678905",
"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_state": "VALID",
"object_updated": "2014-07-17T00:49:20.631Z",
"test": true
}
]
}{}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"
Optional. The object ID of a Managed Shippo Account. Platform accounts set this to make the request on behalf of one of their managed accounts. See the Platform accounts guide.
Query Parameters
The page number you want to select
The number of results to return per page (max 100)
Required range:
x <= 100Was this page helpful?
⌘I