Skip to content

About Inventory

Access scope

Multiple access scopes needed — refer to each endpoint for access scope requirements.

Inventory is designed to manage product inventory information within e-commerce platforms and supply chain systems. Genstore provides a set of RESTful interfaces for precise inventory management. This module supports the creation, retrieval, update, and deletion of inventory items, providing efficient inventory management capabilities for e-commerce platforms and supply chain management systems.

Core Features

  • Variant Warehouse Binding: Add inventory configuration for specific product variants.
  • List Inventory: Retrieve detailed information for all inventory items.
  • Query Warehouse Inventory: Query inventory information by warehouse ID.
  • Query Store Warehouses: Query inventory information by store ID.
  • Update Variant Inventory: Modify existing inventory item information.
  • Variant Warehouse Unbinding: Remove the binding between variant and warehouse.

Use Cases

  • Inventory Monitoring & Alerts: Operations teams can monitor real-time stock levels, configure threshold alerts, and manage exception workflows through the API, ensuring timely responses to inventory changes and preventing stockouts.
  • Warehouse Operation Management: Warehouse managers can coordinate receiving processes, manage shipping tasks, and conduct inventory counts through standardized workflows, maintaining accuracy between physical and system inventory.
  • Inventory Planning Optimization: Supply chain analysts can leverage historical inventory data, generate demand forecasts, and optimize replenishment strategies through the API, improving inventory efficiency and reducing holding costs.

Endpoints

POST /api/202412/inventory/connect: Assign variant to warehouse

PUT /api/202412/inventory/{variantId}: Update variant inventory

GET /api/202412/inventory: Get inventory list

Inventory Object

The product inventory object.

Properties

inventoryobject
Inventory object.
- Hide child properties
productIdnumber
The unique numeric identifier for the product.
variantIdnumber
The unique numeric identifier for the product variant.
inventoryCountsarray
Inventory quantity statistics for the location of the variant association.
+ Show child properties
bash
{
  "inventory": {
    "productId": "102744589756584",
    "variantId": "107362235756584",
    "inventoryCounts": [
      {
        "locationId": "54002",
        "available": "100"
      }
    ]
  }
}

POST Assign variant to warehouse

Establish product inventory-location association by creating products at a specified location.

Access scope

Requires ANY of the following access scopes: write_products

Endpoint

POST /api/202412/inventory/connect 

Request Params

locationIdnumber
The ID of the location that the product variant belongs to.
variantIdnumber
The unique numeric identifier for the product variant.
productIdnumber
The unique numeric identifier for the product.

Response Data

inventoryobject
Inventory object.
- Hide child properties
productIdstring
The unique numeric identifier for the product.
variantIdstring
The unique numeric identifier for the product variant.
inventoryCountsarray
Inventory quantity statistics for the location of the variant association.
+ Show child properties
bash
curl -X POST \ 
https://{shop}.genmystore.com/api/202412/inventory/connect" \ 
-H "X-Genstore-Access-Token: {access_token}" \ 
-H "Content-Type: application/json" \ 
-d '{
	"productId":"102744589756584",
	"locationId":"54002",
	"variantId":"107362235756584"
}'
json
HTTP/1.1 200 OK
{
  "inventory": {
    "productId": "102744589756584",
    "variantId": "107362235756584",
    "inventoryCounts": [
      {
        "locationId": "54002",
        "available": "100"
      }
    ]
  }
}

PUT Update variant inventory

Set the amount of available inventory for the variant at a specified location. If the specified location and variant are not bound, they will be automatically bound first.

Access scope

Requires ANY of the following access scopes: write_products

Endpoint

PUT /api/202412/inventory/{variantId} 

Request Params

locationIdnumber
The ID of the location.
productIdnumber
The unique numeric identifier for the product.
availablenumber
Available inventory.

Response Data

inventoryobject
Inventory object.
- Hide child properties
productIdstring
The unique numeric identifier for the product.
variantIdstring
The unique numeric identifier for the product variant.
inventoryCountsarray
Inventory quantity statistics for the location of the variant association.
+ Show child properties
bash
curl -X PUT \ 
https://{shop}.genmystore.com/api/202412/inventory/{variantId}" \ 
-H "X-Genstore-Access-Token: {access_token}" \ 
-H "Content-Type: application/json" \ 
-d '{
	"productId":"102744589756584",
	"locationId":"54002",
	"available":"100"
}'
json
HTTP/1.1 200 OK
{
  "inventory": {
    "productId": "102744589756584",
    "variantId": "107362235756584",
    "inventoryCounts": [
      {
        "locationId": "54002",
        "available": "100"
      }
    ]
  }
}

GET Get inventory list

Retrieves a list of inventory.

Access scope

Requires ANY of the following access scopes: write_products read_products

Endpoint

GET /api/202412/inventory 

Request Params

locationIdnumber
The ID of the location.
variantIdsarray
The unique numeric identifier list for the product variant.

Response Data

inventorysarray
Inventory object.
- Hide child properties
productIdnumber
The unique numeric identifier for the product.
variantIdnumber
The unique numeric identifier for the product variant.
inventoryCountsarray
Inventory quantity statistics for the location of the variant association.
+ Show child properties
bash
curl -X GET \ 
https://{shop}.genmystore.com/api/202412/inventory" \ 
-H "X-Genstore-Access-Token: {access_token}" \
json
HTTP/1.1 200 OK
{
  "inventorys": [
    {
      "productId": "102744589756584",
      "variantId": "107362235756584",
      "inventoryCounts": [
        {
          "locationId": "54002",
          "available": "100"
        }
      ]
    }
  ]
}