The GoFormz API uses standard HTTP response codes to indicate whether or not a request has succeeded or failed.
In addition to the HTTP response code all errors include a JSON Error object in the body of the response which includes additional details about the error that occurred.
HTTP Status Codes
Code | Text | Description |
---|---|---|
200 | OK | Success |
201 | Created | The resource has been created, the newly created resource can be referenced by the URI(s) returned in the response. |
202 | Accepted | The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. The status of the request can be queried by calling GET on the returned URI. |
304 | Not Modified | There was no new data to return. |
400 | Bad Request | The request was invalid or cannot be otherwise served. |
401 | Unauthorized | Authentication credentials were missing or incorrect. This could also occur if the account is not authorized for API access. |
403 | Forbidden | The request is understood, but it has been refused or access is not allowed. This could occur if the user does not have appropriate permissions for the requested action. |
404 | Not Found | The URI requested is invalid or the resource requested, such as a form, does not exist. |
406 | Not Acceptable | Returned by the API when an invalid format is specified in the request. |
415 | Unsupported Media Type | The request entity has a media type which the server or resource does not support. |
422 | Unprocessable Entity | Returned when the body of a request is well formed but fails validation. For example: updating a non-editable field. |
429 | Too Many Requests | Returned when a user has sent too many requests in a given amount of time. |
500 | Internal Server Error | An unexpected error has occurred. Contact support with the provided requestId for more details. |
502 | Bad Gateway | The API servers are down or being upgraded. |
Error Object
The error object returned has the following properties
Name | Type | Description |
---|---|---|
code | int | The HTTP status code of the error response |
status | string | A friendly status of the HTTP status Code |
message | string | A developer friendly message about the error |
requestUrl | string | The URL of the request |
requestId | string | A unique ID for this request -helpful for troubleshooting (see below) |
Sample Error Object:
{
"code": 400,
"status": "Bad Request",
"message": "'invalid property name' is not a valid sort parameter",
"requestUrl": "https://api.goformz.com/v2/groups?sort=invalid%20property%20name",
"requestId": "d3f40ec7-f9fbe524-4a38-8fbd-6b15ec67"
}
Using the Request Id for additional API support
The JSON Error object response contains a requestId
property which is used to associate errors in the API with the specific request that was made.
In the rare situation that a 500
(Internal Server Error) response code is received, please email [[email protected]](mailto:[email protected]?Subject=Internal Server Error received in the GoFormz API) and include value of the requestId
in the body of the email.
Including the requestId
in the email to [[email protected]](mailto:[email protected]?Subject=Internal Server Error received in the GoFormz API) lets our Support Team better track down the specific problem you are receiving.