Responses and Errors

DoorFlow uses conventional HTTP response codes to indicate the success or failure of an API request.

Creating new objects like People will usually return a "201 Created" status. Updating records will usually return a "200 OK" status code.

HTTP status codes

In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.), and codes in the 5xx range indicate an error with DoorFlow's servers (these are rare). You should try to handle all error codes gracefully.

Not all errors map cleanly onto HTTP response codes, however. When a request is valid but does not complete successfully, we return a 402 error code.

If a request fails, a non-200 status code will be returned, possibly with error information.

Code Meaning Notes
200 OK Everything worked as expected
400 Bad Request The request was unacceptable, often due to missing a required parameter.
401 Unauthorized Your API key is wrong
402 Request Failed The parameters were valid but the request failed
403 Forbidden The object requested is hidden for administrators only
404 Not Found The specified object could not be found
405 Method Not Allowed You tried to access an object with an invalid method
406 Not Acceptable You requested a format that isn't json
410 Gone The object requested has been removed from our servers
418 I'm a teapot
429 Too Many Requests Too many requests hit the API too quickly. We recommend an exponential backoff of your requests
500 Internal Server Error We had a problem with our server. Try again later
503 Service Unavailable We're temporarially offline for maintanance. Please try again later

Response Attributes

Where an error code is returned, we might also include additional contextual information in the payload.

Attribute Notes
type The type of error returned
message
OPTIONAL
A human-readable message providing more details about the error. For card errors, these messages can be shown to your users
param
OPTIONAL
The parameter the error relates to if the error is parameter-specific. You can use this to display a message near the correct form field, for example