Skip to content

assignDeliveryVisit

WRITE

Assign or move a delivery visit to a current route plan. Supply visitId and destination routePlanId from getDispatchWorkspace. If planned quantity is unknown or the user explicitly changes it, include their positive requestedGallons; never invent gallons. Quantity and assignment commit together after truck roads are calculated. This changes the plan, without messaging a driver or customer..

POST /api/v1/routes/assignDeliveryVisit
curl -X POST '<your-host>/api/v1/routes/assignDeliveryVisit' \
  -H 'Authorization: Bearer <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "visitId": "string",
    "routePlanId": "string"
  }'
Response
{
  "entityId": "string",
  "message": "string",
  "serviceDate": "string",
  "routePlanId": "string"
}

Parameters

ParameterType
min length 1
min length 1
> 0

Input schema

schema
{
  "type": "object",
  "properties": {
    "visitId": {
      "type": "string",
      "minLength": 1
    },
    "routePlanId": {
      "type": "string",
      "minLength": 1
    },
    "requestedGallons": {
      "type": "number",
      "exclusiveMinimum": 0
    }
  },
  "required": [
    "visitId",
    "routePlanId"
  ],
  "additionalProperties": false
}