--- title: "POST /StockTargets/initialize" slug: "post-stocktargets-initialize" updated: 2026-09-18T14:02:49Z published: 2026-09-18T14:02:49Z canonical: "docs.wair.ai/post-stocktargets-initialize" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.wair.ai/llms.txt > Use this file to discover all available pages before exploring further. # POST /StockTargets/initialize ### GENERAL INFORMATION ### Purpose Use this endpoint to initialize stock targets for one or more style and location combinations from a size curve. **How the data is used** WAIR accepts the initialization request for asynchronous import processing. For each style and location, the size curve specifies the initial target quantity for every included SKU. The HTTP response confirms that the request was accepted by the API. It does not confirm that downstream import processing has completed. **Best practices** 1. Include the complete size curve for each style and location combination. 2. Ensure that every `skuId` belongs to the supplied `styleId`. 3. Use the same `locationId`, `styleId`, and `skuId` values as in your Items and Locations integrations. 4. Use `sourceReference` for a stable business reference such as a shipment or purchase-order identifier. 5. Use ISO 8601 UTC values for `startingDate` and `endingDate`. **Common pitfalls** 1. Sending a single initialization object without the `initializeStockTargets` array. 2. Repeating the same `locationId` and `styleId` combination in one request. 3. Repeating a `skuId` within one size curve. 4. Sending a negative quantity or an `endingDate` before `startingDate`. 5. Sending an empty array. No initialization is queued when the array is empty. ### TECHNICAL INFORMATION **Authentication** Bearer token, information on page [POST /Token](/v1/docs/tech-documentation-article) **Headers** | Name | Description | Example | | --- | --- | --- | | X-Tenant | Tenant code supplied by WAIR | `TENANT` | #### Query parameters No query parameters required. #### Body example ``` { "initializeStockTargets": [ { "locationId": "STORE-014", "styleId": "STYLE-001-BLUE", "sizeCurve": [ { "skuId": "STYLE-001-BLUE-S", "quantity": 1 }, { "skuId": "STYLE-001-BLUE-M", "quantity": 2 } ], "mode": "Static", "replenishmentActive": true, "startingDate": "2026-09-18T00:00:00Z", "endingDate": "2026-10-18T00:00:00Z", "sourceReference": "SHIPMENT-EXAMPLE-001" } ] } ``` #### Field information | Field | Context | Mandatory | Type / accepted value | | --- | --- | --- | --- | | initializeStockTargets | Initializations to process. | Yes | array | | locationId | Identifier of the location. | Yes | string, maximum 80 characters | | styleId | Identifier of the style. | Yes | string, maximum 80 characters | | sizeCurve | SKU quantities that define the size curve. Must contain at least one entry. | Yes | array | | sizeCurve > skuId | Identifier of a SKU belonging to the style. Must be unique within the size curve. | Yes | string, maximum 80 characters | | sizeCurve > quantity | Initial target quantity for the SKU. | Yes | decimal, `0` or greater | | mode | Initialization mode. | Yes | `Static` or `Dynamic` | | replenishmentActive | Whether replenishment should be active for the initialized style and location. | Yes | boolean | | startingDate | Date and time from which the initialization applies. | Yes | ISO 8601 date and time | | endingDate | Optional end date and time. Must not be earlier than `startingDate`. | No | ISO 8601 date and time | | sourceReference | Optional business reference for the initialization. | No | string, maximum 255 characters | ### RESPONSE **Status codes** - `200 OK` — The request was accepted for asynchronous import processing. - `400 Bad Request` — The request body violates one or more validation rules. - `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.