# Inventory Items

Inventory items represent the raw and/or produced items that are used and tracked in the business through inventory transactions. They are used as the ingredients that make up the finished products/options.

# The Inventory Item Object

# Sample

{
  "id": "8d20cc87",
  "name": "Tomatoes",
  "name_localized": null,
  "sku": "I001",
  "barcode": null,
  "minimum_level": "300",
  "maximum_level": "1000",
  "par_level": "700",
  "storage_unit": "box",
  "ingredient_unit": "gram",
  "storage_to_ingredient_factor": 1000,
  "costing_method": 1,
  "cost": 10,
  "is_product": false,
  "created_at": "2019-03-04 17:21:38",
  "updated_at": "2019-03-04 17:21:38",
  "deleted_at": null,
  "ingredients": [
    {
      "pivot": {
        "quantity": 10,
        "yield_percentage":89
      },
      "id": "8f7b9b1d"
    }
  ],
  "tags": [
    {
      "id": "8f7b941e",
      "pivot": {
        "inventory_item_id": "8f7bb046",
        "tag_id": "8f7b941e"
      }
    }
  ],
  "branches": [
    {
      "pivot": {
        "minimum_level": "12.00000",
        "maximum_level": "27.00000",
        "par_level": "19.00000"
      },
      "id": "8f7ab00"
    }
  ],
  "category": {
    "id": "8f7ba55c"
  },
  "suppliers": [
    {
      "id": "8f7c0ac9",
      "pivot": {
        "inventory_item_id": "8f7baf9f",
        "supplier_id": "8f7c0ac9",
        "order_unit": "Kg",
        "order_to_storage_factor": 1,
        "minimum_order_quantity": null,
        "cost": 15,
        "code": "sup93"
      }
    }
  ]
}

# Attributes

Field Type Rule Description
id string Unique identifier for the inventory item
sku* string updatable SKU of the inventory item
barcode string nullable updatable Barcode of the inventory item
name* string updatable Name of the inventory item
name_localized string nullable updatable Localized name of the inventory item
minimum_level string updatable The minimum allowed level for the inventory item
maximum_level string updatable The maximum allowed level for the inventory item
par_level string updatable The inventory item optimal level
storage_unit* string updatable The unit in which the item is stored in the inventory
ingredient_unit* integer updatable The base unit that's used to measure the volume, e.g. cup. This unit is used to link products with inventory item.
storage_to_ingredient_factor* double updatable The conversion factor between storage and ingredient units.
costing_method* integer updatable The Costing Method of the modifier option
category object updatable includable The Inventory Category the inventory item belongs to
cost double updatable The fixed cost of the inventory item
is_product boolean Identifies if the inventory item is treated as a product
tags array updatable includable The Tags attached to the inventory item
branches array updatable includable List of Branches in which inventory item has custom attributes
ingredients array updatable includable List of Inventory Items attached to the inventory item as ingredients
created_at string sortable Time at which the object was created in UTC. YYYY-MM-DD HH-MM-SS
updated_at string sortable Time at which the object was updated in UTC. YYYY-MM-DD HH-MM-SS
deleted_at string nullable Time at which the object was deleted in UTC. YYYY-MM-DD HH-MM-SS
suppliers array includable The supplier linked to the inventory item.
yield_percentage double nullable The Net Percentage of the produced inventory item
# Costing Methods
Type Details
1 Fixed Cost.
2 Calculate cost from ingredients.

# List Inventory Items

GET /inventory_items

# Scope

inventory.settings.read

# Filters

  • name
  • name_localized
  • id
  • sku
  • sku_partial
  • barcode
  • type
  • is_product
  • category_id
  • suppliers.id
  • tags.id
  • costing_method
  • updated_after
  • is_deleted
  • with_ingredients
  • created_on
  • updated_on
  • deleted_on

# Response

{
  "data": [
    {
      "id": "8d20cc87",
      "name": "Tomatoes",
      "name_localized": null,
      "sku": "I001",
      "barcode": null,
      "minimum_level": "300",
      "maximum_level": "1000",
      "par_level": "700",
      "storage_unit": "box",
      "ingredient_unit": "gram",
      "storage_to_ingredient_factor": 1000,
      "costing_method": 1,
      "cost": 10,
      "is_product": false,
      "created_at": "2019-03-04 17:21:38",
      "updated_at": "2019-03-04 17:21:38",
      "deleted_at": null,
      "ingredients": [
        {
          "pivot": {
            "quantity": 10
          },
          "id": "8f7b9b1d"
        }
      ],
      "tags": [
        {
          "id": "8f7b941e",
          "pivot": {
            "inventory_item_id": "8f7bb046",
            "tag_id": "8f7b941e"
          }
        }
      ],
      "branches": [
        {
          "pivot": {
            "minimum_level": "12.00000",
            "maximum_level": "27.00000",
            "par_level": "19.00000"
          },
          "id": "8f7ab00"
        }
      ],
      "category": {
        "id": "8f7ba55c"
      },
      "suppliers": [
        {
          "id": "8f7c0ac9",
          "pivot": {
            "inventory_item_id": "8f7baf9f",
            "supplier_id": "8f7c0ac9",
            "order_unit": "Kg",
            "order_to_storage_factor": 1,
            "minimum_order_quantity": null,
            "cost": 15,
            "code": "sup93"
          }
        }
      ]
    }
  ]
}

# Get Inventory Item

GET /inventory_items/{inventoryItemId}

# Scope

inventory.settings.read

# Response

{
  "data": {
    "id": "8d20cc87",
    "name": "Tomatoes",
    "name_localized": null,
    "sku": "I001",
    "barcode": null,
    "minimum_level": "300",
    "maximum_level": "1000",
    "par_level": "700",
    "storage_unit": "box",
    "ingredient_unit": "gram",
    "storage_to_ingredient_factor": 1000,
    "costing_method": 1,
    "cost": 10,
    "is_product": false,
    "created_at": "2019-03-04 17:21:38",
    "updated_at": "2019-03-04 17:21:38",
    "deleted_at": null,
    "ingredients": [
      {
        "pivot": {
          "quantity": 10,
          "yield_percentage":89
        },
        "id": "8f7b9b1d"
      }
    ],
    "tags": [
      {
        "id": "8f7b941e",
        "pivot": {
          "inventory_item_id": "8f7bb046",
          "tag_id": "8f7b941e"
        }
      }
    ],
    "branches": [
      {
        "pivot": {
          "minimum_level": "12.00000",
          "maximum_level": "27.00000",
          "par_level": "19.00000"
        },
        "id": "8f7ab00"
      }
    ],
    "category": {
      "id": "8f7ba55c"
    },
    "suppliers": [
      {
        "id": "8f7c0ac9",
        "pivot": {
          "inventory_item_id": "8f7baf9f",
          "supplier_id": "8f7c0ac9",
          "order_unit": "Kg",
          "order_to_storage_factor": 1,
          "minimum_order_quantity": null,
          "cost": 15,
          "code": "sup93"
        }
      }
    ]
  }
}

# Create Inventory Item

POST /inventory_items

# Scope

inventory.settings.write

# Request

{
    "name": "Tomatoes",
    "name_localized": null,
    "sku": "I001",
    "barcode": null,
    "minimum_level": "300",
    "maximum_level": "1000",
    "par_level": "700",
    "storage_unit": "box",
    "ingredient_unit": "gram",
    "storage_to_ingredient_factor": 1000,
    "costing_method": 1,
    "cost": 10,
    "category_id": "8d207fc3",
    "tags": [
        {
            "id": "8d207fc3"
        }
    ]
}

# Response

{
  "data": {
    "id": "8d20cc87",
    "name": "Tomatoes",
    "name_localized": null,
    "sku": "I001",
    "barcode": null,
    "minimum_level": "300",
    "maximum_level": "1000",
    "par_level": "700",
    "storage_unit": "box",
    "ingredient_unit": "gram",
    "storage_to_ingredient_factor": 1000,
    "costing_method": 1,
    "cost": 10,
    "is_product": false,
    "created_at": "2019-03-04 17:21:38",
    "updated_at": "2019-03-04 17:21:38",
    "deleted_at": null,
    "ingredients": [
      {
        "pivot": {
          "quantity": 10,
          "yield_percentage":89
        },
        "id": "8f7b9b1d"
      }
    ],
    "tags": [
      {
        "id": "8f7b941e",
        "pivot": {
          "inventory_item_id": "8f7bb046",
          "tag_id": "8f7b941e"
        }
      }
    ],
    "branches": [
      {
        "pivot": {
          "minimum_level": "12.00000",
          "maximum_level": "27.00000",
          "par_level": "19.00000"
        },
        "id": "8f7ab00"
      }
    ],
    "category": {
      "id": "8f7ba55c"
    },
    "suppliers": [
      {
        "id": "8f7c0ac9",
        "pivot": {
          "inventory_item_id": "8f7baf9f",
          "supplier_id": "8f7c0ac9",
          "order_unit": "Kg",
          "order_to_storage_factor": 1,
          "minimum_order_quantity": null,
          "cost": 15,
          "code": "sup93"
        }
      }
    ]
  }
}

# Update Inventory Item

PUT /inventory_items/{inventoryItemId}

# Scope

inventory.settings.write

# Request

{
    "name": "Tomatoes",
    "name_localized": null,
    "sku": "I001",
    "barcode": null,
    "minimum_level": "300",
    "maximum_level": "1000",
    "par_level": "700",
    "storage_unit": "box",
    "ingredient_unit": "gram",
    "storage_to_ingredient_factor": 1000,
    "costing_method": 1,
    "cost": 10,
    "category_id": "8d207fc3",
    "tags": [
        {
            "id": "8d207fc3"
        }
    ]
}

# Response

{
  "data": {
    "id": "8d20cc87",
    "name": "Tomatoes",
    "name_localized": null,
    "sku": "I001",
    "barcode": null,
    "minimum_level": "300",
    "maximum_level": "1000",
    "par_level": "700",
    "storage_unit": "box",
    "ingredient_unit": "gram",
    "storage_to_ingredient_factor": 1000,
    "costing_method": 1,
    "cost": 10,
    "is_product": false,
    "created_at": "2019-03-04 17:21:38",
    "updated_at": "2019-03-04 17:21:38",
    "deleted_at": null,
    "ingredients": [
      {
        "pivot": {
          "quantity": 10,
          "yield_percentage":89
        },
        "id": "8f7b9b1d"
      }
    ],
    "tags": [
      {
        "id": "8f7b941e",
        "pivot": {
          "inventory_item_id": "8f7bb046",
          "tag_id": "8f7b941e"
        }
      }
    ],
    "branches": [
      {
        "pivot": {
          "minimum_level": "12.00000",
          "maximum_level": "27.00000",
          "par_level": "19.00000"
        },
        "id": "8f7ab00"
      }
    ],
    "category": {
      "id": "8f7ba55c"
    },
    "suppliers": [
      {
        "id": "8f7c0ac9",
        "pivot": {
          "inventory_item_id": "8f7baf9f",
          "supplier_id": "8f7c0ac9",
          "order_unit": "Kg",
          "order_to_storage_factor": 1,
          "minimum_order_quantity": null,
          "cost": 15,
          "code": "sup93"
        }
      }
    ]
  }
}

# Delete Inventory Item

DELETE /inventory_items/{inventoryItemId}

# Scope

inventory.settings.write The API will return 200 indicating that the item has been deleted successfully.

# Restore Inventory Item

PUT /inventory_items/{inventoryItemId}/restore

The API will return 200 indicating that the item has been restored successfully.

# Scope

admin.restore

# Attach Ingredient to Inventory Item

The quantity used here is the ingredient unit quantity.

POST /inventory_items/{inventoryItemId}/ingredients/{itemId}

# Scope

inventory.settings.write

# Request

{
    "quantity": 5
}

# Response

{
  "data": {
    "id": "8d20cc87",
    "name": "Tomatoes",
    "name_localized": null,
    "sku": "I001",
    "barcode": null,
    "minimum_level": "300",
    "maximum_level": "1000",
    "par_level": "700",
    "storage_unit": "box",
    "ingredient_unit": "gram",
    "storage_to_ingredient_factor": 1000,
    "costing_method": 1,
    "cost": 10,
    "is_product": false,
    "created_at": "2019-03-04 17:21:38",
    "updated_at": "2019-03-04 17:21:38",
    "deleted_at": null,
    "ingredients": [
      {
        "pivot": {
          "quantity": 10,
          "yield_percentage":89
        },
        "id": "8f7b9b1d"
      }
    ],
    "tags": [
      {
        "id": "8f7b941e",
        "pivot": {
          "inventory_item_id": "8f7bb046",
          "tag_id": "8f7b941e"
        }
      }
    ],
    "branches": [
      {
        "pivot": {
          "minimum_level": "12.00000",
          "maximum_level": "27.00000",
          "par_level": "19.00000"
        },
        "id": "8f7ab00"
      }
    ],
    "category": {
      "id": "8f7ba55c"
    },
    "suppliers": [
      {
        "id": "8f7c0ac9",
        "pivot": {
          "inventory_item_id": "8f7baf9f",
          "supplier_id": "8f7c0ac9",
          "order_unit": "Kg",
          "order_to_storage_factor": 1,
          "minimum_order_quantity": null,
          "cost": 15,
          "code": "sup93"
        }
      }
    ]
  }
}

# Remove Ingredient from Inventory Item

DELETE /inventory_items/{inventoryItemId}/ingredients/{itemId}

# Scope

inventory.settings.write The API will return 200 indicating that the ingredient has been removed successfully.

# Attach Branch Attributes to Inventory Item

Some attributes can have special values in a specific branch or set of branches, you can define these attachments with the following request.

Levels are defined using the item’s storage unit.

POST /inventory_items/{inventoryItemId}/branches/{branchId}

# Scope

inventory.settings.write

# Request

{
    "minimum_level": "1.000",
    "maximum_level": "300.000",
    "par_level": "50.000"
}

# Response

{
  "data": {
    "id": "8d20cc87",
    "name": "Tomatoes",
    "name_localized": null,
    "sku": "I001",
    "barcode": null,
    "minimum_level": "300",
    "maximum_level": "1000",
    "par_level": "700",
    "storage_unit": "box",
    "ingredient_unit": "gram",
    "storage_to_ingredient_factor": 1000,
    "costing_method": 1,
    "cost": 10,
    "is_product": false,
    "created_at": "2019-03-04 17:21:38",
    "updated_at": "2019-03-04 17:21:38",
    "deleted_at": null,
    "ingredients": [
      {
        "pivot": {
          "quantity": 10,
          "yield_percentage":89
        },
        "id": "8f7b9b1d"
      }
    ],
    "tags": [
      {
        "id": "8f7b941e",
        "pivot": {
          "inventory_item_id": "8f7bb046",
          "tag_id": "8f7b941e"
        }
      }
    ],
    "branches": [
      {
        "pivot": {
          "minimum_level": "12.00000",
          "maximum_level": "27.00000",
          "par_level": "19.00000"
        },
        "id": "8f7ab00"
      }
    ],
    "category": {
      "id": "8f7ba55c"
    },
    "suppliers": [
      {
        "id": "8f7c0ac9",
        "pivot": {
          "inventory_item_id": "8f7baf9f",
          "supplier_id": "8f7c0ac9",
          "order_unit": "Kg",
          "order_to_storage_factor": 1,
          "minimum_order_quantity": null,
          "cost": 15,
          "code": "sup93"
        }
      }
    ]
  }
}

# Remove Branch Attributes from Inventory Item

DELETE /inventory_items/{inventoryItemId}/branches/{branchId}

# Scope

inventory.settings.write The API will respond with 200 indicating that the item’s branch attributes have been removed successfully.

Last Updated: 16/9/2023, 2:58:16 PM