Prices API

Field descriptions

Field Type Description
id integer The identifier of the price.
name string  
description string  
value integer  
sale_begin_at datetime  
sale_end_at datetime  
minimum_count integer  
maximum_count integer  
sold_tickets integer  
door_sales integer  
metadata.deleteable integer Indicating if an price is deletable. An pirce 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": "2011-06-21T10:00:00Z",
    "sale_end_at": "2014-06-21T10:00:00Z",
    "minimum_count": 0,
    "maximum_count": 25,
    "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": "2011-06-21T10:00:00Z",
  "sale_end_at": "2014-06-21T10:00:00Z",
  "minimum_count": 0,
  "maximum_count": 25,
  "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": "2011-06-21T10:00:00Z",
  "sale_end_at": "2014-06-21T10:00:00Z",
  "minimum_count": 0,
  "maximum_count": 25,
  "sold_tickets": 3,
  "door_sales": 2
}

Error codes

Status: 400 Bad Request
Status: 500 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": "2011-06-21T10:00:00Z",
  "sale_end_at": "2014-06-21T10:00:00Z",
  "minimum_count": 0,
  "maximum_count": 25,
  "sold_tickets": 3,
  "door_sales": 2
}

Error codes

Status: 404 Not Found
Status: 500 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