Skip to main content

Import Stock

Typically the data on your stock or inventory is kept in your ERP or in your WMS. But it is also possible you want to import stock levels of one of your suppliers directly into Propeller. Regardless of the source of the inventory, you want to keep your stock information in Propeller up to date so you can either show exact stock information on your website or portal, or at least a rough indication of the available stock levels of your products.

To periodically sync stock to Propeller the bulk inventory endpoint is the most logical endpoint to use.

Endpoint​

POST /v2/inventory/bulk/:lookupKey/:inventoryType

The endpoint has two path parameters:

Example: POST /v2/inventory/bulk/sourceId/local

External system identification​

You can match the stock to the products in Propeller in several ways. The available lookup keys are id (the Propeller product ID), sourceId, sku or supplierCode. The lookup key is set as a path parameter. See Sources for how source combinations work.

Local vs supplier stock​

The endpoint allows for syncing two types of inventory: local or supplier. This way you can distinguish between your own local inventory and possible inventories of your suppliers. The inventory type is set as a path parameter in the call.

Data fields​

quantity: the actual stock number as an integer. You always need to send the full stock as an integer and cannot send mutations like minus 1 or plus 10. Propeller also does not update inventory numbers by itself based on online sales to prevent confusion.

allocatedQuantity and expectedQuantity: if your ERP tracks them, send the stock that is sold but not yet shipped (allocatedQuantity, which is part of quantity) and the stock that is purchased but not yet received (expectedQuantity, which is not). Propeller derives freeQuantity (the stock you can still promise) as quantity minus allocatedQuantity and economicQuantity as free stock plus expected stock. Leave a field out or send null when your system does not report it, because 0 means nothing is allocated or expected. Both must be 0 or more: a record with a negative value is rejected.

warehouseId: it can be relevant to display stock levels in various physical locations. Think about warehouses in multiple countries or when you allow the end customer to pick up their orders. In those cases you can create different warehouses, which will get separate warehouse IDs. Using the warehouse IDs in your inventory import allows you to separate stock levels for multiple warehouses.

nextDeliveryDate: if you have information on when new stock will arrive in your warehouse you can import this as a date in the nextDeliveryDate field. This can be useful information for your customers when making their purchase decision.

companyId: stock can be held for one Company rather than for everyone. A record sent with a companyId is a separate row from the general record for the same product, so updating one does not change the other. Leave the field out or send 0 for general stock that applies to all customers.

Batch size​

This is a bulk endpoint so you can post lots of inventory data in one payload. We advise a batch size of roughly 1000 products per call.

Request body​

{
"inventory": [
{
"location": "B45",
"nextDeliveryDate": "2029-03-01 00:00:00",
"quantity": 75,
"source": "TECHDATA",
"sourceId": "NCABD70004"
},
{
"companyId": 42,
"quantity": 12,
"source": "TECHDATA",
"sourceId": "NCABD70004"
}
]
}

The first record sets general stock for the product. The second holds 12 units for Company 42, without changing the general quantity.

Response​

Each inventory item in the batch returns a result:

{
"data": [
{
"success": true,
"id": 11520,
"action": "update"
}
],
"messages": ["Completed"],
"total": 1
}
  • success indicates whether the operation succeeded
  • id is the Propeller internal inventory ID
  • action is create or update depending on whether the inventory record already existed

See also​