Job Photos
The Job Photo object represents a photo associated with a job in your Custom Trades CRM account.
Endpoints
The Job Photo object
Attributes
uuidstringUnique identifier for the photo
job_uuidUUIDJob UUID (required)
user_idUUIDUser ID who uploaded the photo
photo_urlstringURL to the photo file
photo_typestringType: 'before', 'during', 'after'
file_namestring |nullOriginal file name
file_sizenumber |nullFile size in bytes
mime_typestring |nullMIME type (e.g., 'image/jpeg')
taken_atstring |nullTimestamp when photo was taken (ISO format)
customer_email_sentbooleanWhether photo was sent to customer via email
created_atstringISO timestamp of creation
updated_atstringISO timestamp of last update
deleted_atstring |nullISO timestamp of soft deletion (null if not deleted)
THE JOB PHOTO OBJECT
{ "uuid": "123e4567-e89b-12d3-a456-426614174000", "photo_url": "https://...", "photo_type": "before", "taken_at": "2025-01-15T10:00:00Z", "user": { "id": "...", "first_name": "John", "last_name": "Doe" }}List photos for a job
Returns a paginated list of photos for a specific job.
Parameters
photo_type(string)Filter by type ('before', 'during', 'after')
include_deleted(boolean, default: false)requiredInclude soft-deleted photos
page(number, default: 1)requiredPage number
limit(number, default: 50, max: 100)requiredItems per page
curl -G \ https://customtradescrm.com/api/v1/jobs/123e4567-e89b-12d3-a456-426614174000/photos \ -H "Authorization: Bearer ctc_live_..."Response
{ "success": true, "data": { "photos": [ { "uuid": "123e4567-e89b-12d3-a456-426614174000", "photo_url": "https://...", "photo_type": "before", "taken_at": "2025-01-15T10:00:00Z", "user": { "id": "...", "first_name": "John", "last_name": "Doe" } } ], "pagination": { "page": 1, "limit": 50, "total": 1, "total_pages": 1 } }}Get a photo
Returns a specific photo by UUID.
curl -G \ https://customtradescrm.com/api/v1/jobs/123e4567-e89b-12d3-a456-426614174000/photos/123e4567-e89b-12d3-a456-426614174001 \ -H "Authorization: Bearer ctc_live_..."Upload photos
Uploads one or more photos for a job. Uses `multipart/form-data` format. **Request (FormData):**
curl -X POST \ https://customtradescrm.com/api/v1/jobs/123e4567-e89b-12d3-a456-426614174000/photos \ -H "Authorization: Bearer ctc_live_..."Response
{ "success": true, "data": { "photos": [ { "uuid": "123e4567-e89b-12d3-a456-426614174001", "photo_url": "https://...", "photo_type": "before", "taken_at": "2025-01-15T10:00:00Z", "created_at": "2025-01-15T10:00:00Z" } ] }}Delete a photo
Soft deletes a photo (sets `deleted_at` timestamp). **The file is NOT deleted from storage** - this preserves historical records and compliance requirements.
Error codes
| HTTP status code | Description |
|---|---|
| 200 | Success |
| 400 | Validation error (invalid file type, file too large, invalid photo_type) |
| 401 | Unauthorized (invalid API key) |
| 403 | Forbidden (add-on required, IP restriction, or usage limit exceeded) |
| 404 | Job or photo not found |
| 500 | Server error |
curl -X DELETE \ https://customtradescrm.com/api/v1/jobs/123e4567-e89b-12d3-a456-426614174000/photos/123e4567-e89b-12d3-a456-426614174001 \ -H "Authorization: Bearer ctc_live_..."Response
{ "success": true, "data": { "message": "Photo deleted successfully" }}