Latest News: MIDAS v4.28 Out Now | Refer-a-Friend | MIDAS Turns 15

MIDAS API Addon MIDAS API: Appendix C - Error Handling

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

Unless you've configured your API to return http status code 200 (OK) for every request, successful API calls should return either a 200 (OK) or 201 (Created) http status code. Unsuccessful API calls may return 4xx/5xx http status codes, as outlined in the Error Response table below.

API errors themselves are returned in JSON format.

Example Error Response
{"error":"error response"}
Error ResponseHTTP Status CodeMeaningApplies To
"API running in read only mode"403The 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_*
"booking not found"404The specified booking was not founddel_booking
mod_invoice
"client not found"404The specified client was not foundemail_client
"exceeds invoice total"400The sum of amounts paid, credited, and refunded exceed the specified invoice's totalmod_invoice
"filter field not found"400The specified filter field is invalidget_bookings
"GET method not allowed. Use POST instead"405An 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
"invalid api key"401The API key supplied is invalid. See also API TroubleshootingAll
"invoice x is already associated with this booking"409An attempt was made to generate an invoice for a booking which already has an invoice associated with itgen_invoice
"invoice not found"404The specified invoice was not founddel_invoice
mod_booking
"missing api key"401You have not supplied your API key in your call. See also API TroubleshootingAll
"no email address on record"400The specified client record has no email address associated with itemail_client
"no matches found"404No data was returned for the API call. Try broadening the search parametersdel_bookings
gen_invoice
get_activity
get_bookings
get_client
get_consuable_levels
get_invoice
get_invoices
get_messages
get_reminders
get_user
get_venues_in_group
get_watches
"not available with LDAP enabled"400The API call is unavailable when Active Directory sign-on in enabledauthenticate_user
"not enabled"503API access is not enabled at this time. API access can be enabled from within MIDAS via MIDAS Admin Options → Manage Addons → API Access → EnabledAll
"notification expired"400The notification's expiry date/time has passednotify_user
"protected setting"401The setting you're trying to modify is read-only and cannot be modifiedset_setting
"referrer not allowed"403The 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"400One or more parameters are required for the particular call you're making is missingAll
"required permission missing"401The API call was made under a user account which does not have sufficient privileges to make the particular API callVarious
"request not found"404The specified booking resource was not foundapprove_request
reject_request
"resource not found"404The specified resource was not founddel_resource
mod_resource
"unable to ..."502A generic error indicated that the API has behaved in an unexpected way. Please contact our support team for assistanceVarious
"unable to connect to database"503The API was unable to connect to the databaseAll
"unable to delete - invoice not yet paid"401Software settings prevent the specified invoice from being deleted until it has been paid in fulldel_invoice
"unable to modify - invoice has been sent"401Software settings prevent the specified invoice from being modified once it has been finalizedmod_invoice
"unknown booking type"404Indicates that the specified booking type doesn't existget_bookings (when the type parameter is specified)
"unknown command"400The API command you've specified was unrecognized. Please check you're using a valid commandAll
"unknown resource"404Indicates that the specified resource doesn't existget_resource
get_resource_availability
"unknown setting"404Indicates that the specified setting isn't recognizedget_setting
set_setting
"unknown template"404Indicates that the specified template isn't recognizedget_template
set_template
"unknown user"404Indicates that the specified user doesn't existget_activity
get_messages
get_reminders
get_watches
"unknown venue group"404Indicates that the specified venue group doesn't existget_venues_in_group
"unknown venue"404Indicates that the specified venue doesn't existget_availability
get_bookings
(when the venue parameter is specified)
get_venue