Shipping carriers (add-on)
The carrier aggregator, its connection check and tracking webhook, and the carrier accounts behind it.
Provided by the KahunaCart Shipping plugin. Setup takes kahunacart.shipping.manage. No key or secret is ever returned: a read says whether one has been pasted. See Carriers and services.
List the carrier aggregators
/api/v1/kahunacart/shipping/aggregators
The carrier aggregator this store is configured for, with its capability matrix, whether a key has been pasted, and when the carrier list was last refreshed.
Check the aggregator connection
/api/v1/kahunacart/shipping/aggregators/{code}/check
Make a real call to the aggregator with the configured key and report whether it works, which account it reached and how many carrier accounts that account holds. A live key in the test field is refused before any call is made.
Parameters
| Name | Type | Description |
|---|---|---|
| code required | string | The aggregator's code, one of `shippo`, `easypost`, `shipengine`, `sendcloud` or `demo`. |
Read the tracking webhook setup
/api/v1/kahunacart/shipping/aggregators/webhook
The inbound tracking webhook as this store has it: whether a secret is set, the public address it makes with the secret masked to its last four characters, whether the configured driver can register that address itself, and the last few deliveries the endpoint received.
Generate a tracking webhook secret
/api/v1/kahunacart/shipping/aggregators/webhook/secret
Generate the tracking webhook's secret and save it. The secret is the random part of the inbound address, so generating a new one changes the address and the old one stops working straight away — register the webhook again afterwards.
Register the tracking webhook
/api/v1/kahunacart/shipping/aggregators/webhook/register
Register this store's inbound tracking address with the aggregator. An existing webhook pointing at this store is adopted rather than joined by a second one. Needs a webhook secret and a publicly reachable https address.
Parameters
| Name | Type | Description |
|---|---|---|
| reset optional | boolean | Replace what is registered rather than adopting it, for a store that has moved or rotated its secret. |
List carrier accounts
/api/v1/kahunacart/shipping/accounts
The carrier accounts this store holds at its aggregator — USPS, UPS, FedEx, Royal Mail, DPD and so on — with the services each one offers and whether this store offers it.
Refresh the carrier accounts
/api/v1/kahunacart/shipping/accounts
Read the carrier list from the aggregator again and store it, so a carrier switched on at the aggregator this morning is bindable here this afternoon. The store's own on/off switches are kept.
Switch a carrier on or off
/api/v1/kahunacart/shipping/accounts/{id}
Switch a carrier on or off for this store. Nothing else on a carrier account can be changed here — the account itself belongs to the aggregator.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | The carrier account's id. |
| enabled required | boolean | Whether this store offers this carrier. |