MIDAS API

Appendix C - Error Handling

When making API calls, your applications should take into account possible errors that may be returned.

API errors will be returned in JSON format as follows:
Example Error Response
{"error":"error response"}
Error ResponseMeaningApplies To
"not enabled"API access is not enabled at this time. API access can be enabled from within MIDAS via MIDAS Admin Options → Manage Addons → API Access → EnabledAll
"invalid api key"You have not supplied your API key in your call, or the API key supplied is invalid. See also API TroubleshootingAll
"GET method not allowed. Use POST instead"An http GET request has been made to the API, but the API has been set to accept http POST requests only. This setting may be changed via MIDAS Admin Options → Manage Addons → API Access → Allow GET (as well as POST) methodAll
"API running in read only mode"The API is currently running in read-only mode, and you have made a call that requires full-access. Read-Only mode can be turned off via MIDAS Admin Options → Manage Addons → API Access → Read-Only accessadd_*
del_*
email_*
gen_*
mod_*
notify_*
set_*
"no matches found"No data was returned for the API call. Try broadening the search parametersget_activityget_bookings
get_client
get_consuable_levels
get_invoice
get_invoices
get_messages
get_reminders
get_user
get_venues_in_group
get_watches
"protected setting"The setting you're trying to modify is read-only and cannot be modifiedset_setting
"referrer not allowed"The API call originates from a blocked domain/IP address. Allowed domains/IP's may be specified from within MIDAS via MIDAS Admin Options → Manage Addons → API Access → Allowed ReferrersAll
"required parameter missing"One or more parameters are required for the particular call you're making is missingAll
"unknown booking type"Indicates that the specified booking type doesn't existget_bookings (when the type parameter is specified)
"unknown command"The API command you've specified was unrecognized. Please check you're using a valid commandAll
"unknown resource"Indicates that the specified resource doesn't existget_resource_availability
"unknown setting"Indicates that the specified setting isn't recognizedget_setting
set_setting
"unknown template"Indicates that the specified template isn't recognizedget_template
set_template
"unknown user"Indicates that the specified user doesn't existget_activity
get_messages
get_reminders
get_watches
"unknown venue group"Indicates that the specified venue group doesn't existget_venues_in_group
"unknown venue"Indicates that the specified venue doesn't existget_availability
get_bookings
(when the venue parameter is specified)
get_venue