Prices API

Field descriptions

Field Type Description
id integer The identifier of the price.
name string Name of price. eg. “Voksen” or “Entre”
description string  
value integer price in øre (DKK)
sale_begin_at datetime  
sale_end_at datetime  
minimum_count integer Minimum number of this price, that can be sold per purchase (0 is still allowed)
maximum_count integer Maximum number of this price, that can be sold per purchase.
capacity integer, null Prices capacity, fallback to event total capacity. Null if unlimited
sold_tickets integer  
door_sales integer  
metadata.deleteable integer Indicating if an price is deletable. An price will generally be deletable if there has been no sales.

List prices

List all prices for a specific event

GET /event_makers/:event_maker_id/events/:event/prices

Response

Status: 200 OK
[
  {
    "id": 12345678,
    "name": "Voksen",
    "description": "For 18-65 årige",
    "value": 150,
    "sale_begin_at": "2016-12-01T10:00:00Z",
    "sale_end_at": "2026-12-31T10:00:00Z",
    "minimum_count": 0,
    "maximum_count": 25,
    "capacity": 150,
    "sold_tickets": 3,
    "door_sales": 2
  }
]

Get a single price

GET /event_makers/:event_maker_id/events/:event_id/prices/:price_id

Response

Status: 200 OK
{
  "id": 12345678,
  "name": "Voksen",
  "description": "For 18-65 årige",
  "value": 150,
  "sale_begin_at": "2016-12-01T10:00:00Z",
  "sale_end_at": "2026-12-31T10:00:00Z",
  "minimum_count": 0,
  "maximum_count": 25,
  "capacity": 150,
  "sold_tickets": 3,
  "door_sales": 2
}

Error codes

Status: 404 Not Found

Create a price

POST /event_makers/:event_maker_id/events/:event_id/prices

Input

name
Required string
description
Optional string
value
Required integer
minimum_count
Optional integer
maximum_count
Optional integer
sale_begin_at
Optional datetime
sale_end_at
Optional datetime
{
  "price": {
    "name": "Voksen",
    "description": "For 18-65 årige",
    "value": 150,
    "sale_begin_at": "2011-06-21T10:00:00Z",
    "sale_end_at": "2014-06-21T10:00:00Z",
    "minimum_count": 2,
    "maximum_count": 10
  }
}

Response

Status: 201 Created
Location: https://api.place2book.com/event_makers/evm1234567/prices/ev12345678
{
  "id": 12345678,
  "name": "Voksen",
  "description": "For 18-65 årige",
  "value": 150,
  "sale_begin_at": "2016-12-01T10:00:00Z",
  "sale_end_at": "2026-12-31T10:00:00Z",
  "minimum_count": 0,
  "maximum_count": 25,
  "capacity": 150,
  "sold_tickets": 3,
  "door_sales": 2
}

Error codes

Status: 400 Bad Request
Status: 500 Internal Server Error

Update a price

PUT /event_makers/:event_maker_id/events/:event_id/prices/:price_id

Input

Input is identical to the input on create.

Response

Status: 200 OK
{
  "id": 12345678,
  "name": "Voksen",
  "description": "For 18-65 årige",
  "value": 150,
  "sale_begin_at": "2016-12-01T10:00:00Z",
  "sale_end_at": "2026-12-31T10:00:00Z",
  "minimum_count": 0,
  "maximum_count": 25,
  "capacity": 150,
  "sold_tickets": 3,
  "door_sales": 2
}

Error codes

Status: 404 Not Found
Status: 500 Internal Server Error

Delete a price

DELETE /event_makers/:event_maker_id/events/:event_id/prices/:price_id

Response

Status: 204 No Content

Error codes

Status: 404 Not Found