NAV

Introduction

Welcome to the Matrix Booking API. You can use our API to get data about bookings, visitors, locations and resources.

The server URL for the Matrix Booking API is https://app.matrixbooking.com/api/v1. In various places throughout this documentation, for brevity and readability, we refer to API endpoints without the server URL, such as GET /availability?...

You can view example data and calls in the area to the right. These examples always show the complete URL, which includes the server URL.

Authentication

User credentials

Calling the API as a specific user

curl "https://app.matrixbooking.com/api/v1/user/current"
  -H "Authorization: Basic encoded_credentials"

Make sure to replace encoded_credentials with the Base64 encoded user and password.

Matrix Booking also supports passing user-specific credentials via HTTP Basic authentication. This can be used when an API call should run with the permissions and access level of a particular user.

The client sends HTTP requests with an Authorization header that contains the word Basic followed by a space, and a Base64-encoded string derived from the username and password separated by a colon, as per standard HTTP Basic authentication.

Whilst any Matrix Booking user and password can be used, for system-to-system integration we recommend that you use a System/API user, which can be created by someone who is a Matrix Booking administrator for your organisation.

Common Concepts

API data is JSON encoded with UTF-8. All calls must be made using HTTPS.

Query parameters

Query parameter values must be URL encoded.

Where a query parameter supports multiple values, each value for the query parameter must be specified as a separate key/value pair. For example, if we wanted to call the availability check API and request that both location and booking data be returned, then the include query parameter would be specified twice:

GET /availability?...&include=locations&include=bookings

Dates and times

Dates and times are passed in ISO 8601 format. For example, 12:27 PM on 23 March 2019 would be passed as 2019-03-23T12:27:00. Generally date/time values are local values, passed without a time zone or UTC offset. See also Working with Time Zones below.

Where date/time values are passed as query parameters, the following special values are also supported: today, tomorrow and tomorrow_plus_n, where n is a number of days. Additionally, for ranges, the end date/time may be set to eod, meaning the end of day of the specified start date/time.

For example, a call to check availability for all of the day after tomorrow might appear as:

GET /availability?...&f=tomorrow_plus_1&t=eod

Working with time zones

Matrix Booking tenants can choose to enable support for multiple time zones. Where this is not enabled, date and time values will be local to the time zone of the organisation. This time zone is returned to the API caller in the X-Time-Zone response header.

Where tenants have enabled support for multiple time zones, it is possible for the API caller to specify the time zone of dates and times by setting the X-Time-Zone request header. The value must be an IANA time zone, such as Europe/London or America/New_York.

Example

Suppose a resource located in London is booked from 10:30 AM to 2:30 PM local time on 23 March 2019. If multiple time zones support is not enabled then an API call returning data for this booking will return the start time as 2019-03-23T10:30:00 and the end time as 2019-03-23T14:30:00, with the X-Time-Zone response header set to Europe/London.

If instead, multiple time zones support is enabled and the caller sets the request header X-Time-Zone to Australia/Sydney, then the example booking's start time would be returned as 2019-03-23T21:30:00 and the end time as 2019-03-24T01:30:00, as Sydney is 11 hours ahead of London time on the date of the booking.

Booking Categories

Matrix Booking supports booking of many types of resources, most commonly desks and meeting rooms. In Matrix Booking terminology, the type of resource is known as a booking category. Certain API calls require the booking category to be specified, such as when checking resource availability.

Note that the internal id of a booking category varies from one Matrix Booking tenant to another.

Booking category model

Example booking category object

{
  "id": 123,
  "nameSingle": "Meeting Room",
  "namePlural": "Meeting Rooms",
  "shortNameSingle": "Room",
  "shortNamePlural": "Rooms"
}

A booking category may contain the following fields:

Attribute Type Description
id long The internal id of the booking category.
nameSingle string A singular name that identifies the type of resource, such as Meeting Room or Desk.
namePlural string A pluralised name that identifies the type of resource, such as Meeting Rooms or Desks.
shortNameSingle string A shorter name, where applicable, that identifies the type of resource, such as Room.
shortNamePlural string A shorter pluralised name, where applicable, that identifies the type of resource, such as Rooms.

Get booking categories

An example returning all booking categories.

curl "https://app.matrixbooking.com/api/v1/category"
  -H "Authorization: Basic encoded_credentials"

The above command returns a JSON list structured like this:

[
  {
    "id": 123,
    "nameSingle": "Meeting Room",
    "...": "..."
  },
  {
    "id": 456,
    "name": "Desk",
    "...": "..."
  }
]

This API returns the list of booking categories configured for your organisation. The booking categories are returned in the order preferred by your organisation.

HTTP request

GET https://app.matrixbooking.com/api/v1/category

Locations and Resources

Location hierarchy

The location hierarchy represents all locations and resources that have been setup for your Matrix Booking implementation, from optional high-level geographic regions to buildings and floors down to individual rooms, desks and other resources.

From an API perspective, each resource is technically a location, regardless of whether it represents a room, desk, piece of equipment or other bookable resource. Each may have a parent location, which can be used to determine the hierarchy of locations. Additionally, the location hierarchy employs a nested set model and thus each location object has a left and a right value, which can be used to determine its position within the overall hierarchy, including where it appears amongst siblings.

Example location hierarchy

Id Kind Name Parent Id Left Right
1001 BUILDING Macquarie House null 1 14
1002 FLOOR 1st Floor 1001 2 7
1003 ROOM Room 101 1002 3 4
1004 ROOM Room 102 1002 5 6
1005 FLOOR 2nd Floor 1001 8 13
1006 ROOM Room 201 1003 9 10
1007 ROOM Room 202 1003 11 12

Location model

Example location object

{
  "id": 1001,
  "kind": "BUILDING",
  "name": "Macquarie House",
  "left": 1,
  "right": 14,
  "locations": [
    {
      "id": 1002,
      "parentId": 1001,
      "kind": "FLOOR",
      "name": "1st Floor",
      "shortQualifier": "Macquarie House",
      "longQualifier": "Macquarie House",
      "left": 2,
      "right": 7,
      "locations": [
        {
          "id": 1003,
          "parentId": 1002,
          "kind": "ROOM",
          "name": "Room 101",
          "shortQualifier": "Macquarie House",
          "longQualifier": "1st Floor, Macquarie House",
          "left": 3,
          "right": 4,
          "isBookable": true,
          "bookingCategoryId": 123
        },
        {
          "id": 1004,
          "parentId": 1002,
          "kind": "ROOM",
          "name": "Room 102",
          "shortQualifier": "Macquarie House",
          "longQualifier": "1st Floor, Macquarie House",
          "left": 5,
          "right": 6,
          "isBookable": true,
          "bookingCategoryId": 123
        }
      ]
    }
  ]
}

A location may contain the following fields:

Attribute Type Description
id long The internal id of the location.
kind string A enumeration indicating the kind of location. Typically one of:
  • BUILDING – a building
  • FLOOR – a floor of a building
  • ZONE – a zone within a floor
  • AREA – an area within a zone
  • ROOM – a meeting room
  • DESK_BANK – a desk bank
  • DESK – a desk
name string The name of the location or resource.
shortQualifier string An short text that can be used to distinguish between two locations or resources with the same name. For example, two buildings might both have a meeting room called Room 101. The short qualifier is usually the name of the building.
longQualifier string A longer text that can be used to distinguish between two locations or resources with the same name. For example, two floors might both have a desk bank called Desk Bank A. The long qualifier might be the name of the floor and building separated by a comma.
left long The location or resource's left value as described in the Location hierarchy section.
right long The location or resource's right value as described in the Location hierarchy section.
locations list A nested list of child locations for this location. For example, the desks for a given desk bank. Each child location is also a location object.
isBookable boolean True for a location that is a bookable resource. Such locations will also have a booking category id.
bookingCategoryId long The id of the corresponding booking category for a bookable resource, such as a desk or meeting room.

Get locations

An example returning all floors of a particular building with id 1001

curl "https://app.matrixbooking.com/api/v1/location?kind=FLOOR&l=1001"
  -H "Authorization: Basic encoded_credentials"

The above command returns a JSON list structured like this:

[
  {
    "id": 1002,
    "kind": "FLOOR",
    "name": "1st Floor",
    "...": "..."
  },
  {
    "id": 1005,
    "kind": "FLOOR",
    "name": "2nd Floor",
    "...": "..."
  }
]

A flexible API that returns a list of locations matching the query parameters. Examples include:

HTTP request

GET https://app.matrixbooking.com/api/v1/location

Query parameters

COMING SOON

Get a specific location

curl "https://app.matrixbooking.com/api/v1/location/123"
  -H "Authorization: Basic encoded_credentials"

This API retrieves a specific location.

HTTP request

GET https://app.matrixbooking.com/api/v1/location/<id>

URL parameters

Parameter Description
id The id of the location to retrieve.

Bookings

Booking model

Example booking object, including attendee and person sub-objects

{
  "id": 111,
  "locationId": 222,
  "timeFrom": "2019-03-23T10:00:00",
  "timeTo": "2019-03-23T14:00:00",
  "status": "CONFIRMED",
  "statusReason": "APPROVED",
  "hasStarted": false,
  "hasEnded": false,
  "label": "Important meeting",
  "notes": "Agenda notes...",
  "organisation": {
    "id": 333,
    "name": "Example Inc."
  },
  "owner": {
    "id": 444,
    "name": "Theo Owner",
    "email": "theo.owner@example.com"
  },
  "bookedBy": {
    "id": 555,
    "name": "Anne Booker",
    "email": "anne.booker@example.com"
  },
  "attendeeCount": 3,
  "ownerIsAttendee": true,
  "attendees": [
    {
      "person": {
        "id": 777,
        "kind": "INTERNAL",
        "firstName": "Peter",
        "lastName": "Staff",
        "name": "Peter Staff",
        "email": "peter.staff@example.com"
      },
      "isVisitor": false
    },
    {
      "person": {
        "id": 888,
        "kind": "EXTERNAL",
        "firstName": "Anne",
        "lastName": "Visitor",
        "name": "Anne Visitor",
        "company": "Brocklehurst Motors",
        "email": "anne.visitor@brocklehurstmotors.co.uk"
      },
      "isVisitor": true
    }
  ],
  "audit": {
    "created": {
      "when": "2019-03-06T13:56:03.963",
      "eventType": "CREATED_FOR_APPROVAL",
      "eventUser": {
        "id": 555,
        "name": "Anne Booker",
        "email": "anne.booker@example.com"
      },
      "statement": "created this booking, subject to approval"
    },
    "approved": {
      "when": "2019-03-07T08:32:54.247",
      "eventType": "APPROVED",
      "eventUser": {
        "id": 999,
        "name": "Phillip Approver",
        "email": "phillip.approver@example.com"
      },
      "statement": "approved this booking"
    }
  },
  "history": [
    {
      "when": "2019-03-06T13:56:03.963",
      "eventType": "CREATED_FOR_APPROVAL",
      "eventUser": {
        "id": 555,
        "name": "Anne Booker",
        "email": "anne.booker@example.com"
      },
      "statement": "created this booking, subject to approval"
    },
    {
      "when": "2019-03-06T14:45:32.237",
      "eventType": "TIME_CHANGED",
      "eventUser": {
        "id": 555,
        "name": "Anne Booker",
        "email": "anne.booker@example.com"
      },
      "statement": "updated the time of this booking"
    },
    {
      "when": "2019-03-07T08:32:54.247",
      "eventType": "APPROVED",
      "eventUser": {
        "id": 999,
        "name": "Phillip Approver",
        "email": "phillip.approver@example.com"
      },
      "statement": "approved this booking"
    }
  ]
}

A booking may contain the following fields:

Attribute Type Description
id long The internal id of the booking.
locationId long The internal id of the booked resource.
timeFrom timestamp The start date and time of the booking in the time zone of the resource.
timeTo timestamp The end date and time of the booking in the time zone of the resource.
status string The current status of the booking. One of:
  • TENTATIVE – requires approval.
  • CONFIRMED – approved or did not require approval.
  • CANCELLED – cancelled before the start time of the booking.
statusReason string The reason for the current status. One of:
  • APPROVED - when a tentative booking is approved, the status is set to CONFIRMED and the reason is set to APPROVED.
  • CANCELLED_REJECTED – when a tentative booking is rejected / not approved.
  • CANCELLED_BY_OWNER – when a booking is cancelled by the booking's owner.
  • CANCELLED_BY_OTHER – when a confirmed booking is cancelled by someone else.
  • CANCELLED_NO_SHOW – when a booking is automatically cancelled by Matrix Booking because it was not started in time.
hasStarted boolean Indicates whether the start time of the booking (timeFrom) is in the past. This does not indicate whether a booking has been "started" (also known as checking in).
hasEnded boolean Indicates whether the end time of the booking (timeTo) is in the past.
label string The booking title or subject.
notes string Personal notes for a booking, or the meeting agenda when attendees have been added.
organisation object The id and name of the organisation that made the booking. This is only returned for tenants with Matrix Booking's cross-organisation resource sharing functionality enabled.
owner object The id, name and email address of the (internal) person to whom the booking is assigned. This person is also known as the meeting organiser.
bookedBy object The id, name and email address of the user who created the booking.
attendeeCount integer The number of attendees, including the owner if ownerIsAttendee is true.
ownerIsAttendee boolean Indicates whether the booking's owner is attending the meeting.
attendees list A list of people who are attending the meeting. This list will not include the booking owner. See the attendee model below.
audit object The specific history records for when the booking was created, approved, cancelled and checkedIn, as applicable to the booking. Cancelled bookings include those that required approval but were rejected.
history list A list of history records relating to the booking in chronological order, such as when it was created or cancelled.

An attendee may contain the following fields:

Attribute Type Description
person object The person who is attending the meeting. See the person model.
isVisitor boolean Indicates whether the person attending is a visitor or not.

A person may contain the following fields:

Attribute Type Description
id long The internal id of the person within Matrix Booking. This is not a user id.
kind string Indicates whether the person is INTERNAL or EXTERNAL to the organisation. Most internal people have a corresponding user with the same email address.
firstName string An optional first name of the person.
lastName string An optional last name of the person.
nickName string An optional nickname for the person.
name string The full name of the person including their first and last names, as well as the nickname in parentheses, where specified. For example, "Robert (Bob) Staff".
company string An optional name of the company that an external person belongs to.
email string An email address for the person. This might not be specified for an external person.

A history record may contain the following fields:

Attribute Type Description
when timestamp When the event occurred.
eventType string The type of event:
  • CREATED – the booking was created and did not require approval.
  • CREATED_FOR_APPROVAL – the booking was created subject to approval.
  • APPROVED – the booking was approved.
  • REASSIGNED – the booking was assigned to someone else.
  • TIME_CHANGED – the date or time of the booking was changed.
  • LOCATION_CHANGED – the resource (location) that was booked was changed.
  • ATTENDEES_CHANGED – the attendees associated with the booking were changed.
  • LAYOUT_CHANGED – the room layout was changed.
  • CATERING_CHANGED – the requested catering options were changed.
  • EQUIPMENT_CHANGED – the requested equipment options were changed.
  • SERVICES_CHANGED – the requested service options were changed.
  • CHECK_IN_COMPLETED – the booking was "started" by checking in.
  • CANCELLED – the booking was cancelled, or a booking requiring approval was rejected.
  • ENDED_EARLY – the booking was utilised and subsequently ended before the booked end time.
  • REMINDER_SENT – a reminder e-mail was sent to the booking owner.
eventUser object The internal id, email and name of the user who performed the action.
statement string A short statement describing the action.

Get bookings

An example returning tentative room bookings for tomorrow, but not desk bookings.

curl "https://app.matrixbooking.com/api/v1/booking?bc=123&status=TENTATIVE&f=tomorrow&t=eod"
  -H "Authorization: Basic encoded_credentials"

The above command returns a JSON list structured like this:

[
  {
    "id": 123,
    "label": "An example booking",
    "...": "..."
  },
  {
    "id": 456,
    "label": "Another example booking",
    "...": "..."
  }
]

Note that when requesting location data also, with query parameter include=locations, the response body changes from a JSON list to a JSON object with nested booking, location and ancestor location lists.

{
  "bookings": [],
  "locations": [],
  "ancestorLocations": []
}

This API returns a list of bookings matching the query parameters.

HTTP request

GET https://app.matrixbooking.com/api/v1/booking

Query parameters

Parameter Type Description
bc string The internal id or kind of a booking category in order to only return corresponding bookings, such as room bookings or desk bookings. Multiple values can be specified. If not specified then matching bookings for all categories will be returned.
f string The start date/time of the window in which to search for bookings. The value must be either a timestamp or a permitted date/time constant, such as today or tomorrow. If not specified then the start defaults to the current date and time.
t string The end date/time of the window in which to search for bookings. The value must be either a timestamp or a permitted date/time constant. If not specified then the end defaults to the end of start date.
l long The optional internal id of a location in order to only return bookings for corresponding resources. Multiple values can be specified. For example, specifying the internal id of a building will return bookings for resources within that building only, whereas specifying the internal id of a meeting room will return bookings for that room only.
u long The optional internal id of a user to only return bookings made by the user, or bookings that they are the owner of. Most often, the person making the booking is also the owner, though this is not the case when a booking is made on behalf of another person. Multiple values can be specified.
status string The optional status of the bookings to return. Multiple values can be specified. If not specified then only tentative and confirmed bookings will be returned.
include string Optional data sections to return. Multiple values can be specified.
  • locations – returns a list of location objects, one per resource. It also returns a list of parent location objects, such as buildings and floors, for the corresponding resources, ordered by position within the location hierarchy.

  • audit – returns audit information for each booking, indicating when and by whom it was created, approved, cancelled and checked-in, as applicable to the booking. Audit information is an alternative view of the booking history and thus callers generally should not request both audit and history data sections.

  • history – returns history records for each booking, indicating when and by whom it was booked, approved, updated and so on.
pageSize integer Determines the maximum number of bookings to return. If not specified then a maximum of 5000 bookings can be returned. See also query parameter pageNum.
pageNum integer Allows the caller to make paginated API calls, such as returning the first 500 bookings, followed by a second call for the next 500 bookings thereafter. Page numbers are zero-based, so the first page has pageNum=0. See also query parameter pageSize.

Get a specific booking

curl "https://app.matrixbooking.com/api/v1/booking/123"
  -H "Authorization: Basic encoded_credentials"

This API retrieves a specific booking.

HTTP request

GET https://app.matrixbooking.com/api/v1/booking/<id>

URL and query parameters

Parameter Type Description
id long The id of the booking to retrieve.
include string Optional data sections to return. Multiple values can be specified.
  • audit – returns audit information for each booking, indicating when and by whom it was created, approved, cancelled and checked-in, as applicable to the booking. Audit information is an alternative view of the booking history and thus callers generally should not request both audit and history data sections.

  • history – returns history records for the booking, indicating when and by whom it was booked, approved, updated and so on.

Cancel a specific booking

curl "https://app.matrixbooking.com/api/v1/booking/123"
  -X DELETE
  -H "Authorization: Basic encoded_credentials"

This endpoint cancels a specific booking. If the booking is already in progress, then booking will be ended early instead. It is not possible to cancel a booking that has already ended, meaning that its end time is in the past.

HTTP request

DELETE https://app.matrixbooking.com/api/v1/booking/{id}

URL parameters

Parameter Type Description
id long The id of the booking to be cancelled.

Get a summary of bookings

An example returning a summary of bookings for a particular booking category by building and month.

curl "https://app.matrixbooking.com/api/v1/booking/summary?bc=123&f=2020-10-01&t
=2020-12-31&l=1001&sa=LOCATION&sa=TIMESLOT&slk=BUILDING&stg=MONTH"
  -H "Authorization: Basic encoded_credentials"

The above command returns a JSON list structured like this:

[
  {
    "key": {
      "location": {
        "id": 1001,
        "kind": "BUILDING",
        "name": "Macquarie House",
        "...": "..."
      },
      "timeslot": "2020-10-01"
    },
    "count": 5,
    "minutes": 180
  },
  {
    "key": {
      "location": {
        "id": 1001,
        "kind": "BUILDING",
        "name": "Macquarie House",
        "...": "..."
      },
      "timeslot": "2020-11-01"
    },
    "count": 3,
    "minutes": 90
  },
  { 
    "...": "..."
  }
]

This API returns a set of bookings summaries for each combination of summary key, as requested by the caller.

HTTP request

GET https://app.matrixbooking.com/api/v1/booking/summary

Query parameters

Parameter Type Description
f string The start date of the window in which to search for bookings. The value must be either a date or a permitted date constant, such as today or tomorrow.
t string The end date of the window in which to search for bookings. The value must be either a date or a permitted date constant.
l long The optional internal id of a location in order to only include bookings for corresponding resources. Multiple values can be specified. For example, specifying the internal id of a building will include bookings for resources within that building only, whereas specifying the internal id of a meeting room will include bookings for that room only.
sa list An optional list of one or more booking attributes to summarise by. The possible summary attributes are:
  • ORGANISAITON – the organisation of the booking owner (applicable in cross organisation resource sharing scenarios only).
  • LOCATION – the location of the booking, which is dependent on query parameter slk.
  • TIMESLOT – the time period for the summary, which is dependent on query parameter stg.
  • DOMAIN – the email domain of the booking owner.
  • OWNER – the person who owns the booking, also known as the organiser.
  • COST_CODE – the cost code assigned to the booking.
  • SOURCE – the Matrix Booking app that was used to create the booking.
slk string The kind of location to summarise bookings by, such as by building or floor. Possible values include:
  • REGION – the region that the resource is in.
  • BUILDING – the building that the booked resource is in.
  • FLOOR – the floor that the booked resource is on.
stg string The timeslot granularity, which must be specified when requesting to summarise by timeslot. Possible values are:
  • DAY – the day of the booking.
  • WEEK – the week of the booking.
  • MONTH – the month of the booking.
  • DAY_OF_MONTH – the day of week of the booking (e.g. Monday).

Summary model

Each summary record is comprised of a key and the count of corresponding bookings for that key combination, as well as the cumulative minutes of those bookings. Note that values for a particular key field will only appear if relevant to the requested summary.

A summary key may contain the following fields:

Attribute Type Description
organisation object The id and name of the host organisation. This is only applicable to customers using cross-organisation resource sharing.
location object The location booked, as per the summary location kind query parameter slk.
owner object The id, name and email of the booking owner.
domain string The email domain of the booking owner.
costCode string The cost code assigned to the booking.
source string A value representing the Matrix Booking app used to create the booking.
timeslot string A value representing the time period for the summary depending on the timeslot granularity:
  • MONTH – the date of the first day of the month.
  • WEEK – the date of the first Monday of the week.
  • DAY – the date that the booking is for.
  • DAY_OF_WEEK – the day of the week, such as Monday or Tuesday.

Visitors

The Matrix Booking visitor list generally includes people who are external to your organisation who have been invited to a meeting or have been explicitly added as visiting someone, independent of booking a room. It is also possible for internal staff to be added to the visitor list, particularly when booking a desk or building pass, so that they too go through the visitor check-in process.

The main data model relating to visitors is the Visit. A visit represents a combination of the person visiting, the location that they are visiting and the date of the visit. The location that is being visited is referred to as the visit location, though can be more commonly thought of as a reception.

Visit model

Example visit object

{
  "id": 11111,
  "date": "2020-10-15",
  "when": "2020-10-15T10:30:00",
  "guest": {
    "id": 22222,
    "name": "Anne Visitor",
    "email": "anne@example.com"
  },
  "host": {
    "id": 33333,
    "name": "Sally Staff-Member",
    "email": "sally@your-organisation.com"
  },
  "location": {
    "id": 1001,
    "kind": "BUILDING",
    "name": "Macquarie House"
  }
}

A visit may contain the following fields:

Attribute Type Description
id long The internal id of the visit.
date date The date of the visit in the time zone of the visit location.
when timestamp An optional time of the visit on the visit date, in the time zone of the visit location.
guest object The id, name and email address of the person visiting. See the person model.
host object The id, name and email address of the person that the guest is visiting. See the person model.
location object The location being visited.

A person may contain the following fields:

Attribute Type Description
id long The internal id of the person within Matrix Booking. This is not a user id.
kind string Indicates whether the person is INTERNAL or EXTERNAL to the organisation. Most internal people have a corresponding user with the same email address.
firstName string An optional first name of the person.
lastName string An optional last name of the person.
nickName string An optional nickname for the person.
name string The full name of the person including their first and last names, as well as the nickname in parentheses, where specified. For example, "Robert (Bob) Staff".
company string An optional name of the company that an external person belongs to.
email string An email address for the person. This might not be specified for an external person.

Get visit locations

An example returning all visit locations.

curl "https://app.matrixbooking.com/api/v1/visitor/locations"
  -H "Authorization: Basic encoded_credentials"

The above command returns a JSON object with an embedded list like this:

{
  "locations": [
    {
      "id": 1001,
      "kind": "BUILDING",
      "name": "Macquarie House",
      "...": "..."
    },
    {
      "id": 2002,
      "kind": "BUILDING",
      "name": "Bathurst Place",
      "...": "..."
    }
  ]
}

This API returns the list of visit locations that have been configured for your organisation.

HTTP request

GET https://app.matrixbooking.com/api/v1/visitor/locations

Get visits

An example returning visits between two dates at a particular location.

curl "https://app.matrixbooking.com/api/v1/visitor?f=2020-10-12&t=2020-10-18&l=1001"
  -H "Authorization: Basic encoded_credentials"

The above command returns a JSON list structured like this:

[
  {
    "id": 11111,
    "date": "2020-10-15",
    "when": "2020-10-15T10:30:00",
    "guest": {
      "id": 22222,
      "name": "Anne Visitor",
      "email": "anne@example.com"
    },
    "host": {
      "id": 33333,
      "name": "Sally Staff-Member",
      "email": "sally@your-organisation.com"
    },
    "location": {
      "id": 1001,
      "kind": "BUILDING",
      "name": "Macquarie House"
    }
  }
]

This API returns a list of visits between two local dates. The list can be optionally restricted to specific visit locations (receptions).

HTTP request

GET https://app.matrixbooking.com/api/v1/visitor

Query parameters

Parameter Type Description
f string The start date of the window in which to search for visits. The value must be either a date or a permitted date constant, such as today or tomorrow.
t string The end date of the window in which to search for bookings. The value must be either a date or a permitted date constant.
l long The optional internal id of a visit location in order to only return visits for that location. Multiple values can be specified.

Get a summary of visits

An example returning a summary of visits by day of week and visit location.

curl "https://app.matrixbooking.com/api/v1/visitor/summary?f=2020-10-12&t
=2020-10-18&sa=TIMESLOT&sa=LOCATION&stg=DAY_OF_WEEK"
  -H "Authorization: Basic encoded_credentials"

The above command returns a JSON list structured like this:

[
  {
    "key": {
      "location": {
        "id": 1001,
        "kind": "BUILDING",
        "name": "Macquarie House",
        "...": "..."
      },
      "timeslot": "Monday"
    },
    "count": 3
  },
  {
    "key": {
      "location": {
        "id": 1001,
        "kind": "BUILDING",
        "name": "Macquarie House",
        "...": "..."
      },
      "timeslot": "Tuesday"
    },
    "count": 5
  },
  { 
    "...": "..."
  }
]

This API returns a set of visit summaries for each combination of summary key, as requested by the caller. Dates are local to visit location (reception).

HTTP request

GET https://app.matrixbooking.com/api/v1/visitor/summary

Query parameters

Parameter Type Description
f string The start date of the window in which to search for visits. The value must be either a date or a permitted date constant, such as today or tomorrow.
t string The end date of the window in which to search for visits. The value must be either a date or a permitted date constant.
l long The optional internal id of a visit location in order to only return visits for that location. Multiple values can be specified.
sa list An optional list of one or more visit attributes to summarise by. The possible summary attributes are:
  • ORGANISATION – the host organisation being visited (applicable in cross organisation visitor management scenarios only).
  • LOCATION – the location being visited.
  • TIMESLOT – the time period for the summary, which is dependent on query parameter stg.
  • DOMAIN – the email domain of the person visiting.
stg string The timeslot granularity, which must be specified when requesting to summarise by timeslot. Possible values are:
  • DAY – the day of the visit.
  • WEEK – the week of the visit.
  • MONTH – the month of the visit.
  • DAY_OF_MONTH – the day of week of the visit (e.g. Monday).

Summary model

Each summary record is comprised of a key and the count of corresponding visit records for that key combination. Note that values for a particular key field will only appear if relevant to the requested summary.

A summary key may contain the following fields:

Attribute Type Description
organisation object The id and name of the host organisation. This is only applicable to customers using cross-organisation visitor management.
location object The location being visited.
domain string The email domain of the person visiting.
timeslot string A value representing the time period for the summary depending on the timeslot granularity:
  • MONTH – the date of the first day of the month.
  • WEEK – the date of the first Monday of the week.
  • DAY – the visit date.
  • DAY_OF_WEEK – the day of the week, such as Monday or Tuesday.

Errors

The Matrix Booking API uses the following HTTP status codes to indicate errors:

Error Code Meaning
400 Bad Request – Your request is invalid.
401 Unauthorized – Your user credentials are wrong.
403 Forbidden – Your user credentials do not permit access to the data or action.
404 Not Found – The specified object could not be found.
500 Internal Server Error – We had a problem with our server. Please contact our support team.
503 Service Unavailable – We're temporarily offline for maintenance. Please try again later.