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) (14) {
 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      ["internalremark"]=>
17      string(43) "Don't use this scenario for partner events."
18      ["needsaddress"]=>
19      bool(true)
20      ["ordermailtemplateid_delivery"]=>
21      int(0)
22      ["ordermailtemplateid_deliverystarted"]=>
23      int(0)
24      ["shortdescription"]=>
25      string(70) "Print your own tickets. Do not forget to bring your copy to the event!"
26      ["visibility"]=>
27      string(4) "FULL"
28      ["isarchived"]=>
29      bool(false)
30      ["createdts"]=>
31      object(\DateTime) (3) {
32        ["date"]=>
33        string(26) "2014-09-26 15:24:36.000000"
34        ["timezone_type"]=>
35        int(3)
36        ["timezone"]=>
37        string(3) "UTC"
38      }
39      ["lastupdatets"]=>
40      object(\DateTime) (3) {
41        ["date"]=>
42        string(26) "2014-09-26 15:24:36.000000"
43        ["timezone_type"]=>
44        int(3)
45        ["timezone"]=>
46        string(3) "UTC"
47      }
48    }
49  }
50}

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            Internalremark: "Don't use this scenario for partner events.",
10            Needsaddress: true,
11            OrdermailtemplateidDelivery: 0,
12            OrdermailtemplateidDeliverystarted: 0,
13            Shortdescription: "Print your own tickets. Do not forget to bring your copy to the event!",
14            Visibility: "FULL",
15            Isarchived: false,
16            Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
17            Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
18        },
19    },
20}

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            "internalremark": "Don't use this scenario for partner events.",
13            "needsaddress": true,
14            "ordermailtemplateid_delivery": 0,
15            "ordermailtemplateid_deliverystarted": 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": "2014-09-26 15:24:36",
20            "lastupdatets": "2014-09-26 15:24:36"
21        }
22    ]
23}

Parameters

FieldDescription
filter
        </td>
        <td class="description">
            <p>Filter the returned items by specifying a query on the public datamodel that returns the ids.</p> 
            <strong>Example value:</strong><code>&#34;SELECT id FROM tm.deliveryscenario WHERE needsaddress=&#39;t&#39;&#34;</code>
        </td>
    </tr><tr>
        <td class="field">
            <div class="name">includearchived</div>
            
        </td>
        <td class="description">
            <p>If this parameter is true, archived items will be returned as well.</p> 
            <strong>Example value:</strong><code>true</code>
        </td>
    </tr><tr>
        <td class="field">
            <div class="name">lastupdatesince</div>
            
        </td>
        <td class="description">
            <p>All items that were updated since this timestamp will be returned. Timestamp should be passed in <code>YYYY-MM-DD hh:mm:ss</code> format.</p> 
            <strong>Example value:</strong><code>&#34;2014-09-26 15:24:36&#34;</code>
        </td>
    </tr>
</tbody>

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
internalremark
string

An internal description field. Will not be shown to customers.

Example value:"Don't use this scenario for partner events."
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[]