# Price list

An object representing a price list for the current shop.

# Properties

Property Type Description
uid integer The unique identifier of the price list.
type string The type of price list "standard" or "reduction" (read only for existing price lists).
name string The name of the price list.

# Methods

# create

Creates a new price list. This is shorthand for set with the unique identifier null.

# delete

Removes an existing price list. Only price lists that are not in use may be deleted.

# Parameters

Parameters Description
uid UID of object to delete.

# get

Fetches information about a price list.

# Parameters

Parameter Description
uid The unique identifier of the price list.
query Which info to return. See Query language.

# Example

PriceList.get(12345)

# getSchema

Fetches the JSON Schema which can be used for client-side validation.

# Parameters

The unique identifier of the price list.

# list

Returns an array of objects representing price lists.

# Example

PriceList.list(true, true)

# Parameters

Parameter Description
query Which info to return. See Query language.
selection Which price lists to list. See List selection.

# set

Creates or updates a price list.

# Parameters

Parameter Description
uid The unique identifier of the price list or null to create a new price list.
patch An object containing the properties and values to set for the price list.
query A query specifying what to return after a successful set (optional). See Query language.

# Example

PriceList.set(123456, {
  "name": "New name of price list"
}, [
  "uid",
  "name"
])