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

CodeTextDescription
200OKSuccess
201CreatedThe resource has been created, the newly created resource can be referenced by the URI(s) returned in the response.
202AcceptedThe 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.
304Not ModifiedThere was no new data to return.
400Bad RequestThe request was invalid or cannot be otherwise served.
401UnauthorizedAuthentication credentials were missing or incorrect. This could also occur if the account is not authorized for API access.
403ForbiddenThe 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.
404Not FoundThe URI requested is invalid or the resource requested, such as a form, does not exist.
406Not AcceptableReturned by the API when an invalid format is specified in the request.
415Unsupported Media TypeThe request entity has a media type which the server or resource does not support.
422Unprocessable EntityReturned when the body of a request is well formed but fails validation. For example: updating a non-editable field.
429Too Many RequestsReturned when a user has sent too many requests in a given amount of time.
500Internal Server ErrorAn unexpected error has occurred. Contact support with the provided requestId for more details.
502Bad GatewayThe API servers are down or being upgraded.

Error Object

The error object returned has the following properties

NameTypeDescription
codeintThe HTTP status code of the error response
statusstringA friendly status of the HTTP status Code
messagestringA developer friendly message about the error
requestUrlstringThe URL of the request
requestIdstringA 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]]([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]]([email protected]?Subject=Internal Server Error received in the GoFormz API) lets our Support Team better track down the specific problem you are receiving.