Get a single price type

Content

Resource URL

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

Example

Request

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

Response

 1object(\Ticketmatic\Model\PriceType) (7) {
 2  ["id"]=>
 3  int(0)
 4  ["typeid"]=>
 5  int(0)
 6  ["name"]=>
 7  string(7) "Student"
 8  ["remark"]=>
 9  string(31) "Only valid with a student card."
10  ["isarchived"]=>
11  bool(false)
12  ["createdts"]=>
13  object(\DateTime) (3) {
14    ["date"]=>
15    string(26) "2014-09-26 15:24:36.000000"
16    ["timezone_type"]=>
17    int(3)
18    ["timezone"]=>
19    string(3) "UTC"
20  }
21  ["lastupdatets"]=>
22  object(\DateTime) (3) {
23    ["date"]=>
24    string(26) "2014-09-26 15:24:36.000000"
25    ["timezone_type"]=>
26    int(3)
27    ["timezone"]=>
28    string(3) "UTC"
29  }
30}

Request

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

Response

1result := &ticketmatic.PriceType{
2    Id: 123,
3    Typeid: 2301,
4    Name: "Student",
5    Remark: "Only valid with a student card.",
6    Isarchived: false,
7    Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
8    Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
9}

Request

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

Response

 1HTTP/1.1 200 OK
 2Content-Type: application/json
 3
 4{
 5    "id": 123,
 6    "typeid": 2301,
 7    "name": "Student",
 8    "remark": "Only valid with a student card.",
 9    "isarchived": false,
10    "createdts": "2014-09-26 15:24:36",
11    "lastupdatets": "2014-09-26 15:24:36"
12}

Result fields

FieldDescription
id
int

Unique ID

Example value:123
typeid
int

The category of this price type, defines how the price is displayed. The available values for this field can be found on the price type overview page.

Example value:2301
name

Name of the price type

Example value:"Student"
remark

A remark that describes the price type. Will be shown to customers.

Example value:"Only valid with a student card."
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: PriceType