Create Item

POST /items/v1/items

Create a new item for a specific business location.

application/json

Body Required

  • name string Required

    The name of the item.

    Minimum length is 1, maximum length is 180.

  • businessLocationId integer(int64)

    The unique identifier for the business location.

  • The name used in the docket for the item.

    Maximum length is 64.

  • sku string

    A stock keeping unit.

    Minimum length is 1, maximum length is 32.

  • active boolean

    Indicates whether or not the item is archived from the menu.

  • barcode string

    The item barcode.

    Maximum length is 64.

  • barcodes array[string]

    A list of barcodes associated with the item.

    Minimum length of each is 1, maximum length of each is 64.

  • accountingGroupId integer(int64)

    The unique identifier for the accounting group. Must be an existing accountingGroupId.

  • The cost price of the item.

  • The default price of the item.

  • The type of price for the item.

    Values are AMOUNT, PERCENT, POSITIVE_OPEN_PRICE, or NEGATIVE_OPEN_PRICE. Default value is AMOUNT.

Responses

  • 201 application/json

    Item created

    Hide response attributes Show response attributes object
    • id integer(int64)

      The unique identifier for the item.

    • name string

      The name of the item.

    • The name used in the docket for the item.

      Maximum length is 64.

    • sku string

      A stock keeping unit.

      Minimum length is 1, maximum length is 32.

    • active boolean

      Indicates whether or not the item is archived from the menu.

    • barcode string

      The item barcode.

    • barcodes array[string]

      A list of barcodes associated with the item.

    • The accounting group associated with the item.

      Additional properties are allowed.

      Hide accountingGroup attributes Show accountingGroup attributes object
      • id integer(int64)

        The unique identifier for the accounting group.

      • name string

        The name of the accounting group.

    • statisticGroups array[object]

      List of statistic groups associated with the item.

      Hide statisticGroups attributes Show statisticGroups attributes object
      • category string

        The name of the statistic group category.

      • value string

        The statistic group value.

    • The cost price of the item.

    • prices array[object]

      List of prices associated with the item.

      Hide prices attributes Show prices attributes object
      • amount number

        The item price.

      • name string

        The name for this item price.

    • How the item is shared.

      Values are GLOBAL_NO_BL, GLOBAL, LOCAL, or SHARED.

    • The type of price for the item.

      Values are AMOUNT, PERCENT, POSITIVE_OPEN_PRICE, or NEGATIVE_OPEN_PRICE. Default value is AMOUNT.

    • Source of inventory for the item.

      Values are PURCHASED or PRODUCED.

    • disabled boolean

      Whether or not stock management is disabled for the item.

    • How the item is measured for stock management.

      Values are DIMENSION_LESS, VOLUME, or MASS.

    • The unit of measure of the item for stock management.

    • The measurement value.

    • itemType string

      Type of the item.

      Values are ITEM, SEQUENCE, GROUP, or SUB_ITEM.

  • 404 */*

    Could not create item

    Hide response attributes Show response attributes object
POST /items/v1/items
curl \
 -X POST https://api.trial.lsk.lightspeed.app/items/v1/items \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"name":"Burger","businessLocationId":45454565682155,"docketName":"The Burger","sku":"UGG-BB-PUR-06","active":true,"barcode":"10011101100","barcodes":["10011101100"],"accountingGroupId":462478248241,"costPrice":5.0,"defaultPrice":10,"priceMode":"PERCENT"}'
Request examples
{
  "name": "Burger",
  "businessLocationId": 45454565682155,
  "docketName": "The Burger",
  "sku": "UGG-BB-PUR-06",
  "active": true,
  "barcode": "10011101100",
  "barcodes": [
    "10011101100"
  ],
  "accountingGroupId": 462478248241,
  "costPrice": 5.0,
  "defaultPrice": 10,
  "priceMode": "PERCENT"
}
Response examples (201)
{
  "id": 3012455645,
  "name": "Burger",
  "docketName": "The Burger",
  "sku": "UGG-BB-PUR-06",
  "active": true,
  "barcode": "00000001",
  "barcodes": [
    "10011101100"
  ],
  "accountingGroup": {
    "id": 40570261078058,
    "name": "Alcoholic beverages"
  },
  "statisticGroups": [
    {
      "category": "default",
      "value": "Food"
    }
  ],
  "costPrice": 5.0,
  "prices": [
    {
      "amount": 10.0,
      "name": "Tuesday Special"
    }
  ],
  "sharingType": "SHARED",
  "priceMode": "POSITIVE_OPEN_PRICE",
  "inventorySource": "PURCHASED",
  "disabled": false,
  "contentDimension": "MASS",
  "contentUom": "kg",
  "contentValue": 1,
  "itemType": "ITEM"
}
Response examples (404)
{"status"=>"404", "timestamp"=>"2024-05-04T09:42:00+00:00", "message"=>"string", "apiSubExceptions"=>[{"field"=>"string", "rejectedValue"=>"string", "message"=>"string"}]}