Scoped Query Filters

1. URL Pattern

To apply filters, use the following syntax:
?filter[entity]=key:value1,value2;key2:value

Delimiter Rules:

  • : (Colon): Connects a filter key to its values.
  • , (Comma): Separates multiple values for the same key (Logical OR).
  • ; (Semicolon): Separates different filter keys (Logical AND).

2. Detailed Example

Query:
?filter[odds]=bookmakers:2;markets:1,2,3,6,203;is_live:0

Breakdown:

  • Entity: odds
  • Filter 1: bookmakers is set to 2.
  • Filter 2: markets includes IDs 1, 2, 3, 6, and 203.
  • Filter 3: is_live is set to 0 (False).

Logical Interpretation:

  • Odds must satisfy all of the following:
    • Belong to bookmaker 2.
    • Be in markets 1, 2, 3, 6, or 203.
    • Be not live (inPlay) (is_live=0).