Quick Start Example
Create a Basic Inspection
To create an inspection, send a POST request to https://vision-api.truepic.com/v3/inspections with your access token as a Bearer token in the Authorization header and a JSON payload specifying the inspection details.
Quick Start Example
curl --request POST \
--url https://vision-api.truepic.com/v3/inspections \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"team_id": 123,
"inspection_type_id": 123456,
"customer_first_name": "Philip",
"customer_last_name": "Graham",
"custom_field_values": ["abc123"],
"send_methods": {
"text": true,
"email": false
},
"customer_phone_number": "5555555555",
"include_list": true
}'Required Fields
All inspections must include these fields:
Team and Inspection Configuration
team_id- Determines the team for this inspection. Teams control customer-facing branding, sender phone numbers, and other configuration settings.inspection_type_id- Controls the type of inspection being sent. Inspection types determine custom fields, lists, message templates, alerts, and available outcomes. Find these in Vision Dashboard under Settings > Inspection Types.
Customer Information
customer_first_nameandcustomer_last_name- Customer's name for the inspection.- Alternative: Use
customer_nameif your inspection type hasuse_single_name_fieldset totrue.
- Alternative: Use
Custom Data
custom_field_values- Array of values corresponding to the custom fields configured on your inspection type. All inspection types require at least one custom field, so this array must contain at least one value.
Delivery Method
send_methods- Object specifying how to deliver the inspection:{ "text": true, // Send via SMS "email": false // Send via email }
Contact Information (Conditional)
customer_phone_number- Required ifsend_methods.textistrue. Phone number for SMS delivery.customer_email_address- Required ifsend_methods.emailistrue. Email address for email delivery.
List Configuration
include_list- Must be set totrueany time you want a list included in your inspection, whether you're using the default list from your inspection type or providing a custom list via thelistproperty.
Custom Lists (Advanced)
Lists define the photos, videos, and questions customers must provide during an inspection. You must always set include_list: true when you want a list included. By default, this uses the list configured for your inspection type. If you require a different list for each inspection, set include_list: true and provide a list property in your request to override the default. For a very basic list that might look something like this:
{
"list": {
"items": [
{
"type": "PHOTO",
"name": "2019 Ford Focus (VIN: KNAHG8A80B7339463)",
"is_required": true,
"capture_max": 1
},
{
"type": "PHOTO",
"name": "2012 Toyota Camry (VIN: 4T9BMBEBD939161X)",
"is_required": true,
"capture_max": 1
}
]
}
}As a list grows they can get quite complex. If you do need a custom list, the best way to create that is to create a template list on the Dashboard under Settings > Lists. Then, send a GET request to /v3/lists/{list_id} to retrieve the list structure, modify the retrieved payload as needed and then include the modified payload under the list property in your inspection request
Additional Configuration Options
Many optional fields are available for advanced use cases. See the full API reference: Inspections > Create a new inspection request
Updated about 1 month ago
