Menu Close Menu
Menu
  • 0
    • Number of items in basket: 0

      • Your basket is empty.
      • Total: £0.00
      • Checkout
  • Add-ons
  • Support
    • Documentation
    • Report a Bug
    • Submit a Support Ticket
    • Get Involved
    • Terms and Conditions
  • Your Account
    • Register
  • Blog
  • Contact Us

MDJM REST API: Availability

MDJM REST API: Availability

Availability via REST

The MDJM REST API includes the /availability/ endpoint to enable availability look ups to be performed.

The /availability/ endpoint allows you to query the events and availability database to determine if you are available on the given date.

Parameters

The /availability/ endpoint requires a single parameter to be sent along with the API request. There are also additional parameters than can optionally be provided;

  • date (Required)
    The date for which to perform the availability lookup. Should be provided in the format Y-m-d i.e. 2016-07-18
  • employees (Optional)
    Comma separated list of employees to perform the lookup on. Default to all
  • roles (Optional)
    Comma separated list of role slugs to perform the lookup on. Default to those set within MDJM -> Settings -> Client Zone -> Availability Settings

The following details will be returned;

  • date (string)
    The which was checked
  • response (string)
    available if the agency is available in the given date, or unavailable
  • employees (string)
    Comma separated list of employees who are available on the given date
  • message (string)
    Relevant available/unavailable response as defined within MDJM->Settings->Client Zone Settings->Availability Checker

Method

The /availability/ endpoint accepts the GET HTTP method only.

[heading element=”h3″ style=”bordered” remove_margins=”top,bottom”]Security[/heading]

The /availability/ endpoint requires no security validation and therefore it is not necessary to send the API key or Token with the request.

Example API Call

To retrieve availability information for 18th July, 2016 the following would be used;

1
http://<yoursite.com>/wp-json/mdjm/v1/availability/?date=2016-07-18

Response

The response from the above query would look like;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
 
"data": {
 
"availability": {
 
"date": "2016-07-19",
 
"response": "available",
 
"employees": [
 
18,
 
1
 
],
 
"message": "Good news, we are available on the date you entered. Please contact us now"
 
}
 
},
 
"headers": {
 
"Content-type": "application/json"
 
},
 
"status": 200
 
}

 


Rate this Article

We're working hard to ensure we provide you with useful and relevant documentation to help you get the most out of MDJM Event Management.

Please take a moment to let us know if you found this article helpful.

REST API Availability Checker Last updated: March 24, 2017

Published by MDJM

Posts by MDJM Visit Website

Post navigation

Previous

MDJM REST API: Employee

Next

MDJM REST API: Event

Document Categories

  • Configuration
    • Advanced
  • Extensions
    • Dynamic Contact Forms
    • Google Calendar Sync
    • PayPal Standard
  • FAQs
  • Getting Started
  • Hooks
  • REST API

Latest Posts

  • PayPal Payment Method Discontinued
  • Enhancements! Enhancements! Enhancements!
  • Preparing for New Release 1.6
  • Black Friday Offers

Social Links

  • Like our Facebook Page
  • Join our Facebook Group
  • Fork us on GitHub

Latest news & offers

Subscribe now to receive all the latest news, thoughts and offers from MDJM Event Management.
New subscribers will receive 15% off their first purchase.

© 2021 MDJM Event Management. All rights reserved.
  • Shop
  • Support
  • Account
  • Contact Us
  • Testimonials
  • Privacy Policy
  • Terms