Delivery zones and rates
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:
{
"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.
| Field | Content |
|---|---|
title | A name, for example "Express, up to 5 kg, local". |
serviceLevel | The service level, for example Standard, Express, or SameDay. |
rate | The fixed price. |
distanceBasedRate | The price for each unit of distance. |
minWeight and maxWeight | The weight band, with the unit in weightType. |
limitOn | Dimension or Volume. It selects whether the limits apply to the dimensions or to the volume of the goods. |
deliveryDaysMin and deliveryDaysMax | The number of days for the delivery. |
businessDimensionPresetId | Optional. Link the rate to one package size. |
originZoneId and destinationZoneId | Optional. 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.
| Task | Request |
|---|---|
| List the discounts | GET /api/rates/discounts |
| Add a discount | POST /api/rates/{rateId}/discounts |
| Change a discount | PUT /api/rates/{rateId}/discounts/{discountId} |
| Delete a discount | DELETE /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
Fleet and tracking
Record the vehicles of your fleet, import them from a CSV file, link a GPS tracker, and see the last position and the travel history of each vehicle.
Customs and HS codes
Classify each product with the HS code classifier and the dangerous-goods classifier, and prepare the customs data, the documents, and the duties for each cross-border shipment.