Get a list of ticket fees
Content
Resource URL
https://apps.ticketmatic.com/api/1/{accountname}/settings/pricing/ticketfees
Example
Request
1use Ticketmatic\Endpoints\Settings\Pricing\Ticketfees;
2
3$result = Ticketfees::getlist($client, array(
4 "filter" => "SELECT id FROM tm.ticketfee 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 = Ticketfees::getlist($client);
Response
1object(Ticketmatic\Endpoints\Settings\Pricing\TicketfeesList) (1) {
2 ["data"]=>
3 array(1) {
4 [0]=>
5 object(\Ticketmatic\Model\TicketFee) (5) {
6 ["id"]=>
7 int(0)
8 ["name"]=>
9 string(21) "Fixed reservation fee"
10 ["isarchived"]=>
11 bool(false)
12 ["createdts"]=>
13 object(\DateTime) (3) {
14 ["date"]=>
15 string(26) "2014-09-26 15:24:36.000000"
16 ["timezone_type"]=>
17 int(3)
18 ["timezone"]=>
19 string(3) "UTC"
20 }
21 ["lastupdatets"]=>
22 object(\DateTime) (3) {
23 ["date"]=>
24 string(26) "2014-09-26 15:24:36.000000"
25 ["timezone_type"]=>
26 int(3)
27 ["timezone"]=>
28 string(3) "UTC"
29 }
30 }
31 }
32}
Request
1import (
2 "github.com/ticketmatic/tm-go/ticketmatic"
3 "github.com/ticketmatic/tm-go/ticketmatic/settings/pricing/ticketfees"
4)
5
6result, err := ticketfees.Getlist(client, &ticketmatic.TicketFeeQuery{
7 Filter: "SELECT id FROM tm.ticketfee WHERE createdts > (now() - INTERVAL '1 year')",
8 Includearchived: true,
9 Lastupdatesince: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
10})
11
12// The query object is optional, it can be omitted when empty.
13result, err := ticketfees.Getlist(client, nil)
Response
1result := ticketfees.&List{
2 Data: []*ticketmatic.TicketFee{
3 &ticketmatic.TicketFee{
4 Id: 123,
5 Name: "Fixed reservation fee",
6 Isarchived: false,
7 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
8 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
9 },
10 },
11}
Request
1GET /api/1/{accountname}/settings/pricing/ticketfees HTTP/1.1
Response
1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5 "data": [
6 {
7 "id": 123,
8 "name": "Fixed reservation fee",
9 "isarchived": false,
10 "createdts": "2014-09-26 15:24:36",
11 "lastupdatets": "2014-09-26 15:24:36"
12 }
13 ]
14}
Parameters
Field | Description |
---|---|
filter
|
Type reference: TicketFeeQuery
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 ticket fee scheme Example value:"Fixed reservation fee" |
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: TicketFee[]