Delivery zones
Base URL: https://api.miridia.io. Read Authentication and Conventions before you call these operations.
| Method | Path | Operation |
|---|---|---|
| GET | /api/v1/DeliveryZones | Get all delivery zones |
| POST | /api/v1/DeliveryZones | Create delivery zone |
| GET | /api/v1/DeliveryZones/{deliveryZoneId} | Get delivery zone |
| PUT | /api/v1/DeliveryZones/{deliveryZoneId} | Update delivery zone |
| DELETE | /api/v1/DeliveryZones/{deliveryZoneId} | Delete delivery zone |
| GET | /api/v1/DeliveryZones/coordinates | Get zones inside coordinates |
Get all delivery zones
GET/api/v1/DeliveryZones
Access. Send a bearer token or an API key. The caller needs the Shipments view permission.
Response
200. Returns a PagedResult envelope. Each item in data is DeliveryZoneResponse.
curl -X GET "https://api.miridia.io/api/v1/DeliveryZones" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"{
"count": 0,
"totalCount": 0,
"page": 0,
"finalPage": 0,
"pageSize": 0,
"hasMore": true,
"statusCode": "OK",
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"description": "string",
"geoZones": [
{}
]
}
],
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
]
}Create delivery zone
POST/api/v1/DeliveryZones
Access. Send a bearer token or an API key. The caller needs the Shipments modify permission.
Request body
Send JSON with the shape CreateDeliveryZoneCommand.
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Limits: maximum 100 characters. |
description | string | No | Limits: maximum 500 characters. |
geoZones | GeoZone[] | Yes |
Response
200. Returns a SingleResult envelope. The data field is DeliveryZoneResponse.
curl -X POST "https://api.miridia.io/api/v1/DeliveryZones" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"title": "string",
"description": "string",
"geoZones": [
{
"latitude": 0,
"longitude": 0,
"radiusInMeters": 0
}
]
}'{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"description": "string",
"geoZones": [
{}
]
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Get delivery zone
GET/api/v1/DeliveryZones/{deliveryZoneId}
Access. Send a bearer token or an API key. The caller needs the Shipments view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
deliveryZoneId | path | string (uuid) | Yes |
Response
200. Returns a SingleResult envelope. The data field is DeliveryZoneResponse.
curl -X GET "https://api.miridia.io/api/v1/DeliveryZones/{deliveryZoneId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"description": "string",
"geoZones": [
{}
]
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Update delivery zone
PUT/api/v1/DeliveryZones/{deliveryZoneId}
Access. Send a bearer token or an API key. The caller needs the Shipments modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
deliveryZoneId | path | string (uuid) | Yes |
Request body
Send JSON with the shape UpdateDeliveryZoneCommand.
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | |
title | string | Yes | Limits: maximum 100 characters. |
description | string | No | Limits: maximum 500 characters. |
geoZones | GeoZone[] | No |
Response
200. Returns a SingleResult envelope. The data field is DeliveryZoneResponse.
curl -X PUT "https://api.miridia.io/api/v1/DeliveryZones/{deliveryZoneId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"description": "string",
"geoZones": [
{
"latitude": 0,
"longitude": 0,
"radiusInMeters": 0
}
]
}'{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"description": "string",
"geoZones": [
{}
]
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Delete delivery zone
DELETE/api/v1/DeliveryZones/{deliveryZoneId}
Access. Send a bearer token or an API key. The caller needs the Shipments delete permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
deliveryZoneId | path | string (uuid) | Yes |
Response
200. Returns a SingleResult envelope. The data field is boolean.
curl -X DELETE "https://api.miridia.io/api/v1/DeliveryZones/{deliveryZoneId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": true,
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Get zones inside coordinates
GET/api/v1/DeliveryZones/coordinates
Access. Send a bearer token or an API key. The caller needs the Shipments view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
latitude | query | number (double) | No | |
longitude | query | number (double) | No |
Response
200. Returns a PagedResult envelope. Each item in data is DeliveryZoneResponse.
curl -X GET "https://api.miridia.io/api/v1/DeliveryZones/coordinates" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"{
"count": 0,
"totalCount": 0,
"page": 0,
"finalPage": 0,
"pageSize": 0,
"hasMore": true,
"statusCode": "OK",
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"description": "string",
"geoZones": [
{}
]
}
],
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
]
}Models
The operations on this page use these object types. Select a type to see its fields.
DeliveryZoneResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
title | string | |
description | string | |
geoZones | GeoZone[] |
GeoZone
| Field | Type | Description |
|---|---|---|
latitude | number (double) | |
longitude | number (double) | |
radiusInMeters | integer (int32) |