Ticket types

List all ticket types

GET /fast-events/v1/admin/events/(integer: id)/ticket_types

List all ticket types of the selected event.

Optional query parameters

_fields

A comma separated string of fields included in the response. For example name,price.

Example request

$ curl \
  -H "X-FE-API-KEY: 3zo58AUYP9zOE6YT"  \
  -H "Content-Type: application/json" \
  -u "test:4ZAN O5OY OAvZ FZb2 Lslv JnJG" \
  https://exampledomain.com/wp-json/fast-events/v1/admin/events/54/ticket_types

Example response

[
    {
        "id": "v05ef7",
        "name": "Silver",
        "price": 20.25,
        "vat": 21,
        "stock_control": false,
        "minimum_to_order": 0,
        "maximum_to_order": 10,
        "is_counted": true,
        "attachment_id": 260,
        "_links": {
            "self": [
                {
                    "href": "https://vinyl-openair.com/wp-json/fast-events/v1/admin/events/65/ticket_types/v05ef7"
                }
            ],
            "collection": [
                {
                    "href": "https://vinyl-openair.com/wp-json/fast-events/v1/admin/events/65/ticket_types"
                }
            ]
        }
    },
    {
        "id": "v24a1f",
        "name": "Gold (Backstage)",
        "price": 40.5,
        "vat": 0,
        "stock_control": true,
        "stock": 100,
        "minimum_to_order": 0,
        "maximum_to_order": 1,
        "is_counted": true,
        "attachment_id": 60,
        "_links": {
            "self": [
                {
                    "href": "https://vinyl-openair.com/wp-json/fast-events/v1/admin/events/65/ticket_types/v24a1f"
                }
            ],
            "collection": [
                {
                    "href": "https://vinyl-openair.com/wp-json/fast-events/v1/admin/events/65/ticket_types"
                }
            ]
        }
    }
]

Changelog

Version

Description

1.0

Introduced.


List ticket type

GET /fast-events/v1/admin/events/(integer: id)/ticket_types/(ticket_type)

Retrieve details of a single ticket type.

Query parameters

_fields

A comma separated string of fields included in the response. For example name,price.

Example request

$ curl \
  -H "X-FE-API-KEY: 3zo58AUYP9zOE6YT"  \
  -H "Content-Type: application/json" \
  -u "test:4ZAN O5OY OAvZ FZb2 Lslv JnJG" \
  https://exampledomain.com/wp-json/fast-events/v1/admin/events/54/ticket_types/v24a1f

Example response

{
    "id": "v24a1f",
    "name": "Gold (Backstage)",
    "price": 40.5,
    "vat": 0,
    "stock_control": true,
    "stock": 100,
    "minimum_to_order": 0,
    "maximum_to_order": 1,
    "is_counted": true,
    "attachment_id": 60,
    "_links": {
        "self": [
            {
                "href": "https://vinyl-openair.com/wp-json/fast-events/v1/admin/events/65/ticket_types/v24a1f"
            }
        ],
        "collection": [
            {
                "href": "https://vinyl-openair.com/wp-json/fast-events/v1/admin/events/65/ticket_types"
            }
        ]
    }
}

Changelog

Version

Description

1.0

Introduced.


Update ticket type

PATCH /fast-events/v1/admin/events/(integer: id)/ticket_types/(ticket_type)

Update a ticket type. Only include in the payload the fields you want to change.

Example request

$ curl \
  -X PATCH \
  -H "X-FE-API-KEY: 3zo58AUYP9zOE6YT"  \
  -H "Content-Type: application/json" \
  -u "test:4ZAN O5OY OAvZ FZb2 Lslv JnJG" \
  -d '{"attachment_id": 160}' \
  https://exampledomain.com/wp-json/fast-events/v1/admin/events/54/ticket_types/v24a1f

Example response

{
    "id": "v24a1f",
    "name": "Gold (Backstage)",
    "price": 40.5,
    "vat": 0,
    "stock_control": true,
    "stock": 100,
    "minimum_to_order": 0,
    "maximum_to_order": 1,
    "is_counted": true,
    "attachment_id": 160,
    "_links": {
        "self": [
            {
                "href": "https://vinyl-openair.com/wp-json/fast-events/v1/admin/events/65/ticket_types/v24a1f"
            }
        ],
        "collection": [
            {
                "href": "https://vinyl-openair.com/wp-json/fast-events/v1/admin/events/65/ticket_types"
            }
        ]
    }
}

Changelog

Version

Description

1.0

Introduced.


Delete ticket type

DELETE /fast-events/v1/admin/events/(integer: id)/ticket_types/(ticket_type)

Delete a single ticket type.

Example request

$ curl \
  -X DELETE \
  -H "X-FE-API-KEY: 3zo58AUYP9zOE6YT"  \
  -H "Content-Type: application/json" \
  -u "test:4ZAN O5OY OAvZ FZb2 Lslv JnJG" \
  https://exampledomain.com/wp-json/fast-events/v1/admin/events/54/ticket_types/v24a1f

Example response

{
    "deleted": true,
    "previous": {
        "name": "Gold (Backstage)",
        "price": 40.5,
        "vat": 0,
        "stock_control": true,
        "stock": 100,
        "minimum_to_order": 0,
        "maximum_to_order": 1,
        "is_counted": true,
        "attachment_id": 160
    }
}

Changelog

Version

Description

1.0

Introduced.


Create ticket type

POST /fast-events/v1/admin/events/(integer: id)/ticket_types

Create a new ticket type.

Example request

$ curl \
  -X PATCH \
  -H "X-FE-API-KEY: 3zo58AUYP9zOE6YT"  \
  -H "Content-Type: application/json" \
  -u "test:4ZAN O5OY OAvZ FZb2 Lslv JnJG" \
  -d '{"name":"Gold (Backstage)", "price":40.3, "attachment_id":170}' \
  https://exampledomain.com/wp-json/fast-events/v1/admin/events/54/ticket_types

Example response

{
    "id": "v2f34a",
    "name": "Gold (Backstage)",
    "price": 40.3,
    "vat": 0,
    "stock_control": true,
    "stock": 100,
    "minimum_to_order": 0,
    "maximum_to_order": 1,
    "is_counted": true,
    "attachment_id": 170,
    "_links": {
        "self": [
            {
                "href": "https://vinyl-openair.com/wp-json/fast-events/v1/admin/events/65/ticket_types/v24a1f"
            }
        ],
        "collection": [
            {
                "href": "https://vinyl-openair.com/wp-json/fast-events/v1/admin/events/65/ticket_types"
            }
        ]
    }
}

Changelog

Version

Description

1.0

Introduced.