Find Inspections

Search, filter, sort, and paginate inspections with query string parameters on GET /v3/inspections.

Use GET /v3/inspections to search, filter, sort, and paginate inspections in your organization.

Every search is done through the query string. Use filter[q][=] for free-text search, filter[field][operator] for exact filters, sort[field]=asc|desc for ordering, and page[number] / page[size] for pagination. All of these are optional but can be combined in powerful ways to find the exact inspections that you need to fine.

Example

  1. Start with the inspections endpoint.

    GET https://vision-api.truepic.com/v3/inspections
  2. Add filter[q][=] when you want to search across several fields with one query.

    https://vision-api.truepic.com/v3/inspections?filter[q][=]=jane%20doe
  3. Add exact filters with filter[field][operator] when you know the field you want to match.

    https://vision-api.truepic.com/v3/inspections?filter[created_at][>=]=2023-06-01
  4. Add sorting and pagination to control the result order and page size.

    https://vision-api.truepic.com/v3/inspections?sort[created_at]=desc&page[number]=1&page[size]=25

You can combine free-text search, exact filters, sorting, and pagination in the same request.

Search

filter[q][=] is a free-text search parameter (a query that checks several inspection fields at once).

It can match:

  • customer_name
  • customer_first_name
  • customer_last_name
  • customer_email_address
  • address
  • custom_field_values
  • the beginning of the inspection ID
  • the customer phone number when your search term is numeric

Use these rules when building search queries:

  • Search is case-insensitive for text fields.
  • If you pass multiple terms, each term must match somewhere on the inspection.
  • Terms shorter than 2 characters are ignored.
  • For numeric terms, the query also attempts to match the customer phone number using the digits from your search value.
  • filter[q][=] accepts strings up to 100 characters.

Examples:

# Search by customer name
https://vision-api.truepic.com/v3/inspections?filter[q][=]=Jane%20Doe

# Search by email address
https://vision-api.truepic.com/v3/inspections?filter[q][=][email protected]

# Search by phone number
https://vision-api.truepic.com/v3/inspections?filter[q][=]=5551234567

# Search by inspection ID prefix
https://vision-api.truepic.com/v3/inspections?filter[q][=]=10234

Filter

Use exact filters when you want to narrow results to known IDs, dates, or custom field values.

ID, status, and custom field filters

ParameterOperatorsTypeNotes
filter[team_id][in][]inarray of team IDsOnly team IDs from your organization are allowed.
filter[organization_team][in][]inarray of team IDsAlias for team filtering.
filter[status][=]=integerMatch one inspection status ID.
filter[status][in][]inarray of integersMatch multiple inspection status IDs.
filter[member][in][]inarray of positive integersAlias for the member who created the inspection.
filter[created_by_member][in][]inarray of positive integersMatch the member who created the inspection.
filter[assigned_to_member][in][]inarray of positive integersMatch the assigned member.
filter[group_id][in][]inarray of positive integersMatch group IDs.
filter[inspection_type][in][]inarray of positive integersMatch inspection type IDs.
filter[outcome][=]=positive integerMatch one outcome ID.
filter[outcome][in][]inarray of positive integersMatch multiple outcome IDs.
filter[custom_field_1][=] through filter[custom_field_20][=]=string, max 255 charsExact match against that custom field. The comparison trims whitespace and ignores case.
filter[verification][in][]inarray of stringsMatch verification result values.
filter[photos][is] / filter[photos][is not]is, is notspecial filterFilter based on whether photo_uploaded_at is present.

For any in filter, repeat the query string key for each value:

https://vision-api.truepic.com/v3/inspections?filter[status][in][]=2&filter[status][in][]=3

Date filters

ParameterOperatorsTypeExample
filter[created_at][<], filter[created_at][<=], filter[created_at][>=], filter[created_at][>]<, <=, >=, >ISO 8601 date stringfilter[created_at][>=]=2023-06-01
filter[updated_at][<], filter[updated_at][<=], filter[updated_at][>=], filter[updated_at][>]<, <=, >=, >ISO 8601 date stringfilter[updated_at][>=]=2024-01-01
filter[scheduled_for][<], filter[scheduled_for][<=], filter[scheduled_for][>=], filter[scheduled_for][>]<, <=, >=, >ISO 8601 date stringfilter[scheduled_for][<]=2024-12-31

You can build ranges by combining the same field with multiple operators in one request:

https://vision-api.truepic.com/v3/inspections?filter[created_at][>=]=2024-01-01&filter[created_at][<]=2024-02-01

Sort

Use sort[field]=asc or sort[field]=desc to control the order of the results.

FieldSort parameter
Statussort[status]
Inspection typesort[inspection_type]
Creator membersort[member] or sort[created_by_member]
Assigned membersort[assigned_to_member]
Photossort[photos]
Verificationsort[verification]
Created atsort[created_at]
Scheduled forsort[scheduled_for]

If you do not pass a sort field, the endpoint defaults to created_at.

Paginate

ParameterTypeConstraintsExample
page[number]integerpage numberpage[number]=1
page[size]integermaximum 100page[size]=25

Common recipes

Find inspections created after a date

https://vision-api.truepic.com/v3/inspections?filter[created_at][>=]=2023-06-01

Find inspections created within a date range

https://vision-api.truepic.com/v3/inspections?filter[created_at][>=]=2024-01-01&filter[created_at][<]=2024-02-01

Search across customer and address fields

https://vision-api.truepic.com/v3/inspections?filter[q][=]=jane%20doe

Search by phone number

https://vision-api.truepic.com/v3/inspections?filter[q][=]=5551234567

Combine free-text search with team and status filters

https://vision-api.truepic.com/v3/inspections?filter[q][=]=smith&filter[team_id][in][]=12&filter[status][in][]=2&filter[status][in][]=3

Filter by an exact custom field value

https://vision-api.truepic.com/v3/inspections?filter[custom_field_3][=]=ABC-123

Find inspections assigned to a member and scheduled before a date

https://vision-api.truepic.com/v3/inspections?filter[assigned_to_member][in][]=42&filter[scheduled_for][<]=2024-12-31

Sort newest first and return 25 results from page 2

https://vision-api.truepic.com/v3/inspections?sort[created_at]=desc&page[number]=2&page[size]=25

Compare queries with the Vision Dashboard

We recommend comparing search results with the Vision Dashboard and watching how the URL changes as you apply filters. That is a quick way to understand which query string parameters to send from your integration. The dashboard uses the exact same filtering query string so if you utilize the dashboard to filter and search for the perfect view of the inspections you need to see, you can just copy the query string and use it with Vision API to do the same query and find the same inspections.

Vision Dashboard. Example of searching for inspections.

Vision Dashboard. Example of searching for inspections.

For the full endpoint details and to test queries interactively, see Inspections > Get a list of existing inspection requests.


What’s Next