Stock

This page is outdated. Please go to our new documentation under https://docs.fulfillmenttools.com/documentation.

Summary

Stocks represent items in a facility and carry information on how much of a product is present as well as metadata and operational data. Stock is typically linked to a listing which holds information on the attributes of the item within the facility. Only stock-specific information, which differs from item to item, like best-before-dates or storage locations is tracked via stocks. Stocks can exist without listings and the other way around. However, we advise to always create listings for stocks so that stocks are assigned to the corresponding item and item information can be displayed in clients.

Description

Stock represents one or more items with the exact same attributes, e.g., items with the same best-before-date, lying on the same storage location. Two stocks can be merged, if all information on the respective stocks is identical, adding up their amounts. However, our systems still allow having two separate stocks with identical attributes.

The example below shows a listing with tenantArticleId "9999". As stocks for that item are firstly, distributed over two locations and secondly, have different attributes, three stocks were created.

Stock Properties

Attributes which are relevant for operational processes are handled via Stock Properties. A common example for properties are values such as expiry date or batch number.

Stock Receipt Date

Stocks have the attribute receiptDate: This represents the time and date, when a stock enters a facility. The information can be used for various purposes, e.g., to ensure that picking follows a first-in-first-out strategy. This ensures that the timestamp is set to the value when the stock is accepted in the Inbound process and not changed afterwards.

When the stock is set via API, it is the responsibility of the integration layer to provide the correct time point. If no receiptDate is provided, the platform defaults to the moment when the stock is created.

Stocks with amount 0

The fact that there is no stock left for an item in a facility can be represented in two ways:

  1. Having no stock entities

  2. Having stock entities with amount 0

A stock with amount 0 that is assigned to a storage location can be used to indicate that the product should always be stored there. This is, for example, helpful when using our Inventory App and/or our storage location recommendations. If stock is set to 0, our systems will remove the stock entity by default. This can be prevented by adding the trait KEEP_ON_ZERO to a storage location.

API documentation

Creating stock

Mandatory values when creating stock:

  • facilityRef: facility in which the stock should be created

  • tenantArticleId: the item that the stock belongs to

  • value: quantity that should be created

Optional values when creating stock:

  • locationRef: location on which the stock is placed on (when using our storage locations)

  • properties: Attributes which are relevant for operational processes. See stock properties for more information

  • receiptDate: Time and date when the stock entered the facility

  • availableUntil: Defines until when a stock is included in the stock availability which is, e.g., used to communicate available stock to shop systems. See the corresponding listing configuration for more information.

  • customAttributes: can be used to carry custom information that might be in interest to connectors or services outside of fulfillmenttools. For more information see custom attributes.

Create stock

post
Authorizations
Body
facilityRefstringRequired
tenantArticleIdstringRequired
valueinteger · int32Required
locationRefstringOptional
propertiesall ofOptional
receiptDatestring · date-timeOptional
Responses
201
Stock was created.
application/json
post
POST / HTTP/1.1
Host: %%HOST%%
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 171

{
  "facilityRef": "text",
  "tenantArticleId": "text",
  "value": 1,
  "locationRef": "text",
  "properties": {
    "expiry": "text",
    "receiptDate": "text"
  },
  "receiptDate": "2025-07-12T02:33:48.554Z"
}
{
  "reserved": 1,
  "facilityWideReserved": 1,
  "available": 1,
  "id": "text",
  "version": 1,
  "facilityRef": "text",
  "tenantArticleId": "text",
  "tenantStockId": "text",
  "created": "2025-07-12T02:33:48.554Z",
  "lastModified": "2025-07-12T02:33:48.554Z",
  "value": 1,
  "locationRef": "text",
  "traits": [
    "PICKABLE"
  ],
  "scores": [
    "text"
  ],
  "scannableCodes": [
    "text"
  ],
  "properties": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "serializedProperties": "text",
  "receiptDate": "2025-07-12T02:33:48.554Z"
}

Get all stocks

Get stocks

get
Authorizations
Query parameters
facilityRefstringOptional
tenantArticleIdstring[] · max: 500Optional
locationRefstring[] · max: 500Optional
sizenumber · min: 1 · max: 100OptionalDefault: 25
startAfterIdstringOptional
Responses
200
Stocks
application/json
get
GET / HTTP/1.1
Host: %%HOST%%
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "total": 1,
  "stocks": [
    {
      "reserved": 1,
      "facilityWideReserved": 1,
      "available": 1,
      "id": "text",
      "version": 1,
      "facilityRef": "text",
      "tenantArticleId": "text",
      "tenantStockId": "text",
      "created": "2025-07-12T02:33:48.554Z",
      "lastModified": "2025-07-12T02:33:48.554Z",
      "value": 1,
      "locationRef": "text",
      "traits": [
        "PICKABLE"
      ],
      "scores": [
        "text"
      ],
      "scannableCodes": [
        "text"
      ],
      "properties": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "serializedProperties": "text",
      "receiptDate": "2025-07-12T02:33:48.554Z"
    }
  ]
}

Updating stock

Each stock created in our system receives a unique ID. This ID must be specified when updating stock. Therefore, we advise to either temporarily store stock Ids or get all stocks before updating.

Update and create many stocks at once

put
Authorizations
Body
Responses
200
Stock upsert result
application/json
put
PUT / HTTP/1.1
Host: %%HOST%%
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 184

{
  "stocks": [
    {
      "facilityRef": "text",
      "tenantArticleId": "text",
      "value": 1,
      "locationRef": "text",
      "properties": {
        "expiry": "text",
        "receiptDate": "text"
      },
      "receiptDate": "2025-07-12T02:33:48.554Z"
    }
  ]
}
[
  {
    "stock": {
      "reserved": 1,
      "facilityWideReserved": 1,
      "available": 1,
      "id": "text",
      "version": 1,
      "facilityRef": "text",
      "tenantArticleId": "text",
      "tenantStockId": "text",
      "created": "2025-07-12T02:33:48.554Z",
      "lastModified": "2025-07-12T02:33:48.554Z",
      "value": 1,
      "locationRef": "text",
      "traits": [
        "PICKABLE"
      ],
      "scores": [
        "text"
      ],
      "scannableCodes": [
        "text"
      ],
      "properties": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "serializedProperties": "text",
      "receiptDate": "2025-07-12T02:33:48.554Z"
    },
    "status": "UPDATED"
  }
]

Deleting stock

Each stock created in our system receives a unique ID. This ID must be specified when deleting stock.

Delete stock

delete
Authorizations
Path parameters
stockIdstringRequired
Responses
200
Stock was deleted.
delete
DELETE / HTTP/1.1
Host: %%HOST%%
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Deleting stock by product / location / id in batch

  • For deleting all stocks for a product in a facility, use the DELETE_BY_PRODUCTS action

  • For deleting all stocks on a storage location in a facility, use the DELETE_BY_LOCATIONS action

  • For deleting multiple stocks in a facility in one call, use the DELETE_BY_IDS action

Perform stocks actions

post
Authorizations
Body
actionone ofOptional
or
or
or
Responses
200
Stock action result
application/json
post
POST / HTTP/1.1
Host: %%HOST%%
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 65

{
  "action": {
    "name": "DELETE_BY_LOCATIONS",
    "locationRefs": [
      "text"
    ]
  }
}
{
  "name": "DELETE_BY_LOCATIONS",
  "result": {
    "ids": [
      "text"
    ]
  }
}

Move stock to another location

For moving a stock from one location to another, specify the respective stockId as well as the toLocationRef to which the stock should be moved. When setting deleteFromStockIfZero to true, the stock on the start location is deleted when value reaches 0 after move action was completed. Attention: If deleteFromStockIfZero is set to true, the stock entity is deleted even when the KEEP_ON_ZERO trait is active on the respective location.

Perform stocks actions

post
Authorizations
Body
actionone ofOptional
or
or
or
Responses
200
Stock action result
application/json
post
POST / HTTP/1.1
Host: %%HOST%%
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 65

{
  "action": {
    "name": "DELETE_BY_LOCATIONS",
    "locationRefs": [
      "text"
    ]
  }
}
{
  "name": "DELETE_BY_LOCATIONS",
  "result": {
    "ids": [
      "text"
    ]
  }
}

Last updated

Was this helpful?