Modify an existing delivery scenario
Content
Resource URL
https://apps.ticketmatic.com/api/1/{accountname}/settings/ticketsales/deliveryscenarios/{id}
Example
Request
1use Ticketmatic\Endpoints\Settings\Ticketsales\Deliveryscenarios;
2
3$result = Deliveryscenarios::update($client, $id, array(
4 "typeid" => 2501,
5 "name" => "Print at home",
6 "allowetickets" => 1,
7 "availability" => array(
8 "saleschannels" => array(
9 1,
10 2,
11 ),
12 ),
13 "deliverystatusaftertrigger" => 2602,
14 "feedescription" => "+ 1€",
15 "internalremark" => "Don't use this scenario for partner events.",
16 "logo" => "logos/printathome.svg",
17 "mailorganization" => true,
18 "needsaddress" => true,
19 "ordermailtemplateid_delivery" => 0,
20 "ordermailtemplateid_deliverystarted" => 0,
21 "shortdescription" => "Print your own tickets. Do not forget to bring your copy to the event!",
22 "visibility" => "FULL",
23));
Response
1object(\Ticketmatic\Model\DeliveryScenario) (18) {
2 ["id"]=>
3 int(0)
4 ["typeid"]=>
5 int(0)
6 ["name"]=>
7 string(13) "Print at home"
8 ["allowetickets"]=>
9 int(0)
10 ["availability"]=>
11 object(\Ticketmatic\Model\DeliveryscenarioAvailability) (1) {
12 ["saleschannels"]=>
13 array(2) {
14 [0]=>
15 int(0)
16 [1]=>
17 int(0)
18 }
19 }
20 ["deliverystatusaftertrigger"]=>
21 int(0)
22 ["feedescription"]=>
23 string(6) "+ 1€"
24 ["internalremark"]=>
25 string(43) "Don't use this scenario for partner events."
26 ["logo"]=>
27 string(21) "logos/printathome.svg"
28 ["mailorganization"]=>
29 bool(true)
30 ["needsaddress"]=>
31 bool(true)
32 ["ordermailtemplateid_delivery"]=>
33 int(0)
34 ["ordermailtemplateid_deliverystarted"]=>
35 int(0)
36 ["shortdescription"]=>
37 string(70) "Print your own tickets. Do not forget to bring your copy to the event!"
38 ["visibility"]=>
39 string(4) "FULL"
40 ["isarchived"]=>
41 bool(false)
42 ["createdts"]=>
43 object(\DateTime) (3) {
44 ["date"]=>
45 string(26) "2014-09-26 15:24:36.000000"
46 ["timezone_type"]=>
47 int(3)
48 ["timezone"]=>
49 string(3) "UTC"
50 }
51 ["lastupdatets"]=>
52 object(\DateTime) (3) {
53 ["date"]=>
54 string(26) "2014-09-26 15:24:36.000000"
55 ["timezone_type"]=>
56 int(3)
57 ["timezone"]=>
58 string(3) "UTC"
59 }
60}
Request
1import (
2 "github.com/ticketmatic/tm-go/ticketmatic"
3 "github.com/ticketmatic/tm-go/ticketmatic/settings/ticketsales/deliveryscenarios"
4)
5
6result, err := deliveryscenarios.Update(client, id, &ticketmatic.DeliveryScenario{
7 Typeid: 2501,
8 Name: "Print at home",
9 Allowetickets: 1,
10 Availability: &ticketmatic.DeliveryscenarioAvailability{
11 Saleschannels: []int64{
12 1,
13 2,
14 },
15 },
16 Deliverystatusaftertrigger: 2602,
17 Feedescription: "+ 1€",
18 Internalremark: "Don't use this scenario for partner events.",
19 Logo: "logos/printathome.svg",
20 Mailorganization: true,
21 Needsaddress: true,
22 OrdermailtemplateidDelivery: 0,
23 OrdermailtemplateidDeliverystarted: 0,
24 Shortdescription: "Print your own tickets. Do not forget to bring your copy to the event!",
25 Visibility: "FULL",
26})
Response
1result := &ticketmatic.DeliveryScenario{
2 Id: 123,
3 Typeid: 2501,
4 Name: "Print at home",
5 Allowetickets: 1,
6 Availability: &ticketmatic.DeliveryscenarioAvailability{
7 Saleschannels: []int64{
8 1,
9 2,
10 },
11 },
12 Deliverystatusaftertrigger: 2602,
13 Feedescription: "+ 1€",
14 Internalremark: "Don't use this scenario for partner events.",
15 Logo: "logos/printathome.svg",
16 Mailorganization: true,
17 Needsaddress: true,
18 OrdermailtemplateidDelivery: 0,
19 OrdermailtemplateidDeliverystarted: 0,
20 Shortdescription: "Print your own tickets. Do not forget to bring your copy to the event!",
21 Visibility: "FULL",
22 Isarchived: false,
23 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
24 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
25}
Request
1PUT /api/1/{accountname}/settings/ticketsales/deliveryscenarios/{id} HTTP/1.1
2Content-Type: application/json
3
4{
5 "typeid": 2501,
6 "name": "Print at home",
7 "allowetickets": 1,
8 "availability": {
9 "saleschannels": [ 1, 2 ]
10 },
11 "deliverystatusaftertrigger": 2602,
12 "feedescription": "+ 1€",
13 "internalremark": "Don't use this scenario for partner events.",
14 "logo": "logos/printathome.svg",
15 "mailorganization": true,
16 "needsaddress": true,
17 "ordermailtemplateid_delivery": 0,
18 "ordermailtemplateid_deliverystarted": 0,
19 "shortdescription": "Print your own tickets. Do not forget to bring your copy to the event!",
20 "visibility": "FULL"
21}
Response
1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5 "id": 123,
6 "typeid": 2501,
7 "name": "Print at home",
8 "allowetickets": 1,
9 "availability": {
10 "saleschannels": [ 1, 2 ]
11 },
12 "deliverystatusaftertrigger": 2602,
13 "feedescription": "+ 1€",
14 "internalremark": "Don't use this scenario for partner events.",
15 "logo": "logos/printathome.svg",
16 "mailorganization": true,
17 "needsaddress": true,
18 "ordermailtemplateid_delivery": 0,
19 "ordermailtemplateid_deliverystarted": 0,
20 "shortdescription": "Print your own tickets. Do not forget to bring your copy to the event!",
21 "visibility": "FULL",
22 "isarchived": false,
23 "createdts": "2014-09-26 15:24:36",
24 "lastupdatets": "2014-09-26 15:24:36"
25}
Request body fields
Field | Description |
---|---|
typeid int (required) | The type of this delivery scenario, defines when this delivery scenario is triggered. The available values for this field can be found on the delivery scenario overview page. Example value:2501 |
name mlstring (required) | Name of the delivery scenario Example value:"Print at home" |
allowetickets int (required) | Are e-tickets allowed with this delivery scenario? Example value:1 |
availability DeliveryscenarioAvailability (required) | The rules that define when this scenario is available. See the delivery scenario overview page for a description of this field Example value:{ "saleschannels": [ 1, 2 ] } |
deliverystatusaftertrigger int (required) | The delivery status the order will transition to when the trigger occurs. Example value:2602 |
feedescription mlstring (required) | A very short description of the fee that is applicable. Example value:"+ 1€" |
internalremark string | An internal description field. Will not be shown to customers. Example value:"Don't use this scenario for partner events." |
logo string (required) | Logo url Example value:"logos/printathome.svg" |
mailorganization bool (required) | Send mail to organization if known Example value:true |
needsaddress bool (required) | A physical address is required Example value:true |
ordermailtemplateid_delivery int (required) | The ID of the order mail template that will be used for sending out when changing to delivery state ‘delivered’. Can be 0 to indicate that no mail should be sent
|
Type reference: DeliveryScenario
Result fields
Field | Description |
---|---|
id int | Unique ID Example value:123 |
typeid int | The type of this delivery scenario, defines when this delivery scenario is triggered. The available values for this field can be found on the delivery scenario overview page. Example value:2501 |
name | Name of the delivery scenario Example value:"Print at home" |
allowetickets int | Are e-tickets allowed with this delivery scenario? Example value:1 |
availability | The rules that define when this scenario is available. See the delivery scenario overview page for a description of this field Example value:{ "saleschannels": [ 1, 2 ] } |
deliverystatusaftertrigger int | The delivery status the order will transition to when the trigger occurs. Example value:2602 |
feedescription | A very short description of the fee that is applicable. Example value:"+ 1€" |
internalremark string | An internal description field. Will not be shown to customers. Example value:"Don't use this scenario for partner events." |
logo string | Logo url Example value:"logos/printathome.svg" |
mailorganization bool | Send mail to organization if known Example value:true |
needsaddress bool | A physical address is required Example value:true |
ordermailtemplateid_delivery int | The ID of the order mail template that will be used for sending out when changing to delivery state ‘delivered’. Can be 0 to indicate that no mail should be sent |
ordermailtemplateid_deliverystarted int | The ID of the order mail template that will be used for sending out when changing to delivery state ‘delivery started’. Can be 0 to indicate that no mail should be sent |
shortdescription | A short description of the deilvery scenario. Will be shown to customers. Example value:"Print your own tickets. Do not forget to bring your copy to the event!" |
visibility string | Parameter that sets the visibility of this scenario, can be either ‘FULL’ or ‘API’. Example value:"FULL" |
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: DeliveryScenario