biterp

Search states by name and country filter

GET
/states/search
AuthorizationBearer <token>

In: header

Query Parameters

cursor?string

Opaque cursor from CursorPaginationDto.cursor. Use next_cursor or previous_cursor from the previous response.

limit?integer

Page size from CursorPaginationDto.limit.

Default20
Range1 <= value <= 100
search?string

Full-text search term from CursorPaginationDto.search.

with_deleted?boolean

Include soft-deleted records from CursorPaginationDto.with_deleted.

Defaultfalse
include_payload_search?boolean

Include payload JSON search from CursorPaginationDto.include_payload_search when supported by the endpoint.

Defaultfalse
sort?string

Sort expression from CursorPaginationDto.sort in the format field:order (for example created_at:desc).

id?number

Exact match for "id" (number)

id[neq]?number

Not equal filter for "id" (number)

id[gt]?number

Greater than filter for "id" (number)

id[gte]?number

Greater than or equal filter for "id" (number)

id[lt]?number

Less than filter for "id" (number)

id[lte]?number

Less than or equal filter for "id" (number)

country_id?number

Exact match for "country_id" (number)

country_id[neq]?number

Not equal filter for "country_id" (number)

country_id[gt]?number

Greater than filter for "country_id" (number)

country_id[gte]?number

Greater than or equal filter for "country_id" (number)

country_id[lt]?number

Less than filter for "country_id" (number)

country_id[lte]?number

Less than or equal filter for "country_id" (number)

state_code?string

Exact match for "state_code" (string)

state_code[neq]?string

Not equal filter for "state_code" (string)

state_code[contains]?string

Contains filter for "state_code"

state_code[not_contains]?string

Does not contain filter for "state_code"

country_code?string

Exact match for "country_code" (string)

country_code[neq]?string

Not equal filter for "country_code" (string)

country_code[contains]?string

Contains filter for "country_code"

country_code[not_contains]?string

Does not contain filter for "country_code"

name?string

Exact match for "name" (string)

name[neq]?string

Not equal filter for "name" (string)

name[contains]?string

Contains filter for "name"

name[not_contains]?string

Does not contain filter for "name"

is_blocked?boolean

Exact match for "is_blocked" (boolean)

is_blocked[neq]?boolean

Not equal filter for "is_blocked" (boolean)

display_order?number

Exact match for "display_order" (number)

display_order[neq]?number

Not equal filter for "display_order" (number)

display_order[gt]?number

Greater than filter for "display_order" (number)

display_order[gte]?number

Greater than or equal filter for "display_order" (number)

display_order[lt]?number

Less than filter for "display_order" (number)

display_order[lte]?number

Less than or equal filter for "display_order" (number)

created_at?string

Exact match for "created_at" (ISO 8601 datetime)

created_at[neq]?string

Not equal filter for "created_at" (ISO 8601 datetime)

created_at[gt]?string

Greater than filter for "created_at" (ISO 8601 datetime)

created_at[gte]?string

Greater than or equal filter for "created_at" (ISO 8601 datetime)

created_at[lt]?string

Less than filter for "created_at" (ISO 8601 datetime)

created_at[lte]?string

Less than or equal filter for "created_at" (ISO 8601 datetime)

updated_at?string

Exact match for "updated_at" (ISO 8601 datetime)

updated_at[neq]?string

Not equal filter for "updated_at" (ISO 8601 datetime)

updated_at[gt]?string

Greater than filter for "updated_at" (ISO 8601 datetime)

updated_at[gte]?string

Greater than or equal filter for "updated_at" (ISO 8601 datetime)

updated_at[lt]?string

Less than filter for "updated_at" (ISO 8601 datetime)

updated_at[lte]?string

Less than or equal filter for "updated_at" (ISO 8601 datetime)

q*unknown

Search term (accent-insensitive FTS)

country_iso3?unknown

Country ISO3 code (3 letters)

country_iso2?unknown

Country ISO2 code (2 letters)

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://api.biterp.ai/states/search"
{
  "data": [
    {
      "id": 0,
      "country_id": 0,
      "state_code": "string",
      "country_code": "string",
      "name": "string",
      "latitude": "-23.55052000",
      "longitude": "-46.63331000",
      "is_blocked": true,
      "display_order": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "metadata": [
        {
          "id": 0,
          "metadata_type": "string",
          "metadata_value": "string",
          "description": "string"
        }
      ]
    }
  ],
  "pagination": {
    "limit": 0,
    "has_next_page": true,
    "has_previous_page": true,
    "current_query_cursor": "string",
    "current_page_cursor": "string",
    "next_cursor": "string",
    "previous_cursor": "string"
  },
  "meta": {
    "filters": {},
    "search": "string",
    "sort": {
      "field": "string",
      "order": "asc"
    }
  }
}
{
  "statusCode": 404,
  "message": "Customer not found",
  "error": "Not Found",
  "code": "CUSTOMER_NOT_FOUND"
}
{
  "statusCode": 404,
  "message": "Customer not found",
  "error": "Not Found",
  "code": "CUSTOMER_NOT_FOUND"
}
{
  "statusCode": 404,
  "message": "Customer not found",
  "error": "Not Found",
  "code": "CUSTOMER_NOT_FOUND"
}