Body Required
-
name string Required
Minimum length is
1
, maximum length is180
. -
businessLocationId integer(int64) Required
the id of the businessLocation
-
docketName string
Maximum length is
64
. -
sku string
Minimum length is
1
, maximum length is32
. -
active boolean
-
barcode string
Maximum length is
64
. -
costPrice number
-
priceMode string
Values are
AMOUNT
,PERCENT
,POSITIVE_OPEN_PRICE
, orNEGATIVE_OPEN_PRICE
. Default value isAMOUNT
. -
defaultPrice number
-
accountingGroupId integer(int64) Required
Needs to be an existing accountingId
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":"cola","businessLocationId":45454565682155,"docketName":"docketName","sku":"sku123577","active":true,"barcode":"10011101100","costPrice":42.0,"priceMode":"PERCENT","defaultPrice":3,"accountingGroupId":462478248241}'
Request example
{
"name": "cola",
"businessLocationId": 45454565682155,
"docketName": "docketName",
"sku": "sku123577",
"active": true,
"barcode": "10011101100",
"costPrice": 42.0,
"priceMode": "PERCENT",
"defaultPrice": 3,
"accountingGroupId": 462478248241
}
Response examples (201)
{
"accountingGroup": {
"id": 42,
"name": "string"
},
"active": true,
"barcode": "string",
"contentDimension": "DIMENSION_LESS",
"contentUom": "string",
"contentValue": 42.0,
"costPrice": 42.0,
"disabled": true,
"docketName": "string",
"id": 42,
"inventorySource": "PURCHASED",
"itemType": "ITEM",
"name": "string",
"priceMode": "AMOUNT",
"prices": [
{
"amount": 42.0,
"name": "string"
}
],
"sharingType": "GLOBAL_NO_BL",
"sku": "string",
"statisticGroups": [
{
"category": "string",
"value": "string"
}
]
}