Create Order
Create a new order in Last Mile Intelligence.
Operation
Section titled “Operation”createOrder
Resource
Section titled “Resource”order
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Order Data | JSON | Yes | - | Order object with required fields |
Order Data Fields
Section titled “Order Data Fields”| Field | Type | Required | Description |
|---|---|---|---|
| customerId | string | Yes | Customer ID |
| shipToId | string | Yes | Ship-to location ID |
| scheduledDate | string | No | Scheduled delivery date |
| items | array | Yes | Array of order items |
| notes | string | No | Order notes |
Response
Section titled “Response”Success
Section titled “Success”{ "id": "ord_new123", "orderNumber": "ORD-2024-001236", "customerId": "cust_xyz789", "shipToId": "ship_def456", "status": "pending", "createdAt": "2024-06-21T09:00:00Z"}{ "success": false, "error": "Validation failed", "details": { "customerId": "Customer not found" }}Error Handling
Section titled “Error Handling”- Missing API Token: LMI credential is missing API token
- Customer Not Found: Customer ID does not exist
- Ship-To Not Found: Ship-to location does not exist
- Validation Error: Required fields missing or invalid
- Permission Denied: API token lacks permission for this operation