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: Endpoints

MDJM REST API: Endpoints

An overview of the MDJM REST API endpoints

The MDJM REST API includes a number of endpoints and methods allowing you to access data;

  • event (GET/POST)
    For accessing a specific events information. More details
  • events (GET/POST)
    F
    or accessing information for multiple events
  • employee (GET/POST)
    F
    or retrieving a specific employees information. More details
  • client (GET/POST)
    For retrieving a specific clients information. More details
  • availability (GET)
    For performing availability checks. More details

Endpoints are used like so;

http://<yoursite.com>/wp-json/mdjm/v1/<endpoint>

An example of the events endpoint would therefore be;

http://yoursite.com/wp-json/mdjm/v1/events/

and when combined with your API Key and Token;

http://yoursite.com/wp-json/mdjm/v1/events/?api_key=03e8d350690c06b6106edc7936bd2b96&token=b35b7c30f56e2975dcc7dc171db90cdb

Visibility

All endpoints with the exception of availability require the API key and token. Availability checks are intended to be public and therefore no authentication is required.

Responses

All API responses are provided in JSON format. An example response for an API request to the event endpoint would look like;

{
    "data": {
        "request": {
            "request": "Retrieve Event",
            "params": {}
        },
    "event": {
        "id": 5818,
        "client": "62",
        "contract": "7955",
        "contract_status": "Signed",
        "cost": {
            "balance": 0,
            "balance_status": "Paid",
            "deposit": "47.50",
            "deposit_status": "Paid",
            "remaining_deposit": "0",
            "cost": "475.00"
        },
        "date": "2016-11-30",
        "duration": "6 hours",
        "employees": {
            "employees": {
                "1": {
                    "role_slug": "dj",
                    "role": "DJ",
                    "wage": "100.00",
                    "payment_status": {
                    "payment_status": "part-paid",
                    "payment_date": "2016-05-17 16:27:00",
                    "payment_txn": 8043,
                    "payment_amount": "0.00",
                    "txn_id": 0
                },
                "93": {
                    "role_slug": "mdjm-photographer",
                    "role": "Photographer",
                    "wage": "75",
                    "payment_status": "paid",
                    "txn_id": ""
                }
            },
            "primary_employee": "1"
        },
        "end_date": "2016-12-01",
        "end_time": "01:00:00",
        "equipment": {
            "package": "Standard Disco",
            "addons": "White Setup<br />Photobooth"
        },
        "name": "40th Birthday Party",
        "playlist": {
            "playlist_enabled": true,
            "playlist_guest_code": "5dw2Z9cHy",
            "playlist_status": true
        },
        "setup_date": "2016-11-30",
        "setup_time": "01:00:00",
        "source": "Google",
        "status": "Completed",
        "start_time": "19:00:00",
        "type": "Child Birthday Party",
        "venue": {
            "id": "8691",
            "name": "Client Address",
            "address": [
                "Address Line 1",
                "Address Line 2",
                "London",
                "County",
                "AB1 2CD"
            ],
            "contact": "Jonathan King",
            "details": [
                "Low Ceiling",
                "PAT Required",
                "PLI Required",
                "Via Stairs"
            ],
            "email": "[email protected]",
            "phone": "0123456789",
            "notes": ""
        }
    }
    },
    "headers": {
        "Content-type": "application/json"
    },
    "status": 200
}

Error Checking

If your API call results in an error, the response will include an error message such as;

{
    "data": {
        "error": "Event does not exist."
    },
    "headers": {
        "Content-type": "application/json"
    },
    "status": 200
}
REST API Last updated: March 24, 2017

Published by MDJM

Posts by MDJM Visit Website

Post navigation

Previous

MDJM REST API: Introduction

Next

MDJM REST API: Client

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!
  • Black Friday Offers
  • Stripe Payments Add-on

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