Create a new sales channel
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::create($client, array(
4 "typeid" => 3002,
5 "name" => "Website",
6 "ordermailtemplateid_confirmation" => 123,
7 "ordermailtemplateid_confirmation_sendalways" => false,
8));
Response
1object(\Ticketmatic\Model\SalesChannel) (8) {
2 ["id"]=>
3 int(0)
4 ["typeid"]=>
5 int(0)
6 ["name"]=>
7 string(7) "Website"
8 ["ordermailtemplateid_confirmation"]=>
9 int(0)
10 ["ordermailtemplateid_confirmation_sendalways"]=>
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}
Request
1import (
2 "github.com/ticketmatic/tm-go/ticketmatic"
3 "github.com/ticketmatic/tm-go/ticketmatic/settings/ticketsales/saleschannels"
4)
5
6result, err := saleschannels.Create(client, &ticketmatic.SalesChannel{
7 Typeid: 3002,
8 Name: "Website",
9 OrdermailtemplateidConfirmation: 123,
10 OrdermailtemplateidConfirmationSendalways: false,
11})
Response
1result := &ticketmatic.SalesChannel{
2 Id: 123,
3 Typeid: 3002,
4 Name: "Website",
5 OrdermailtemplateidConfirmation: 123,
6 OrdermailtemplateidConfirmationSendalways: false,
7 Isarchived: false,
8 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
9 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
10}
Request
1POST /api/1/{accountname}/settings/ticketsales/saleschannels HTTP/1.1
2Content-Type: application/json
3
4{
5 "typeid": 3002,
6 "name": "Website",
7 "ordermailtemplateid_confirmation": 123,
8 "ordermailtemplateid_confirmation_sendalways": false
9}
Response
1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5 "id": 123,
6 "typeid": 3002,
7 "name": "Website",
8 "ordermailtemplateid_confirmation": 123,
9 "ordermailtemplateid_confirmation_sendalways": false,
10 "isarchived": false,
11 "createdts": "2014-09-26 15:24:36",
12 "lastupdatets": "2014-09-26 15:24:36"
13}
Request body fields
Field | Description |
---|---|
typeid int (required) | 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 mlstring (required) | Name of the sales channel Example value:"Website" |
ordermailtemplateid_confirmation int (required) | 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 (required) | Always send the confirmation, regardless of the payment method configuration
|
Type reference: SalesChannel
Result fields
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