Booking Created V2

View JSON Schema

A message that is sent when a booking is created (v2). In addition to the v1 fields it carries the booking type, the underlying entity ID and the activity detail, and is emitted for standard court, activity, subscription, training and match bookings. This is the data part of the message; please read the event section for more information on the metadata envelope.

Properties

NameTypeTitleDescriptionRequired
issuerIdstringIssuer IDNot populated for booking events; the field is always absent.Format: "uuid"no
playersobject[]PlayersList of playersyes
ownerobjectOwnerBooking owner informationyes
bookingobjectBookingV2yes
facilityobjectFacilityFacility informationyes

Example

{
    "players": [
        {
            "userId": "550e8400-e29b-41d4-a716-446655440000",
            "email": "john.doe@example.com",
            "isCustomer": false,
            "telephone": "1234567890",
            "cellphone": "0987654321",
            "firstName": "John",
            "lastName": "Doe",
            "customerId": "123456"
        }
    ],
    "owner": {
        "customerId": "CUST123456",
        "userId": "550e8400-e29b-41d4-a716-446655440000",
        "firstName": "John",
        "lastName": "Doe",
        "email": "john.doe@example.com",
        "address": "123 Main St",
        "city": "Anytown",
        "zipcode": "12345",
        "country": "USA",
        "nationality": "American",
        "cellphone": "+1234567890",
        "telephone": "+0987654321",
        "dateOfBirth": "1980-01-01",
        "gender": "MALE",
        "isOrganization": false,
        "doNotEmail": false,
        "registrationDate": "2023-07-04T10:00:00+02:00"
    },
    "booking": {
        "bookingId": "1234555",
        "bookingType": "ACTIVITY",
        "entityId": "4711",
        "activityDetail": "OPEN_MATCH",
        "startTime": "2024-07-04T10:00:00+02:00",
        "endTime": "2024-07-04T11:00:00+02:00",
        "courtId": "C001",
        "courtName": "Main Court",
        "accessCode": "ACCESS1234",
        "splitPayment": true,
        "internalNotes": "This note is hidden from customers",
        "externalNotes": "9025 Vuxenkurs",
        "externalPayment": false,
        "totalPrice": "1000.00",
        "sport": {
            "sportId": "12",
            "sportName": "Tennis"
        }
    },
    "facility": {
        "facilityId": "2344123",
        "facilityName": "Matchi Tennis Club"
    }
}

 

players[]: Players

List of players

Items: Player

Player information

Item Properties

NameTypeTitleDescriptionRequired
customerIdstringCustomer IDA unique identifier for the customer.no
userIdstringUser IDThe player’s MATCHi user id, present only when an account is found. It is looked up by the player’s email first (or the customer’s email when the player has none), then by the account linked to the player’s customer, so it can differ from the userId in customer events for the same customer.Format: "uuid"no
firstNamestringFirst NameThe first name of the player.no
lastNamestringLast NameThe last name of the player.no
cellphonestringCellphoneThe cellphone number of the player.no
telephonestringTelephoneThe telephone number of the player.no
emailstringEmailThe email address of the player, in a valid email format.Format: "email"no
isCustomerbooleanIs CustomerIndicates whether the player is a customer.yes

Example

[
    {
        "userId": "550e8400-e29b-41d4-a716-446655440000",
        "email": "john.doe@example.com",
        "isCustomer": false,
        "telephone": "1234567890",
        "cellphone": "0987654321",
        "firstName": "John",
        "lastName": "Doe",
        "customerId": "123456"
    }
]

 

owner: Owner

Booking owner information

Properties

NameTypeTitleDescriptionRequired
customerIdstringCustomer IDA unique identifier for the customer.yes
userIdstringUser IDA MATCHi user id for the booking owner: the account linked to the booking’s customer. When that customer has no account, it is the user who placed the booking’s order (bookings made by the facility usually have none) or, in V2 events for subscription bookings, the account linked to the subscription’s customer. Absent when none of these exists.Format: "uuid"no
firstNamestringFirst NameThe first name of the booking owner.no
lastNamestringLast NameThe last name of the booking owner.no
emailstringEmailThe email address of the booking owner, in a valid email format.Format: "email"no
addressstringAddressThe street address of the booking owner.no
citystringCityThe city where the booking owner resides.no
zipcodestringZipcodeThe postal code of the booking owner’s address.no
countrystringCountryThe country where the booking owner resides.no
nationalitystringNationalityThe nationality of the booking owner.no
cellphonestringCellphoneThe cellphone number of the booking owner.no
telephonestringTelephoneThe telephone number of the booking owner.no
dateOfBirthstringDate of BirthThe date of birth of the booking owner, in YYYY-MM-DD format.Format: "date"no
genderstringGenderThe gender of the booking owner: MALE, FEMALE, OTHER or NOT_SPECIFIED. Absent for organizations.no
isOrganizationbooleanIs OrganizationIndicates whether the booking owner is an organization.no
doNotEmailbooleanDo Not EmailIndicates whether the booking owner should not receive emails from facility.no
registrationDatestringRegistration DateThe date and time when the booking owner registered, in ISO 8601 format. The time is the facility’s local time, with its UTC offset included.Format: "date-time"no

Example

{
    "customerId": "CUST123456",
    "userId": "550e8400-e29b-41d4-a716-446655440000",
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com",
    "address": "123 Main St",
    "city": "Anytown",
    "zipcode": "12345",
    "country": "USA",
    "nationality": "American",
    "cellphone": "+1234567890",
    "telephone": "+0987654321",
    "dateOfBirth": "1980-01-01",
    "gender": "MALE",
    "isOrganization": false,
    "doNotEmail": false,
    "registrationDate": "2023-07-04T10:00:00+02:00"
}

 

booking: BookingV2

Properties

NameTypeTitleDescriptionRequired
bookingIdstringBooking IDA unique identifier for the booking.yes
bookingTypestringBooking TypeThe kind of booking. DEFAULT is a standard court booking; ACTIVITY, SUBSCRIPTION, TRAINING and MATCH are customer-facing booking types that v1 did not emit.Enum: "DEFAULT", "ACTIVITY", "SUBSCRIPTION", "TRAINING", "MATCH"yes
entityIdstringEntity IDID of the underlying entity the booking belongs to. Normally set for ACTIVITY/TRAINING (the activity ID), SUBSCRIPTION (the subscription ID) and MATCH (the match ID), but may be absent for these types when the underlying entity cannot be resolved; always absent for DEFAULT court bookings, which are identified by bookingId.no
activityDetailstringActivity DetailCustomer-facing classification of the underlying activity, present only when bookingType is ACTIVITY or TRAINING.Enum: "TOURNAMENT", "OPEN_MATCH", "CLASS", "EVENT", "COURSE"no
startTimestringStart TimeThe start time of the booking, in ISO 8601 format. The time is the facility’s local time, with its UTC offset included.Format: "date-time"yes
endTimestringEnd TimeThe end time of the booking, in ISO 8601 format. The time is the facility’s local time, with its UTC offset included.Format: "date-time"yes
courtIdstringCourt IDA unique identifier for the court.yes
courtNamestringCourt NameThe name of the court.yes
accessCodestringAccess CodeA code to access the court.no
splitPaymentbooleanSplit PaymentIndicates whether the booking type is a split payment booking.no
internalNotesstringInternal NotesThe comments/notes on the booking which should be hidden from players.no
externalNotesstringExternal NotesThe comments/notes on the booking which should be shown to players.no
externalPaymentbooleanExternal PaymentIndicates whether the booking requires an external provider payment (f.ex: TPC payment gateway).no
totalPricestringTotal PriceThe total price of the booking, including VAT, with refunds and promo codes subtracted. It is the order price, not the amount the customer actually paid. Absent when the booking has no order.no
sportobjectSportThe sport played on the booked court.no

Example

{
    "bookingId": "1234555",
    "bookingType": "ACTIVITY",
    "entityId": "4711",
    "activityDetail": "OPEN_MATCH",
    "startTime": "2024-07-04T10:00:00+02:00",
    "endTime": "2024-07-04T11:00:00+02:00",
    "courtId": "C001",
    "courtName": "Main Court",
    "accessCode": "ACCESS1234",
    "splitPayment": true,
    "internalNotes": "This note is hidden from customers",
    "externalNotes": "9025 Vuxenkurs",
    "externalPayment": false,
    "totalPrice": "1000.00",
    "sport": {
        "sportId": "12",
        "sportName": "Tennis"
    }
}

 

booking.sport: Sport

The sport played on the booked court.

Properties

NameTypeTitleDescriptionRequired
sportIdstringSport IDA unique identifier for the sport.Minimal Length: 1Maximal Length: 64yes
sportNamestringSport NameThe name of the sport.Minimal Length: 1Maximal Length: 256yes

Example

{
    "sportId": "12",
    "sportName": "Tennis"
}

 

facility: Facility

Facility information

Properties

NameTypeTitleDescriptionRequired
facilityIdstringFacility IDA unique identifier for the facility.yes
facilityNamestringFacility NameThe name of the facility.yes

Example

{
    "facilityId": "2344123",
    "facilityName": "Matchi Tennis Club"
}