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.

POST /SalesPrices

Prev Next

GENERAL INFORMATION

Purpose

Use this endpoint to create or update the cost price and sales price of a SKU at a specific location.

How the data is used

Location-specific prices support merchandising, replenishment, and reporting calculations. WAIR accepts the request for asynchronous import processing.

Best practices

  1. Use a stable id for each location and SKU price record. Send the same id again when updating that record.
  2. Match skuId to the identifiers supplied through POST /Items.
  3. Match locationId to the identifiers supplied through POST /Locations.
  4. Use the same currency and price basis consistently across your integration.
  5. Include each id and each locationId and skuId combination only once per request.

Common pitfalls

  1. Generating a new id whenever a price changes. This creates a different record instead of updating the existing record.
  2. Repeating an id or a location and SKU combination in one request.
  3. Confusing costPrice with salesPrice.
  4. Sending an empty salesPrices array. No import is queued for an empty array.

TECHNICAL INFORMATION

Authentication

Bearer token, information on page POST /Token

Headers

Name Description Example
X-Tenant Tenant code supplied by WAIR TENANT

Query parameters

No query parameters required.

Body example

{
  "salesPrices": [
    {
      "id": "PRICE-STORE-014-STYLE-001-BLUE-M",
      "skuId": "STYLE-001-BLUE-M",
      "locationId": "STORE-014",
      "costPrice": 9.5,
      "salesPrice": 39.99
    }
  ]
}

Field information

Field Context Mandatory Type / accepted value
salesPrices Location-specific prices to process. Yes array
id Stable unique identifier of the price record. Yes string, maximum 80 characters
skuId Identifier of the SKU. Yes string, maximum 80 characters
locationId Identifier of the location. Yes string, maximum 80 characters
costPrice Cost price of one unit at the location. Yes decimal, maximum 999999.999
salesPrice Sales price of one unit at the location. Yes decimal, maximum 999999.999

RESPONSE

Status codes

  • 200 OK — The request was accepted for asynchronous import processing.
  • 400 Bad Request — The request body contains duplicate identifiers, duplicate location and SKU combinations, values above the supported maximum, or otherwise fails validation.
  • 401 Unauthorized — The bearer token is missing, expired, or invalid.
  • 500 Internal Server Error — An unexpected error occurred while accepting the request.

Body example

No response body.