Check our plugin documentation and find the information you need!

We are updating our documentation all the time so if you don't find what you are looking for feel free to contact our customer support!

Customer Support Download

API documentation

Building a back-end API layer introduces a whole new layer of coordination between server and client code. While there are many aspects to this delicate dance of communication, one key ingredient to minimizing back-and-forth-confusion-about what-call-does-what, is consistently communicating about your API endpoints.

This is by no means rocket science, but over time I’ve created a template that I now tend to use and have been asked to share. Conveniently when the time comes to publish an API externally, this serves as an invaluable tool for creating public documentation. You can see the markdown template alongside an example in this gist.

Title

Get Timetables

Route Relative Route URL

saem/v2/get/timetables/{id}

Method The request type

GET

URL Params Route Parameters

Optional:

id=[int]
Example: get/timetables/6
Title

Get Timetable Services

Route Relative Route URL

saem/v2/get/timetables/{id}/services

Method The request type

GET

URL Params Route Parameters

Required:

id=[int]
Example: saem/v2/get/timetables/15/services
Title

Get Timetable Employees

Route Relative Route URL

saem/v2/get/timetables/{id}/employees

Method The request type

GET

URL Params Route Parameters

Required:

id=[int]
Example: saem/v2/get/timetables/12/employees
Title

Get Timetable Events

Route Relative Route URL

saem/v2/get/timetables/{id}/events

Method The request type

GET

URL Params Route Parameters

Required:

id=[int]
Example: saem/v2/get/timetables/151/events
Title

Get Timetable Events List

Route Relative Route URL

saem/v2/get/timetables/{id}/eventslist/{range_start}/{range_end}/{offset}/{limit}

Method The request type

GET

URL Params Route Parameters

Required:

id=[int]
Example: saem/v2/get/timetables/3/eventslist

Optional:

range_start=[YYYY-MM-DD|Unixtimestamp]
Example: saem/v2/get/timetables/3/eventslist/2017-01-01/2017-01-31

Optional:

range_end=[YYYY-MM-DD|Unixtimestamp]
Example: saem/v2/get/timetables/3/eventslist/1483228800/1485820800

Optional:

offset=[int]
Example: saem/v2/get/timetables/3/eventslist/2017-01-01/2017-01-31/5/10

Optional:

limit=[int]
Example: saem/v2/get/timetables/3/eventslist/2017-01-01/2017-01-31/5/10
Title

Get Services

Route Relative Route URL

saem/v2/get/services/{id}

Method The request type

GET

URL Params Route Parameters

Optional:

id=[int]
Example: saem/v2/get/services/412
Title

Get Service Events List

Route Relative Route URL

saem/v2/get/services/{id}/eventslist/{range_start}/{range_end}/{offset}/{limit}

Method The request type

GET

URL Params Route Parameters

Required:

id=[int]
Example: saem/v2/get/services/51/eventslist

Optional:

range_start=[YYYY-MM-DD|Unixtimestamp]
Example: saem/v2/get/services/51/eventslist/2017-01-01/2017-01-31

Optional:

range_end=[YYYY-MM-DD|Unixtimestamp]
Example: saem/v2/get/services/51/eventslist/1483228800/1485820800

Optional:

offset=[int]
Example: saem/v2/get/services/51/eventslist/2017-01-01/2017-01-31/5/10

Optional:

limit=[int]
Example: saem/v2/get/services/51/eventslist/2017-01-01/2017-01-31/5/10
Title

Get Employee Events List

Route Relative Route URL

saem/v2/get/employees/{id}/eventslist/{range_start}/{range_end}/{offset}/{limit}

Method The request type

GET

URL Params Route Parameters

Required:

id=[int]
Example: saem/v2/get/employees/8/eventslist

Optional:

range_start=[YYYY-MM-DD|Unixtimestamp]
Example: saem/v2/get/employees/8/eventslist/2017-01-01/2017-01-31

Optional:

range_end=[YYYY-MM-DD|Unixtimestamp]
Example: saem/v2/get/employees/8/eventslist/1483228800/1485820800

Optional:

offset=[int]
Example: saem/v2/get/employees/8/eventslist/2017-01-01/2017-01-31/5/10

Optional:

limit=[int]
Example: saem/v2/get/employees/8/eventslist/2017-01-01/2017-01-31/5/10
Title

Get Employee Workflow

Route Relative Route URL

saem/v2/get/employees/{id}/workflow

Method The request type

GET

URL Params Route Parameters

Required:

id=[int]
Example: saem/v2/get/employees/8/workflow
Title

Set Reminder

Route Relative Route URL

saem/v2/post/reminder

Method The request type

POST

Data Params Route Parameters

Required:

event_id=[int]
Example: event_id=1

Required:

repeat_offset=[int]
Example: repeat_offset=0

Required:

seconds_before=[int]
Example: seconds_before=3600

Required:

email=[email]
Example: email=example@email.com

Optional:

X-WP-Nonce=[String]
Example: xhr.setRequestHeader("X-WP-Nonce", WP_REST_NONCE);
Title

Unset Reminder

Route Relative Route URL

saem/v2/delete/reminder

Method The request type

DELETE

Data Params Route Parameters

Required:

event_id=[int]
Example: event_id=1

Required:

repeat_offset=[int]
Example: repeat_offset=0

Required:

X-WP-Nonce=[String]
Example: xhr.setRequestHeader("X-WP-Nonce", WP_REST_NONCE);