---
title: "Erp inventory updated"
method: POST
path: "erp-inventory.updated"
---

# Erp inventory updated

`POST erp-inventory.updated` (webhook)

When an Inventory Item is updated.

## Payload

- union
  - ErpInventoryUpdatedFullWebhook
    - `connection_id` string, required
    - `data` ErpInventoryItemApiItemSchema, required
      - `id` string, required: The unique ID of the inventory item in the ERP.
      - `created_date` string, date-time, required: The date the inventory item was created.
      - `updated_date` string, date-time, required: The date the inventory item was last updated.
      - `name` string, required: The display name of the inventory item.
      - `sku` string, nullable, required: The SKU / item number of the inventory item.
      - `upc` string, nullable, required: UPC / GTIN barcode for the item.
      - `active` boolean, required: Whether the inventory item is active.
      - `description` string, nullable, required: A long-form description of the inventory item.
      - `unit_cost` number, nullable, required: Cost of a single unit of the inventory item, expressed in the ERP's base currency. The accounting meaning (e.g., standard, average, FIFO/LIFO) depends on `costing_method`.
      - `costing_method` string, nullable, required: How the ERP values this item for inventory accounting (e.g., Standard, Average, FIFO, LIFO).
      - `stock_unit` string, nullable, required: Unit of measure for on-hand quantities (e.g., EA, LB, CS).
      - `onhand` number, nullable, required: Total physical on-hand quantity across all locations.
      - `committed` number, nullable, required: Total quantity committed / reserved against orders across all locations.
      - `available` number, nullable, required: Total quantity available to sell across all locations (typically onhand minus committed).
      - `inventory_by_location_id` object, required: Inventory broken down by location. A location can be a warehouse, retail store, production line, or consignment site depending on how the ERP is configured.
      - `vendors` ErpItemVendor[], required: Vendors from whom this item is purchased.
        - `vendor_id` string, required: ID of the vendor in the ERP.
        - `vendor_name` string, nullable, required: Display name of the vendor.
      - `lots` ErpLot[], required: A lot is a specific batch of inventory items that are stored together and expire together. If an item doesn't expire, it is not allocated to a lot.
        - `lot_id` string, required: Lot ID.
        - `lot_name` string, nullable, required: Human-readable lot name as shown in the source ERP (e.g. 'LOT-20260418-A').
        - `onhand` number, required: Quantity on hand for this lot at this location.
        - `expiration_date` string, date-time, nullable, required: The date that the lot expires.
        - `location_id` string, required: ID of the location the lot is stored at. Same identifier as in /erp/locations and inventory_by_location_id keys.
      - `bins` ErpBin[], required: Bins are physical storage slots within a location. For items also tracked by lot, each entry is a (lot, bin) pair — the same bin can appear across multiple entries (holding different lots) and the same lot can appear across multiple bins.
        - `bin_id` string, required: Bin ID.
        - `bin_name` string, nullable, required: Human-readable bin name as shown in the source ERP (e.g. 'C-03-L3-P2').
        - `onhand` number, required: Quantity on hand in this bin (for the optionally-paired lot, when the item is also lot-tracked).
        - `location_id` string, required: ID of the location the bin is in. Same identifier as in /erp/locations and inventory_by_location_id keys.
        - `lot_id` string, nullable, required: If the item is both lot-tracked and bin-tracked, the lot occupying this bin. Null when the item is bin-tracked but not lot-tracked.
      - `custom_fields` object, required: Per-account custom fields defined on the inventory item. Keys are the field names as defined in the ERP; each value carries the raw value, its declared type, and a human-readable label.
      - `measurements` InventoryItemMeasurementsErp, required
        - `length` number, nullable, required
        - `width` number, nullable, required
        - `height` number, nullable, required
        - `unit` 'cm' | 'in', nullable, required: The unit of measurement for the size of the inventory item.
        - `weight` number, nullable, required
        - `weight_unit` 'kg' | 'oz' | 'lb', nullable, required: The unit of measurement for the weight of the inventory item.
      - `external_system_url` string, nullable, required: URL link to the inventory item in the external system (WMS/Freight etc).
      - `trackstar_tags` unknown[], nullable, required: A list of custom tags associated with the resource. A tag can be either a string or a dictionary with one key-value pair.
        - unknown
      - `additional_fields` object, required: Integration-specific fields
      - `trackstar_created_date` string, date-time, required
      - `trackstar_updated_date` string, date-time, required
    - `event_type` 'erp-inventory.updated', required
    - `integration_name` string, required
    - `integration_type` string, required
    - `previous_attributes` ErpInventoryUpdatedPreviousAttributes, required
      - `id` string: The unique ID of the inventory item in the ERP.
      - `created_date` string, date-time: The date the inventory item was created.
      - `updated_date` string, date-time: The date the inventory item was last updated.
      - `name` string: The display name of the inventory item.
      - `sku` string, nullable: The SKU / item number of the inventory item.
      - `upc` string, nullable: UPC / GTIN barcode for the item.
      - `active` boolean: Whether the inventory item is active.
      - `description` string, nullable: A long-form description of the inventory item.
      - `unit_cost` number, nullable: Cost of a single unit of the inventory item, expressed in the ERP's base currency. The accounting meaning (e.g., standard, average, FIFO/LIFO) depends on `costing_method`.
      - `costing_method` string, nullable: How the ERP values this item for inventory accounting (e.g., Standard, Average, FIFO, LIFO).
      - `stock_unit` string, nullable: Unit of measure for on-hand quantities (e.g., EA, LB, CS).
      - `onhand` number, nullable: Total physical on-hand quantity across all locations.
      - `committed` number, nullable: Total quantity committed / reserved against orders across all locations.
      - `available` number, nullable: Total quantity available to sell across all locations (typically onhand minus committed).
      - `inventory_by_location_id` object: Inventory broken down by location. A location can be a warehouse, retail store, production line, or consignment site depending on how the ERP is configured.
      - `vendors` ErpItemVendor[]: Vendors from whom this item is purchased.
        - `vendor_id` string, required: ID of the vendor in the ERP.
        - `vendor_name` string, nullable, required: Display name of the vendor.
      - `lots` ErpLot[]: A lot is a specific batch of inventory items that are stored together and expire together. If an item doesn't expire, it is not allocated to a lot.
        - `lot_id` string, required: Lot ID.
        - `lot_name` string, nullable, required: Human-readable lot name as shown in the source ERP (e.g. 'LOT-20260418-A').
        - `onhand` number, required: Quantity on hand for this lot at this location.
        - `expiration_date` string, date-time, nullable, required: The date that the lot expires.
        - `location_id` string, required: ID of the location the lot is stored at. Same identifier as in /erp/locations and inventory_by_location_id keys.
      - `bins` ErpBin[]: Bins are physical storage slots within a location. For items also tracked by lot, each entry is a (lot, bin) pair — the same bin can appear across multiple entries (holding different lots) and the same lot can appear across multiple bins.
        - `bin_id` string, required: Bin ID.
        - `bin_name` string, nullable, required: Human-readable bin name as shown in the source ERP (e.g. 'C-03-L3-P2').
        - `onhand` number, required: Quantity on hand in this bin (for the optionally-paired lot, when the item is also lot-tracked).
        - `location_id` string, required: ID of the location the bin is in. Same identifier as in /erp/locations and inventory_by_location_id keys.
        - `lot_id` string, nullable, required: If the item is both lot-tracked and bin-tracked, the lot occupying this bin. Null when the item is bin-tracked but not lot-tracked.
      - `custom_fields` object: Per-account custom fields defined on the inventory item. Keys are the field names as defined in the ERP; each value carries the raw value, its declared type, and a human-readable label.
      - `measurements` InventoryItemMeasurementsErp
        - `length` number, nullable, required
        - `width` number, nullable, required
        - `height` number, nullable, required
        - `unit` 'cm' | 'in', nullable, required: The unit of measurement for the size of the inventory item.
        - `weight` number, nullable, required
        - `weight_unit` 'kg' | 'oz' | 'lb', nullable, required: The unit of measurement for the weight of the inventory item.
      - `external_system_url` string, nullable: URL link to the inventory item in the external system (WMS/Freight etc).
      - `trackstar_tags` unknown[], nullable: A list of custom tags associated with the resource. A tag can be either a string or a dictionary with one key-value pair.
        - unknown
      - `additional_fields` object: Integration-specific fields
      - `trackstar_created_date` string, date-time
      - `trackstar_updated_date` string, date-time
  - ErpInventoryUpdatedTruncatedWebhook
    - `connection_id` string, required
    - `data` ErpInventoryUpdatedTruncatedData, required
      - `id` string: The record this event is about. Absent on connection webhooks, which carry dates rather than a row.
    - `event_type` 'erp-inventory.updated', required
    - `integration_name` string, required
    - `integration_type` string, required
    - `previous_attributes` ErpInventoryUpdatedTruncatedPreviousAttributes, required
    - `data_truncated` boolean, required: Always true on this shape. The event was too large to send in full, so `data` holds only the `id` and `previous_attributes` is empty.
    - `data_url` string, required: Called with your usual API key, it returns a download link for this event exactly as it would have been delivered.

## Acknowledgement `200`

Success

---

[API](https://skmtc.dev/trackstarhq/apis/trackstar-api.md) - [All operations](https://skmtc.dev/trackstarhq/apis/trackstar-api/llms.txt) - [OpenAPI document](https://skmtc.dev/trackstarhq/apis/trackstar-api/revisions/08647f790594?raw)
