Get a list of price types
Content
Resource URL
https://apps.ticketmatic.com/api/1/{accountname}/settings/pricing/pricetypes
Example
Request
1use Ticketmatic\Endpoints\Settings\Pricing\Pricetypes;
2
3$result = Pricetypes::getlist($client, array(
4 "filter" => "SELECT id FROM tm.pricetype WHERE createdts > (now() - INTERVAL '1 year')",
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 = Pricetypes::getlist($client);
Response
1object(Ticketmatic\Endpoints\Settings\Pricing\PricetypesList) (1) {
2 ["data"]=>
3 array(1) {
4 [0]=>
5 object(\Ticketmatic\Model\PriceType) (7) {
6 ["id"]=>
7 int(0)
8 ["typeid"]=>
9 int(0)
10 ["name"]=>
11 string(7) "Student"
12 ["remark"]=>
13 string(31) "Only valid with a student card."
14 ["isarchived"]=>
15 bool(false)
16 ["createdts"]=>
17 object(\DateTime) (3) {
18 ["date"]=>
19 string(26) "2014-09-26 15:24:36.000000"
20 ["timezone_type"]=>
21 int(3)
22 ["timezone"]=>
23 string(3) "UTC"
24 }
25 ["lastupdatets"]=>
26 object(\DateTime) (3) {
27 ["date"]=>
28 string(26) "2014-09-26 15:24:36.000000"
29 ["timezone_type"]=>
30 int(3)
31 ["timezone"]=>
32 string(3) "UTC"
33 }
34 }
35 }
36}
Parameters
Field | Description |
---|---|
filter
|
Type reference: PriceTypeQuery
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 |
typeid int | The category of this price type, defines how the price is displayed. The available values for this field can be found on the price type overview page. Example value:2301 |
name | Name of the price type Example value:"Student" |
remark | A remark that describes the price type. Will be shown to customers. Example value:"Only valid with a student card." |
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" |
This type can have custom fields.
Type reference: PriceType[]