The Delivery Zone API is a simple JSON over HTTP endpoint. Call it from HttpClient in any .NET application — ASP.NET Core, Azure Functions, or a background service.
Call the API from your ASP.NET controller or service layer before confirming the order. Never expose the API key or route the call through the client.
appsettings.json (via secrets). Never hardcode it or expose it in client-facing code.
// .NET / C# — server-side, inject via IHttpClientFactory
var payload = new {
destinationPostcode = postcode,
basketValueCents = basketCents,
};
var response = await httpClient.PostAsJsonAsync(
"https://api.deliveryzone.fi/api/v1/delivery/check",
payload
);
var result = await response.Content.ReadFromJsonAsync<DeliveryCheckResult>();
if (!result.CanDeliver) {
// Reject order: result.ReasonCode
}
When canDeliver is false (or null), the response includes a reasonCode field. Display this to the customer:
NOT_DELIVERABLE — postcode is outside your delivery zones, or not recognised (the API intentionally uses one generic code for both, to protect zone boundaries)MINIMUM_ORDER_NOT_MET — basket value is below the zone's minimum orderBASKET_VALUE_REQUIRED — a basket value is needed to evaluate this destination's minimum-order or free-delivery ruleAlways handle HTTP errors (5xx, timeout) gracefully. If the API is unreachable, fail safe — either reject the order or allow manual review.
Free plan. No credit card. Real setup help.