Skip to main content

Inventory

The inventory API provides structured endpoints to manage product categories, products, variants, inventory, and availability within the CRS system. This API is essential for webshop integrations, enabling efficient data retrieval and manipulation.

Get Product Categories

Method: POST
URL: {host_url}/api/inventory/ProductCategory/GetProductCategories

Minimal Request:

{}

Response: Returns a list of all product categories.

Get Products (Paged)

Method: POST
URL: {host_url}/api/inventory/Product/GetProductPage

Detailed usage of GetProductPage method is described in GetProductPage Usage document. Please read this document first.

Minimal Request:

{
"propertiesToLoad": {
"value": <write flags value>
},
"offset": 0,
"count": page_size,
"includeOverallEntryCount": true,
"modifiedAfter": {
"value": "2017-09-26T12:52:29.960Z"
}
}
note
  • modifiedAfter retrieves products modified after a specific date. If all products are needed, set this field to null. Each product have properties isProductInstancesSupported, isProductVariantsSupported, and productImages.
  • Additional product data fetching:
    • isProductInstancesSupported → Fetch product variants if true.
    • isProductVariantsSupported → Fetch product instances if true.
    • productImages → If not empty, fetch product images.

Get Product Variants

Method: POST
URL: {host_url}/api/inventory/ProductVariant/GetProductVariants

Minimal Request:

{
"productId": { "value": product_id }
}

Response: Returns a list of product variants.

note

ProductVariant entities do not contain overridable properties like isEnabled, CostPrice, and SalesPrice. Use ProductVariantInfo for actual values.

Get Product Variant Infos

Method: POST
URL: {host_url}/api/inventory/ProductVariant/GetProductVariantInfos

Minimal Request:

{
"productId": { "value": product_id }
}

Response: Returns product variants in ProductVariantInfo format.

Also may be specified parameter OrganizationUnitId to be sure that isEnabled and CostPrice and SalesPrice overridable properties will be got for specific organizational unit. In case when OrganizationUnitId is not defined, overridable properties will be filled for Organizational unit to which user is logged in.

Get Product Instances (Paged)

Method: POST
URL: {host_url}/api/inventory/ProductInstance/GetProductInstancePage

Minimal Request:

{
"productIds": { "value": ` product_id ` },
"offset": 0,
"count": page_size,
"includeOverallEntryCount": true
}

Response: Returns product instances for multiple products.

Get Product & Product Variant Images

Product and ProductVariant entities contains collection named ProductImages. Each product image along with other properties contain property mediaItemId using which product image can be fetched from media storage

First need to be fetched media item information:

Method: POST
URL: {host_url}/api/media/MediaItem/GetMediaItem

Minimal Request:

{
"id": media_item_id
}

Response: Returns file metadata (MIME type, file name, etc.).

Then need to be fetched media item itself:

Method: GET
URL: {host_url}/api/media/MediaItem/GetMediaItemStream?id=mediaItemId

Response: Returns media item as a stream.

Get Product Availability

Method: POST
URL: {host_url}/api/inventory/StockEntry/GetProductAvailability

Minimal Request:

{
"productIdentifier": { "productId": product_id },
"organizationalUnitId": { "value": organizational_unit_id }
}

Response: List of availability records for the product in the selected unit.

In productIdentifier parameter may be also set variantId and instanceId (if product support variants and instances and we need to know availability for specific variant and instance).

In case when instanceId is not set- in result will be availability rows for all instances for product/variant combination. In case when variantId is not set - in result will be availability rows for all variants /instances for product.

Get Product Availability (Paged)

Method: POST
URL: {host_url}/api/inventory/StockEntry/GetProductAvalibilityPage

Minimal Request:

{
"organizationalUnitId": organizational_unit_id,
"offset": 0,
"count": page_size,
"includeOverallEntryCount": true
}

updatedAtFrom and updatedAtTo may be specified to retrieve product availability results for products which availability was changed within specific time interval.

organizational_unit_id is organizational unit id (Root organizational unit id = -1) for which availability need to be fetched.

productIds and categoryIds may be specified in order to narrow paged result for specific product categories or products.

Paged result will contain page of entities of type GetProductAvailabilityResult each of them will contain availability items for specific organizational unit in Items collection and StockItem property in which ProductId is product Id and properties VariantId and InstanceId will be always null for this request.

note

For products that supports variants and instances availability items in response will be grouped by product so GetProductAvailabilityResult will contain availability entries for all variants and all instance of specific product in Items collection and they need to be grouped by variant and instance on client side in case of need.

In case when updatedAtFrom and updatedAtTo is specified, will be returned availability for products which availability is changed within time interval but will be presented all availability records, not change (delta) rows. In other worls updatedAtFrom and updatedAtTo need to be used to narrow the range of products for which availability will be fetched but always all availability rows for product will be returned.

Get Stock Entries (Paged)

Method: POST
URL: {host_url}/api/inventory/StockEntry/GetStockEntryPage

Minimal Request:

{
"offset": 0,
"count": page_size,
"includeOverallEntryCount": true
}

Optional Filters:

  • updatedAtFrom, updatedAtTo → Fetch stock entries created/updated within a specific time interval.
  • productId, variantId, instanceId, organizationalUnitId → Filter results.

Planned Features & Improvements

Future enhancements include:

  • Filter by createdAtFrom → Fetch stock entries created after a specific date.
  • Filter by productCategoryIds → Fetch entries for specific product categories.
  • Plural Filters → Convert productId, variantId, instanceId into plural format.