Status Codes for API v4

Overview

The Reckon Accounts Hosted API version 4 would have a better consistency in error reporting compared with API version 2 for any received request and returns a clearer response of the source of an issue that the User can action.

HTTP Codes examples in API v2:

  • The response returns a 200 OK if a query cannot find a result
  • The response returns 400 Bad Request if a query request has an empty result set
  • The result is inconsistent with the fact that the request is successfully executed and QBXML response is returned



Status Codes

List of HTTP Codes

API V2

API V4

  1. 200 OK
  2. 400 Bad Request
  1. 200 OK
  2. 202 Accepted
  3. 400 Bad Request
  4. 401 Unauthorized
  5. 403 Forbidden
  6. 404 Not Found
  7. 408 Request Timeout
  8. 422 Unprocessable Entity
  9. 500 Internal Server Error


Response changes between API v2 and API v4

SCENARIO

CODE

API V2 - MESSAGE

CODE

API V4 - MESSAGE

A request was processed successfully on the first attempt.

200

A request was processed successfully on first attempt.

200

"QBXML processing complete."

  1. A request wasn’t processed successfully within 2.5 mins and a GUID to try again later is returned.
  2. "Your data was processed successfully"
  1. 200
  2. 200
  1. "Request has not been completed yet. Please check back in couple of minutes"
  2. "Your data was processed successfully"
  1. 202
  2. 200
  1. "QBXML result not yet available. To retrieve result, try again later specifying the provided RequestId."
  2. "QBXML processing complete."

Delayed retrieval of QBXML response by requestId fails to include a requestId

400

"Invalid requestId supplied"

400

"No request exists for the provided Id."

QBW file path not included in the request object

400

"File not specified"

400

"QBW Company file not specified."

QBXML operation not included in the request object

400

"Operation not specified"

400

"QBXML operation not specified."

The request object is null (no exception occurred during deserialization per above)

400

"Invalid json failed to deserialize"

400

"Invalid request object. Failed to deserialize."

Incorrect user or password for QBW file included in the request

400

"Error connecting to Reckon Accounts. E03: Failed to access the Reckon Accounts company file using the supplied credentials. Please verify the user exists and the username and password match those supplied."

401

"Error connecting to Reckon Accounts. E03: Failed to access the Reckon Accounts company file using the supplied credentials. Please verify the user exists and the username and password match those supplied."

Shared file access authorisation fails for User ID

400

"File access authorisation failed for RAH UserID. Access to requested file is denied."

403

"File access authorisation failed for RAH UserID. Access to requested file is denied."

Application firewall (Web API) blocks requests due to repeated errors for a specific file during a specific timespan per firewall config DB settings

400

"Error connecting to Reckon Accounts. E03: Failed to access the Reckon Accounts company file using the supplied credentials. Please verify the user exists and the username and password match those supplied."

403

"The request was blocked due to repeated processing errors associated with this company file."

Sending a request to an invalid HTTP resource

404

"No HTTP resource was found that matches the request URI '<URL>'."

404

"No HTTP resource was found that matches the request URI '<URL>'."

A request takes more than the hard timeout limit (currently 60 mins).

400

408

"Request processing timeout. Reckon Accounts Hosted will be forced to close."

The User specified in the request is already logged into .QBW file in RA Hosted front end

400

"Error connecting to Reckon Accounts. E01: The Reckon Accounts company file User Name you have specified is already logged in to the company file. This User Name must be logged out of the company file or another User Name specified."

422

"Error connecting to Reckon Accounts. E01: The Reckon Accounts company file User Name you have specified is already logged in to the company file. This User Name must be logged out of the company file or another User Name specified."

Reckon Accounts Hosted .QBW file is open in Single-User mode

400

"Error connecting to Reckon Accounts. E02: Reckon Accounts is currently open in Single User mode. You must switch to Multi-User mode for Hosted API access."

422

"Error connecting to Reckon Accounts. E02: Reckon Accounts is currently open in Single User mode. You must switch to Multi-User mode for Hosted API access."

.QBW file is not accessible e.g. incorrect file path or shared file permissions issue

400

"Error connecting to Reckon Accounts. E04: Could not start Reckon Accounts to process your request. Please verify the path to the company file included in your request."

422

"Error connecting to Reckon Accounts. E04: Could not start Reckon Accounts to process your request. Please verify the path to the company file included in your request."

Json Reader throws an exception during the deserialization of the request

400

"Jason error. {0}", jex. Message"Invalid request object. Failed deserialization. {0}", ex.Message

500

"Invalid request object. Failed to deserialize."

Web API fails to insert requests into API DB for processing

400

"Failed to insert request for processing. Please retry"

500

"Failed to insert request for processing. Please retry"

Other unspecified fatal error

400

i.e. "Invalid json failed to deserialize"

500

Exception message text



How did we do?

Developer's Guide for updating API v2 to API v4

Related Articles

Powered by HelpDocs (opens in a new tab)

Powered by HelpDocs (opens in a new tab)