My Account

Introduction to Route Optimization REST API

This document provides a high-level introduction to Route Optimization REST API.

Walmart Commerce Technologies (WCT) provides Route Optimization REST API for logistics planners interested in the programmatic optimization of route and trailer plans. You can use the REST API to programmatically access and interact with route optimization services and resources.

Route Optimization REST API offers operations for transport route planning and job creation. To access these operations, you construct and send HTTP requests to endpoints using standard REST methods.

The basics

Route Optimization uses the following terms and concepts.

A route is the path traveled by a trailer, from origin to destination.

A route plan maps the path that is traveled to complete a route.

Routing is the task of mapping the path of a trailer along a planned route from origin to destination.

Planning is the task of ingesting and analyzing information, and then creating an optimized workflow for loading and delivery.

An optimized route is the product of analysis of a range of parameters which encompass location, container metadata such as temperature, weight, and type of goods, time factors like store operating hours and driver work shifts, and more.

A load plan is a plan for loading a trailer. A load plan is calculated to maximize the capacity of the vehicle and minimize the number of vehicles that are required to deliver shipments. A load plan is created based on a wide range of factors that include the vehicle and the capabilities it offers—for example, refrigerated storage and the type of products awaiting delivery. A load plan increases operational efficiency.

A job is the process that creates optimized load plans and route plans.

A release is the delivery of the output from the completed job.

Authorization

Use of Route Optimization REST API requires a Walmart Consumer ID (WM_CONSUMER.ID). Clients of Route Optimization REST API receive a Walmart Consumer ID upon signing a contract with WCT.

The Walmart Consumer ID of the tenant must be included in the header of every request.

Header parameterExample
WM_CONSUMER.ID2d6cf199-9b07-4350-bb2b9-0db3c2

Operations by endpoint

Route Optimization REST API provides the following endpoints.

HTTP methodAction
POSTPOST /oath/v1/token
Create an access token. Most requests require the submission of an access token.
POSTPOST /v1/routes
Initiate the creation of a route or load plan.
PUTPUT /v1/{jobId}cancel
Cancel the release of the route plan and the routes it includes.
GETGET /v1/{jobId}/dispatchSummary
Retrieve a file stream of the Dispatch Summary Excel document. This document provides a comprehensive overview of the optimized routes in a release.
GETGET /v1/job/{jobId}
Fetch information about an optimization. This request can be made at any time.

Operations by functional area

The REST API provides operations in the following functional areas.

Authentication

OperationHTTP method and endpointDescription
Create an Access TokenPOST
/oauth/v1/token
Create an access token. An access token is required to make a request. Authentication to the Route Optimization REST API requires an OAuth 2.0 Bearer Token in accord with RFC 6750.

Routing

OperationHTTP method and endpointDescription
Create RoutesPOST
/v1/routes
Submit pallets and generate an optimized route or load plan.

Planning

OperationHTTP method and endpointDescription
Cancel ReleasePUT
/v1/job/{jobId}/cancel
Cancel the execution of a job or the release of a route plan and the routes it includes.
Download Dispatch SummaryGET
/v1/job/{jobId}/dispatchSummary
Retrieve a file stream of the Dispatch Summary Excel document. The Excel document includes a comprehensive overview of the optimized routes in a release.
Get Job DetailsGET
/v1/job/{jobId}
Fetch information about an optimization. The information includes status, route details, aggregated metrics at the route or job level, and so on. You can request this operation at any time.

Status codes

Route Optimization REST API uses standard HTTP status codes. The following table lists the status codes that the API typically returns. For detailed information about HTTP status codes, see RFC 9110 HTTP Semantics.

Status codeMessageDescription
200OKThe request was successful and returned the expected response.
400Bad requestThe request was invalid or was not properly formed. This error is commonly generated in response to a request that has malformed syntax, is too large, or uses invalid message framing.
401UnauthorizedAuthentication failed. The user cannot be authenticated. This error occurs when the authentication credentials are invalid or were not provided.
403ForbiddenThe request is valid and was understood but the server refused action. This error is typically the result of inadequate permissions or authentication at the server.
429Too many requestsThe rate limit was exceeded. Try again later.

Rate limits

Rate limits restrict the number of API calls that are allowed for each endpoint each minute. Route Optimization has generally established rate limits of 10 requests per minute for each endpoint.

Integrations that exceed the rate limit receive status code HTTP 429 with an error message. If your integration requires adjustments, contact your account representative.