Create or update an order
optimoroute_create_orderCreate one order, or update an existing one, with address geocoding. operation: CREATE (new; errors if orderNo exists), UPDATE (existing only), MERGE (create or update only the fields you send — safest for edits), SYNC (create or REPLACE all fields with what you send). CREATE/SYNC/MERGE of a new order need date, type, location and orderNo or id. A location is either an existing locationNo alone, an address to geocode, or latitude+longitude+locationName. OptimoRoute: POST /create_order.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | OptimoRoute's order id. Takes priority over orderNo when matching. | |
| date | No | Order date, YYYY-MM-DD. | |
| type | No | D = delivery, P = pickup, T = task. | |
| No | Customer email for notifications. | ||
| load1 | No | Load units #1 (boxes, kg, ...) per your capacity setup. | |
| load2 | No | Load units #2. | |
| load3 | No | Load units #3. | |
| load4 | No | Load units #4. | |
| notes | No | Notes for the driver's instructions. | |
| phone | No | Customer phone number. | |
| skills | No | Required driver skill codes. | |
| orderNo | No | Your order number, shown in the web app. Used to match existing orders. | |
| duration | No | Service time at the location, in minutes. | |
| location | No | Where the order is serviced. | |
| priority | No | L low, M medium (default), H high, C critical. | |
| operation | Yes | How to apply the order (see description). | |
| relatedId | No | id of a related pickup/delivery. | |
| assignedTo | No | Force the order onto one driver, e.g. {"serial": "102"} or {"externalId": "444"}. null clears it. | |
| timeWindows | No | When the order can be serviced, e.g. [{"twFrom": "10:00", "twTo": "14:00"}]. | |
| allowedDates | No | Restrict the dates the order may be scheduled, e.g. {"from": "2026-10-01", "to": "2026-10-07"}. | |
| customField1 | No | Legacy custom field #1. | |
| customField2 | No | Legacy custom field #2. | |
| customField3 | No | Legacy custom field #3. | |
| customField4 | No | Legacy custom field #4. | |
| customField5 | No | Legacy custom field #5. | |
| customFields | No | New-style custom fields keyed by the field key configured in OptimoRoute. | |
| relatedOrderNo | No | orderNo of a related pickup/delivery (set on the second order of the pair). | |
| allowedWeekdays | No | Weekdays the order may be scheduled on. Default: all. | |
| vehicleFeatures | No | Required vehicle feature codes. | |
| allowedDateTimes | No | Datetime windows in which the service may begin. | |
| acceptDuplicateOrderNo | No | Allow CREATE of an order whose orderNo already exists. | |
| notificationPreference | No | How order-tracking notifications are delivered for this order. |