Delivery Plan

Creating orders for delivery provider

post

Push given orders to delivery provider for the given tenant. In case of an unsuccessful route planning for given order (eg. due to invalid address) an email to the Merchant will be send.

Authorizations
Path parameters
tenantstringRequired
Body
orderStatusstring · enumOptionalPossible values:
siteCodestringRequired
orderIdsstring[]Optional
Responses
200
Route planning executed. Returned body only for unsuccessfully planned orders (QAC6GQEF in this example). Returned empty body for successfully planned orders (B7016709).
application/json
post
POST /delivery-v2/{tenant}/planRoute HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 78

{
  "orderStatus": "CREATED",
  "siteCode": "main",
  "orderIds": [
    "B7016709",
    "QAC6GQEF"
  ]
}
{
  "orderId": "QAC6GQEF",
  "deliveryProvider": "ONFLEET",
  "errorMessage": "completeBefore must not be before creation time"
}

Was this helpful?