Miridia
Portal
Logistics

Delivery zones

The delivery zones operations of the Core API.

Base URL: https://api.miridia.io. Read Authentication and Conventions before you call these operations.

MethodPathOperation
GET/api/v1/DeliveryZonesGet all delivery zones
POST/api/v1/DeliveryZonesCreate 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/coordinatesGet 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.

Request
curl -X GET "https://api.miridia.io/api/v1/DeliveryZones" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
{
  "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.

FieldTypeRequiredDescription
titlestringYesLimits: maximum 100 characters.
descriptionstringNoLimits: maximum 500 characters.
geoZonesGeoZone[]Yes

Response

200. Returns a SingleResult envelope. The data field is DeliveryZoneResponse.

Request
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
    }
  ]
}'
Response
{
  "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

NameInTypeRequiredDescription
deliveryZoneIdpathstring (uuid)Yes

Response

200. Returns a SingleResult envelope. The data field is DeliveryZoneResponse.

Request
curl -X GET "https://api.miridia.io/api/v1/DeliveryZones/{deliveryZoneId}" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
{
  "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

NameInTypeRequiredDescription
deliveryZoneIdpathstring (uuid)Yes

Request body

Send JSON with the shape UpdateDeliveryZoneCommand.

FieldTypeRequiredDescription
idstring (uuid)Yes
titlestringYesLimits: maximum 100 characters.
descriptionstringNoLimits: maximum 500 characters.
geoZonesGeoZone[]No

Response

200. Returns a SingleResult envelope. The data field is DeliveryZoneResponse.

Request
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
    }
  ]
}'
Response
{
  "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

NameInTypeRequiredDescription
deliveryZoneIdpathstring (uuid)Yes

Response

200. Returns a SingleResult envelope. The data field is boolean.

Request
curl -X DELETE "https://api.miridia.io/api/v1/DeliveryZones/{deliveryZoneId}" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
{
  "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

NameInTypeRequiredDescription
latitudequerynumber (double)No
longitudequerynumber (double)No

Response

200. Returns a PagedResult envelope. Each item in data is DeliveryZoneResponse.

Request
curl -X GET "https://api.miridia.io/api/v1/DeliveryZones/coordinates" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
{
  "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
FieldTypeDescription
idstring (uuid)
titlestring
descriptionstring
geoZonesGeoZone[]
GeoZone
FieldTypeDescription
latitudenumber (double)
longitudenumber (double)
radiusInMetersinteger (int32)