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

Block an order when the postcode is out of zone

Check before payment is attempted — if canDeliver is false, stop the order and show a clear reason.

Node.js example

// In your checkout server route — before payment is processed
async function validateDelivery(postcode, basketCents) {
  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: basketCents }),
  });
  if (!res.ok) throw new Error('Zone check failed');
  const data = await res.json();
  if (!data.canDeliver) {
    return { blocked: true, reason: data.reason };
  }
  return { blocked: false, priceCents: data.priceCents };
}

Reason codes you may receive

  • OUT_OF_ZONE — valid postcode, outside your zones
  • UNKNOWN_POSTCODE — postcode not recognised
  • MIN_BASKET — basket below zone minimum
Checkout use case API reference