(customs_items)
Customs declarations are relevant information, including one or multiple customs items, you need to provide for customs clearance for your international shipments.
Returns a list all customs items objects.
import shippo
s = shippo.Shippo(
api_key_header='<YOUR_API_KEY_HERE>',
shippo_api_version='2018-02-08',
)
res = s.customs_items.list()
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
page |
Optional[int] | ➖ | The page number you want to select |
results |
Optional[int] | ➖ | The number of results to return per page (max 100) |
components.CustomsItemPaginatedList
Error Type | Status Code | Content Type |
---|---|---|
errors.SDKError | 4XX, 5XX | */* |
Creates a new customs item object.
import shippo
from shippo.models import components
s = shippo.Shippo(
api_key_header='<YOUR_API_KEY_HERE>',
shippo_api_version='2018-02-08',
)
res = s.customs_items.create(request=components.CustomsItemCreateRequest(
description='T-Shirt',
mass_unit=components.WeightUnitEnum.LB,
net_weight='5',
origin_country='<value>',
quantity=20,
value_amount='200',
value_currency='USD',
metadata='Order ID "123454"',
sku_code='HM-123',
hs_code='0901.21',
))
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
components.CustomsItemCreateRequest | ✔️ | The request object to use for the request. |
Error Type | Status Code | Content Type |
---|---|---|
errors.SDKError | 4XX, 5XX | */* |
Returns an existing customs item using an object ID
import shippo
s = shippo.Shippo(
api_key_header='<YOUR_API_KEY_HERE>',
shippo_api_version='2018-02-08',
)
res = s.customs_items.get(customs_item_id='<value>')
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
customs_item_id |
str | ✔️ | Object ID of the customs item |
page |
Optional[int] | ➖ | The page number you want to select |
Error Type | Status Code | Content Type |
---|---|---|
errors.SDKError | 4XX, 5XX | */* |