The 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 may be handled at the client’s end. There are three components in error handling as outlined below.
Error Structure
{
    "StatusCode": 200,
    "StatusName": "Ok",
    "StatusMessage": "Successful API call",
    "SubmissionId": "6a30078c-7e5f-4db0-862a-d5e1266363f0",
    "FormRecords": {
        SuccessRecords": {
        . . .
    },
    "ErrorRecords": {
        . . .
    },
    "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. |
Code |
Status |
Description |
1 |
200 |
Ok |
Successful API call |
2 |
300 |
Multi-Status |
Multiple statuses are available for the request.
|
3 |
400 |
BadRequest |
A validation error has occurred.
|
4 |
401 |
Unauthorized |
Invalid authorization credentials.
|
5 |
402 |
CreditsNotSufficient |
The Credit in your account is not sufficient to transmit all requested records
|
6 |
404 |
NotFound
|
The resource you have specified cannot be found
|
7 |
405 |
MethodNotAllowed |
The Credit in your account is not sufficient to transmit all requested records
|
8 |
429 |
RequestLimitExceeded
|
The API rate limit for your organisation/application has been exceeded
|
9 |
500 |
InternalServerError |
An unhandled error with this API call. Contact the API team if problems persist
|
10 |
503 |
NotAvailable |
API is currently unavailable – typically due to a scheduled outage – try again soon
|
{
    "StatusCode": 200,
    "StatusName": "Ok",
    "StatusMessage": "Successful API call",
}
Data validation errors
Before processing the individual records, the API subjects the data to some mandatory data validation checks, and errors observed will be reported under the object “Errors”.
"Errors": {
    {
        "Code": "ERR-EIN-02",
        "Name": "EIN",
        "Message": "Invalid EIN/SSN. Should be numeric in the format: 999999999.",
        "Type": "Error"
    }
}
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”.
"ErrorRecords": {
   
    "RecordId": "0e6b053a-3e67-4559-a09f-5631bd06f5e9",
    "Sequence": "8",
    "Errors":
    {
       
        "Code": "ERR-FNAME-01",
        "Name": "Recipient First Name",
        "Message": "Recipient's First Name is required",
        "Type": "Error"
    }
},