# Stocks (Inventory)

Endpoints to create, update and read stocks.

## List articles

> This part of the API is deprecated. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Search articles tenant-wide based on title or tenantArticleId

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"SupportedLocale":{"description":"This part of the API is in Beta status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />ISO 3166 conform country code and ISO 639-1 conform language code (de_DE, en_US, ch_FR, etc.)","enum":["de_DE","en_US","pl_PL","ru_RU","nl_NL","fr_FR","it_IT","nb_NO","es_ES","cs_CZ","sk_SK","pt_PT","sl_SI","ro_RO","bg_BG","hr_HR","hu_HU"],"type":"string","title":"SupportedLocale"},"InventoryArticlePaginatedResult":{"properties":{"articles":{"items":{"$ref":"#/components/schemas/InventoryArticle"},"type":"array"},"pageInfo":{"$ref":"#/components/schemas/PageInfo"},"total":{"minimum":0,"type":"number"}},"required":["total","pageInfo","articles"],"title":"InventoryArticlePaginatedResult","type":"object","description":"InventoryArticlePaginatedResult"},"InventoryArticle":{"properties":{"titleLocalized":{"$ref":"#/components/schemas/LocaleString"},"attributes":{"items":{"$ref":"#/components/schemas/ListingAttributeItem"},"type":"array"},"imageUrl":{"type":"string"},"tenantArticleId":{"type":"string"},"title":{"type":"string"}},"required":["imageUrl","tenantArticleId","title"],"title":"InventoryArticle","type":"object","description":"InventoryArticle"},"LocaleString":{"additionalProperties":{"type":"string"},"description":"Provides Localized values. The key is the locale, the value is the translation. https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/localization","title":"LocaleString","type":"object"},"ListingAttributeItem":{"allOf":[{"$ref":"#/components/schemas/ArticleAttributeItem"}],"properties":{"valueLocalized":{"$ref":"#/components/schemas/LocaleString"},"keyLocalized":{"$ref":"#/components/schemas/LocaleString"}},"title":"ListingAttributeItem","description":"ListingAttributeItem"},"ArticleAttributeItem":{"properties":{"valueLocalized":{"allOf":[{"$ref":"#/components/schemas/LocaleString"}],"description":"The translations for the key of the attribute. This can be only filled with a descriptive category"},"keyLocalized":{"allOf":[{"$ref":"#/components/schemas/LocaleString"}],"description":"The translations for the key of the attribute. This can be only filled with a descriptive category. Excluding for %%subtitle%%"},"category":{"description":"This category is used by OCFF to customize implemented processes.\nCategorized attributes are used by various processes and tools\nthroughout our platform. For a complete list of possible categories\nand the correct use of those please refer to the documentation.\nDefault value: miscellaneous","enum":["descriptive","miscellaneous","pickingSequence","customs","insurance","shop","dimensions","carrierService","salesPrice"],"type":"string"},"context":{"allOf":[{"$ref":"#/components/schemas/ArticleAttributeItemContext"}],"description":"Context for salesPrice category and valuePerUnit key. Can only be set via Listing endpoints."},"key":{"description":"Providing the key %%subtitle%% (see example) here will cause the\nvalue to appear for example in the App directly under the title.\nWith all other attributes also the key will be displayed in the\n clients.","minLength":1,"type":"string"},"priority":{"description":"This value gives the priority in the respective attribute category.\nThe lower the value the higher is the priority, e.g. priority 1 is\nhigher than priority 10. Attributes that have the highest priority\nmight be selected for display in different articles of OCFF. Default\nValue is 1001. For details please contact the product owners.","format":"int64","maximum":1001,"minimum":1,"type":"integer"},"type":{"default":"STRING","description":"The type of the attribute.","enum":["STRING","NUMBER","CURRENCY","BOOLEAN"],"type":"string"},"value":{"minLength":1,"type":"string"}},"required":["key","value"],"title":"ArticleAttributeItem","type":"object","description":"ArticleAttributeItem"},"ArticleAttributeItemContext":{"properties":{"type":{"description":"Indicates the entity type the value refers to.","enum":["FACILITY_GROUP","FACILITY","TAG_REFERENCE"],"type":"string"},"value":{"description":"Holds the reference to the entity the attribute refers to.","minLength":1,"type":"string"}},"required":["type","value"],"title":"ArticleAttributeItemContext","type":"object","description":"ArticleAttributeItemContext"},"PageInfo":{"properties":{"endCursor":{"description":"The cursor to use to fetch the next page of items. Use with parameter `after`.","type":"string"},"hasNextPage":{"description":"If true, there are more items after the current page.","type":"boolean"},"hasPreviousPage":{"description":"If true, there are more items before the current page.","type":"boolean"},"startCursor":{"description":"The cursor to use to fetch the previous page of items.","type":"string"}},"required":["hasNextPage","hasPreviousPage","startCursor","endCursor"],"title":"PageInfo","type":"object","description":"PageInfo"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/articles":{"get":{"deprecated":true,"description":"This part of the API is deprecated. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Search articles tenant-wide based on title or tenantArticleId","operationId":"getArticles","parameters":[{"in":"query","name":"size","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"number"}},{"in":"query","name":"startAfterId","required":false,"schema":{"type":"string"}},{"in":"query","name":"facilityRef","required":false,"schema":{"type":"string"}},{"in":"query","name":"searchTerm","required":false,"schema":{"minLength":1,"type":"string"}},{"in":"query","name":"locale","required":false,"schema":{"$ref":"#/components/schemas/SupportedLocale"}},{"in":"query","name":"tenantArticleId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryArticlePaginatedResult"}}},"description":"Articles search result according to the request. The result is in the body."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"List articles","tags":["Stocks (Inventory)"]}}}}
```

## Get article forecast

> This part of the API is in Alpha status. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#alpha>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Get the forecast for a specific tenantArticleId

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ArticleStockForecast":{"properties":{"created":{"format":"date-time","type":"string"},"cumulated":{"type":"number"},"cumulatedLowerBounds":{"items":{"type":"number"},"type":"array"},"cumulatedUpperBounds":{"items":{"type":"number"},"type":"array"},"id":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"loadTime":{"format":"date-time","type":"string"},"lowerBounds":{"items":{"type":"number"},"type":"array"},"period":{"enum":["DAILY"],"type":"string"},"point":{"type":"number"},"sourceDate":{"format":"date-time","type":"string"},"targetDate":{"format":"date-time","type":"string"},"tenantArticleId":{"type":"string"},"upperBounds":{"items":{"type":"number"},"type":"array"}},"required":["id","tenantArticleId","created","lastModified","sourceDate","targetDate","loadTime","cumulated","cumulatedLowerBounds","cumulatedUpperBounds","lowerBounds","upperBounds","period","point"],"title":"ArticleStockForecast","type":"object","description":"ArticleStockForecast"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/articles/{tenantArticleId}/forecasts":{"get":{"deprecated":false,"description":"This part of the API is in Alpha status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#alpha\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Get the forecast for a specific tenantArticleId","operationId":"getForecastsForArticle","parameters":[{"in":"path","name":"tenantArticleId","required":true,"schema":{"type":"string"}},{"in":"query","name":"period","required":false,"schema":{"enum":["DAILY"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ArticleStockForecast"},"type":"array"}}},"description":"Forecast for the specified tenantArticleId. The result is in the body."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Get article forecast","tags":["Stocks (Inventory)"]}}}}
```

## Get article stock distribution

> Stock per Facility for a specific tenantArticleId, also includes the Tenant-Wide Summary

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"StockDistribution":{"properties":{"facilityStocks":{"items":{"$ref":"#/components/schemas/FacilityStockDistribution"},"type":"array"},"summary":{"$ref":"#/components/schemas/StockSummaryDetails"},"tenantArticleId":{"type":"string"}},"required":["tenantArticleId","summary","facilityStocks"],"title":"StockDistribution","type":"object","description":"StockDistribution"},"FacilityStockDistribution":{"properties":{"available":{"deprecated":true,"description":"This field is deprecated and replaced by new availability concepts. Please see https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock/stock-availability for more information.","minimum":0,"type":"number"},"availableForPicking":{"type":"number"},"availableOnStock":{"type":"number"},"availableToPromise":{"deprecated":true,"description":"This field is deprecated and replaced by new availability concepts. Please see https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock/stock-availability for more information.","type":"number"},"byTrait":{"$ref":"#/components/schemas/ByTrait"},"channelAdjusted":{"items":{"$ref":"#/components/schemas/ChannelStockAvailability"},"type":"array"},"facilityId":{"type":"string"},"facilityName":{"type":"string"},"facilityServiceTypes":{"items":{"$ref":"#/components/schemas/FacilityServiceType","type":"string"},"type":"array"},"facilityStatus":{"$ref":"#/components/schemas/FacilityStatus"},"price":{"nullable":true,"type":"number"},"readyToPick":{"deprecated":true,"description":"This field is deprecated and replaced by new availability concepts. Please see https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock/stock-availability for more information.","type":"number"},"reserved":{"minimum":0,"type":"number"},"safetyStock":{"minimum":0,"type":"number"},"stockOnHand":{"type":"number"},"totalAmount":{"minimum":0,"type":"number"}},"required":["reserved","totalAmount","available","safetyStock","byTrait","availableForPicking","availableToPromise","readyToPick","availableOnStock","stockOnHand","facilityId","facilityName"],"title":"FacilityStockDistribution","type":"object","description":"FacilityStockDistribution"},"ByTrait":{"properties":{"ACCESSIBLE":{"type":"number"},"PICKABLE":{"type":"number"}},"required":["PICKABLE","ACCESSIBLE"],"title":"ByTrait","type":"object","description":"ByTrait"},"ChannelStockAvailability":{"properties":{"availableForPicking":{"type":"number"},"availableOnStock":{"type":"number"},"channelRef":{"type":"string"}},"required":["channelRef","availableForPicking","availableOnStock"],"title":"ChannelStockAvailability","type":"object","description":"ChannelStockAvailability"},"FacilityServiceType":{"description":"The description of the service this facility offers.","enum":["SHIP_FROM_STORE","PICKUP"],"type":"string","title":"FacilityServiceType"},"FacilityStatus":{"description":"The state of the facility. ONLINE means that this facility can process new orders and pickjobs, SUSPENDED means it cannot get new orders but is able to fulfill the current workload and OFFLINE means that it cannot fulfill any new or existing orders. Processes already running might be rescheduled to another facility depending on the preferences.","enum":["ONLINE","SUSPENDED","OFFLINE"],"type":"string","title":"FacilityStatus"},"StockSummaryDetails":{"properties":{"available":{"deprecated":true,"description":"This field is deprecated and replaced by new availability concepts. Please see https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock/stock-availability for more information.","minimum":0,"type":"number"},"availableForPicking":{"type":"number"},"availableOnStock":{"type":"number"},"availableToPromise":{"deprecated":true,"description":"This field is deprecated and replaced by new availability concepts. Please see https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock/stock-availability for more information.","type":"number"},"byTrait":{"$ref":"#/components/schemas/ByTrait"},"channelAdjusted":{"items":{"$ref":"#/components/schemas/ChannelStockAvailability"},"type":"array"},"readyToPick":{"deprecated":true,"description":"This field is deprecated and replaced by new availability concepts. Please see https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock/stock-availability for more information.","type":"number"},"reserved":{"minimum":0,"type":"number"},"safetyStock":{"minimum":0,"type":"number"},"stockOnHand":{"type":"number"},"totalAmount":{"minimum":0,"type":"number"}},"required":["reserved","totalAmount","available","safetyStock","byTrait","availableForPicking","availableToPromise","readyToPick","availableOnStock","stockOnHand"],"title":"StockSummaryDetails","type":"object","description":"StockSummaryDetails"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/articles/{tenantArticleId}/stockdistribution":{"get":{"deprecated":false,"description":"Stock per Facility for a specific tenantArticleId, also includes the Tenant-Wide Summary","operationId":"getStockDistribution","parameters":[{"in":"path","name":"tenantArticleId","required":true,"schema":{"minLength":1,"type":"string"}},{"explode":false,"in":"query","name":"facilityServiceTypes","required":false,"schema":{"items":{"enum":["SHIP_FROM_STORE","PICKUP"],"type":"string"},"type":"array"}},{"explode":false,"in":"query","name":"facilityStatus","required":false,"schema":{"items":{"enum":["ONLINE","SUSPENDED","OFFLINE"],"type":"string"},"type":"array"}},{"in":"query","name":"facilityName","required":false,"schema":{"minLength":1,"type":"string"}},{"explode":true,"in":"query","name":"facilityIds","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"description":"The channels to included under \"channelAdjusted\" in each summary and facility stock. Provide up to 50 channelRefs, specify \"UNALLOCATED for unallocated stock.\"","explode":true,"in":"query","name":"channelRefs","required":false,"schema":{"items":{"type":"string"},"maxItems":50,"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockDistribution"}}},"description":"Stock distribution was loaded & you were allowed to access it. The result is in the body."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"Get article stock distribution","tags":["Stocks (Inventory)"]}}}}
```

## List facility stocks

> This part of the API is deprecated. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Use \<a href="[https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock">Inventory](https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock">Inventory) Stock\</a> instead

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"FacilityStock":{"properties":{"available":{"type":"number"},"facilityRef":{"type":"string"},"id":{"type":"string"},"reserved":{"type":"number"},"tenantArticleId":{"type":"string"},"value":{"type":"number"}},"required":["available","reserved","value","tenantArticleId","facilityRef","id"],"title":"FacilityStock","type":"object","description":"FacilityStock"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/facilities/{facilityId}/stocks":{"get":{"deprecated":true,"description":"This part of the API is deprecated. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Use <a href=\"https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock\">Inventory Stock</a> instead","operationId":"getFacilityStocks","parameters":[{"in":"query","name":"size","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"number"}},{"in":"query","name":"startAfterId","required":false,"schema":{"type":"string"}},{"in":"path","name":"facilityId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FacilityStock"},"type":"array"}}},"description":"Stock was loaded and you were allowed to access it."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"List facility stocks","tags":["Stocks (Inventory)"]}}}}
```

## Update facility stocks

> This part of the API is deprecated. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Use \<a href="[https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock">Inventory](https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock">Inventory) Stock\</a> instead

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"FacilityStockBulkOperations":{"properties":{"operations":{"items":{"$ref":"#/components/schemas/FacilityStockBulkOperation"},"minItems":1,"type":"array"}},"required":["operations"],"title":"FacilityStockBulkOperations","type":"object","description":"FacilityStockBulkOperations"},"FacilityStockBulkOperation":{"properties":{"tenantArticleId":{"minLength":1,"type":"string"},"value":{"minimum":0,"type":"number"}},"required":["tenantArticleId","value"],"title":"FacilityStockBulkOperation","type":"object","description":"FacilityStockBulkOperation"},"FacilityStockBulkResult":{"properties":{"error":{"$ref":"#/components/schemas/BulkOperationError"},"facilityRef":{"type":"string"},"status":{"enum":["UPDATED","CREATED","FAILED"],"type":"string"},"tenantArticleId":{"type":"string"}},"required":["tenantArticleId","facilityRef","status"],"title":"FacilityStockBulkResult","type":"object","description":"FacilityStockBulkResult"},"BulkOperationError":{"properties":{"message":{"type":"string"},"type":{"enum":["NOT_FOUND","NOT_ALLOWED","VALIDATION","UNKNOWN"],"type":"string"}},"required":["type","message"],"title":"BulkOperationError","type":"object","description":"BulkOperationError"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/facilities/{facilityId}/stocks":{"put":{"deprecated":true,"description":"This part of the API is deprecated. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Use <a href=\"https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock\">Inventory Stock</a> instead","operationId":"bulkUpdateFacilityStock","parameters":[{"in":"path","name":"facilityId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityStockBulkOperations"}}},"required":true},"responses":{"207":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FacilityStockBulkResult"},"type":"array"}}},"description":"Update Result of each targeted tenantArticleId"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"Update facility stocks","tags":["Stocks (Inventory)"]}}}}
```

## List stock summaries

> This part of the API is deprecated. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />This endpoint is deprecated. Please use /api/stocks/summaries instead.

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"StockSummaries":{"properties":{"stockSummaries":{"items":{"$ref":"#/components/schemas/StockSummary"},"type":"array"},"total":{"minimum":0,"type":"number"}},"required":["total","stockSummaries"],"title":"StockSummaries","type":"object","description":"StockSummaries"},"StockSummary":{"properties":{"article":{"$ref":"#/components/schemas/StockSummaryArticle"},"details":{"$ref":"#/components/schemas/StockSummaryDetails"},"includedFacilityRefs":{"description":"ALPHA Status!. The facilityRefs that are included in the stock summary.","items":{"type":"string"},"type":"array"}},"required":["includedFacilityRefs","article","details"],"title":"StockSummary","type":"object","description":"StockSummary"},"StockSummaryArticle":{"properties":{"imageUrl":{"type":"string"},"tenantArticleId":{"type":"string"},"title":{"type":"string"}},"required":["tenantArticleId","title"],"title":"StockSummaryArticle","type":"object","description":"StockSummaryArticle"},"StockSummaryDetails":{"properties":{"available":{"deprecated":true,"description":"This field is deprecated and replaced by new availability concepts. Please see https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock/stock-availability for more information.","minimum":0,"type":"number"},"availableForPicking":{"type":"number"},"availableOnStock":{"type":"number"},"availableToPromise":{"deprecated":true,"description":"This field is deprecated and replaced by new availability concepts. Please see https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock/stock-availability for more information.","type":"number"},"byTrait":{"$ref":"#/components/schemas/ByTrait"},"channelAdjusted":{"items":{"$ref":"#/components/schemas/ChannelStockAvailability"},"type":"array"},"readyToPick":{"deprecated":true,"description":"This field is deprecated and replaced by new availability concepts. Please see https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock/stock-availability for more information.","type":"number"},"reserved":{"minimum":0,"type":"number"},"safetyStock":{"minimum":0,"type":"number"},"stockOnHand":{"type":"number"},"totalAmount":{"minimum":0,"type":"number"}},"required":["reserved","totalAmount","available","safetyStock","byTrait","availableForPicking","availableToPromise","readyToPick","availableOnStock","stockOnHand"],"title":"StockSummaryDetails","type":"object","description":"StockSummaryDetails"},"ByTrait":{"properties":{"ACCESSIBLE":{"type":"number"},"PICKABLE":{"type":"number"}},"required":["PICKABLE","ACCESSIBLE"],"title":"ByTrait","type":"object","description":"ByTrait"},"ChannelStockAvailability":{"properties":{"availableForPicking":{"type":"number"},"availableOnStock":{"type":"number"},"channelRef":{"type":"string"}},"required":["channelRef","availableForPicking","availableOnStock"],"title":"ChannelStockAvailability","type":"object","description":"ChannelStockAvailability"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/inventory/stocks/summaries":{"get":{"deprecated":true,"description":"This part of the API is deprecated. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />This endpoint is deprecated. Please use /api/stocks/summaries instead.","operationId":"getStockSummariesDeprecated","parameters":[{"in":"query","name":"size","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"number"}},{"description":"The stockSummaries.article.tenantArticleId value should be used for pagination.","in":"query","name":"startAfterId","required":false,"schema":{"type":"string"}},{"explode":false,"in":"query","name":"facilityServiceTypes","required":false,"schema":{"items":{"enum":["SHIP_FROM_STORE","PICKUP"],"type":"string"},"type":"array"}},{"explode":false,"in":"query","name":"facilityStatus","required":false,"schema":{"items":{"enum":["ONLINE","SUSPENDED","OFFLINE"],"type":"string"},"type":"array"}},{"explode":true,"in":"query","name":"facilityRefs","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"in":"query","name":"allowStale","required":false,"schema":{"type":"boolean"}},{"explode":true,"in":"query","name":"tenantArticleIds","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"description":"Returns stock summaries using adaptive batching to reduce latency spikes, as a consequence response time will have a more consistent upper bound but page size may be reduced below the maximum - This overrides `size` argument.","in":"query","name":"maxPageSize","required":false,"schema":{"maximum":100,"minimum":1,"type":"number"}},{"description":"The channels to included under \"channelAdjusted\" in the stock summary. Provide up to 50 channelRefs, specify \"UNALLOCATED for unallocated stock.\"","explode":true,"in":"query","name":"channelRefs","required":false,"schema":{"items":{"type":"string"},"maxItems":50,"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockSummaries"}}},"description":"Stock summaries was loaded & you were allowed to access it. The result is in the body."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"List stock summaries","tags":["Stocks (Inventory)"]}}}}
```

## GET /api/safetystocks

> List safety stocks

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"SafetyStocksPaginatedResult":{"properties":{"safetyStocks":{"items":{"$ref":"#/components/schemas/SafetyStock"},"type":"array"},"total":{"minimum":0,"type":"number"}},"required":["total","safetyStocks"],"title":"SafetyStocksPaginatedResult","type":"object","description":"SafetyStocksPaginatedResult"},"SafetyStock":{"properties":{"created":{"format":"date-time","type":"string"},"facilityRef":{"type":"string"},"id":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"tenantArticleId":{"type":"string"},"value":{"type":"number"},"version":{"type":"number"}},"required":["tenantArticleId","value","created","id","lastModified","version"],"title":"SafetyStock","type":"object","description":"SafetyStock"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/safetystocks":{"get":{"deprecated":false,"description":"","operationId":"getSafetyStocks","parameters":[{"in":"query","name":"size","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"number"}},{"in":"query","name":"startAfterId","required":false,"schema":{"type":"string"}},{"in":"query","name":"tenantArticleId","required":false,"schema":{"type":"string"}},{"in":"query","name":"facilityRef","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SafetyStocksPaginatedResult"}}},"description":"Available Safety Stocks"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"List safety stocks","tags":["Stocks (Inventory)"]}}}}
```

## PUT /api/safetystocks

> Update safety stocks

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"SafetyStockBulkOperations":{"properties":{"operations":{"items":{"$ref":"#/components/schemas/SafetyStockBulkOperation"},"maxItems":500,"minItems":1,"type":"array"}},"required":["operations"],"title":"SafetyStockBulkOperations","type":"object","description":"SafetyStockBulkOperations"},"SafetyStockBulkOperation":{"properties":{"facilityRef":{"type":"string"},"tenantArticleId":{"type":"string"},"value":{"type":"number"}},"required":["tenantArticleId","value"],"title":"SafetyStockBulkOperation","type":"object","description":"SafetyStockBulkOperation"},"SafetyStockBulkOperationResult":{"properties":{"error":{"$ref":"#/components/schemas/BulkOperationError"},"facilityRef":{"type":"string"},"status":{"enum":["UPDATED","CREATED","FAILED"],"type":"string"},"tenantArticleId":{"type":"string"},"value":{"type":"number"}},"required":["tenantArticleId","facilityRef","value","status"],"title":"SafetyStockBulkOperationResult","type":"object","description":"SafetyStockBulkOperationResult"},"BulkOperationError":{"properties":{"message":{"type":"string"},"type":{"enum":["NOT_FOUND","NOT_ALLOWED","VALIDATION","UNKNOWN"],"type":"string"}},"required":["type","message"],"title":"BulkOperationError","type":"object","description":"BulkOperationError"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/safetystocks":{"put":{"deprecated":false,"description":"","operationId":"bulkUpdateSafetyStock","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SafetyStockBulkOperations"}}},"required":true},"responses":{"207":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SafetyStockBulkOperationResult"}}},"description":"Result of the bulk operations"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"Update safety stocks","tags":["Stocks (Inventory)"]}}}}
```

## DELETE /api/safetystocks/{safetyStockId}

> Delete safety stock

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/safetystocks/{safetyStockId}":{"delete":{"deprecated":false,"description":"","operationId":"deleteSafetyStock","parameters":[{"in":"path","name":"safetyStockId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result of the bulk operations"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Delete safety stock","tags":["Stocks (Inventory)"]}}}}
```

## GET /api/stocks

> List stocks

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"StockPaginatedResult":{"properties":{"pageInfo":{"allOf":[{"$ref":"#/components/schemas/PageInfo"}],"description":"Pagination information for the search result."},"stocks":{"items":{"$ref":"#/components/schemas/Stock"},"type":"array"},"total":{"description":"The total number of items matching the search criteria. Only filled, if withTotal is set to true in the search options.","minimum":0,"type":"number"}},"required":["pageInfo","stocks"],"title":"StockPaginatedResult","type":"object","description":"StockPaginatedResult"},"PageInfo":{"properties":{"endCursor":{"description":"The cursor to use to fetch the next page of items. Use with parameter `after`.","type":"string"},"hasNextPage":{"description":"If true, there are more items after the current page.","type":"boolean"},"hasPreviousPage":{"description":"If true, there are more items before the current page.","type":"boolean"},"startCursor":{"description":"The cursor to use to fetch the previous page of items.","type":"string"}},"required":["hasNextPage","hasPreviousPage","startCursor","endCursor"],"title":"PageInfo","type":"object","description":"PageInfo"},"Stock":{"properties":{"available":{"type":"number"},"availableUntil":{"description":"defines until when a stock is included in the stock availability as available and used for routing","format":"date-time","type":"string"},"conditions":{"description":"Describes conditions of a stock\n    *`DEFECTIVE` - stock is defective, not usable for customer orders","items":{"enum":["DEFECTIVE"],"type":"string"},"type":"array"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facility":{"$ref":"#/components/schemas/StockFacilityReferences"},"facilityRef":{"description":"facility in which the stock is located","type":"string"},"facilityWideReserved":{"deprecated":true,"type":"number"},"id":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"locationRef":{"description":"location on which the stock is placed","type":"string"},"properties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}],"description":"allow tracking of specific values such as expiry dates on a set of items. They should describe physical identifiable properties of the stock and are not meant to be used for metadata (see \"customAttributes\" for that)."},"receiptDate":{"description":"date-time when stock has entered the system, defaults to the creation date","format":"date-time","type":"string"},"reserved":{"description":"amount of this stock reserved for customer orders","type":"number"},"scannableCodes":{"description":"scannableCodes such as barcodes that identify this stock","items":{"type":"string"},"type":"array"},"scores":{"description":"stock with a high score can used preferably over stock with a lower score in routing, depending on configuration. The score can represent different attributes of the stock like zone, storage location, expiry date or receipt date.","items":{"type":"string"},"type":"array"},"serializedProperties":{"description":"properties object serialized as JSON string, sorted alphabetically by key","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock","minLength":1,"type":"string"},"tenantStockId":{"description":"tenantStockId is an optional identifier for the stock in the tenant system.","type":"string"},"traitConfig":{"description":"defines the traits of the stock, overrules the storage location traits","items":{"$ref":"#/components/schemas/StorageLocationTraitConfigEntry"},"type":"array"},"traits":{"description":"provide information on how storage locations and stocks are to be handled in operational processes. Can only be set via storageLocation. ","items":{"enum":["PICKABLE","ACCESSIBLE","KEEP_ON_ZERO","OUTBOUND","IN_MOTION"],"type":"string"},"type":"array"},"value":{"format":"int32","minimum":0,"type":"integer"},"version":{"type":"number"}},"required":["tenantArticleId","value","reserved","facilityWideReserved","facilityRef","facility","available","id","version","created","lastModified","traits","serializedProperties"],"title":"Stock","type":"object","description":"Stock"},"StockFacilityReferences":{"properties":{"facilityRef":{"description":"facility in which the stock is located","type":"string"},"tenantFacilityId":{"description":"tenantFacilityId in which the stock is located","type":"string"}},"required":["facilityRef"],"title":"StockFacilityReferences","type":"object","description":"StockFacilityReferences"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"StorageLocationTraitConfigEntry":{"properties":{"enabled":{"description":"whether the trait is enabled or not","type":"boolean"},"trait":{"description":"Describes what kind of actions this stock is available for\n     * `PICKABLE`- The stock is available for picking\n     * `ACCESSIBLE`- The stock is available for stock movements (stowing, inbound, etc)\n     * `KEEP_ON_ZERO`- The stock will not be deleted when emptied\n     * `OUTBOUND`- The stock is intended for outbound processes","type":"string"}},"required":["enabled","trait"],"title":"StorageLocationTraitConfigEntry","type":"object","description":"StorageLocationTraitConfigEntry"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/stocks":{"get":{"deprecated":false,"description":"","operationId":"getStocks","parameters":[{"in":"query","name":"facilityRef","required":false,"schema":{"type":"string"}},{"in":"query","name":"tenantFacilityId","required":false,"schema":{"type":"string"}},{"in":"query","name":"tenantArticleId","required":false,"schema":{"items":{"type":"string"},"maxItems":500,"type":"array"}},{"in":"query","name":"locationRef","required":false,"schema":{"items":{"type":"string"},"maxItems":500,"type":"array"}},{"in":"query","name":"size","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"number"}},{"in":"query","name":"startAfterId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockPaginatedResult"}}},"description":"Stocks"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"List stocks","tags":["Stocks (Inventory)"]}}}}
```

## POST /api/stocks

> Create stock

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"StockForCreation":{"properties":{"availableUntil":{"description":"defines until when a stock is included in the stock availability as available and used for routing","format":"date-time","type":"string"},"conditions":{"description":"Describes conditions of a stock\n    *`DEFECTIVE` - stock is defective, not usable for customer orders","items":{"enum":["DEFECTIVE"],"type":"string"},"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facility":{"description":"Selector for the facility. Either a facility reference or a tenant facility ID must be provided.","oneOf":[{"$ref":"#/components/schemas/FacilityRefSelector"},{"$ref":"#/components/schemas/TenantFacilityIdSelector"}]},"facilityRef":{"deprecated":true,"description":"facility in which the stock is located - fill with either facilityRef or tenantFacilityId - Deprecated: use facility object instead","type":"string"},"locationRef":{"description":"location on which the stock is placed","type":"string"},"properties":{"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"},{"additionalProperties":{"type":"string"},"type":"object"}],"description":"allow tracking of specific values such as expiry dates on a set of items. They should describe physical identifiable properties of the stock and are not meant to be used for metadata (see \"customAttributes\" for that)."},"receiptDate":{"description":"date-time when stock has entered the system, defaults to the creation date","format":"date-time","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock","minLength":1,"type":"string"},"tenantFacilityId":{"deprecated":true,"description":"tenantFacilityId in which the stock is located - fill with either facilityRef or tenantFacilityId - Deprecated: use facility object instead","type":"string"},"tenantStockId":{"description":"tenantStockId is an optional identifier for the stock in the tenant system.","type":"string"},"traitConfig":{"description":"defines the traits of the stock, overrules the storage location traits","items":{"$ref":"#/components/schemas/StorageLocationTraitConfigEntry"},"type":"array"},"value":{"format":"int32","minimum":0,"type":"integer"}},"required":["tenantArticleId","value"],"title":"StockForCreation","type":"object","description":"StockForCreation"},"FacilityRefSelector":{"properties":{"facilityRef":{"description":"Resolves a facility by its reference. This is the preferred way to resolve a facility.","minLength":1,"type":"string"}},"required":["facilityRef"],"title":"FacilityRefSelector","type":"object","description":"FacilityRefSelector"},"TenantFacilityIdSelector":{"properties":{"tenantFacilityId":{"description":"Resolves a facility by its tenantFacilityId.","minLength":1,"type":"string"}},"required":["tenantFacilityId"],"title":"TenantFacilityIdSelector","type":"object","description":"TenantFacilityIdSelector"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"StorageLocationTraitConfigEntry":{"properties":{"enabled":{"description":"whether the trait is enabled or not","type":"boolean"},"trait":{"description":"Describes what kind of actions this stock is available for\n     * `PICKABLE`- The stock is available for picking\n     * `ACCESSIBLE`- The stock is available for stock movements (stowing, inbound, etc)\n     * `KEEP_ON_ZERO`- The stock will not be deleted when emptied\n     * `OUTBOUND`- The stock is intended for outbound processes","type":"string"}},"required":["enabled","trait"],"title":"StorageLocationTraitConfigEntry","type":"object","description":"StorageLocationTraitConfigEntry"},"Stock":{"properties":{"available":{"type":"number"},"availableUntil":{"description":"defines until when a stock is included in the stock availability as available and used for routing","format":"date-time","type":"string"},"conditions":{"description":"Describes conditions of a stock\n    *`DEFECTIVE` - stock is defective, not usable for customer orders","items":{"enum":["DEFECTIVE"],"type":"string"},"type":"array"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facility":{"$ref":"#/components/schemas/StockFacilityReferences"},"facilityRef":{"description":"facility in which the stock is located","type":"string"},"facilityWideReserved":{"deprecated":true,"type":"number"},"id":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"locationRef":{"description":"location on which the stock is placed","type":"string"},"properties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}],"description":"allow tracking of specific values such as expiry dates on a set of items. They should describe physical identifiable properties of the stock and are not meant to be used for metadata (see \"customAttributes\" for that)."},"receiptDate":{"description":"date-time when stock has entered the system, defaults to the creation date","format":"date-time","type":"string"},"reserved":{"description":"amount of this stock reserved for customer orders","type":"number"},"scannableCodes":{"description":"scannableCodes such as barcodes that identify this stock","items":{"type":"string"},"type":"array"},"scores":{"description":"stock with a high score can used preferably over stock with a lower score in routing, depending on configuration. The score can represent different attributes of the stock like zone, storage location, expiry date or receipt date.","items":{"type":"string"},"type":"array"},"serializedProperties":{"description":"properties object serialized as JSON string, sorted alphabetically by key","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock","minLength":1,"type":"string"},"tenantStockId":{"description":"tenantStockId is an optional identifier for the stock in the tenant system.","type":"string"},"traitConfig":{"description":"defines the traits of the stock, overrules the storage location traits","items":{"$ref":"#/components/schemas/StorageLocationTraitConfigEntry"},"type":"array"},"traits":{"description":"provide information on how storage locations and stocks are to be handled in operational processes. Can only be set via storageLocation. ","items":{"enum":["PICKABLE","ACCESSIBLE","KEEP_ON_ZERO","OUTBOUND","IN_MOTION"],"type":"string"},"type":"array"},"value":{"format":"int32","minimum":0,"type":"integer"},"version":{"type":"number"}},"required":["tenantArticleId","value","reserved","facilityWideReserved","facilityRef","facility","available","id","version","created","lastModified","traits","serializedProperties"],"title":"Stock","type":"object","description":"Stock"},"StockFacilityReferences":{"properties":{"facilityRef":{"description":"facility in which the stock is located","type":"string"},"tenantFacilityId":{"description":"tenantFacilityId in which the stock is located","type":"string"}},"required":["facilityRef"],"title":"StockFacilityReferences","type":"object","description":"StockFacilityReferences"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/stocks":{"post":{"deprecated":false,"description":"","operationId":"createStock","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockForCreation"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stock"}}},"description":"Stock was created."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"Create stock","tags":["Stocks (Inventory)"]}}}}
```

## Update stocks

> Update and create many stocks at once

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"StocksForUpsert":{"properties":{"stocks":{"description":"Please be sure to include each stock (by ID) only once, when updating. Otherwise the whole batch is rejected with an error.","items":{"oneOf":[{"$ref":"#/components/schemas/StockForCreation"},{"$ref":"#/components/schemas/StockForUpsertUpdate"},{"not":{"required":["version"]},"properties":{"id":{"type":"string"},"locationRef":{"nullable":true,"type":"string"},"value":{"format":"int32","minimum":0,"type":"integer"}},"required":["id","value"],"type":"object"}]},"maxItems":500,"type":"array"}},"required":["stocks"],"title":"StocksForUpsert","type":"object","description":"StocksForUpsert"},"StockForCreation":{"properties":{"availableUntil":{"description":"defines until when a stock is included in the stock availability as available and used for routing","format":"date-time","type":"string"},"conditions":{"description":"Describes conditions of a stock\n    *`DEFECTIVE` - stock is defective, not usable for customer orders","items":{"enum":["DEFECTIVE"],"type":"string"},"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facility":{"description":"Selector for the facility. Either a facility reference or a tenant facility ID must be provided.","oneOf":[{"$ref":"#/components/schemas/FacilityRefSelector"},{"$ref":"#/components/schemas/TenantFacilityIdSelector"}]},"facilityRef":{"deprecated":true,"description":"facility in which the stock is located - fill with either facilityRef or tenantFacilityId - Deprecated: use facility object instead","type":"string"},"locationRef":{"description":"location on which the stock is placed","type":"string"},"properties":{"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"},{"additionalProperties":{"type":"string"},"type":"object"}],"description":"allow tracking of specific values such as expiry dates on a set of items. They should describe physical identifiable properties of the stock and are not meant to be used for metadata (see \"customAttributes\" for that)."},"receiptDate":{"description":"date-time when stock has entered the system, defaults to the creation date","format":"date-time","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock","minLength":1,"type":"string"},"tenantFacilityId":{"deprecated":true,"description":"tenantFacilityId in which the stock is located - fill with either facilityRef or tenantFacilityId - Deprecated: use facility object instead","type":"string"},"tenantStockId":{"description":"tenantStockId is an optional identifier for the stock in the tenant system.","type":"string"},"traitConfig":{"description":"defines the traits of the stock, overrules the storage location traits","items":{"$ref":"#/components/schemas/StorageLocationTraitConfigEntry"},"type":"array"},"value":{"format":"int32","minimum":0,"type":"integer"}},"required":["tenantArticleId","value"],"title":"StockForCreation","type":"object","description":"StockForCreation"},"FacilityRefSelector":{"properties":{"facilityRef":{"description":"Resolves a facility by its reference. This is the preferred way to resolve a facility.","minLength":1,"type":"string"}},"required":["facilityRef"],"title":"FacilityRefSelector","type":"object","description":"FacilityRefSelector"},"TenantFacilityIdSelector":{"properties":{"tenantFacilityId":{"description":"Resolves a facility by its tenantFacilityId.","minLength":1,"type":"string"}},"required":["tenantFacilityId"],"title":"TenantFacilityIdSelector","type":"object","description":"TenantFacilityIdSelector"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"StorageLocationTraitConfigEntry":{"properties":{"enabled":{"description":"whether the trait is enabled or not","type":"boolean"},"trait":{"description":"Describes what kind of actions this stock is available for\n     * `PICKABLE`- The stock is available for picking\n     * `ACCESSIBLE`- The stock is available for stock movements (stowing, inbound, etc)\n     * `KEEP_ON_ZERO`- The stock will not be deleted when emptied\n     * `OUTBOUND`- The stock is intended for outbound processes","type":"string"}},"required":["enabled","trait"],"title":"StorageLocationTraitConfigEntry","type":"object","description":"StorageLocationTraitConfigEntry"},"StockForUpsertUpdate":{"properties":{"conditions":{"description":"Describes conditions of a stock\n    *`DEFECTIVE` - stock is defective, not usable for customer orders","items":{"enum":["DEFECTIVE"],"type":"string"},"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"id":{"type":"string"},"locationRef":{"nullable":true,"type":"string"},"tenantStockId":{"description":"tenantStockId is an optional identifier for the stock in the tenant system.","type":"string"},"traitConfig":{"description":"defines the traits of the stock, overrules the storage location traits","items":{"$ref":"#/components/schemas/StorageLocationTraitConfigEntry"},"type":"array"},"value":{"format":"int32","minimum":0,"type":"integer"},"version":{"type":"number"}},"required":["value","id","version"],"title":"StockForUpsertUpdate","type":"object","description":"StockForUpsertUpdate"},"StockUpsertOperationResult":{"properties":{"status":{"enum":["UPDATED","CREATED","UNCHANGED"],"type":"string"},"stock":{"$ref":"#/components/schemas/Stock"}},"required":["stock","status"],"title":"StockUpsertOperationResult","type":"object","description":"StockUpsertOperationResult"},"Stock":{"properties":{"available":{"type":"number"},"availableUntil":{"description":"defines until when a stock is included in the stock availability as available and used for routing","format":"date-time","type":"string"},"conditions":{"description":"Describes conditions of a stock\n    *`DEFECTIVE` - stock is defective, not usable for customer orders","items":{"enum":["DEFECTIVE"],"type":"string"},"type":"array"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facility":{"$ref":"#/components/schemas/StockFacilityReferences"},"facilityRef":{"description":"facility in which the stock is located","type":"string"},"facilityWideReserved":{"deprecated":true,"type":"number"},"id":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"locationRef":{"description":"location on which the stock is placed","type":"string"},"properties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}],"description":"allow tracking of specific values such as expiry dates on a set of items. They should describe physical identifiable properties of the stock and are not meant to be used for metadata (see \"customAttributes\" for that)."},"receiptDate":{"description":"date-time when stock has entered the system, defaults to the creation date","format":"date-time","type":"string"},"reserved":{"description":"amount of this stock reserved for customer orders","type":"number"},"scannableCodes":{"description":"scannableCodes such as barcodes that identify this stock","items":{"type":"string"},"type":"array"},"scores":{"description":"stock with a high score can used preferably over stock with a lower score in routing, depending on configuration. The score can represent different attributes of the stock like zone, storage location, expiry date or receipt date.","items":{"type":"string"},"type":"array"},"serializedProperties":{"description":"properties object serialized as JSON string, sorted alphabetically by key","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock","minLength":1,"type":"string"},"tenantStockId":{"description":"tenantStockId is an optional identifier for the stock in the tenant system.","type":"string"},"traitConfig":{"description":"defines the traits of the stock, overrules the storage location traits","items":{"$ref":"#/components/schemas/StorageLocationTraitConfigEntry"},"type":"array"},"traits":{"description":"provide information on how storage locations and stocks are to be handled in operational processes. Can only be set via storageLocation. ","items":{"enum":["PICKABLE","ACCESSIBLE","KEEP_ON_ZERO","OUTBOUND","IN_MOTION"],"type":"string"},"type":"array"},"value":{"format":"int32","minimum":0,"type":"integer"},"version":{"type":"number"}},"required":["tenantArticleId","value","reserved","facilityWideReserved","facilityRef","facility","available","id","version","created","lastModified","traits","serializedProperties"],"title":"Stock","type":"object","description":"Stock"},"StockFacilityReferences":{"properties":{"facilityRef":{"description":"facility in which the stock is located","type":"string"},"tenantFacilityId":{"description":"tenantFacilityId in which the stock is located","type":"string"}},"required":["facilityRef"],"title":"StockFacilityReferences","type":"object","description":"StockFacilityReferences"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/stocks":{"put":{"deprecated":false,"description":"Update and create many stocks at once","operationId":"upsertStocks","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StocksForUpsert"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/StockUpsertOperationResult"},"type":"array"}}},"description":"Stock upsert result"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"Update stocks","tags":["Stocks (Inventory)"]}}}}
```

## GET /api/stocks/{stockId}

> Get stock

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Stock":{"properties":{"available":{"type":"number"},"availableUntil":{"description":"defines until when a stock is included in the stock availability as available and used for routing","format":"date-time","type":"string"},"conditions":{"description":"Describes conditions of a stock\n    *`DEFECTIVE` - stock is defective, not usable for customer orders","items":{"enum":["DEFECTIVE"],"type":"string"},"type":"array"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facility":{"$ref":"#/components/schemas/StockFacilityReferences"},"facilityRef":{"description":"facility in which the stock is located","type":"string"},"facilityWideReserved":{"deprecated":true,"type":"number"},"id":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"locationRef":{"description":"location on which the stock is placed","type":"string"},"properties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}],"description":"allow tracking of specific values such as expiry dates on a set of items. They should describe physical identifiable properties of the stock and are not meant to be used for metadata (see \"customAttributes\" for that)."},"receiptDate":{"description":"date-time when stock has entered the system, defaults to the creation date","format":"date-time","type":"string"},"reserved":{"description":"amount of this stock reserved for customer orders","type":"number"},"scannableCodes":{"description":"scannableCodes such as barcodes that identify this stock","items":{"type":"string"},"type":"array"},"scores":{"description":"stock with a high score can used preferably over stock with a lower score in routing, depending on configuration. The score can represent different attributes of the stock like zone, storage location, expiry date or receipt date.","items":{"type":"string"},"type":"array"},"serializedProperties":{"description":"properties object serialized as JSON string, sorted alphabetically by key","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock","minLength":1,"type":"string"},"tenantStockId":{"description":"tenantStockId is an optional identifier for the stock in the tenant system.","type":"string"},"traitConfig":{"description":"defines the traits of the stock, overrules the storage location traits","items":{"$ref":"#/components/schemas/StorageLocationTraitConfigEntry"},"type":"array"},"traits":{"description":"provide information on how storage locations and stocks are to be handled in operational processes. Can only be set via storageLocation. ","items":{"enum":["PICKABLE","ACCESSIBLE","KEEP_ON_ZERO","OUTBOUND","IN_MOTION"],"type":"string"},"type":"array"},"value":{"format":"int32","minimum":0,"type":"integer"},"version":{"type":"number"}},"required":["tenantArticleId","value","reserved","facilityWideReserved","facilityRef","facility","available","id","version","created","lastModified","traits","serializedProperties"],"title":"Stock","type":"object","description":"Stock"},"StockFacilityReferences":{"properties":{"facilityRef":{"description":"facility in which the stock is located","type":"string"},"tenantFacilityId":{"description":"tenantFacilityId in which the stock is located","type":"string"}},"required":["facilityRef"],"title":"StockFacilityReferences","type":"object","description":"StockFacilityReferences"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"StorageLocationTraitConfigEntry":{"properties":{"enabled":{"description":"whether the trait is enabled or not","type":"boolean"},"trait":{"description":"Describes what kind of actions this stock is available for\n     * `PICKABLE`- The stock is available for picking\n     * `ACCESSIBLE`- The stock is available for stock movements (stowing, inbound, etc)\n     * `KEEP_ON_ZERO`- The stock will not be deleted when emptied\n     * `OUTBOUND`- The stock is intended for outbound processes","type":"string"}},"required":["enabled","trait"],"title":"StorageLocationTraitConfigEntry","type":"object","description":"StorageLocationTraitConfigEntry"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/stocks/{stockId}":{"get":{"deprecated":false,"description":"","operationId":"getStock","parameters":[{"in":"path","name":"stockId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stock"}}},"description":"Stock"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"Get stock","tags":["Stocks (Inventory)"]}}}}
```

## PUT /api/stocks/{stockId}

> Update stock

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"StockForUpdate":{"properties":{"conditions":{"description":"Describes conditions of a stock\n    *`DEFECTIVE` - stock is defective, not usable for customer orders","items":{"enum":["DEFECTIVE"],"type":"string"},"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"locationRef":{"nullable":true,"type":"string"},"tenantStockId":{"description":"tenantStockId is an optional identifier for the stock in the tenant system.","type":"string"},"traitConfig":{"description":"defines the traits of the stock, overrules the storage location traits","items":{"$ref":"#/components/schemas/StorageLocationTraitConfigEntry"},"type":"array"},"value":{"format":"int32","minimum":0,"type":"integer"},"version":{"type":"number"}},"required":["value","version"],"title":"StockForUpdate","type":"object","description":"StockForUpdate"},"StorageLocationTraitConfigEntry":{"properties":{"enabled":{"description":"whether the trait is enabled or not","type":"boolean"},"trait":{"description":"Describes what kind of actions this stock is available for\n     * `PICKABLE`- The stock is available for picking\n     * `ACCESSIBLE`- The stock is available for stock movements (stowing, inbound, etc)\n     * `KEEP_ON_ZERO`- The stock will not be deleted when emptied\n     * `OUTBOUND`- The stock is intended for outbound processes","type":"string"}},"required":["enabled","trait"],"title":"StorageLocationTraitConfigEntry","type":"object","description":"StorageLocationTraitConfigEntry"},"Stock":{"properties":{"available":{"type":"number"},"availableUntil":{"description":"defines until when a stock is included in the stock availability as available and used for routing","format":"date-time","type":"string"},"conditions":{"description":"Describes conditions of a stock\n    *`DEFECTIVE` - stock is defective, not usable for customer orders","items":{"enum":["DEFECTIVE"],"type":"string"},"type":"array"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facility":{"$ref":"#/components/schemas/StockFacilityReferences"},"facilityRef":{"description":"facility in which the stock is located","type":"string"},"facilityWideReserved":{"deprecated":true,"type":"number"},"id":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"locationRef":{"description":"location on which the stock is placed","type":"string"},"properties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}],"description":"allow tracking of specific values such as expiry dates on a set of items. They should describe physical identifiable properties of the stock and are not meant to be used for metadata (see \"customAttributes\" for that)."},"receiptDate":{"description":"date-time when stock has entered the system, defaults to the creation date","format":"date-time","type":"string"},"reserved":{"description":"amount of this stock reserved for customer orders","type":"number"},"scannableCodes":{"description":"scannableCodes such as barcodes that identify this stock","items":{"type":"string"},"type":"array"},"scores":{"description":"stock with a high score can used preferably over stock with a lower score in routing, depending on configuration. The score can represent different attributes of the stock like zone, storage location, expiry date or receipt date.","items":{"type":"string"},"type":"array"},"serializedProperties":{"description":"properties object serialized as JSON string, sorted alphabetically by key","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock","minLength":1,"type":"string"},"tenantStockId":{"description":"tenantStockId is an optional identifier for the stock in the tenant system.","type":"string"},"traitConfig":{"description":"defines the traits of the stock, overrules the storage location traits","items":{"$ref":"#/components/schemas/StorageLocationTraitConfigEntry"},"type":"array"},"traits":{"description":"provide information on how storage locations and stocks are to be handled in operational processes. Can only be set via storageLocation. ","items":{"enum":["PICKABLE","ACCESSIBLE","KEEP_ON_ZERO","OUTBOUND","IN_MOTION"],"type":"string"},"type":"array"},"value":{"format":"int32","minimum":0,"type":"integer"},"version":{"type":"number"}},"required":["tenantArticleId","value","reserved","facilityWideReserved","facilityRef","facility","available","id","version","created","lastModified","traits","serializedProperties"],"title":"Stock","type":"object","description":"Stock"},"StockFacilityReferences":{"properties":{"facilityRef":{"description":"facility in which the stock is located","type":"string"},"tenantFacilityId":{"description":"tenantFacilityId in which the stock is located","type":"string"}},"required":["facilityRef"],"title":"StockFacilityReferences","type":"object","description":"StockFacilityReferences"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/stocks/{stockId}":{"put":{"deprecated":false,"description":"","operationId":"updateStock","parameters":[{"in":"path","name":"stockId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StockForUpdate"},{"not":{"required":["version"]},"properties":{"locationRef":{"nullable":true,"type":"string"},"value":{"format":"int32","minimum":0,"type":"integer"}},"required":["value"],"type":"object"}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stock"}}},"description":"Stock"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"Update stock","tags":["Stocks (Inventory)"]}}}}
```

## DELETE /api/stocks/{stockId}

> Delete stock

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/stocks/{stockId}":{"delete":{"deprecated":false,"description":"","operationId":"deleteStock","parameters":[{"in":"path","name":"stockId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stock was deleted."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"Delete stock","tags":["Stocks (Inventory)"]}}}}
```

## Get stock recommendations

> This part of the API is in Alpha status. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#alpha>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Get the Storage Location recommendations for a specific Stock.

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"StorageLocationRecommendation":{"properties":{"stockCount":{"type":"number"},"storageLocation":{"$ref":"#/components/schemas/StorageLocation"}},"required":["storageLocation","stockCount"],"title":"StorageLocationRecommendation","type":"object","description":"StorageLocationRecommendation"},"StorageLocation":{"allOf":[{"$ref":"#/components/schemas/StorageLocationForReplacement"},{"$ref":"#/components/schemas/VersionedResource"}],"properties":{"facilityRef":{"description":"The id of the facility reference.","type":"string"},"id":{"description":"The id of this storage location","type":"string"},"schemaVersion":{"type":"number"},"traitConfig":{"$ref":"#/components/schemas/StorageLocationTraitConfig"},"traits":{"description":"The traits of this storage location","items":{"$ref":"#/components/schemas/StorageLocationTrait"},"type":"array"},"zoneName":{"deprecated":true,"description":"Deprecated! This field will not be filled in newly created storage locations. Resolve the zone name separately via the facilities/{id}/zones endpoint. The name of the Zone to which this storage location belongs","type":"string"}},"required":["id","facilityRef","traits"],"type":"object","xml":{"name":"StorageLocation"},"title":"StorageLocation","description":"StorageLocation"},"StorageLocationForReplacement":{"allOf":[{"$ref":"#/components/schemas/StorageLocationForCreation"}],"properties":{"version":{"format":"int64","type":"integer"}},"required":["version"],"type":"object","xml":{"name":"StorageLocationForReplacement"},"title":"StorageLocationForReplacement","description":"StorageLocationForReplacement"},"StorageLocationForCreation":{"allOf":[{"$ref":"#/components/schemas/CustomAttributesResource"}],"properties":{"information":{"description":"A free text information about this storage location, max length 1024","maxLength":1024,"type":"string"},"name":{"description":"The name of this storage location","maxLength":15,"type":"string"},"runningSequences":{"description":"The Sequence item/s of this location","items":{"$ref":"#/components/schemas/StorageLocationSequenceItem"},"maxItems":10,"type":"array"},"scannableCodes":{"description":"Barcodes representing this storage location","items":{"type":"string"},"maxItems":5,"type":"array"},"tenantLocationId":{"description":"The internal tenant id for this location","type":"string"},"traitConfig":{"$ref":"#/components/schemas/StorageLocationTraitConfig"},"traits":{"description":"The traits of this storage location, includes both local config and and defaults. Do not use to write to traits, use traitConfig instead.","items":{"$ref":"#/components/schemas/StorageLocationTrait"},"type":"array"},"type":{"$ref":"#/components/schemas/StorageLocationType"},"zoneName":{"description":"The name of the Zone to which this storage location belongs","type":"string"},"zoneRef":{"description":"The id of the Zone to which this storage location belongs","type":"string"}},"required":["name","runningSequences","scannableCodes","type"],"type":"object","xml":{"name":"StorageLocationForCreation"},"title":"StorageLocationForCreation","description":"StorageLocationForCreation"},"CustomAttributesResource":{"properties":{"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"}},"title":"CustomAttributesResource","type":"object","description":"CustomAttributesResource"},"StorageLocationSequenceItem":{"properties":{"nextStorageLocationRef":{"description":"The next storage from which to pick up after this one","type":"string"},"previousStorageLocationRef":{"description":"The previous storage from which to pick up after this one","type":"string"},"score":{"deprecated":true,"description":"Running sequence score - read-only","type":"number"},"type":{"$ref":"#/components/schemas/StorageLocationSequenceType"}},"required":["type"],"type":"object","xml":{"name":"StorageLocationSequenceItem"},"title":"StorageLocationSequenceItem","description":"StorageLocationSequenceItem"},"StorageLocationSequenceType":{"description":"Describes the type of a storage location sequence type\n  * `PICKING_SEQUENCE`- The sequence in wich the storage locations are picked.\n  * `RESTOW_SEQUENCE`- The sequence in wich the storage locations are restowed.","enum":["PICKING_SEQUENCE","RESTOW_SEQUENCE"],"type":"string","xml":{"name":"StorageLocationType"},"title":"StorageLocationSequenceType"},"StorageLocationTraitConfig":{"description":"The configuration of the traits of this storage location","items":{"properties":{"enabled":{"type":"boolean"},"trait":{"$ref":"#/components/schemas/StorageLocationTrait"}},"required":["trait","enabled"],"type":"object"},"type":"array","title":"StorageLocationTraitConfig"},"StorageLocationTrait":{"description":"Describes what kind of actions this stock is available for\n  * `PICKABLE`- The stock is available for picking\n  * `ACCESSIBLE`- The stock is available for stock movements (stowing, inbound, etc)\n  * `KEEP_ON_ZERO`- The stock will not be deleted when emptied\n  * `OUTBOUND`- The stock is intended for outbound processes\n  * `IN_MOTION`- The stock is in motion, used by StowJobs.","enum":["PICKABLE","ACCESSIBLE","KEEP_ON_ZERO","OUTBOUND","IN_MOTION"],"type":"string","xml":{"name":"StorageLocationTrait"},"title":"StorageLocationTrait"},"StorageLocationType":{"description":"Describes the kind of a storage location:\n  * `SINGLE_STORAGE`- it is only allowed to store stock with the same tenantArticleId here\n  * `BULK_STORAGE`- stocks belonging to different tenantArticleIds can be stored here","enum":["SINGLE_STORAGE","BULK_STORAGE"],"type":"string","xml":{"name":"StorageLocationType"},"title":"StorageLocationType"},"VersionedResource":{"properties":{"created":{"description":"The date this entity was created at the platform. This value is generated by the service.","format":"date-time","type":"string"},"lastModified":{"description":"The date this entity was modified last. This value is generated by the service.","format":"date-time","type":"string"},"version":{"description":"The version of the document to be used in optimistic locking mechanisms.","format":"int64","type":"integer"}},"required":["version"],"type":"object","title":"VersionedResource","description":"VersionedResource"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/stocks/{stockId}/locationrecommendations":{"get":{"deprecated":false,"description":"This part of the API is in Alpha status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#alpha\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Get the Storage Location recommendations for a specific Stock.","operationId":"getStorageLocationRecommendations","parameters":[{"in":"path","name":"stockId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/StorageLocationRecommendation"},"type":"array"}}},"description":"List of Storage Locations sorted by the stock sum ascending. The result is in the body."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"Get stock recommendations","tags":["Stocks (Inventory)"]}}}}
```

## POST /api/stocks/actions

> Call stock action

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"StockAction":{"properties":{"action":{"description":"Action to be performed on the stock. If a user has specific facility context limitations, only stocks located in the referenced facilities will be affected","oneOf":[{"$ref":"#/components/schemas/StockDeleteByLocations"},{"$ref":"#/components/schemas/StockDeleteByProducts"},{"$ref":"#/components/schemas/StockDeleteByIds"},{"$ref":"#/components/schemas/StockMoveToLocation"},{"$ref":"#/components/schemas/VersionlessUpdateStock"}]},"actions":{"deprecated":true,"description":"Deprecated. Use 'action' with a single action input instead.","items":{"oneOf":[{"$ref":"#/components/schemas/StockDeleteByLocations"},{"$ref":"#/components/schemas/StockDeleteByProducts"},{"$ref":"#/components/schemas/StockDeleteByIds"}]},"maxItems":10,"type":"array"}},"title":"StockAction","type":"object","description":"StockAction"},"StockDeleteByLocations":{"properties":{"locationRefs":{"items":{"type":"string"},"maxItems":500,"type":"array"},"name":{"enum":["DELETE_BY_LOCATIONS"],"type":"string"}},"required":["name","locationRefs"],"title":"StockDeleteByLocations","type":"object","description":"StockDeleteByLocations"},"StockDeleteByProducts":{"properties":{"facilityRef":{"type":"string"},"name":{"enum":["DELETE_BY_PRODUCTS"],"type":"string"},"tenantArticleIds":{"items":{"type":"string"},"maxItems":500,"type":"array"}},"required":["name","facilityRef","tenantArticleIds"],"title":"StockDeleteByProducts","type":"object","description":"StockDeleteByProducts"},"StockDeleteByIds":{"properties":{"ids":{"items":{"type":"string"},"maxItems":500,"type":"array"},"name":{"enum":["DELETE_BY_IDS"],"type":"string"}},"required":["name","ids"],"title":"StockDeleteByIds","type":"object","description":"StockDeleteByIds"},"StockMoveToLocation":{"properties":{"amount":{"type":"number"},"fromStockId":{"type":"string"},"name":{"enum":["MOVE_TO_LOCATION"],"type":"string"},"options":{"$ref":"#/components/schemas/MoveStockToLocationOptions"},"toLocationRef":{"type":"string"}},"required":["name","fromStockId","toLocationRef","amount"],"title":"StockMoveToLocation","type":"object","description":"This part of the API is in Beta status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />StockMoveToLocation"},"MoveStockToLocationOptions":{"properties":{"deleteFromStockIfZero":{"type":"boolean"}},"title":"MoveStockToLocationOptions","type":"object","description":"MoveStockToLocationOptions"},"VersionlessUpdateStock":{"properties":{"name":{"enum":["UPDATE_VERSIONLESS"],"type":"string"},"stocks":{"description":"Please be sure to include each stock (by ID) only once, when updating. Otherwise the whole batch is rejected with an error.","items":{"oneOf":[{"$ref":"#/components/schemas/StockForCreationVersionless"},{"$ref":"#/components/schemas/StockForUpdateVersionless"}]},"maxItems":25,"type":"array"}},"required":["name","stocks"],"title":"VersionlessUpdateStock","type":"object","description":"VersionlessUpdateStock"},"StockForCreationVersionless":{"properties":{"availableUntil":{"description":"defines until when a stock is included in the stock availability as available and used for routing","format":"date-time","type":"string"},"conditions":{"description":"Describes conditions of a stock\n    *`DEFECTIVE` - stock is defective, not usable for customer orders","items":{"enum":["DEFECTIVE"],"type":"string"},"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facility":{"description":"Selector for the facility. Either a facility reference or a tenant facility ID must be provided.","oneOf":[{"$ref":"#/components/schemas/FacilityRefSelector"},{"$ref":"#/components/schemas/TenantFacilityIdSelector"}]},"facilityRef":{"deprecated":true,"description":"facility in which the stock is located - fill with either facilityRef or tenantFacilityId - Deprecated: use facility object instead","type":"string"},"locationRef":{"description":"location on which the stock is placed","type":"string"},"operationType":{"enum":["CREATE"],"type":"string"},"properties":{"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"},{"additionalProperties":{"type":"string"},"type":"object"}],"description":"allow tracking of specific values such as expiry dates on a set of items. They should describe physical identifiable properties of the stock and are not meant to be used for metadata (see \"customAttributes\" for that)."},"receiptDate":{"description":"date-time when stock has entered the system, defaults to the creation date","format":"date-time","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock","minLength":1,"type":"string"},"tenantFacilityId":{"deprecated":true,"description":"tenantFacilityId in which the stock is located - fill with either facilityRef or tenantFacilityId - Deprecated: use facility object instead","type":"string"},"tenantStockId":{"description":"tenantStockId is an optional identifier for the stock in the tenant system.","type":"string"},"traitConfig":{"description":"defines the traits of the stock, overrules the storage location traits","items":{"$ref":"#/components/schemas/StorageLocationTraitConfigEntry"},"type":"array"},"value":{"format":"int32","minimum":0,"type":"integer"}},"required":["tenantArticleId","value","operationType"],"title":"StockForCreationVersionless","type":"object","description":"StockForCreationVersionless"},"FacilityRefSelector":{"properties":{"facilityRef":{"description":"Resolves a facility by its reference. This is the preferred way to resolve a facility.","minLength":1,"type":"string"}},"required":["facilityRef"],"title":"FacilityRefSelector","type":"object","description":"FacilityRefSelector"},"TenantFacilityIdSelector":{"properties":{"tenantFacilityId":{"description":"Resolves a facility by its tenantFacilityId.","minLength":1,"type":"string"}},"required":["tenantFacilityId"],"title":"TenantFacilityIdSelector","type":"object","description":"TenantFacilityIdSelector"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"StorageLocationTraitConfigEntry":{"properties":{"enabled":{"description":"whether the trait is enabled or not","type":"boolean"},"trait":{"description":"Describes what kind of actions this stock is available for\n     * `PICKABLE`- The stock is available for picking\n     * `ACCESSIBLE`- The stock is available for stock movements (stowing, inbound, etc)\n     * `KEEP_ON_ZERO`- The stock will not be deleted when emptied\n     * `OUTBOUND`- The stock is intended for outbound processes","type":"string"}},"required":["enabled","trait"],"title":"StorageLocationTraitConfigEntry","type":"object","description":"StorageLocationTraitConfigEntry"},"StockForUpdateVersionless":{"properties":{"conditions":{"description":"Describes conditions of a stock\n    *`DEFECTIVE` - stock is defective, not usable for customer orders","items":{"enum":["DEFECTIVE"],"type":"string"},"type":"array"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"id":{"type":"string"},"locationRef":{"nullable":true,"type":"string"},"operationType":{"enum":["UPDATE"],"type":"string"},"tenantStockId":{"description":"tenantStockId is an optional identifier for the stock in the tenant system.","type":"string"},"traitConfig":{"description":"defines the traits of the stock, overrules the storage location traits","items":{"$ref":"#/components/schemas/StorageLocationTraitConfigEntry"},"type":"array"},"value":{"format":"int32","minimum":0,"type":"integer"}},"required":["value","id","operationType"],"title":"StockForUpdateVersionless","type":"object","description":"StockForUpdateVersionless"},"StockActionResult":{"properties":{"name":{"enum":["DELETE_BY_LOCATIONS","DELETE_BY_PRODUCTS","DELETE_BY_IDS","MOVE_TO_LOCATION","UPDATE_VERSIONLESS"],"type":"string"},"result":{"oneOf":[{"$ref":"#/components/schemas/StockDeleteActionResult"},{"$ref":"#/components/schemas/StockMoveToLocationActionResult"},{"$ref":"#/components/schemas/StockVersionlessUpsertActionResult"}]}},"required":["name","result"],"title":"StockActionResult","type":"object","description":"StockActionResult"},"StockDeleteActionResult":{"properties":{"ids":{"items":{"type":"string"},"type":"array"}},"required":["ids"],"title":"StockDeleteActionResult","type":"object","description":"StockDeleteActionResult"},"StockMoveToLocationActionResult":{"properties":{"fromStock":{"$ref":"#/components/schemas/Stock"},"toStock":{"$ref":"#/components/schemas/Stock"}},"required":["toStock"],"title":"StockMoveToLocationActionResult","type":"object","description":"StockMoveToLocationActionResult"},"Stock":{"properties":{"available":{"type":"number"},"availableUntil":{"description":"defines until when a stock is included in the stock availability as available and used for routing","format":"date-time","type":"string"},"conditions":{"description":"Describes conditions of a stock\n    *`DEFECTIVE` - stock is defective, not usable for customer orders","items":{"enum":["DEFECTIVE"],"type":"string"},"type":"array"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facility":{"$ref":"#/components/schemas/StockFacilityReferences"},"facilityRef":{"description":"facility in which the stock is located","type":"string"},"facilityWideReserved":{"deprecated":true,"type":"number"},"id":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"locationRef":{"description":"location on which the stock is placed","type":"string"},"properties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}],"description":"allow tracking of specific values such as expiry dates on a set of items. They should describe physical identifiable properties of the stock and are not meant to be used for metadata (see \"customAttributes\" for that)."},"receiptDate":{"description":"date-time when stock has entered the system, defaults to the creation date","format":"date-time","type":"string"},"reserved":{"description":"amount of this stock reserved for customer orders","type":"number"},"scannableCodes":{"description":"scannableCodes such as barcodes that identify this stock","items":{"type":"string"},"type":"array"},"scores":{"description":"stock with a high score can used preferably over stock with a lower score in routing, depending on configuration. The score can represent different attributes of the stock like zone, storage location, expiry date or receipt date.","items":{"type":"string"},"type":"array"},"serializedProperties":{"description":"properties object serialized as JSON string, sorted alphabetically by key","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock","minLength":1,"type":"string"},"tenantStockId":{"description":"tenantStockId is an optional identifier for the stock in the tenant system.","type":"string"},"traitConfig":{"description":"defines the traits of the stock, overrules the storage location traits","items":{"$ref":"#/components/schemas/StorageLocationTraitConfigEntry"},"type":"array"},"traits":{"description":"provide information on how storage locations and stocks are to be handled in operational processes. Can only be set via storageLocation. ","items":{"enum":["PICKABLE","ACCESSIBLE","KEEP_ON_ZERO","OUTBOUND","IN_MOTION"],"type":"string"},"type":"array"},"value":{"format":"int32","minimum":0,"type":"integer"},"version":{"type":"number"}},"required":["tenantArticleId","value","reserved","facilityWideReserved","facilityRef","facility","available","id","version","created","lastModified","traits","serializedProperties"],"title":"Stock","type":"object","description":"Stock"},"StockFacilityReferences":{"properties":{"facilityRef":{"description":"facility in which the stock is located","type":"string"},"tenantFacilityId":{"description":"tenantFacilityId in which the stock is located","type":"string"}},"required":["facilityRef"],"title":"StockFacilityReferences","type":"object","description":"StockFacilityReferences"},"StockVersionlessUpsertActionResult":{"properties":{"operationResults":{"$ref":"#/components/schemas/StockUpsertOperationResult"}},"required":["operationResults"],"title":"StockVersionlessUpsertActionResult","type":"object","description":"StockVersionlessUpsertActionResult"},"StockUpsertOperationResult":{"properties":{"status":{"enum":["UPDATED","CREATED","UNCHANGED"],"type":"string"},"stock":{"$ref":"#/components/schemas/Stock"}},"required":["stock","status"],"title":"StockUpsertOperationResult","type":"object","description":"StockUpsertOperationResult"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/stocks/actions":{"post":{"deprecated":false,"description":"","operationId":"performStocksActions","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockAction"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockActionResult"}}},"description":"Stock action result"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"Call stock action","tags":["Stocks (Inventory)"]}}}}
```

## List stocks (search)

> Search for Stock

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"StockSearchPayload":{"properties":{"after":{"deprecated":false,"description":"The cursor to start after for forward pagination. The value is provided in the `pageInfo.endCursor` field of the response. Cannot be used with `before` or `last`.","type":"string"},"before":{"description":"The cursor to start before for backward pagination. The value is provided in the `pageInfo.startCursor` field of the response. Cannot be used with `after` or `size` (first).","type":"string"},"last":{"description":"Number of items to return for backward pagination. Cannot be used with 'size' (first). Default: 20.","maximum":250,"minimum":1,"type":"number"},"options":{"$ref":"#/components/schemas/SearchOptions"},"query":{"$ref":"#/components/schemas/StockSearchQuery"},"size":{"description":"Number of items to return for forward pagination. Cannot be used with 'last'. Default: 20.","maximum":250,"minimum":1,"type":"number"},"sort":{"description":"Use for sorting the result.","items":{"$ref":"#/components/schemas/StockSort"},"maxItems":1,"minItems":1,"type":"array"},"startAfterId":{"deprecated":true,"description":"The ID to start after. Deprecated, use `after` with the value provided in `pageInfo.endCursor` instead.","type":"string"}},"required":["query"],"title":"StockSearchPayload","type":"object","description":"StockSearchPayload"},"SearchOptions":{"properties":{"withTotal":{"description":"Set to true to include the total count of items in the search result.","type":"boolean"}},"title":"SearchOptions","type":"object","description":"SearchOptions"},"StockSearchQuery":{"properties":{"and":{"items":{"$ref":"#/components/schemas/StockSearchQuery"},"maxItems":500,"type":"array"},"availableUntil":{"allOf":[{"$ref":"#/components/schemas/DateFilter"}],"description":"Search by availableUntil"},"conditions":{"allOf":[{"$ref":"#/components/schemas/StockConditionEnumListFilter"}],"description":"Search by conditions"},"customAttributes":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/BooleanFilter"},{"$ref":"#/components/schemas/StringEqFilter"},{"$ref":"#/components/schemas/NumberEqFilter"},{"$ref":"#/components/schemas/DateFilter"}]},"description":"Search by custom attributes","type":"object"},"facilityRef":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by facilityRef"},"id":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by id"},"locationRef":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by locationRef"},"or":{"items":{"$ref":"#/components/schemas/StockSearchQuery"},"maxItems":500,"type":"array"},"properties":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/StringFilter"},{"$ref":"#/components/schemas/DateFilter"},{"$ref":"#/components/schemas/KeyExistsFilter"}]},"description":"Search by properties","type":"object"},"receiptDate":{"allOf":[{"$ref":"#/components/schemas/DateFilter"}],"description":"Search by receiptDate"},"scannableCodes":{"allOf":[{"$ref":"#/components/schemas/StringListFilter"}],"description":"Search by scannableCodes"},"tenantArticleId":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by tenantArticleId"},"tenantFacilityId":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"tenantFacilityId is handled like facilityRef filter, if you want to search by both you should wrap that filter in an \"or\" filter"},"tenantStockId":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by tenantStockId"},"traits":{"allOf":[{"$ref":"#/components/schemas/StockStorageLocationTraitEnumListFilter"}],"description":"Search by traits"},"value":{"allOf":[{"$ref":"#/components/schemas/NumberFilter"}],"description":"Search by value"}},"title":"StockSearchQuery","type":"object","description":"StockSearchQuery"},"DateFilter":{"properties":{"after":{"description":"Search using ISO‑8601 dates relative to today. Prefix with “–” for past dates. Results include events after the specified date. Example: “–P1D” for yesterday, “P1W” for next week.","maxLength":256,"type":"string"},"before":{"description":"Search using ISO‑8601 dates relative to today. Prefix with “–” for past dates. Results include events before the specified date. Example: “–P1D” for yesterday, “P1W” for next week.","maxLength":256,"type":"string"},"eq":{"format":"date-time","type":"string"},"gt":{"format":"date-time","type":"string"},"gte":{"format":"date-time","type":"string"},"lt":{"format":"date-time","type":"string"},"lte":{"format":"date-time","type":"string"},"notEq":{"format":"date-time","type":"string"}},"title":"DateFilter","type":"object","description":"DateFilter"},"StockConditionEnumListFilter":{"properties":{"contains":{"allOf":[{"$ref":"#/components/schemas/StockConditionEnumFilter"}],"description":"Search by conditions"}},"title":"StockConditionEnumListFilter","type":"object","description":"StockConditionEnumListFilter"},"StockConditionEnumFilter":{"properties":{"eq":{"description":"Search by conditions","enum":["DEFECTIVE"],"type":"string"},"in":{"description":"Search by conditions","items":{"enum":["DEFECTIVE"],"type":"string"},"maxItems":500,"type":"array"},"notEq":{"description":"Search by conditions","enum":["DEFECTIVE"],"type":"string"}},"title":"StockConditionEnumFilter","type":"object","description":"StockConditionEnumFilter"},"BooleanFilter":{"properties":{"eq":{"type":"boolean"},"notEq":{"type":"boolean"}},"title":"BooleanFilter","type":"object","description":"BooleanFilter"},"StringEqFilter":{"properties":{"eq":{"maxLength":256,"type":"string"},"notEq":{"maxLength":256,"type":"string"}},"title":"StringEqFilter","type":"object","description":"StringEqFilter"},"NumberEqFilter":{"properties":{"eq":{"type":"number"},"gt":{"type":"number"},"gte":{"type":"number"},"lt":{"type":"number"},"lte":{"type":"number"},"notEq":{"type":"number"}},"title":"NumberEqFilter","type":"object","description":"NumberEqFilter"},"StringFilter":{"properties":{"eq":{"maxLength":256,"type":"string"},"in":{"items":{"maxLength":256,"type":"string"},"maxItems":25,"type":"array"},"notEq":{"maxLength":256,"type":"string"},"notIn":{"items":{"maxLength":256,"type":"string"},"maxItems":25,"type":"array"}},"title":"StringFilter","type":"object","description":"StringFilter"},"KeyExistsFilter":{"properties":{"exists":{"description":"Search all entities which have or do not have this key defined","type":"boolean"}},"title":"KeyExistsFilter","type":"object","description":"KeyExistsFilter"},"StringListFilter":{"properties":{"contains":{"$ref":"#/components/schemas/StringEqFilter"}},"title":"StringListFilter","type":"object","description":"StringListFilter"},"StockStorageLocationTraitEnumListFilter":{"properties":{"contains":{"allOf":[{"$ref":"#/components/schemas/StockStorageLocationTraitEnumFilter"}],"description":"Search by traits"}},"title":"StockStorageLocationTraitEnumListFilter","type":"object","description":"StockStorageLocationTraitEnumListFilter"},"StockStorageLocationTraitEnumFilter":{"properties":{"eq":{"description":"Search by traits","enum":["PICKABLE","ACCESSIBLE","KEEP_ON_ZERO","OUTBOUND","IN_MOTION"],"type":"string"},"in":{"description":"Search by traits","items":{"enum":["PICKABLE","ACCESSIBLE","KEEP_ON_ZERO","OUTBOUND","IN_MOTION"],"type":"string"},"maxItems":500,"type":"array"},"notEq":{"description":"Search by traits","enum":["PICKABLE","ACCESSIBLE","KEEP_ON_ZERO","OUTBOUND","IN_MOTION"],"type":"string"}},"title":"StockStorageLocationTraitEnumFilter","type":"object","description":"StockStorageLocationTraitEnumFilter"},"NumberFilter":{"properties":{"eq":{"type":"number"},"gt":{"type":"number"},"gte":{"type":"number"},"in":{"items":{"type":"number"},"maxItems":25,"type":"array"},"lt":{"type":"number"},"lte":{"type":"number"},"notEq":{"type":"number"},"notIn":{"items":{"type":"number"},"maxItems":25,"type":"array"}},"title":"NumberFilter","type":"object","description":"NumberFilter"},"StockSort":{"properties":{"customAttributes":{"additionalProperties":true,"maxProperties":1,"minProperties":1,"type":"object"},"lastModified":{"enum":["ASC","DESC"],"type":"string"},"locationName":{"enum":["ASC","DESC"],"type":"string"},"tenantArticleId":{"enum":["ASC","DESC"],"type":"string"},"value":{"enum":["ASC","DESC"],"type":"string"}},"title":"StockSort","type":"object","description":"StockSort"},"StockPaginatedResult":{"properties":{"pageInfo":{"allOf":[{"$ref":"#/components/schemas/PageInfo"}],"description":"Pagination information for the search result."},"stocks":{"items":{"$ref":"#/components/schemas/Stock"},"type":"array"},"total":{"description":"The total number of items matching the search criteria. Only filled, if withTotal is set to true in the search options.","minimum":0,"type":"number"}},"required":["pageInfo","stocks"],"title":"StockPaginatedResult","type":"object","description":"StockPaginatedResult"},"PageInfo":{"properties":{"endCursor":{"description":"The cursor to use to fetch the next page of items. Use with parameter `after`.","type":"string"},"hasNextPage":{"description":"If true, there are more items after the current page.","type":"boolean"},"hasPreviousPage":{"description":"If true, there are more items before the current page.","type":"boolean"},"startCursor":{"description":"The cursor to use to fetch the previous page of items.","type":"string"}},"required":["hasNextPage","hasPreviousPage","startCursor","endCursor"],"title":"PageInfo","type":"object","description":"PageInfo"},"Stock":{"properties":{"available":{"type":"number"},"availableUntil":{"description":"defines until when a stock is included in the stock availability as available and used for routing","format":"date-time","type":"string"},"conditions":{"description":"Describes conditions of a stock\n    *`DEFECTIVE` - stock is defective, not usable for customer orders","items":{"enum":["DEFECTIVE"],"type":"string"},"type":"array"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facility":{"$ref":"#/components/schemas/StockFacilityReferences"},"facilityRef":{"description":"facility in which the stock is located","type":"string"},"facilityWideReserved":{"deprecated":true,"type":"number"},"id":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"locationRef":{"description":"location on which the stock is placed","type":"string"},"properties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}],"description":"allow tracking of specific values such as expiry dates on a set of items. They should describe physical identifiable properties of the stock and are not meant to be used for metadata (see \"customAttributes\" for that)."},"receiptDate":{"description":"date-time when stock has entered the system, defaults to the creation date","format":"date-time","type":"string"},"reserved":{"description":"amount of this stock reserved for customer orders","type":"number"},"scannableCodes":{"description":"scannableCodes such as barcodes that identify this stock","items":{"type":"string"},"type":"array"},"scores":{"description":"stock with a high score can used preferably over stock with a lower score in routing, depending on configuration. The score can represent different attributes of the stock like zone, storage location, expiry date or receipt date.","items":{"type":"string"},"type":"array"},"serializedProperties":{"description":"properties object serialized as JSON string, sorted alphabetically by key","type":"string"},"tenantArticleId":{"description":"tenantArticleId of the stock","minLength":1,"type":"string"},"tenantStockId":{"description":"tenantStockId is an optional identifier for the stock in the tenant system.","type":"string"},"traitConfig":{"description":"defines the traits of the stock, overrules the storage location traits","items":{"$ref":"#/components/schemas/StorageLocationTraitConfigEntry"},"type":"array"},"traits":{"description":"provide information on how storage locations and stocks are to be handled in operational processes. Can only be set via storageLocation. ","items":{"enum":["PICKABLE","ACCESSIBLE","KEEP_ON_ZERO","OUTBOUND","IN_MOTION"],"type":"string"},"type":"array"},"value":{"format":"int32","minimum":0,"type":"integer"},"version":{"type":"number"}},"required":["tenantArticleId","value","reserved","facilityWideReserved","facilityRef","facility","available","id","version","created","lastModified","traits","serializedProperties"],"title":"Stock","type":"object","description":"Stock"},"StockFacilityReferences":{"properties":{"facilityRef":{"description":"facility in which the stock is located","type":"string"},"tenantFacilityId":{"description":"tenantFacilityId in which the stock is located","type":"string"}},"required":["facilityRef"],"title":"StockFacilityReferences","type":"object","description":"StockFacilityReferences"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"StorageLocationTraitConfigEntry":{"properties":{"enabled":{"description":"whether the trait is enabled or not","type":"boolean"},"trait":{"description":"Describes what kind of actions this stock is available for\n     * `PICKABLE`- The stock is available for picking\n     * `ACCESSIBLE`- The stock is available for stock movements (stowing, inbound, etc)\n     * `KEEP_ON_ZERO`- The stock will not be deleted when emptied\n     * `OUTBOUND`- The stock is intended for outbound processes","type":"string"}},"required":["enabled","trait"],"title":"StorageLocationTraitConfigEntry","type":"object","description":"StorageLocationTraitConfigEntry"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/stocks/search":{"post":{"deprecated":false,"description":"Search for Stock","operationId":"searchStock","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockSearchPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockPaginatedResult"}}},"description":"Your search result"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"List stocks (search)","tags":["Stocks (Inventory)"]}}}}
```

## List stock summaries

> Get the accumulated Stock for each Article

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update and read stocks.","name":"Stocks (Inventory)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"StockSummaries":{"properties":{"stockSummaries":{"items":{"$ref":"#/components/schemas/StockSummary"},"type":"array"},"total":{"minimum":0,"type":"number"}},"required":["total","stockSummaries"],"title":"StockSummaries","type":"object","description":"StockSummaries"},"StockSummary":{"properties":{"article":{"$ref":"#/components/schemas/StockSummaryArticle"},"details":{"$ref":"#/components/schemas/StockSummaryDetails"},"includedFacilityRefs":{"description":"ALPHA Status!. The facilityRefs that are included in the stock summary.","items":{"type":"string"},"type":"array"}},"required":["includedFacilityRefs","article","details"],"title":"StockSummary","type":"object","description":"StockSummary"},"StockSummaryArticle":{"properties":{"imageUrl":{"type":"string"},"tenantArticleId":{"type":"string"},"title":{"type":"string"}},"required":["tenantArticleId","title"],"title":"StockSummaryArticle","type":"object","description":"StockSummaryArticle"},"StockSummaryDetails":{"properties":{"available":{"deprecated":true,"description":"This field is deprecated and replaced by new availability concepts. Please see https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock/stock-availability for more information.","minimum":0,"type":"number"},"availableForPicking":{"type":"number"},"availableOnStock":{"type":"number"},"availableToPromise":{"deprecated":true,"description":"This field is deprecated and replaced by new availability concepts. Please see https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock/stock-availability for more information.","type":"number"},"byTrait":{"$ref":"#/components/schemas/ByTrait"},"channelAdjusted":{"items":{"$ref":"#/components/schemas/ChannelStockAvailability"},"type":"array"},"readyToPick":{"deprecated":true,"description":"This field is deprecated and replaced by new availability concepts. Please see https://docs.fulfillmenttools.com/documentation/products/inventory-management/stock/stock-availability for more information.","type":"number"},"reserved":{"minimum":0,"type":"number"},"safetyStock":{"minimum":0,"type":"number"},"stockOnHand":{"type":"number"},"totalAmount":{"minimum":0,"type":"number"}},"required":["reserved","totalAmount","available","safetyStock","byTrait","availableForPicking","availableToPromise","readyToPick","availableOnStock","stockOnHand"],"title":"StockSummaryDetails","type":"object","description":"StockSummaryDetails"},"ByTrait":{"properties":{"ACCESSIBLE":{"type":"number"},"PICKABLE":{"type":"number"}},"required":["PICKABLE","ACCESSIBLE"],"title":"ByTrait","type":"object","description":"ByTrait"},"ChannelStockAvailability":{"properties":{"availableForPicking":{"type":"number"},"availableOnStock":{"type":"number"},"channelRef":{"type":"string"}},"required":["channelRef","availableForPicking","availableOnStock"],"title":"ChannelStockAvailability","type":"object","description":"ChannelStockAvailability"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/stocks/summaries":{"get":{"deprecated":false,"description":"Get the accumulated Stock for each Article","operationId":"getStockSummaries","parameters":[{"in":"query","name":"size","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"number"}},{"description":"The stockSummaries.article.tenantArticleId value should be used for pagination.","in":"query","name":"startAfterId","required":false,"schema":{"type":"string"}},{"explode":false,"in":"query","name":"facilityServiceTypes","required":false,"schema":{"items":{"enum":["SHIP_FROM_STORE","PICKUP"],"type":"string"},"type":"array"}},{"explode":false,"in":"query","name":"facilityStatus","required":false,"schema":{"items":{"enum":["ONLINE","SUSPENDED","OFFLINE"],"type":"string"},"type":"array"}},{"explode":true,"in":"query","name":"facilityRefs","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"in":"query","name":"allowStale","required":false,"schema":{"type":"boolean"}},{"explode":true,"in":"query","name":"tenantArticleIds","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"description":"Returns stock summaries using adaptive batching to reduce latency spikes, as a consequence response time will have a more consistent upper bound but page size may be reduced below the maximum - This overrides `size` argument.","in":"query","name":"maxPageSize","required":false,"schema":{"maximum":100,"minimum":1,"type":"number"}},{"description":"The channels to included under \"channelAdjusted\" in the stock summary. Provide up to 50 channelRefs, specify \"UNALLOCATED for unallocated stock.\"","explode":true,"in":"query","name":"channelRefs","required":false,"schema":{"items":{"type":"string"},"maxItems":50,"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockSummaries"}}},"description":"Stock summaries was loaded & you were allowed to access it. The result is in the body."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this"}},"summary":"List stock summaries","tags":["Stocks (Inventory)"]}}}}
```
