Miridia
Portal
Logistics (Cargopilot)

Delivery plans

Group shipments into a delivery plan with a vehicle and drivers, follow the plan from departure to completion, and see each step on a timeline.

A delivery plan is a group of shipments that leave together, usually in one of your own vehicles. It is also called a trip or a dispatch. The API uses the path /api/v1/plans, and the events use the name Dispatch.

Use a delivery plan for your own fleet. For a shipment that a carrier moves, read Carriers and quotations.

Create a delivery plan

In the portal, select New Delivery Plan. The plan builder shows the shipments that are not in a plan yet. Select the shipments, a vehicle, and one or more drivers.

With the API:

  1. Send GET /api/v1/plans/code to get a new plan code.
  2. Send GET /api/v1/plans/unassigned-shipments to find the shipments that are not in a plan.
  3. Send POST /api/v1/plans with the code, a description, the shipmentIds, the driverIds, and the vehicleId.
POST /api/v1/plans
{
  "dispatchCode": "<plan-code>",
  "description": "South Coast run, Tuesday",
  "shipmentIds": ["<shipment-id-1>", "<shipment-id-2>"],
  "driverIds": ["<driver-id>"],
  "vehicleId": "<vehicle-id>"
}

Miridia raises the OnDispatchCreated event.

Change the shipments of a plan

TaskRequest
Add a shipmentPOST /api/v1/plans/{deliveryPlanId}/shipments with the shipmentId
Remove a shipmentDELETE /api/v1/plans/{deliveryPlanId}/shipments/{shipmentId}
Find the plan of a shipmentGET /api/v1/plans/in-shipment/{shipmentId}

Status of a plan

A plan has one of these statuses: Draft, Unassigned, Pending, Active, Dispatched, InTransit, Complete, and Cancelled. Your team sets the status as the plan moves. Filter the list of plans by status in the portal or with the API.

To change the status or the dates, send PUT /api/v1/plans/{deliveryPlanId}. A plan records the scheduled departure, the actual departure, and the completion. Each change raises the OnDispatchUpdated event.

The timeline

GET /api/v1/plans/{deliveryPlanId}/timeline returns the time of each step of the plan and of each shipment on it. The steps are: the order placed, the shipment created, the shipment added to the plan, the departure, the collection, and the delivery. The portal draws the timeline as a Gantt chart. Use it to find the step that takes the most time.

The map

The portal shows each plan on a map, with the stops and the road route between them. To see where a vehicle is now, read Fleet and tracking.

Route optimisation

Cargopilot orders the stops of a plan for the shortest route. It uses the delivery time windows, the capacity of the vehicle, and the shifts of the drivers. It can also plan more than one vehicle at a time.

Auto-batch

POST /api/v1/plans/{dispatchId}/autobatch groups the open shipments into the plan by delivery zone and delivery window. It also raises the OnDispatchUpdated event, so a workflow can apply your own rules.

The schedule

The Schedule Overview page is a calendar of the business. A schedule event has a type: Dispatch, Incoming, Task, or Production. Use a Dispatch event to put a delivery run on the calendar of the team. Manage the events with /api/v1/schedule/events. Add mine=true to read only your own events.

Read the plans

  • GET /api/v1/plans returns a page of plans. Filter by status and by a date range with from and to.
  • GET /api/v1/plans/overview returns the numbers for the delivery plan dashboard.

API reference