gokart-logo-v2
GoKart - Documentation
General Schemas

icon picker
Filterting & Sorting

Liubomyr Maievskyi
This GoKart API supports flexible filtering and sorting options to help refine and order results based on your requirements.

Sorting:

orderby (string, query parameter):
Specifies the property by which the results should be sorted.
Example: ?orderby=createdAt will sort the results by the createdAt property.
order_asc (boolean, query parameter):
Determines the direction of the sorting.
Set to true for ascending order and false for descending order.
Example: ?orderby=createdAt&order_asc=true will sort the results by createdAt in ascending order.

Filtering:

General Structure

Filters are typically specified in the format filter.{FieldName}, where {FieldName} corresponds to the specific property you want to filter by. The field names are predefined based on the resource you are querying.

Supported Filter Types:

String Filtering:
Allows filtering by string fields such as names, descriptions, or statuses.
Example: ?filter.search=SpecialOffer filters results that match the given name.
UUID Filtering:
Filters based on unique identifiers like offer IDs, category IDs, etc.
Example: ?filter.categoryId=123e4567-e89b-12d3-a456-426614174000 filters results by a specific offer.
Enum Filtering:
Filters based on enum values, such as progress states or device types.
Example: ?filter.Progress=InProgress filters results based on their progress status.
Another Example: ?filter.webDeviceType=IOS filters results by the type of device.
Numeric or Date Filtering:
Allows filtering based on numeric or date fields (if applicable to the resource).
Example: ?filter.created_from=2024-01-01 filters results created from the specified date.

Multiple Filters:

You can apply multiple filters in a single query to narrow down results further.
Example: ?filter.Progress=InProgress&filter.categoryId=123e4567-e89b-12d3-a456-426614174000 filters results that are both in progress and belong to a specific category.
Request:
GET https://api.brownboots.getgokart.ai/api/v1/offer-wall/offer-details?offerId=3fa85f64-5717-4562-b3fc-2c963f66afa6&filter.webDeviceType=IOS&filter.search=5a4f6885-a0ab-4774-ae5e-af8eaa4991e2

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.