gokart-logo-v2
GoKart - Documentation
General Schemas

icon picker
Response Data

Liubomyr Maievskyi
The GoKart API uses structured response models to provide consistent and meaningful feedback to API clients. These response models encapsulate common properties such as unique response IDs, success status, response titles, response types, and any associated messages. Additionally, they support the inclusion of data payloads when needed.

ResponseResult Model

The ResponseResult model serves as the base for all API responses, encapsulating common properties.

Properties

responseId (string): Unique identifier for the response, automatically generated.
isSuccessful (boolean): Indicates whether the response represents a successful operation.
responseTitle (string): Human-readable title of the response, derived from the response type.
responseType (string): Type of response, used to determine the success status and title.
messages (array of strings): List of messages associated with the response, which can include error messages or other relevant information.

Example JSON Response

{
"responseId": "442c1dfd-9039-4b1a-b94d-082c2db39ecd",
"isSuccessful": true,
"responseTitle": "Success",
"responseType": "Success",
"messages": []
}

ResponseResult with Data

The ResponseResult model includes also a typed data payload when it needed, making it versatile for various types of responses that include data.

Properties

data (object): The data payload of the response, which can be any type specified.

Example JSON Response with Data

{
"responseId": "442c1dfd-9039-4b1a-b94d-082c2db39ecd",
"isSuccessful": true,
"responseTitle": "Success",
"responseType": "Success",
"messages": [],
"data": {
"offers": {
"indexFrom": 0,
"pageIndex": 0,
"pageSize": 10,
"totalCount": 12,
"totalPages": 2,
"items": [
{
"id": "6ad57ffe-3eda-404c-9c7c-1bd466a18886",
"name": "Credit Strong",
"headline": "Start your credit repair today!",
"shortDescription": "Sign up and earn 5000 coins today!",
"keyPoints": "<ul>\n<li>Create an account</li>\n<li>Sign up for a membership</li>\n<li>Collect your coins!</li>\n</ul>\n",
"offerDetails": "<p></p>\n",
"termsAndDisclaimers": "<p>CreditStrong is a division of Austin Capital Bank, an independent community bank and member of the FDIC. CreditStrong is a fintech product in and around the credit building space.</p>\n",
"creativeFileUrl": "https://gokartstorage.blob.core.windows.net/tenants/brightwheels/offers/6bd57ffe-3eda-404c-9c7c-1bd466a18886/creative.png",
"categoryName": "Fin-Tech",
"rewardPoints": 5000
}
],
"hasPreviousPage": false,
"hasNextPage": true
}
}
}

ResponseTypes Enumeration

The ResponseTypes enumeration defines the set of response types used to categorize the outcomes of operations within the application.

Enumeration Values

Success: Indicates that the operation was successful.
Failed: Indicates a general failure in the operation.
NotFoundError: Indicates that the requested resource was not found.
ValidationFailed: Indicates that validation failed for one or more of the provided parameters or inputs.
ServerError: Indicates an internal server error that prevented the operation from completing successfully.
ConflictError: Indicates a conflict with the current state of the target resource, such as duplicate entries.
UnprocessableEntity: Indicates that the server understood the request but refuses to authorize it.

Example Enumeration Usage

"responseType": "Success"
"responseType": "Failed"
"responseType": "NotFoundError"
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.