Get a list of price lists
Content
Resource URL
https://apps.ticketmatic.com/api/1/{accountname}/settings/pricing/pricelists
Example
Request
1use Ticketmatic\Endpoints\Settings\Pricing\Pricelists;
2
3$result = Pricelists::getlist($client, array(
4 "filter" => "SELECT id FROM tm.pricelist WHERE hasranks='f'",
5 "includearchived" => true,
6 "lastupdatesince" => "2014-09-26 15:24:36",
7));
8
9// The parameters array is optional, it can be omitted when empty.
10$result = Pricelists::getlist($client);
Response
1object(Ticketmatic\Endpoints\Settings\Pricing\PricelistsList) (1) {
2 ["data"]=>
3 array(1) {
4 [0]=>
5 object(\Ticketmatic\Model\PriceList) (6) {
6 ["id"]=>
7 int(0)
8 ["name"]=>
9 string(5) "Dance"
10 ["hasranks"]=>
11 bool(false)
12 ["isarchived"]=>
13 bool(false)
14 ["createdts"]=>
15 object(\DateTime) (3) {
16 ["date"]=>
17 string(26) "2014-09-26 15:24:36.000000"
18 ["timezone_type"]=>
19 int(3)
20 ["timezone"]=>
21 string(3) "UTC"
22 }
23 ["lastupdatets"]=>
24 object(\DateTime) (3) {
25 ["date"]=>
26 string(26) "2014-09-26 15:24:36.000000"
27 ["timezone_type"]=>
28 int(3)
29 ["timezone"]=>
30 string(3) "UTC"
31 }
32 }
33 }
34}
Parameters
Field | Description |
---|---|
filter string | Filter the returned items by specifying a query on the public datamodel that returns the ids. Example value:"SELECT id FROM tm.pricelist WHERE hasranks='f'" |
includearchived bool | If this parameter is true, archived items will be returned as well. Example value:true |
lastupdatesince timestamp | All items that were updated since this timestamp will be returned. Timestamp should be passed in "2014-09-26 15:24:36" |
Type reference: PriceListQuery
Result fields
This call returns an object with an array of objects in the data
field.
Field | Description |
---|---|
id int | Unique ID Example value:123 |
name string | Name for the pricelist Example value:"Dance" |
hasranks bool | Boolean indicating whether this pricelist has ranks or not |
isarchived bool | Whether or not this item is archived |
createdts timestamp | Created timestamp Example value:"2014-09-26 15:24:36" |
lastupdatets timestamp | Last updated timestamp Example value:"2014-09-26 15:24:36" |
Type reference: PriceList[]