Most of our content is Publicly accessible. However some content is Private and you will be asked to create an account the first time you try to access this content.
Private content is only available to our existing customers.

GET /Recommendations/stockTargets

Prev Next

GENERAL INFORMATION

Purpose

Use this endpoint to retrieve stock target recommendations generated by WAIR. Each recommendation defines a target quantity for one SKU at one location and includes the forecast date and effective replenishment period.

How the data is used

Use the response to synchronize recommended stock targets with your source system. By default, the endpoint returns the qualifying changes that need synchronization. Use FullLoad=true when you need a complete qualifying snapshot.

Disabled stock targets are returned with targetQuantity set to 0. Effective start and end dates can be absent when no date restriction applies.

Best practices

  1. Start a new integration or recovery with FullLoad=true and retrieve every page.
  2. For regular synchronization, omit FullLoad or set it to false and process all returned changes.
  3. Start with Offset=0 and increase Offset by Limit while moreRecordsAvailable is true.
  4. Identify a target by the combination of locationId and skuId.
  5. Apply a returned quantity of 0; it can represent a disabled stock target rather than a missing record.

Common pitfalls

  1. Treating an incremental response as a complete snapshot.
  2. Stopping after the first page while moreRecordsAvailable is true.
  3. Ignoring a targetQuantity of 0 and leaving an obsolete target active in the source system.
  4. Assuming startDate and endDate are always populated.

TECHNICAL INFORMATION

Authentication

Bearer token, information on page POST /Token

Headers

NameDescriptionExample
X-TenantEnvironment code supplied by WAIRENVIRONMENT

Query parameters

NameDescriptionExample
OffsetRequired number of stock target records to skip.0
LimitRequired maximum number of stock target records to return.100
FullLoadOptional. Defaults to false. When true, returns a complete qualifying stock target snapshot instead of only the qualifying changes.true

Example request for a full load:

?Offset=0&Limit=100&FullLoad=true

Body example

No request body required.

RESPONSE

Status codes

  • 200 OK — The stock target recommendations were retrieved successfully. The stockTargets array can be empty.
  • 400 Bad Request — Offset or Limit is missing, or a query parameter cannot be parsed.
  • 401 Unauthorized — The bearer token is missing, expired, or invalid.
  • 500 Internal Server Error — An unexpected error occurred while processing the request.

Body example

{
  "stockTargets": [
    {
      "locationId": "STORE-014",
      "skuId": "STYLE-1001-BLUE-M",
      "targetQuantity": 3,
      "forecastDate": "2026-09-21T00:00:00Z",
      "startDate": "2026-09-01T00:00:00Z",
      "endDate": "2026-12-31T00:00:00Z"
    },
    {
      "locationId": "STORE-014",
      "skuId": "STYLE-1001-BLUE-L",
      "targetQuantity": 0,
      "forecastDate": "2026-09-21T00:00:00Z",
      "startDate": null,
      "endDate": null
    }
  ],
  "offset": 0,
  "limit": 100,
  "moreRecordsAvailable": false
}

Field information

FieldDescription
stockTargetsStock target recommendations in this page.
locationIdUnique identifier of the location.
skuIdUnique identifier of the SKU.
targetQuantityRecommended stock quantity. A disabled target is returned as 0.
forecastDateForecast date used for the recommendation.
startDateEffective replenishment start date. A manual activation date takes precedence over the imported date. Can be null.
endDateEffective replenishment end date. A manual activation date takes precedence over the imported date. Can be null.
offsetOffset value used for the request.
limitLimit value used for the request.
moreRecordsAvailableIndicates whether another page is available.