Skip to content

Powered by Grav CMS + Helios Theme

Addresses and customs (add-on)

The carrier's address check, and the customs facts recorded against a product.

Both take kahunacart.shipping.manage. See Customs.

Check a delivery address

POST /api/v1/kahunacart/shipping/addresses/validate Permission kahunacart.shipping.manage

What the carrier makes of a delivery address, with its own corrected version where it offers one. A carrier that cannot be reached answers "not checked" rather than "invalid", because a validator being down must not stop a label being bought.

Parameters

Name Type Description
name optional string
company optional string
address1 required string
address2 optional string
city required string
region optional string
postcode optional string
country required string Two-letter country code, such as US or GB.
phone optional string
email optional string
residential optional boolean

Read a products customs facts

GET /api/v1/kahunacart/shipping/products/{id}/customs Permission kahunacart.shipping.manage

The customs facts recorded against a product — its harmonised code, where it was made, and what it is called on a customs form. A parcel crossing a border cannot be labelled without a country of origin for every line.

Parameters

Name Type Description
id required integer The product's id.
variant_id optional integer A particular variant, or 0 for the whole product.

Set a products customs facts

PUT /api/v1/kahunacart/shipping/products/{id}/customs Permission kahunacart.shipping.manage

Record the customs facts for a product, or for one of its variants. A variant's facts win over the product's, field by field. Clearing all three fields removes the row.

Parameters

Name Type Description
id required integer The product's id.
variant_id optional integer A particular variant, or 0 for every variant of the product.
hs_code optional string The harmonised tariff code.
origin_country optional string Two-letter country code where it was made.
customs_description optional string What a customs officer reads. Never a SKU.