🌐
Recrubo API
  • Getting Started
    • Introduction
    • Sandbox
    • Async requests
    • Authentication
    • Webhooks
    • Filtering, sorting, pagination and including resources
  • Guides
    • Setting up webhooks
    • Generating flows
    • Editing flows
    • Triggering flows
    • Embedding the Inbox
    • Sending messages
  • Resources
    • API Resource Reference
      • Candidate
      • Conversation
      • Flow
      • FlowRun
      • FlowGeneration
      • Message
      • MessageTemplate
      • MessageThread
      • NodeAction
      • NodeTransition
      • Node
      • VacancyAnalysis
      • Vacancy
      • User
      • WebhookPayload
    • Embeddables
      • Inbox
      • BotStudio
      • GenerateFlow
      • Whatsapp connect button
      • Schedule Form
      • Schedule Table
    • Flow types
      • vacancy_application_flow
  • Management
    • Organizations
Powered by GitBook
On this page
  • Filtering
  • Examples
  • Sorting
  • Pagination
  • Including
  1. Getting Started

Filtering, sorting, pagination and including resources

PreviousWebhooksNextSetting up webhooks

Last updated 1 year ago

Filtering, sorting and including resources adheres to the

Filtering

You can filter the result set by adding the filter query parameter to the URL.

For example, to filter flow runs by status, you could use: GET /flow-runs?filter[status]=finished

To filter flow runs by status and messageThreadId, you could use: GET /flow-runs?filter[status]=finished&filter[messageThreadId]=7135853f-26ac-4a65-9044-cab092806249

Note that the API will return all resources that match all provided filter criteria.

Filtering supports not only exact match but also other operators:

Available operators are:

  • eq - Equal to (case-sensitive)

  • eql - Equal to (case-insensitive)

  • prefix - Starts with

  • suffix - Ends with

  • gt - Greater than

  • gte - Greater than or equal to

  • lt - Less than

  • lte - Less than or equal to

  • match - In a list of values

Examples

To filter records which field value is in a list of values. Use GET /messages?filter[delivery_status]=sent,accepted. Or GET /messages?filter[delivery_status][match]=sent,accepted.

To filter records which created_at field value is greater than specified date, use GET /messages?filter[created_at][gt]=2022-02-05.

Sorting

Use the sort query parameter to specify your desired order of results.

For example to order messages by when they were created, you might want to use:

GET /messages?sort=createdAt

For example to order messages by when they were created in descending order, you could use:

GET /messages?sort=-createdAt

Pagination

Use the page query parameter to specify the desired page size and number. By default the page size is set to 25 and you will always receive the first page. The maximum page size is locked at 200 rows.

For example to replicate the default pagination you would use:

GET /messages?&page[size]=25&page[number]=1

Including

In some cases, you may want to include associated resources in your results. Let's say you have a relationship between messages and threads, and you want to include related threads within each returned message. You can use:

GET /messages?include=messageThreads
JSON:API specification