Errors
The API communicates errors through standard HTTP status codes paired with error objects. Generally the following pattern will apply:
2xx
The request was successfully received, understood, and accepted
3xx
Further action needs to be taken by the user agent in order to fulfill the request
4xx
An error in the request. Usually a bad parameter.
5xx
The request is fine, but something is wrong on SmartSurvey’s end.
HTTP STATUS CODES
For examples of most of the known detailed error codes and their accompanying messages, see here.
200 | success |
201 | created |
202 | accepted |
301 | redirect |
400 | bad_request |
401 | unauthorized |
403 | forbidden |
404 | not_found |
415 | unsupported_media_type |
429 | too_many_requests |
500 | internal_server_error |
503 | unavailable |
Here is an example response if the resource is not found:
{
"status": 404,
"code": "not_found",
"message": "Survey with id '123' could not be found."
}
Updated over 3 years ago