Skip to main content
Version: 1.7.1

Error Handling

TaxBandits API uses the commonly used error codes to stream the success or failure message to an API request. If validation checks fail during the creation of the business, the field errors will return the information in the Response, which can be handled at your end. There are three components in error handling, as outlined below.

Error Structure

{
<<-- HTTP Status Code Fields -->>
"StatusCode": 200,
"StatusName": "Ok",
"StatusMessage": "Successful API call",
<<-- Submission Detail -->

"SubmissionId": "6a30078c-7e5f-4db0-862a-d5e1266363f0",
<<-- Form Success Details & Business Validation Errors -->>

"FormRecords": {
<<-- Collection of Form Success Details -->

"SuccessRecords": {
. . .
},
<<-- Collection of Business Validation Error Details -->

"ErrorRecords": {
. . .
},
<<-- Collection of Data Validation Error Details -->


"Errors": {
. . .
}
}

HTTP Status Codes

HTTP status codes are reported back in the Response JSON. Below is how the HTTP status codes are grouped:

S No.CodeStatusDescription
1200OkSuccessful API call
2300Multi-StatusMultiple statuses are available for the request.
3400BadRequestA validation error has occurred.
4401UnauthorizedInvalid authorization credentials.
5402CreditsNotSufficientThe Credit in your account is not sufficient to transmit all requested records.
6404NotFoundThe resource you have specified cannot be found.
7405MethodNotAllowedTarget resource doesn't support this method.
8429RequestLimitExceededThe API rate limit for your organisation/application has been exceeded
9500InternalServerErrorAn unhandled error with this API call. Contact the API team if problems persist
10503NotAvailableAPI is currently unavailable – typically due to a scheduled outage – try again soon
<<-- HTTP Status Code Fields -->
{
"StatusCode": 200,
"StatusName": "Ok",
"StatusMessage": "Successful API call",
}

Data validation errors

Before processing the individual records, our API subjects the data to some mandatory data validation checks, and errors observed will be reported under the object “Errors”.

"Errors": 
{
<<-- Error on an incorrect TIN format -->
{
"Id": "F00-100088",
"Name": "Business.EINorSSN",
"Message": "Enter a valid EINorSSN"
}
}

Business validation errors

To process the individual records, the data is subjected to business validation checks, and errors observed will be reported under the object “ErrorRecords”.

<<-- Collection of Business Validation Error -->
"ErrorRecords": {
<<-- Business Validation Errors on Record with Sequence 8 -->

"RecordId": "0e6b053a-3e67-4559-a09f-5631bd06f5e9",
"Sequence": "8",
"Errors":
{

<<-- Error on Recipient First Name required -->

"Id": "F00-100239",
"Name": "Recipient.FirstPayeeNm",
"Message": "FirstPayeeNm is required",
}
},