Job Photos

The Job Photo object represents a photo associated with a job in your Custom Trades CRM account.

View as Markdown

Endpoints

GET/api/v1/jobs/{job_uuid}/photos
GET/api/v1/jobs/{job_uuid}/photos/{photo_uuid}
POST/api/v1/jobs/{job_uuid}/photos
DELETE/api/v1/jobs/{job_uuid}/photos/{photo_uuid}

The Job Photo object

Attributes

uuidstring

Unique identifier for the photo

job_uuidUUID

Job UUID (required)

user_idUUID

User ID who uploaded the photo

photo_urlstring

URL to the photo file

photo_typestring

Type: 'before', 'during', 'after'

file_namestring |null

Original file name

file_sizenumber |null

File size in bytes

mime_typestring |null

MIME type (e.g., 'image/jpeg')

taken_atstring |null

Timestamp when photo was taken (ISO format)

customer_email_sentboolean

Whether photo was sent to customer via email

created_atstring

ISO timestamp of creation

updated_atstring

ISO timestamp of last update

deleted_atstring |null

ISO timestamp of soft deletion (null if not deleted)

View as Markdown

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)required

Include soft-deleted photos

page(number, default: 1)required

Page number

limit(number, default: 50, max: 100)required

Items per page

GET/api/v1/jobs/{job_uuid}/photos
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.

GET/api/v1/jobs/{job_uuid}/photos/{photo_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):**

POST/api/v1/jobs/{job_uuid}/photos
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 codeDescription
200Success
400Validation error (invalid file type, file too large, invalid photo_type)
401Unauthorized (invalid API key)
403Forbidden (add-on required, IP restriction, or usage limit exceeded)
404Job or photo not found
500Server error
DELETE/api/v1/jobs/{job_uuid}/photos/{photo_uuid}
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"
}
}