Error Codes

Error Codes

Response Codes

To denote a successful execution or an error occurrence, the standard HTTP code is used. Along with the HTTP code, the response body will include an error entity with a custom error code assigned to the specific issue described in the message.

HTTP Codes for Errors

Error ConditionHTTP Response CodeHTTP Code Name
Invalid submitted data400BAD REQUEST
Unauthorized or forbidden access to resource.401UNAUTHORIZED
Unauthorized or forbidden access to resource.403FORBIDDEN
The operation took a long time, more than expected, to complete.408REQUEST TIMEOUT
There was an unexpected error in the API.500INTERNAL SERVER ERROR

Response Body Format

The error response will include one of the following entities in the response body.

Format 1

{
   "status":"XXX",
   "errors":[
      {
         "subcode":"XXXX-XXXX",
         "message":"..."
      }
   ],
   "message":"...",
   "success":false
} 

For errors with this format, the success field will always be “false,” and the status field will have the same code value as the HTTP status code in the response. The base message, the outer message field, will include a description for the given endpoint path where the error was thrown, and the inner message field will include the specific description of the error cause. The subcode field will be a combination of the product code name, SMAR for receivables or SMAP for payables, with a code number associated directly to the cause of the error.

Format 2

{
   "timestamp":"XXXXXXXXXXXXX",
   "status":"XXX",
   "error":"...",
   "message":"...",
   "path":"..."
} 

For errors with this format, the status field will have the same code value as the HTTP status code in the response, and the error field will be the standard name assigned to that HTTP status code. Additionally, and the message field will include the description of the error and the path field will be the path of the resource that threw the error.

Error Subcodes

Error CodeError Code TypeMeaning
0000GeneralGeneral error. Errors with this code are unexpected and are related to issues that could be originated in the server or in an external service.
0001GeneralForbidden. A general error for unauthorized or forbidden issues.
0002GeneralForbidden, missing permissions.
0011ValidationString or list property with a null or empty value.
0012ValidationObject or number with a null or empty value.
0014ValidationMaximum permitted length failure.
0015ValidationMinimum permitted length failure.
0016ValidationInvalid date format.
0101Administrative informationMissing or invalid account information.
0201ConnectivityInvalid GTD Authentication Key.
0202ConnectivityTimeout error, the tax calculation engine (GTD) timed out.
0204ConnectivityTax calculation engine (GTD) service not found.
1004Transaction validationInvalid discount amount.
1008Transaction validationInvalid invoice date format.
1010Transaction validationMissing line items.
1013Transaction validationInvalid commit date format.
1015Transaction validationInvalid Credit/Debit indicator number.
2002Transaction state validation.Invalid prior transaction ID.
2004Transaction state validationCommit date is not equal to or greater than the invoice date.
2005Transaction state validationInvalid requested transaction state.
3000Configuration validationTransaction lines exceeds the allowable max.
99692Tax calculation en-gine errorsA validation error generated by the tax calcula-tion engine (GTD). Common reasons for this error could be an invalid organization name, an invalid currency code, or a negative discount amount.