Skip to content

Powered by Grav CMS + Helios Theme

Pickup locations

Named collection points a customer can choose at checkout instead of delivery.

Named collection points a customer can choose at checkout instead of having an order delivered. See Click and collect.

List pickup locations

GET /api/v1/kahunacart/pickup-locations Permission kahunacart.products.manage

Every collection point in the merchant's own order, enabled or not, with its full address, opening hours, optional collection charge as a decimal string in the store currency, and the language key holding its collection instruction. A location's country is the tax anchor: an order collected there is taxed at the counter rather than at the customer's address. On a store that sells in more than one currency each location also carries currency_amounts (its charge in the other currencies) and offered_in (the currencies it can be collected in).

Create a pickup location

POST /api/v1/kahunacart/pickup-locations Permission kahunacart.products.manage

Add a collection point. code is the stable handle documents print and is unique per store; country is required because it is what a collected order is taxed at. price is genuinely nullable — an empty value means collecting costs nothing and prints no line, which is not the same as a charge of zero.

Parameters

Name Type Description
code required string Stable, unique per store, printed on documents
name required string
address_1 optional string
address_2 optional string
city optional string
state optional string State or province
postcode optional string
country required string ISO country code; the tax anchor for a collected order
phone optional string
hours optional object Weekday (mon..sun) to a list of [open, close] pairs, plus an `exceptions` string. A weekday with an empty list is closed; a weekday left out is unstated and prints nothing.
instructions_key optional string A language key, never a sentence, so a bilingual store has it twice
price optional string or null Collection charge as a decimal amount; empty means no charge
currency_amounts optional object The charge in the other currencies, only on a store that sells in more than one: {"EUR": {"price": "1.80"}}. A location with a base charge is offered in a currency only where it has a charge there too; one with no charge, or a charge of 0, is offered in all of them. An amount needs a base charge beside it.
tax_class optional string
enabled optional boolean
Default: true
position optional integer

Update a pickup location

PUT /api/v1/kahunacart/pickup-locations/{id} Permission kahunacart.products.manage

Change a collection point's fields. Disable a branch that has closed rather than deleting it: the orders that named it still print where they were collected.

Parameters

Name Type Description
id required integer Pickup location id
code optional string
name optional string
address_1 optional string
address_2 optional string
city optional string
state optional string
postcode optional string
country optional string
phone optional string
hours optional object
instructions_key optional string
price optional string or null
currency_amounts optional object The charge in the other currencies, as on create. An empty string removes one.
tax_class optional string
enabled optional boolean
position optional integer

Delete a pickup location

DELETE /api/v1/kahunacart/pickup-locations/{id} Permission kahunacart.products.manage

Delete a collection point. Orders already collected there keep the branch stamped on them and still print it, so this is for the row created by mistake; disable the branch that has closed.

Parameters

Name Type Description
id required integer Pickup location id

code, name and country are required. country is the tax anchor: a collected order is taxed on the location's country, state and postcode rather than on the customer's address, and a collected order has no delivery address at all. code is unique per store and is what documents print, so it survives a branch being renamed. hours is a weekday key to a list of [open, close] pairs plus an exceptions string, and the two empty cases differ: a weekday present with an empty list prints as closed, a weekday that is absent prints as nothing. instructions_key is a language key rather than a sentence. price is genuinely nullable: null charges nothing and prints no line, "0.00" charges nothing and prints a line saying so. Deleting removes the row and the orders that named it still print the branch; switch a closed branch off instead.