Get a list of sales channels
Content
Resource URL
https://apps.ticketmatic.com/api/1/{accountname}/settings/ticketsales/saleschannels
Example
Request
1use Ticketmatic\Endpoints\Settings\Ticketsales\Saleschannels;
2
3$result = Saleschannels::getlist($client, array(
4 "filter" => "SELECT id FROM tm.saleschannel WHERE typeid=3003",
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 = Saleschannels::getlist($client);
Response
1object(Ticketmatic\Endpoints\Settings\Ticketsales\SaleschannelsList) (1) {
2 ["data"]=>
3 array(1) {
4 [0]=>
5 object(\Ticketmatic\Model\SalesChannel) (8) {
6 ["id"]=>
7 int(0)
8 ["typeid"]=>
9 int(0)
10 ["name"]=>
11 string(7) "Website"
12 ["ordermailtemplateid_confirmation"]=>
13 int(0)
14 ["ordermailtemplateid_confirmation_sendalways"]=>
15 bool(false)
16 ["isarchived"]=>
17 bool(false)
18 ["createdts"]=>
19 object(\DateTime) (3) {
20 ["date"]=>
21 string(26) "2014-09-26 15:24:36.000000"
22 ["timezone_type"]=>
23 int(3)
24 ["timezone"]=>
25 string(3) "UTC"
26 }
27 ["lastupdatets"]=>
28 object(\DateTime) (3) {
29 ["date"]=>
30 string(26) "2014-09-26 15:24:36.000000"
31 ["timezone_type"]=>
32 int(3)
33 ["timezone"]=>
34 string(3) "UTC"
35 }
36 }
37 }
38}
Request
1import (
2 "github.com/ticketmatic/tm-go/ticketmatic"
3 "github.com/ticketmatic/tm-go/ticketmatic/settings/ticketsales/saleschannels"
4)
5
6result, err := saleschannels.Getlist(client, &ticketmatic.SalesChannelQuery{
7 Filter: "SELECT id FROM tm.saleschannel WHERE typeid=3003",
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 := saleschannels.Getlist(client, nil)
Response
1result := saleschannels.&List{
2 Data: []*ticketmatic.SalesChannel{
3 &ticketmatic.SalesChannel{
4 Id: 123,
5 Typeid: 3002,
6 Name: "Website",
7 OrdermailtemplateidConfirmation: 123,
8 OrdermailtemplateidConfirmationSendalways: false,
9 Isarchived: false,
10 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
11 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
12 },
13 },
14}
Request
1GET /api/1/{accountname}/settings/ticketsales/saleschannels HTTP/1.1
Response
1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5 "data": [
6 {
7 "id": 123,
8 "typeid": 3002,
9 "name": "Website",
10 "ordermailtemplateid_confirmation": 123,
11 "ordermailtemplateid_confirmation_sendalways": false,
12 "isarchived": false,
13 "createdts": "2014-09-26 15:24:36",
14 "lastupdatets": "2014-09-26 15:24:36"
15 }
16 ]
17}
Parameters
Field | Description |
---|---|
filter
|
Type reference: SalesChannelQuery
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 type of this sales channel, defines where this sales channel will be used. The available values for this field can be found on the sales channel overview page. Example value:3002 |
name | Name of the sales channel Example value:"Website" |
ordermailtemplateid_confirmation int | The ID of the order mail template to use for sending confirmations. Can be 0 to indicate that no mail should be sent Example value:123 |
ordermailtemplateid_confirmation_sendalways bool | Always send the confirmation, regardless of the payment method configuration |
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: SalesChannel[]