Get a single price list

Content

Resource URL

https://apps.ticketmatic.com/api/1/{accountname}/settings/pricing/pricelists/{id}

Example

Request

1use Ticketmatic\Endpoints\Settings\Pricing\Pricelists;
2
3$result = Pricelists::get($client, $id);

Response

 1object(\Ticketmatic\Model\PriceList) (7) {
 2  ["id"]=>
 3  int(0)
 4  ["name"]=>
 5  string(5) "Dance"
 6  ["hasranks"]=>
 7  bool(false)
 8  ["prices"]=>
 9  object(\Ticketmatic\Model\PricelistPrices) (2) {
10    ["prices"]=>
11    array(2) {
12      [0]=>
13      object(\Ticketmatic\Model\PricelistPrice) (2) {
14        ["prices"]=>
15        array(1) {
16          [0]=>
17          float(25.000000)
18        }
19        ["pricetypeid"]=>
20        int(0)
21      }
22      [1]=>
23      object(\Ticketmatic\Model\PricelistPrice) (3) {
24        ["conditions"]=>
25        array(1) {
26          [0]=>
27          object(\Ticketmatic\Model\PricelistPriceCondition) (2) {
28            ["type"]=>
29            string(9) "promocode"
30            ["value"]=>
31            string(9) "UGENT2013"
32          }
33        }
34        ["prices"]=>
35        array(1) {
36          [0]=>
37          float(30.000000)
38        }
39        ["pricetypeid"]=>
40        int(0)
41      }
42    }
43    ["seatrankids"]=>
44    NULL
45  }
46  ["isarchived"]=>
47  bool(false)
48  ["createdts"]=>
49  object(\DateTime) (3) {
50    ["date"]=>
51    string(26) "2014-09-26 15:24:36.000000"
52    ["timezone_type"]=>
53    int(3)
54    ["timezone"]=>
55    string(3) "UTC"
56  }
57  ["lastupdatets"]=>
58  object(\DateTime) (3) {
59    ["date"]=>
60    string(26) "2014-09-26 15:24:36.000000"
61    ["timezone_type"]=>
62    int(3)
63    ["timezone"]=>
64    string(3) "UTC"
65  }
66}

Request

1import (
2    "github.com/ticketmatic/tm-go/ticketmatic"
3    "github.com/ticketmatic/tm-go/ticketmatic/settings/pricing/pricelists"
4)
5
6result, err := pricelists.Get(client, id)

Response

 1result := &ticketmatic.PriceList{
 2    Id: 123,
 3    Name: "Dance",
 4    Hasranks: false,
 5    Prices: &ticketmatic.PricelistPrices{
 6        Prices: []*ticketmatic.PricelistPrice{
 7            &ticketmatic.PricelistPrice{
 8                Prices: []float64{
 9                    25,
10                },
11                Pricetypeid: 1,
12            },
13            &ticketmatic.PricelistPrice{
14                Conditions: []*ticketmatic.PricelistPriceCondition{
15                    &ticketmatic.PricelistPriceCondition{
16                        Type: "promocode",
17                        Value: "UGENT2013",
18                    },
19                },
20                Prices: []float64{
21                    30,
22                },
23                Pricetypeid: 2,
24            },
25        },
26        Seatrankids: nil,
27    },
28    Isarchived: false,
29    Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
30    Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
31}

Request

1GET /api/1/{accountname}/settings/pricing/pricelists/{id} HTTP/1.1

Response

 1HTTP/1.1 200 OK
 2Content-Type: application/json
 3
 4{
 5    "id": 123,
 6    "name": "Dance",
 7    "hasranks": false,
 8    "prices": {
 9        "prices": [
10            {
11                "prices": [ 25.000000 ],
12                "pricetypeid": 1
13            },
14            {
15                "conditions": [
16                    {
17                        "type": "promocode",
18                        "value": "UGENT2013"
19                    }
20                ],
21                "prices": [ 30.000000 ],
22                "pricetypeid": 2
23            }
24        ],
25        "seatrankids": null
26    },
27    "isarchived": false,
28    "createdts": "2014-09-26 15:24:36",
29    "lastupdatets": "2014-09-26 15:24:36"
30}

Result fields

FieldDescription
id
int

Unique ID

Example value:123
name
string

Name for the pricelist

Example value:"Dance"
hasranks
bool

Boolean indicating whether this pricelist has ranks or not

prices

Definition of the actual prices and conditions for the pricelist

Example value:{ "prices": [ { "prices": [ 25.000000 ], "pricetypeid": 1 }, { "conditions": [ { "type": "promocode", "value": "UGENT2013" } ], "prices": [ 30.000000 ], "pricetypeid": 2 } ], "seatrankids": null }
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: PriceList