Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • equal or equals - the value is the same as the criteria (also used as an "in" operation when the criteria is an array)
  • notequal or notequals - the value is different than the criteria
  • lessthan - the value is less than (numerically or alphabetically)
  • lessthanorequal/lessthanorequals - the value is less or equal to the criteria
  • greaterthan - the value is more than (numerically or alphabetically)
  • greaterthanorequal or greaterthanorequals - the value is more than or equal to the criteria
  • contains/notcontain (string) - the value includes the provided string (e.g., smithe contains smith)
  • blank/notblank - does not have a value
  • radius - this is a special case for use with location/radius searches including animals, organizations and events.  See Radius searches below.
Info

If you want to filter by multiple values (for example, you want to retrieve all pets that are either Baby or Young), you can use the equals operation, and provide an array for the criteria.  So, animalGeneralAge equals array("Baby","Young").  An array in the criteria is handled similar to an "in" clause.

 

Criteria

The criteria for a filter should match the data/field type (see data types on the HTTP API field properties and data types page).

...

Some objects, including animals, organization and events, allow for a radius search.  For example, a radius search for animals could find adoptable animals that are within a certain number of miles of a specific zip/postal code.

Info

If you notice odd sorting issues (like the results don't seem to be sorting the way you requested), check the tool that you are using. Some tools, like Postman, seem to re-sort results for some reason. If you experience this issue be sure to check the raw results to see if they are sorting correctly.

The following is an example of filters that would search for organizations within 90 miles of the 90210 zip code:

...