(CustomsItems)
Customs declarations are relevant information, including one or multiple customs items, you need to provide for customs clearance for your international shipments.
- List - List all customs items
- Create - Create a new customs item
- Get - Retrieve a customs item
Returns a list all customs items objects.
using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;
var sdk = new ShippoSDK(
apiKeyHeader: "<YOUR_API_KEY_HERE>",
shippoApiVersion: "2018-02-08"
);
var res = await sdk.CustomsItems.ListAsync(
page: 1,
results: 25,
shippoApiVersion: "2018-02-08"
);
// handle response
Parameter |
Type |
Required |
Description |
Example |
Page |
long |
➖ |
The page number you want to select |
|
Results |
long |
➖ |
The number of results to return per page (max 100) |
|
ShippoApiVersion |
string |
➖ |
Optional string used to pick a non-default API version to use. See our API version guide. |
2018-02-08 |
CustomsItemPaginatedList
Error Type |
Status Code |
Content Type |
Shippo.Models.Errors.SDKException |
4XX, 5XX |
*/* |
Creates a new customs item object.
using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;
var sdk = new ShippoSDK(
apiKeyHeader: "<YOUR_API_KEY_HERE>",
shippoApiVersion: "2018-02-08"
);
var res = await sdk.CustomsItems.CreateAsync(
customsItemCreateRequest: new CustomsItemCreateRequest() {
Description = "T-Shirt",
MassUnit = Shippo.Models.Components.WeightUnitEnum.Lb,
Metadata = "Order ID \"123454\"",
NetWeight = "5",
OriginCountry = "<value>",
Quantity = 20,
SkuCode = "HM-123",
HsCode = "0901.21",
ValueAmount = "200",
ValueCurrency = "USD",
},
shippoApiVersion: "2018-02-08"
);
// handle response
Parameter |
Type |
Required |
Description |
Example |
CustomsItemCreateRequest |
CustomsItemCreateRequest |
✔️ |
CustomsItem details. |
|
ShippoApiVersion |
string |
➖ |
Optional string used to pick a non-default API version to use. See our API version guide. |
2018-02-08 |
CustomsItem
Error Type |
Status Code |
Content Type |
Shippo.Models.Errors.SDKException |
4XX, 5XX |
*/* |
Returns an existing customs item using an object ID
using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;
var sdk = new ShippoSDK(
apiKeyHeader: "<YOUR_API_KEY_HERE>",
shippoApiVersion: "2018-02-08"
);
var res = await sdk.CustomsItems.GetAsync(
customsItemId: "<id>",
page: 1,
shippoApiVersion: "2018-02-08"
);
// handle response
Parameter |
Type |
Required |
Description |
Example |
CustomsItemId |
string |
✔️ |
Object ID of the customs item |
|
Page |
long |
➖ |
The page number you want to select |
|
ShippoApiVersion |
string |
➖ |
Optional string used to pick a non-default API version to use. See our API version guide. |
2018-02-08 |
CustomsItem
Error Type |
Status Code |
Content Type |
Shippo.Models.Errors.SDKException |
4XX, 5XX |
*/* |