Response Types
When making a request to the Kapsul API, you can expect the following types of responses:
Response - OK
If the request is successful, the response will have the following structure:
{
"code": <responseStatus>,
"requestId": <requestId>,
"clientMessage": "<client message>",
"data": <response data>
}
- code: Indicates the status of the response.
- requestId: A unique identifier for the request.
- clientMessage: A message intended for the client.
- data: The actual data returned by the API.
Response - Error
If there is an error, the response will be structured as follows:
{
"code": <responseStatus>,
"requestId": <requestId>,
"clientMessage": "<client message>",
"error": "<error message>"
}
- code: Indicates the status of the response.
- requestId: A unique identifier for the request.
- clientMessage: A message intended for the client.
- error: Details about the error that occurred