An object representing a price item in a price list for the current shop.
Property | Type | Description |
---|---|---|
uid | integer | The unique identifier of the price list item. |
priceList | integer | The identifier of the PriceList of the price list item. |
article | integer | The identifier of the Article of the price list item. |
currency | string | The three letter code of the currency. |
qtyFloor | number | The quantity from where the price is applicable. |
amount | number | The price |
Creates a new price list item. This is shorthand for set with the unique identifier null
.
Removes an existing price list item.
Parameters | Description |
---|---|
uid | UID of object to delete. |
Fetches information about a price list item.
Parameter | Description |
---|---|
uid | The unique identifier of the price list. |
query | Which info to return. See Query language. |
PriceListItem.get(12345)
Fetches the JSON Schema which can be used for client-side validation.
The unique identifier of the price list item.
Returns an array of objects representing price list items.
Parameter | Description |
---|---|
query | Which info to return. See Query language. |
selection | Which price lists to list. See List selection. |
Filtering on the properties using their JSON pointers is possible. For example, list all price list items in price list 13991 for article 172358573:
PriceListItem.list({
"uid": true,
"priceList": true,
"article": true,
"currency": true,
"qtyFloor": true,
"amount": true
}, {
"filters": {
"/priceList": {
"in": [
13991
]
},
"/article": 172358573
},
"sort": "uid",
"descending": false,
"offset": 0,
"limit": 500
})
The API will return maximum 500 items even if there are more than 500 price list items. To
hande more than 500 items you will need to make several requests to PriceListItem.list
and
specify offset
and limit
until you receive an empty response.
See List selection.
Returns an array of objects representing price list items. Please note that this method is intended to be used for presentation only. No uid will be returned for price lists items.
Parameter | Description |
---|---|
article | Uid of the article |
pricelist | Uid of the pricelist |
currency | Currency code or null (optional) |
quanity | Get prices for this quantity (optional) |
Creates or updates a price list.
Parameter | Description |
---|---|
uid | The unique identifier of the price list item or null to create a new price list item. |
patch | An object containing the properties and values to set for the price list item. |
query | A query specifying what to return after a successful set (optional). See Query language. |
PriceListItem.set(123456, {
"priceList": 1,
"article": 123,
"currency": "SEK",
"qtyFloor": 0,
"amount": 100
}, [
"uid",
"currency",
"amount"
])