Skip to content
↑↓ navigate↵ openEsc close

API reference

Inventory

Master stock items, warehouses, stock documents, and the stock ledger.

Bulk update variants

POST/v1/bulk/variants

Change marketplace price and stock of many variants; pushed per store.

Variants that follow a master item with sync on reject the managed field with VARIANT_MANAGED.

Scopes:products:write

Request bodyapplication/json

  • updatesarray<object>required

    min items 1 · max items 200

    Show 3 child attributes
    • variantIdstringrequired

      format: uuid

    • pricestring (decimal)optional

      Decimal string with two fraction digits.

    • stockintegeroptional

      min 0 · max 99999

Response200 · application/json

Outcome per variant, in request order

  • resultsarray<object>required
    Show 3 child attributes
    • variantIdstringrequired

      format: uuid

    • okbooleanrequired
    • errorobjectrequirednullable
      Show 2 child attributes
      • codestringrequired
      • messagestringrequired
Example request · curl
curl -X POST "https://api.comnethub.app/v1/bulk/variants" \
  -H "Authorization: Bearer $THECOMNET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "updates": [
    {
      "variantId": "0192f0c4-8d1e-7a4b-9c3e-5f6a7b8c9d0e"
    }
  ]
}'

List inventory items

GET/v1/inventory/items

Master stock items.

Scopes:products:read

Query parameters

  • qstringoptional

    max length 100

Response200 · application/json

Items ordered by SKU

  • itemsarray<InventoryItem>required
    Show 15 child attributes
    • idstringrequired

      format: uuid

    • skustringrequired
    • namestringrequired
    • stockintegerrequired

      Sum over sellable warehouses.

    • onHandintegerrequired

      Sum over all warehouses.

    • avgCoststring (decimal)requirednullable

      Moving-average unit cost from receipts.

    • safetyStockintegerrequired
    • availableintegerrequired

      max(0, stock - safetyStock); the quantity pushed to marketplaces.

    • pricestring (decimal)requirednullable

      Decimal string with two fraction digits.

    • currencystringrequired
    • syncStockbooleanrequired
    • syncPricebooleanrequired
    • linkCountintegerrequired
    • errorCountintegerrequired
    • updatedAtstringrequired

      format: date-time

Example request · curl
curl "https://api.comnethub.app/v1/inventory/items" \
  -H "Authorization: Bearer $THECOMNET_API_KEY"

Create inventory item

POST/v1/inventory/items

Create a master stock item.

Scopes:products:write

Request bodyapplication/json

  • skustringrequired

    min length 1 · max length 100

  • namestringrequired

    min length 1 · max length 200

  • stockintegeroptional

    min 0 · max 1000000

  • warehouseIdstringoptional

    Warehouse for the initial stock; defaults to the default warehouse.

    format: uuid

  • safetyStockintegeroptional

    min 0 · max 1000000

  • pricestring (decimal)optionalnullable

    Decimal string with two fraction digits.

  • syncStockbooleanoptional
  • syncPricebooleanoptional

Response201 · application/json

Created item

  • idstringrequired

    format: uuid

  • skustringrequired
  • namestringrequired
  • stockintegerrequired

    Sum over sellable warehouses.

  • onHandintegerrequired

    Sum over all warehouses.

  • avgCoststring (decimal)requirednullable

    Moving-average unit cost from receipts.

  • safetyStockintegerrequired
  • availableintegerrequired

    max(0, stock - safetyStock); the quantity pushed to marketplaces.

  • pricestring (decimal)requirednullable

    Decimal string with two fraction digits.

  • currencystringrequired
  • syncStockbooleanrequired
  • syncPricebooleanrequired
  • linkCountintegerrequired
  • errorCountintegerrequired
  • updatedAtstringrequired

    format: date-time

Example request · curl
curl -X POST "https://api.comnethub.app/v1/inventory/items" \
  -H "Authorization: Bearer $THECOMNET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "sku": "string",
  "name": "string"
}'

Get inventory item

GET/v1/inventory/items/{itemId}

Item with linked marketplace variants and recent movements.

Scopes:products:read

Path parameters

  • itemIdstringrequired

    format: uuid

Response200 · application/json

Item detail

  • idstringrequired

    format: uuid

  • skustringrequired
  • namestringrequired
  • stockintegerrequired

    Sum over sellable warehouses.

  • onHandintegerrequired

    Sum over all warehouses.

  • avgCoststring (decimal)requirednullable

    Moving-average unit cost from receipts.

  • safetyStockintegerrequired
  • availableintegerrequired

    max(0, stock - safetyStock); the quantity pushed to marketplaces.

  • pricestring (decimal)requirednullable

    Decimal string with two fraction digits.

  • currencystringrequired
  • syncStockbooleanrequired
  • syncPricebooleanrequired
  • linkCountintegerrequired
  • errorCountintegerrequired
  • updatedAtstringrequired

    format: date-time

  • warehousesarray<ItemWarehouseStock>required
    Show 5 child attributes
    • warehouseIdstringrequired

      format: uuid

    • codestringrequired
    • namestringrequired
    • sellablebooleanrequired
    • quantityintegerrequired
  • linksarray<InventoryLink>required
    Show 13 child attributes
    • variantIdstringrequired

      format: uuid

    • storeIdstringrequired

      format: uuid

    • storeNamestringrequired
    • marketplacestringrequired

      One of:tiktokshopeelazadatokopedia

    • productTitlestringrequired
    • variantNamestringrequirednullable
    • skustringrequirednullable
    • stockintegerrequirednullable
    • pricestring (decimal)requirednullable

      Decimal string with two fraction digits.

    • lastPushedStockintegerrequirednullable
    • lastPushedAtstringrequirednullable

      format: date-time

    • lastErrorstringrequirednullable
    • linkedAtstringrequired

      format: date-time

  • movementsarray<InventoryMovement>required
    Show 15 child attributes
    • idstringrequired

      format: uuid

    • deltaintegerrequired
    • reasonstringrequired

      One of:adjustsetordercancelreceiveissuetransfer_intransfer_outstocktakereturn

    • batchIdstringrequirednullable

      Shared by the lines and transfer legs of one stock document.

      format: uuid

    • warehouseIdstringrequired

      format: uuid

    • warehouseCodestringrequired
    • unitCoststring (decimal)requirednullable

      Decimal string with two fraction digits.

    • purchaseOrderIdstringrequirednullable

      format: uuid

    • purchaseOrderNumberstringrequirednullable
    • stocktakeIdstringrequirednullable

      format: uuid

    • stocktakeNumberstringrequirednullable
    • orderIdstringrequirednullable

      format: uuid

    • externalOrderIdstringrequirednullable
    • notestringrequirednullable
    • createdAtstringrequired

      format: date-time

Example request · curl
curl "https://api.comnethub.app/v1/inventory/items/$ITEM_ID" \
  -H "Authorization: Bearer $THECOMNET_API_KEY"

Update inventory item

PATCH/v1/inventory/items/{itemId}

Edit name, safety stock, price, or sync switches.

Scopes:products:write

Path parameters

  • itemIdstringrequired

    format: uuid

Request bodyapplication/json

  • namestringoptional

    min length 1 · max length 200

  • safetyStockintegeroptional

    min 0 · max 1000000

  • pricestring (decimal)optionalnullable

    Decimal string with two fraction digits.

  • syncStockbooleanoptional
  • syncPricebooleanoptional

Response200 · application/json

Updated item

  • idstringrequired

    format: uuid

  • skustringrequired
  • namestringrequired
  • stockintegerrequired

    Sum over sellable warehouses.

  • onHandintegerrequired

    Sum over all warehouses.

  • avgCoststring (decimal)requirednullable

    Moving-average unit cost from receipts.

  • safetyStockintegerrequired
  • availableintegerrequired

    max(0, stock - safetyStock); the quantity pushed to marketplaces.

  • pricestring (decimal)requirednullable

    Decimal string with two fraction digits.

  • currencystringrequired
  • syncStockbooleanrequired
  • syncPricebooleanrequired
  • linkCountintegerrequired
  • errorCountintegerrequired
  • updatedAtstringrequired

    format: date-time

Example request · curl
curl -X PATCH "https://api.comnethub.app/v1/inventory/items/$ITEM_ID" \
  -H "Authorization: Bearer $THECOMNET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "safetyStock": 1,
  "price": "150000.00",
  "syncStock": true,
  "syncPrice": true
}'

Adjust inventory stock

POST/v1/inventory/items/{itemId}/adjust

Set or change stock; queues a push to linked marketplaces.

Scopes:products:write

Path parameters

  • itemIdstringrequired

    format: uuid

Request bodyapplication/json

  • modestringrequired

    One of:setdelta

  • quantityintegerrequired

    min -1000000 · max 1000000

  • warehouseIdstringoptional

    Defaults to the default warehouse; set mode applies to that warehouse.

    format: uuid

  • notestringoptional

    max length 200

Response200 · application/json

Item after the change

  • idstringrequired

    format: uuid

  • skustringrequired
  • namestringrequired
  • stockintegerrequired

    Sum over sellable warehouses.

  • onHandintegerrequired

    Sum over all warehouses.

  • avgCoststring (decimal)requirednullable

    Moving-average unit cost from receipts.

  • safetyStockintegerrequired
  • availableintegerrequired

    max(0, stock - safetyStock); the quantity pushed to marketplaces.

  • pricestring (decimal)requirednullable

    Decimal string with two fraction digits.

  • currencystringrequired
  • syncStockbooleanrequired
  • syncPricebooleanrequired
  • linkCountintegerrequired
  • errorCountintegerrequired
  • updatedAtstringrequired

    format: date-time

Example request · curl
curl -X POST "https://api.comnethub.app/v1/inventory/items/$ITEM_ID/adjust" \
  -H "Authorization: Bearer $THECOMNET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "set",
  "quantity": 1
}'

Link inventory variant

POST/v1/inventory/items/{itemId}/links

Link a marketplace variant; it immediately receives the item's stock.

Scopes:products:write

Path parameters

  • itemIdstringrequired

    format: uuid

Request bodyapplication/json

  • variantIdstringrequired

    format: uuid

Response200 · application/json

Item detail

  • idstringrequired

    format: uuid

  • skustringrequired
  • namestringrequired
  • stockintegerrequired

    Sum over sellable warehouses.

  • onHandintegerrequired

    Sum over all warehouses.

  • avgCoststring (decimal)requirednullable

    Moving-average unit cost from receipts.

  • safetyStockintegerrequired
  • availableintegerrequired

    max(0, stock - safetyStock); the quantity pushed to marketplaces.

  • pricestring (decimal)requirednullable

    Decimal string with two fraction digits.

  • currencystringrequired
  • syncStockbooleanrequired
  • syncPricebooleanrequired
  • linkCountintegerrequired
  • errorCountintegerrequired
  • updatedAtstringrequired

    format: date-time

  • warehousesarray<ItemWarehouseStock>required
    Show 5 child attributes
    • warehouseIdstringrequired

      format: uuid

    • codestringrequired
    • namestringrequired
    • sellablebooleanrequired
    • quantityintegerrequired
  • linksarray<InventoryLink>required
    Show 13 child attributes
    • variantIdstringrequired

      format: uuid

    • storeIdstringrequired

      format: uuid

    • storeNamestringrequired
    • marketplacestringrequired

      One of:tiktokshopeelazadatokopedia

    • productTitlestringrequired
    • variantNamestringrequirednullable
    • skustringrequirednullable
    • stockintegerrequirednullable
    • pricestring (decimal)requirednullable

      Decimal string with two fraction digits.

    • lastPushedStockintegerrequirednullable
    • lastPushedAtstringrequirednullable

      format: date-time

    • lastErrorstringrequirednullable
    • linkedAtstringrequired

      format: date-time

  • movementsarray<InventoryMovement>required
    Show 15 child attributes
    • idstringrequired

      format: uuid

    • deltaintegerrequired
    • reasonstringrequired

      One of:adjustsetordercancelreceiveissuetransfer_intransfer_outstocktakereturn

    • batchIdstringrequirednullable

      Shared by the lines and transfer legs of one stock document.

      format: uuid

    • warehouseIdstringrequired

      format: uuid

    • warehouseCodestringrequired
    • unitCoststring (decimal)requirednullable

      Decimal string with two fraction digits.

    • purchaseOrderIdstringrequirednullable

      format: uuid

    • purchaseOrderNumberstringrequirednullable
    • stocktakeIdstringrequirednullable

      format: uuid

    • stocktakeNumberstringrequirednullable
    • orderIdstringrequirednullable

      format: uuid

    • externalOrderIdstringrequirednullable
    • notestringrequirednullable
    • createdAtstringrequired

      format: date-time

Example request · curl
curl -X POST "https://api.comnethub.app/v1/inventory/items/$ITEM_ID/links" \
  -H "Authorization: Bearer $THECOMNET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "variantId": "0192f0c4-8d1e-7a4b-9c3e-5f6a7b8c9d0e"
}'

Unlink inventory variant

DELETE/v1/inventory/items/{itemId}/links/{variantId}

Stop syncing a variant.

Scopes:products:write

Path parameters

  • itemIdstringrequired

    format: uuid

  • variantIdstringrequired

    format: uuid

Response204

Unlinked

No response body.

Example request · curl
curl -X DELETE "https://api.comnethub.app/v1/inventory/items/$ITEM_ID/links/$VARIANT_ID" \
  -H "Authorization: Bearer $THECOMNET_API_KEY"

Push inventory item

POST/v1/inventory/items/{itemId}/push

Queue a push of stock (and price when enabled) to every linked variant.

Scopes:products:write

Path parameters

  • itemIdstringrequired

    format: uuid

Response202

Queued

No response body.

Example request · curl
curl -X POST "https://api.comnethub.app/v1/inventory/items/$ITEM_ID/push" \
  -H "Authorization: Bearer $THECOMNET_API_KEY"

List unlinked variants

GET/v1/inventory/variants

Synced marketplace variants not linked to any item.

Scopes:products:read

Query parameters

  • qstringoptional

    max length 100

Response200 · application/json

Variants

  • itemsarray<MarketplaceVariant>required
    Show 9 child attributes
    • variantIdstringrequired

      format: uuid

    • storeIdstringrequired

      format: uuid

    • storeNamestringrequired
    • marketplacestringrequired

      One of:tiktokshopeelazadatokopedia

    • productTitlestringrequired
    • variantNamestringrequirednullable
    • skustringrequirednullable
    • stockintegerrequirednullable
    • pricestring (decimal)requirednullable

      Decimal string with two fraction digits.

Example request · curl
curl "https://api.comnethub.app/v1/inventory/variants" \
  -H "Authorization: Bearer $THECOMNET_API_KEY"

List warehouses

GET/v1/inventory/warehouses

Warehouses with stock totals.

Scopes:products:read

Query parameters

  • archivedbooleanoptional

Response200 · application/json

OK

  • itemsarray<Warehouse>required
    Show 12 child attributes
    • receivesReturnsbooleanrequired

      Returned goods are restocked here (e.g. for inspection); otherwise into the order's warehouse.

    • idstringrequired

      format: uuid

    • codestringrequired
    • namestringrequired
    • addressstringrequirednullable
    • sellablebooleanrequired
    • isDefaultbooleanrequired
    • archivedbooleanrequired
    • itemCountintegerrequired

      Items with non-zero quantity.

    • onHandintegerrequired
    • storeCountintegerrequired

      Stores whose orders deduct from this warehouse.

    • createdAtstringrequired

      format: date-time

Example request · curl
curl "https://api.comnethub.app/v1/inventory/warehouses" \
  -H "Authorization: Bearer $THECOMNET_API_KEY"

List warehouse stock

GET/v1/inventory/warehouses/{warehouseId}/stock

Item quantities in one warehouse.

Scopes:products:read

Path parameters

  • warehouseIdstringrequired

    format: uuid

Query parameters

  • qstringoptional

    max length 100

  • nonZerobooleanoptional

Response200 · application/json

OK

  • itemsarray<WarehouseStockRow>required
    Show 5 child attributes
    • itemIdstringrequired

      format: uuid

    • skustringrequired
    • namestringrequired
    • quantityintegerrequired
    • avgCoststring (decimal)requirednullable

      Decimal string with two fraction digits.

Example request · curl
curl "https://api.comnethub.app/v1/inventory/warehouses/$WAREHOUSE_ID/stock" \
  -H "Authorization: Bearer $THECOMNET_API_KEY"

Post stock document

POST/v1/inventory/stock-documents

Receive, issue, or transfer stock in one batch.

Scopes:products:write

Request bodyapplication/json

  • typestringrequired

    One of:receiveissuetransfer

  • warehouseIdstringrequired

    Destination for receive, source for issue and transfer.

    format: uuid

  • toWarehouseIdstringoptional

    Required for transfer.

    format: uuid

  • notestringoptional

    max length 200

  • linesarray<object>required

    min items 1 · max items 200

    Show 3 child attributes
    • itemIdstringrequired

      format: uuid

    • quantityintegerrequired

      min 1 · max 1000000

    • unitCoststring (decimal)optional

      Receive only; updates the item's average cost.

Response201 · application/json

OK

  • batchIdstringrequired

    format: uuid

  • movementsintegerrequired
Example request · curl
curl -X POST "https://api.comnethub.app/v1/inventory/stock-documents" \
  -H "Authorization: Bearer $THECOMNET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "receive",
  "warehouseId": "0192f0c4-8d1e-7a4b-9c3e-5f6a7b8c9d0e",
  "lines": [
    {
      "itemId": "0192f0c4-8d1e-7a4b-9c3e-5f6a7b8c9d0e",
      "quantity": 1
    }
  ]
}'

List stock movements

GET/v1/inventory/movements

Stock ledger, newest first.

Scopes:products:read

Query parameters

  • warehouseIdstringoptional

    format: uuid

  • itemIdstringoptional

    format: uuid

  • reasonMovementReasonoptional

    One of:adjustsetordercancelreceiveissuetransfer_intransfer_outstocktakereturn

  • beforestringoptional

    Cursor; returns movements older than this movement id.

    format: uuid

  • limitintegeroptional

    min 1 · max 500

Response200 · application/json

OK

  • itemsarray<StockLedgerEntry>required
    Show 18 child attributes
    • idstringrequired

      format: uuid

    • deltaintegerrequired
    • reasonstringrequired

      One of:adjustsetordercancelreceiveissuetransfer_intransfer_outstocktakereturn

    • batchIdstringrequirednullable

      Shared by the lines and transfer legs of one stock document.

      format: uuid

    • warehouseIdstringrequired

      format: uuid

    • warehouseCodestringrequired
    • unitCoststring (decimal)requirednullable

      Decimal string with two fraction digits.

    • purchaseOrderIdstringrequirednullable

      format: uuid

    • purchaseOrderNumberstringrequirednullable
    • stocktakeIdstringrequirednullable

      format: uuid

    • stocktakeNumberstringrequirednullable
    • orderIdstringrequirednullable

      format: uuid

    • externalOrderIdstringrequirednullable
    • notestringrequirednullable
    • createdAtstringrequired

      format: date-time

    • itemIdstringrequired

      format: uuid

    • skustringrequired
    • itemNamestringrequired
Example request · curl
curl "https://api.comnethub.app/v1/inventory/movements?limit=20" \
  -H "Authorization: Bearer $THECOMNET_API_KEY"