Miridia
Portal
Logistics (Cargopilot)

Delivery zones and rates

Draw the delivery zones of your business, find the zone of an address, and keep rate matrices and discounts for each service level and weight band.

A delivery zone is an area on the map where you deliver, for example "Durban central" or "South Coast". A rate matrix is your own price for a delivery, for a service level, a weight band, and a pair of zones.

Delivery zones

A delivery zone is made of one or more circles. Each circle has a centre (a latitude and a longitude) and a radius in metres. Use more than one circle to cover an area that is not round, or draw a polygon in the portal.

In the portal, open the delivery zone settings, and draw the circles on the map. With the API, send POST /api/v1/DeliveryZones:

POST /api/v1/DeliveryZones
{
  "title": "South Coast",
  "description": "Margate to Port Shepstone",
  "geoZones": [
    { "latitude": -30.8636, "longitude": 30.3705, "radiusInMeters": 8000 },
    { "latitude": -30.7414, "longitude": 30.4550, "radiusInMeters": 6000 }
  ]
}

To find the zones that hold a point, send GET /api/v1/DeliveryZones/coordinates?latitude=-30.86&longitude=30.37. Zones can overlap. Thus the response is a list.

Where Miridia uses zones

  • Price lists. A price list can apply to a delivery zone. Thus a customer in one zone can pay a different price. Read Pricing.
  • Rate matrices. A rate can apply from an origin zone to a destination zone.

Rate matrices

A rate matrix holds one price rule for your deliveries. In the portal, open Rates & Pricing. With the API, send POST /api/rates.

FieldContent
titleA name, for example "Express, up to 5 kg, local".
serviceLevelThe service level, for example Standard, Express, or SameDay.
rateThe fixed price.
distanceBasedRateThe price for each unit of distance.
minWeight and maxWeightThe weight band, with the unit in weightType.
limitOnDimension or Volume. It selects whether the limits apply to the dimensions or to the volume of the goods.
deliveryDaysMin and deliveryDaysMaxThe number of days for the delivery.
businessDimensionPresetIdOptional. Link the rate to one package size.
originZoneId and destinationZoneIdOptional. Link the rate to a pair of zones. Leave a zone empty to match each origin or each destination.

Discounts

A discount lowers the price of a rate matrix for a large shipment. It applies when the number of packages is between minPackageCount and maxPackageCount. The discountType is Percentage or FixedValue, and discountBy is the amount.

TaskRequest
List the discountsGET /api/rates/discounts
Add a discountPOST /api/rates/{rateId}/discounts
Change a discountPUT /api/rates/{rateId}/discounts/{discountId}
Delete a discountDELETE /api/rates/{rateId}/discounts/{discountId}

Quotations from rate matrices

Cargopilot uses your rate matrices to quote a shipment for your own fleet, and for a partner carrier that has no API. These quotations show on the shipment next to the quotations of the connected carriers.

API reference