Dynamic Pricing API
The Dynamic Pricing API allows to create Prices overriding the default price of a ticket type. A common use case is an external revenue optimization engine which needs to override the price for a given ticket type in a given event.
Creating a Price won't edit the ticket type price on the Event Object directly but will affect the calculation within the Event Info Object.
Prices can be created for all Events except ROOT event types. If you want to dynamically price a Recurring Event you can create prices against the RECURRENCE event directly.
POST/api/pricing/prices
Create a price
Create a price
Payload
Required attributes
- Name
eventId- Type
- string
- Description
- Name
price- Type
- number
- Description
- Name
ticketTypeId- Type
- string
- Description
Optional attributes
- Name
seatingGroupId- Type
- string
- Description
Request
POST
/api/pricing/pricesconst response = await fetch('https://marketmaker.vivenu.com/api/pricing/prices', {
method: 'POST',
headers: {
Authorization: 'Bearer {token}',
'Content-Type': 'application/json',
},
body: JSON.stringify( {
"eventId": "507f191e810c19729de860ea",
"price": 10.5,
"ticketTypeId": "507f191e810c19729de860ea",
"seatingGroupId": "507f191e810c19729de860ea"
}),
})
const data = await response.json()Response (201)
{
"_id": "507f191e810c19729de860ea",
"createdAt": "2030-01-23T23:00:00.123Z",
"eventId": "507f191e810c19729de860ea",
"price": 10.5,
"seatingGroupId": "507f191e810c19729de860ea",
"sellerId": "507f191e810c19729de860ea",
"ticketTypeId": "507f191e810c19729de860ea",
"updatedAt": "2030-01-23T23:00:00.123Z"
}GET/api/pricing/prices
Get Prices
Get Prices
Query parameters
Optional query parameters
- Name
ticketTypeId- Type
- string
- Description
- Name
top- Type
- integer
- Description
- Name
eventId- Type
- string
- Description
- Name
skip- Type
- integer
- Description
Request
GET
/api/pricing/pricesconst response = await fetch('https://marketmaker.vivenu.com/api/pricing/prices?ticketTypeId=507f191e810c19729de860ea&top=1&eventId=507f191e810c19729de860ea&skip=1', {
method: 'GET',
headers: {
Authorization: 'Bearer {token}',
},
})
const data = await response.json()Response (200)
{
"docs": [
{
"_id": "507f191e810c19729de860ea",
"createdAt": "2030-01-23T23:00:00.123Z",
"eventId": "507f191e810c19729de860ea",
"price": 10.5,
"seatingGroupId": "507f191e810c19729de860ea",
"sellerId": "507f191e810c19729de860ea",
"ticketTypeId": "507f191e810c19729de860ea",
"updatedAt": "2030-01-23T23:00:00.123Z"
}
],
"total": 1
}GETPUBLIC/api/pricing/prices/overrides
Get Price Overrides
Get Price Overrides
Query parameters
Optional query parameters
- Name
eventId- Type
- string
- Description
Request
GET
/api/pricing/prices/overridesconst response = await fetch('https://marketmaker.vivenu.com/api/pricing/prices/overrides?eventId=507f191e810c19729de860ea', {
method: 'GET',
headers: {
Authorization: 'Bearer {token}',
},
})
const data = await response.json()Response (200)
{
"_id": "507f191e810c19729de860ea",
"createdAt": "2030-01-23T23:00:00.123Z",
"eventId": "507f191e810c19729de860ea",
"price": 10.5,
"seatingGroupId": "507f191e810c19729de860ea",
"sellerId": "507f191e810c19729de860ea",
"ticketTypeId": "507f191e810c19729de860ea",
"updatedAt": "2030-01-23T23:00:00.123Z"
}