Get a list of delivery scenarios

Content

Resource URL

https://apps.ticketmatic.com/api/1/{accountname}/settings/ticketsales/deliveryscenarios

Example

Request

 1use Ticketmatic\Endpoints\Settings\Ticketsales\Deliveryscenarios;
 2
 3$result = Deliveryscenarios::getlist($client, array(
 4    "filter" => "SELECT id FROM tm.deliveryscenario WHERE needsaddress='t'",
 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 = Deliveryscenarios::getlist($client);

Response

 1object(Ticketmatic\Endpoints\Settings\Ticketsales\DeliveryscenariosList) (1) {
 2  ["data"]=>
 3  array(1) {
 4    [0]=>
 5    object(\Ticketmatic\Model\DeliveryScenario) (17) {
 6      ["id"]=>
 7      int(0)
 8      ["typeid"]=>
 9      int(0)
10      ["name"]=>
11      string(13) "Print at home"
12      ["allowetickets"]=>
13      int(0)
14      ["deliverystatusaftertrigger"]=>
15      int(0)
16      ["feedescription"]=>
17      string(6) "+ 1€"
18      ["internalremark"]=>
19      string(43) "Don't use this scenario for partner events."
20      ["logo"]=>
21      string(21) "logos/printathome.svg"
22      ["mailorganization"]=>
23      bool(true)
24      ["needsaddress"]=>
25      bool(true)
26      ["ordermailtemplateid_delivery"]=>
27      int(0)
28      ["ordermailtemplateid_deliverystarted"]=>
29      int(0)
30      ["shortdescription"]=>
31      string(70) "Print your own tickets. Do not forget to bring your copy to the event!"
32      ["visibility"]=>
33      string(4) "FULL"
34      ["isarchived"]=>
35      bool(false)
36      ["createdts"]=>
37      object(\DateTime) (3) {
38        ["date"]=>
39        string(26) "2014-09-26 15:24:36.000000"
40        ["timezone_type"]=>
41        int(3)
42        ["timezone"]=>
43        string(3) "UTC"
44      }
45      ["lastupdatets"]=>
46      object(\DateTime) (3) {
47        ["date"]=>
48        string(26) "2014-09-26 15:24:36.000000"
49        ["timezone_type"]=>
50        int(3)
51        ["timezone"]=>
52        string(3) "UTC"
53      }
54    }
55  }
56}

Request

 1import (
 2    "github.com/ticketmatic/tm-go/ticketmatic"
 3    "github.com/ticketmatic/tm-go/ticketmatic/settings/ticketsales/deliveryscenarios"
 4)
 5
 6result, err := deliveryscenarios.Getlist(client, &ticketmatic.DeliveryScenarioQuery{
 7    Filter: "SELECT id FROM tm.deliveryscenario WHERE needsaddress='t'",
 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 := deliveryscenarios.Getlist(client, nil)

Response

 1result := deliveryscenarios.&List{
 2    Data: []*ticketmatic.DeliveryScenario{
 3        &ticketmatic.DeliveryScenario{
 4            Id: 123,
 5            Typeid: 2501,
 6            Name: "Print at home",
 7            Allowetickets: 1,
 8            Deliverystatusaftertrigger: 2602,
 9            Feedescription: "+ 1€",
10            Internalremark: "Don't use this scenario for partner events.",
11            Logo: "logos/printathome.svg",
12            Mailorganization: true,
13            Needsaddress: true,
14            OrdermailtemplateidDelivery: 0,
15            OrdermailtemplateidDeliverystarted: 0,
16            Shortdescription: "Print your own tickets. Do not forget to bring your copy to the event!",
17            Visibility: "FULL",
18            Isarchived: false,
19            Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
20            Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
21        },
22    },
23}

Request

1GET /api/1/{accountname}/settings/ticketsales/deliveryscenarios HTTP/1.1

Response

 1HTTP/1.1 200 OK
 2Content-Type: application/json
 3
 4{
 5    "data": [
 6        {
 7            "id": 123,
 8            "typeid": 2501,
 9            "name": "Print at home",
10            "allowetickets": 1,
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            "isarchived": false,
22            "createdts": "2014-09-26 15:24:36",
23            "lastupdatets": "2014-09-26 15:24:36"
24        }
25    ]
26}

Parameters

FieldDescription
filter
string

Filter the returned items by specifying a query on the public datamodel that returns the ids.

Example value:"SELECT id FROM tm.deliveryscenario WHERE needsaddress='t'"
includearchived
bool

If this parameter is true, archived items will be returned as well.

Example value:true
lastupdatesince
timestamp

All items that were updated since this timestamp will be returned. Timestamp should be passed in YYYY-MM-DD hh:mm:ss format.

Example value:"2014-09-26 15:24:36"

Type reference: DeliveryScenarioQuery

Result fields

This call returns an object with an array of objects in the data field.

FieldDescription
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
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"

This type can have custom fields.

Type reference: DeliveryScenario[]