Create Order
The "Create Order" API request requires parameters such as order type (delivery, in-store pickup, curbside, or shipping), a required unique storeExternalId and orderExternalId, orderValue, deliveryContact, and deliveryAddress (except for pickup types), with optional fields like groupId, tips, pickupTime, dropoffTime, and package details to facilitate accurate delivery estimates and provider selection.
HTTP Response
Please see the Order documentation for details on the response.
Request Body Parameters
type
- string
- enum:
delivery,in-store-pickup,curbside,shipping - Order Type. If not specified, orchestration preference of Providers and services will be based on orchestration.
storeExternalId
- string (required)
- Unique Id of the pickup location for which the order is being placed. See Create Location.
orderExternalId
- string (required)
- Unique Id of the order generated in your system and configured in our system. Can be configured to be non-unique.
groupId
- string
- Group ID allows you to group a number of orders together. It further helps in providing a combined post-purchase experience for these orders.
orderValue
- double (required)
- The value of the order in major units as decimals. E.g.,
10.00. In USD this will be $10.00
tips
- double
- Driver tip amount in major units as decimals. E.g.,
9.00. In USD this will be $9.00
pickupTime
- object
- Time Window in which the package will be ready to be picked up.
dropoffTime
- object
- Time Window in which the package must be delivered by. Not needed for pickup order.
deliveryContact
- object (required)
- Customer information to obtain an estimate.
deliveryAddress
- object (required)
- Address to deliver the package to. Not needed for order type: in-store-pickup and curbside.
packages
- array of objects
- Package details. Package dimension and weight details help in surfacing accurate estimates and winning Providers. For
shippingtype orders, packages are converted to shipments with applicable Providers.
isSpirit
- boolean
- Delivery contains spirits.
isBeerOrWine
- boolean
- Delivery contains beer or wine.
isTobacco
- boolean
- Delivery contains tobacco.
isFragile
- boolean
- Delivery has fragile items.
isRx
- boolean
- Delivery has Rx items.
hasRefrigeratedItems
- boolean
- Delivery has refrigerated items.
hasPerishableItems
- boolean
- Delivery has perishable items.
notification
- object
- Status update notification recipients.
signature
- string (enum)
- Signature requirement. If available, defaults to Provider-level configuration. Defaults to
not_requiredif Provider-level configuration is not available. - Allowed:
not_required,required,unattended,required_recipient
pickupInstructions
- string
- Pickup instruction for the location. This will override the instructions configured with the pickup location.
deliveryInstructions
- string
- Delivery instructions for drop-off.
orderAttributes
- json
- Configurable key-value pairs of custom order attributes. See Attributes.
itemList
- array of objects
- Array of items in the order. Details offer improved post-purchase experiences. In the absence of
packages, cubic dimensions and weight will be derived from this list.
alternateLocation
- object
- Alternate location details in case order is to be delivered to alternate location.
proposedProviders
- array of objects
- Override orchestration and place order with the specified Provider and Service.
dispatch
- object
- Order dispatch settings. e.g., dispatch order 10 mins before pickup time. In case of null, settings will be inherited.
temperatureControl
- string (enum)
- Temperature information of the package.
- Allowed:
frozen,refrigerated,cool,ambient,warm,none
locale
- string
- Preferred locale by the customer for an order. Value to be sent in the format of language code (ISO-639-1) - country code (ISO-3166-1-alpha-2). E.g., fr-CA, en-US.
createdDate
- int32
- Date at which the order was originally created in Unix time in milliseconds. E.g., 1500616800000
Example Request
curl --request POST \
--url https://sandbox.api.deliverysolutions.co/api/v2/order/placeorderasync \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'tenantId: YOUR_TENANT_ID' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-compression: true'
Response Codes
201- Success400- Bad Request
Related
Delete Boundary
The "Delete Boundary" API endpoint requires a unique integer boundaryId to delete a specific boundary, responds with a 200 status on success or 400 on bad request, and includes example cURL request headers such as tenantId, x-api-key, and x-compression.
Get Order by External ID
The "Get Order by External ID" API allows retrieval of an order using a unique external ID, optionally forcing an update to fetch the latest order details from the provider (if supported), returning the order data with possible error information, and uses HTTP status codes 200, 400, or 404 to indicate success or failure.
Edit Boundary
The "Edit Boundary" API requires a unique integer boundaryId and an array of boundary objects with a mandatory status field set to either "active" or "inactive" to modify a specified boundary, returning a 200 status code on success or 400 on error.
Check Delivery Assurance
The Delivery Assurance service offers five key checks—Store Boundary, DSP, Store Boundary + DSP, Confidence Score, and Return Confidence Score—to verify delivery coverage and reliability based on store boundaries, provider availability, and confidence metrics, with specific requirements such as providing pickup and dropoff times for time-window checks, restrictions on provider configurations, caching options to reduce latency, and current availability of confidence scores only in the U.S., while excluding business rules and orchestration engine usage.
Delivery Solutions API Doc - Premium
The Delivery Solutions API documentation provides sandbox and production base URLs and portals, instructions for importing and running a Postman collection including a pre-script request, and specifies that authentication requires passing a generated API key and tenantId in request headers while keeping the key secure.
Create Batch
The "Create Batch" API endpoint requires a unique batchExternalId, dispatch details specifying scheduling and reference times, sorting parameters to prioritize order dispatch by fields like deliveryDistance, and optionally order details, with example usage shown via a POST request including headers and JSON body, returning status codes such as 201 for success or 400 for errors.