Sign UpLog In

Details of Responses

Our new version of APIs(v2) is callback-based APIs, So if you have not set up a callback URL till now, Please set it from brick dashboard.

Success Response

Sync Response

{
         "status": 202,
          data:{         
               "message": "We are processing your request and will send the data in the callback URL."
               “job_id”:”XXXX-XXXX-XXXX-XXXX”
          },
          metadata:{
               "source": {{API/Widget/Dashboard/SDK/Portal}}, 
               "entity": {{Data/Insight/Verification/Payment}}         
        },
        error: null, 
 }

Explantion of every field
status - HTTP/HTTPS status code
message- Text message
job_id - Unique transaction_id, It will help to map Async response
source - It defines from where APIs request is coming, It can be either one from API, Widget, Dashabord, SDK or Portal.
entity - It defines which product the APIs request is coming from, It can be either one from Data, Insight, Verification, or Payments.
error- Incase of success, Error will be null

Async Response

{
    "status": 200,
     "data": {
            "message": “We are successfully able to fetch data”,
            "example-1":"XXXX-XXXX-XXXX",
            "count":{{Number of objects}},
            "example-2"{[
                 "array1":1,
                 "example-3":"xx-xx-xx" 
                 ],[
                 "array2":1,
                 "example-4":"xx-xx-xx"
            ]}  
    },
    metadata:{
        "source": {{API/Widget/Dashboard/SDK/Portal}}, 
        "entity": {{Data/Insight/VErification/Payment}}         
   },
   error: null 
}

Explantion of every field
status - HTTP/HTTPS status code
message- Text message
data- Response data
source - It defines from where APIs request is coming, It can be either one from API, Widget, Dashabord, SDK or Portal.
entity - It defines which product the APIs request is coming from, It can be either one from Data, Insight, Verification, or Payments.
error - Incase of success, Error will be null

Error Response

Below is a structure of Unsuccessful responses.

{ 
           "status" : XXX,        
           “error”:{
                  "code": {{brick_unique_error_code}}, 
                  "message": {{description_of_error}}, 
                  "action": {{further_action}},
                  "reason": {{Actual_reason_for_error}}
          }, 
          “metadata”:{
                  "source": {{API/Widget/Dashboard/SDK/Portal}}, 
                  "entity": {{Auth/Insight/Verification/Payment}}
         },
         data:null 
 }

Explanation for every field

status - HTTP/HTTPS status code
code - Brick customized status code
message - Error message for showing to end-users
action- Further action to prevent this error
reason- Actual reason of the error
source - It defines from where APIs request is coming, It can be either one from API, Widget, Dashabord, SDK or Portal.
entity - It defines which product the APIs request is coming from, It can be either one from Data, Insight, Verification, or Payments.

📘

Below is a list of possible "code" that can be returned, along with a description and action.

Client Side Errors

TypeReasonStatus codeCode
Unauthorised/UnauthticateUsername & password in not correct(in Auth API)401missing_parameters_in_headers
Unauthorised/UnauthticatePublic token is invalid401invalid_parameters_in_headers
Unauthorised/UnauthticatePublic token is missing401missing_parameters_in_headers
Unauthorised/UnauthticatePublic token is expire401expired_parameters_in_headers
Unauthorised/UnauthticateUser access token is invalid401invalid_parameters_in_headers
Unauthorised/UnauthticateUser access token is missing401missing_parameters_in_headers
Unauthorised/UnauthticateUser access token is expire401expired_parameters_in_headers
Unauthorised/UnauthticateUnauthorised access to transaction401unauthorized_access
ForbiddenUser access token is not mapped with Public access token(Client)403client_not_authorized
Bad Request(Parameters is missing or Invalid)Parameter is missing in request(Either one or more parameters)400missing_parameters_in_request
Bad Request(Parameters is missing or Invalid)Parameters are not incorrect(If value is not correct)400wrong_parameters_in_request
Bad Request(Parameters is missing or Invalid)Parameters are not incorrect (If value is not valid)400invalid_parameters_in_request
Bad Request(Parameters is missing or Invalid)Parameters are not in correct format400incorrect_format_of_parameters_in_request
Bad Request(Parameters is missing or Invalid)Parameter are not in correct type(Wrong type of parameters) in request400incorrect_type_of_parameters_in_request
Bad Request(Parameters is missing or Invalid)Callback is not available400missing_callback_url
Bad Request(Parameters is missing or Invalid)Parameters is expired400expired_parameters_in_request
Unprocessable requestDormant user422inactive_user
Unprocessable requestConcurrent user/ Session is available is other device400session_available_in_other_device
Resource not availableNot authorised to complete the request404feature_not_available
Source is not authorisedRequest is not from whitelisted IP401ip_not_whitelisted
Rate limit exceededMore number of request than rate limit401rate_limit_exceeded
Method not allowedWrong method405method_not_allowed

Server Side Errors

TypeReasonStatus CodeCode
Service unavailableService unavailable (Brick)500service_unavailable
Service unavailableService unavailable (Institution level)500institution_not_available
Unexpected behaviourData can not retrieved500unexpected_behaviour
Unexpected behaviourInternal crash500unexpected_behaviour
Server unavailableServer unavailable500server_unavailable