Beta Delivery Zone is in private beta and not yet open to customers — public launch coming soon.
Docs / Examples

Check a Finnish postcode

The most basic call: POST a postcode and get back a delivery decision.

curl

# Server-side: check whether a postcode can be delivered to
curl -X POST https://api.deliveryzone.fi/v1/check \
  -H "X-Api-Key: dz_live_..." \
  -H "Content-Type: application/json" \
  -d '{"destinationPostcode":"00100","basketValueCents":4500}'

# response
{
  "canDeliver": true,
  "zone": "Helsinki Center",
  "priceCents": 590,
  "reason": null
}

JavaScript (Node.js)

// Server-side only — never expose your API key in browser code
const res = await fetch('https://api.deliveryzone.fi/v1/check', {
  method: 'POST',
  headers: {
    'X-Api-Key': process.env.DZ_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ destinationPostcode: postcode, basketValueCents: basket }),
});
const data = await res.json();
if (!data.canDeliver) {
  showError(data.reason); // e.g. "OUT_OF_ZONE"
} else {
  setShippingFee(data.priceCents);
}

PHP

// PHP — server-side, keep API key out of frontend
$r = wp_remote_post('https://api.deliveryzone.fi/v1/check', [
  'headers' => [
    'X-Api-Key'    => get_option('dz_api_key'),
    'Content-Type' => 'application/json',
  ],
  'body' => json_encode([
    'destinationPostcode' => $postcode,
    'basketValueCents'    => $basketCents,
  ]),
]);
$data = json_decode(wp_remote_retrieve_body($r), true);
if (!$data['canDeliver']) return [];
foreach ($rates as $rate) {
  $rate->cost = $data['priceCents'] / 100;
}

What the response means

  • canDeliver: true — postcode is in a zone. Use priceCents for the delivery fee.
  • canDeliver: false — postcode is out of zone. Use reason for the customer message.
Full API reference Get free API key