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 _http.PostAsJsonAsync(
"https://api.deliveryzone.fi/v1/check", payload);
var data = await response.Content.ReadFromJsonAsync<CheckResult>();
if (!data.CanDeliver) {
return BadRequest(data.Reason);
}
When canDeliver is false, the response includes a reason field. Display this to the customer:
OUT_OF_ZONE — postcode is valid but outside all defined zonesUNKNOWN_POSTCODE — postcode is not recognisedMIN_BASKET — basket value is below the zone minimumAlways handle HTTP errors (5xx, timeout) gracefully. If the API is unreachable, fail safe — either reject the order or allow manual review.
Create a free account and get your sandbox API key in minutes.