POST https://developer.api.us.walmart.com/api-proxy/service/supplychain/transportation/v1/daas-simulator/available-step/execute
This request executes the requested action on the delivery.
This request can be made only with a sandbox account.
To simulate the progress of a delivery, use a sandbox account to create the delivery using the Book a delivery request (POST /deliveries
) request.
Because this is not an actual delivery, no driver will be assigned.
The simulator request completes the process.
Use the Execute Next Step (POST https://developer.api.us.walmart.com/api-proxy/service/supplychain/transportation/v1/daas-simulator/available-step/execute
) request with a valid event to complete the next step.
The request responds with the latest updated status along with the list of possible actions that can be take subsequently.
Example Request Sequence
The following is a typical, but by no means the only, request sequence for a complete delivery.
This is being conducted for testing and therefore will be in a sandbox account.
To replicate driver actions, such as assigning a driver to a delivery, simulator requests must be used.
Action | Request | Notes |
---|---|---|
Get access token | {baseURL}/api-proxy/service/identity/oauth/v1/token | Required for access. |
Verify location eligibility | {baseURL}/api-proxy/service/supplychain/transportation/v1/sbx-daas/deliveries/location/eligibility | This request confirms a customer’s order can be delivered based on the order delivery destination. |
Get delivery cost quote | {baseURL}/deliveries/quote | This request returns delivery price only, not the price of the entire order. The delivery price can be guaranteed if the order is placed within the delivery price's expiration time. |
Book delivery | {baseURL}/api-proxy/service/supplychain/transportation/v1/sbx-daas/deliveries | This request creates a new delivery. However, an existing delivery could be used, as well as one created through an application such as the Walmart GoLocal Client Center. |
Assign a driver | {simulatorBaseURL}/api-proxy/service/supplychain/transportation/v1/daas-simulator/available-step/execute | This is a simulator request. Request parameters important values: "action": "ASSIGN_DRIVER" "actor": "WALMART_USER" |
En route to pick up | {simulatorBaseURL}/api-proxy/service/supplychain/transportation/v1/daas-simulator/available-step/execute | This is a simulator request. Request parameters important values: "action": "ENROUTE_TO_PICKUP" "actor": "DRIVER" |
Arrive at store | {simulatorBaseURL}/api-proxy/service/supplychain/transportation/v1/daas-simulator/available-step/execute | This is a simulator request. Request parameters important values: "action": "ARRIVED_AT_STORE" "actor": "DRIVER" |
En route to drop off | {simulatorBaseURL}/api-proxy/service/supplychain/transportation/v1/daas-simulator/available-step/execute | This is a simulator request. Request parameters important values: "action": "ENROUTE_TO_DROPOFF" "actor": "DRIVER" |
Arrive at customer location | {simulatorBaseURL}/api-proxy/service/supplychain/transportation/v1/daas-simulator/available-step/execute | This is a simulator request. Request parameters important values: "action": "ARRIVED_AT_CUSTOMERS_LOCATION" "actor": "DRIVER" |
Deliver | {simulatorBaseURL}/api-proxy/service/supplychain/transportation/v1/daas-simulator/available-step/execute | This is a simulator request. Request parameters important values: "action": "DELIVER" "actor": "DRIVER" |
The URLs are:
- The {baseURL} is the associated production or sandbox account.
See Walmart GoLocal Accounts section for the URL details. - The {simulatorBaseURL} is POST
https://developer.api.us.walmart.com/api-proxy/service/supplychain/transportation/v1/daas-simulator
Example Requests
The following are example requests and responses.
These headers values are used in the simulator requests:
Content-Type: application/json
Authorization: Bearer eyJraWQiOiI1N…yLTQ4MjctOGUz
WM_CONSUMER.ID: 685f74bf-b8ca-447d-8338-966di751443f
WM_QOS.CORRELATION_ID: 685f74bf-b8ca-447d-8338-966dd751445f
Example Request 1
This request executes the next step to be ENROUTE_TO_PICKUP
for the delivery including orderId of Store15_748345
.
POST https://developer.api.us.walmart.com/api-proxy/service/supplychain/transportation/v1/daas-simulator/available-step/execute
Request body:
{ "payload": { "orderId": "Store15_748345", "actor": "DRIVER", "action": "ENROUTE_TO_PICKUP", "driverUserId": null }
}
Example Request 2
This request executes the next step to be ENROUTE_TO_PICKUP
for the delivery including deliveryId
of 40151218-9cbe-4dd5-9043-932c8b7845e1
.
POST https://developer.api.us.walmart.com/api-proxy/service/supplychain/transportation/v1/daas-simulator/available-step/execute
Request body:
{ "payload": { "deliveryId": "40151218-9cbe-4dd5-9043-932c8b7845e1", "actor": "DRIVER", "action": "ENROUTE_TO_PICKUP", "driverUserId": null }
}
Examples Response
This is the response from either successful request.
The current delivery has been changed to ENROUTE_TO_PICKUP
.
Response body:
{ "availableNextStep": [ { "orderId": "TEST_ORDER_1112", "deliveryId": "40151218-9cbe-4dd5-9043-932c8b7845e1", "deliveryStatus": "ENROUTE_TO_PICKUP", "availableNextStep": [ { "action": "ARRIVED_AT_STORE", "actor": "DRIVER" }, { "action": "CANCEL", "actor": "CLIENT" } ] } ]
}
See Also
To request a list of next available actions, see POST /available-step