Events

Endpoints for working with events.

The old manager had only the concept of courses. In the new one, something more general is used: events. Each event has a type: course, seminar, etc. Currently, only the type course is implemented. The next types will be implemented in the future.

Get events

GET /api/internal/v1/partners/:partner_id/events

Get all the events of a partner.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

Query Parameters

Name
Type
Description

page

number

The page to display.

timeframe

string

Filter events by their timeframe. Allowed values: all, current, upcoming, past, cancelled, inactive.

search

string

Filter events by their name and short name.

type

string

The type of the event. Default is course.

Get event types

GET /api/internal/v1/partners/:partner_id/events/types

Get all the available event types.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

Get event timeframes

GET /api/internal/v1/partners/:partner_id/events/timeframes

Get all the available event timeframes.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

Create new event

POST /api/internal/v1/partners/:partner_id/events

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

Request Body

Name
Type
Description

name

string

The name of the event.

short_name

string

The short name of the event.

type

string

Currently only course is accepted.

bookability

string

Currently only public is accepted.

bookable_from

string

The date time since the event can be booked. Format: Y-m-d H:i:s

bookable_until

string

The date time until the event can be booked. Format: Y-m-d H:i:s

start_date

string

The date when the event starts. Format: Y-m-d

end_date

string

The date when the event is over. Format: Y-m-d

freebie

boolean

Indicates if the event is freebie or not.

waitlist_enabled

boolean

waitlist_max_places

number

waitlist_autofill_free_places

boolean

birthdate_mandatory

boolean

max_participants

number

online_max_participants

number

disable_online_payment

boolean

instructor_ids

array

The IDs of the event instructors. Use the dedicated endpoint to fetch all the available instructors (pagination is applied, allow the user to filter by name). An event can have none, one, or many instructors.

audience_ids

array

The IDs of the event audiences. Use the dedicated endpoint to fetch all the available audiences.

Get event

GET /api/internal/v1/partners/:partner_id/events/:event_id

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

event_id

integer

The ID of the event.

Toggle event freebie

PUT /api/internal/v1/partners/:partner_id/events/:event_id/freebie

Togggle the freebie of the given event. If the

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

event_id

integer

The ID of the event.

Update event image

PUT /api/internal/v1/partners/:partner_id/events/:event_id/image

Update the image of the given event.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

event_id

integer

The ID of the event.

Request Body

Name
Type
Description

image

object

The new image of the event.

Get event brochures

GET /api/internal/v1/partners/:partner_id/events/:event_id/brochures

Get the brochures of the given event.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

event_id

integer

The ID of the event.

Upload event brochure

POST /api/internal/v1/partners/:partner_id/events/:event_id/brochures/:brochure_id

Upload a new brochure for the given event.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

event_id

integer

The ID of the event.

brochure_id

integer

The ID of the brochure.

Delete event brochure

DELETE /api/internal/v1/partners/:partner_id/events/:event_id/brochures/:brochure_id

Delete the given brouchure belonging to the given event.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

event_id

integer

The ID of the event.

brochure_id

integer

The ID of the brochure.

Get event date settings

GET /api/internal/v1/partners/:partner_id/events/:event_id/date-settings

Get the date settings of the given event.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

event_id

integer

The ID of the event.

Update event date settings

PUT /api/internal/v1/partners/:partner_id/events/:event_id/date-settings

Update the date settings of the given event. New appointments will be generate based on the date settings. Old appointments (if any) will be deleted.

Path Parameters

Name
Type
Description

partner_id

integer

The id of the partner.

event_id

integer

The ID of the event.

Request Body

Name
Type
Description

date_settings

array

Array with all the date settings.

date_settings.*

array

Array with the date settings of a day.

date_settings.*.appointments

array

Array of appointments.

date_settings.*.appointments.*.starts_at

string

The hour when the appointment will start. The allowed format is H:i:s.

date_settings.*.appointments.*.ends_at

string

The hour when the appointment will end. The allowed format is H:i:s.

date_settings.*.appointments.*.venue_id

integer

The ID of the venue where the appointment will take place.

To easily understand the format of the date_settings parameter, below is an example of a request done in PHP.

Get event prices

GET /api/internal/v1/partners/:partner_id/events/:event_id/prices

Get the secondary prices of the given event.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

event_id

integer

The ID of the event.

Query Parameters

Name
Type
Description

page

number

The page number.

Create event price

POST /api/internal/v1/partners/:partner_id/events/:event_id/prices

Create a new event price. If the event has no default price, the price will be created with type default. If it already has a default price, the price will be created with the type secondary.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

event_id

integer

The ID of the event.

Request Body

Name
Type
Description

name

string

The price name.

description

string

The price description.

form

string

The price form: gross or net.

amount

number

The price amount.

vat_id

integer

The ID of the VAT.

usable_online

boolean

Indicate if the price will be usable online or not.

Get the default event price

GET /api/internal/v1/partners/:partner_id/events/:event_id/prices/default

Get the default price of the event.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

event_id

integer

The ID of the event.

Update event price

PUT /api/internal/v1/partners/:partner_id/events/:event_id/prices/:price_id

Update the given price. If a anything related to the amount is changed (amount, vat, form), a new price will be created and the old one will be deleted. Make sure the fetch the update price using the new id if this happens.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

event_id

integer

The ID of the event.

price_id

integer

The ID of the price.

Request Body

Name
Type
Description

name

string

The price name.

description

string

The price description.

form

string

The price form: net or gross.

amount

number

The price amount.

vat_id

integer

The ID of the VAT applied to the price.

usable_online

boolean

Indicate if the price will be usable online or not.

Delete event price

DELETE /api/internal/v1/partners/:partner_id/events/:event_id/prices/:price_id

Delete the given event price. A default event price cannot be deleted.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

event_id

integer

The ID of the event.

price_id

integer

The ID of the price.

Get the appointments of an event

GET /api/internal/v1/partners/:partner_id/events/:event_id/appointments

Get the appointments of an event.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

event_id

integer

The ID of the event.

Get an appointment for an event

GET /api/internal/v1/partners/:partner_id/events/:event_id/appointments/:appointment_id

Get an appointment for an event.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

event_id

integer

The ID of the event.

appointment_id

integer

The ID of the appointment.

Update an appointment for an event

PUT /api/internal/v1/partners/:partner_id/events/:event_id/appointments/:appointment_id

Update an appointment for an event.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

event_id

integer

The ID of the event.

appointment_id

integer

The ID of the appointment.

Request Body

Name
Type
Description

starts_at

string

When the appointment starts. Format: Y-m-d H:i:s

ends_at

string

When the appointment ends. Format: Y-m-d H:i:s

venue_id

integer

The ID of the venue where the appointment is taking place.

instructor_ids

array

Array with the IDs of the instructors assigned to the appointment. An empty array can be sent.

Delete an appointment for an event

DELETE /api/internal/v1/partners/:partner_id/events/:event_id/appointments/:appointment_id

Delete an appointment for an event.

Path Parameters

Name
Type
Description

partner_id

integer

The ID of the partner.

event_id

integer

The ID of the event.

appointment_id

integer

The ID of the appointment.

Last updated

Was this helpful?