Service Dog Standards Help

Trainers gallery

Endpoint

GET /api/v1/trainers/{trainer_id}/gallery

Request Headers

{ "X-API-Key": "your_tenant_api_key", "Authorization": "Bearer token here", "Content-Type": "application/json" }

Request Body

{}

Expected Response

{ "success": true, "message": "Data retrieved successfully", "data": { "id": 2, "full_name": "<trainers full name>", "email": "<trainers_email>", "gallery": [ { "id": 5, "url": "http://194.242.45.55:8040/storage/trainer_galleries/temp/01K5DTSFYDJDJ8G44Y7NQ5Z1BW.jpg", "title": null, "description": null, "size": null, "mime": null }, { "id": 4, "url": "http://194.242.45.55:8040/storage/trainer_galleries/2/1758195053_qOqDjBUwfd.webp", "title": "test title", "description": null, "size": 114509, "mime": "image/jpeg" } ] } }

Endpoint

POST /api/v1/trainers/{trainer_id}/gallery

Request Headers

{ "X-API-Key": "your_tenant_api_key", "Authorization": "Bearer token here", "Content-Type": "application/json" }

Request Body

The photos field is required. It must be an array of objects.

Each object may contain the following fields:

Field

Type

Required

Description

photo

file

Image file (jpeg, png, jpg, gif, webp). Max size: 4 MB.

title

string

Photo title (max 255 characters).

description

string

Optional description.

position

integer

Order number (0 to the configured gallery limit, e.g., 19).

Example Request (Postman / cURL)

curl --location --request POST 'http://194.242.45.55:8040/api/v1/trainers/2/gallery' \ --header 'X-API-Key: your_tenant_api_key' \ --header 'Authorization: Bearer token_here' \ --form 'photos[0][photo]=@"/path/to/photo1.jpg"' \ --form 'photos[0][title]="Dog training"' \ --form 'photos[0][description]="Photo during training"' \ --form 'photos[0][position]=0' \ --form 'photos[1][photo]=@"/path/to/photo2.png"' \ --form 'photos[1][title]="Portfolio"' \ --form 'photos[1][position]=1'

Expected Response

{ "success": true, "message": "Photos added successfully", "data": { "id": 2, "full_name": "<Trainer`s full name>", "email": "<trainer`s email>", "gallery": [ { "id": 4, "url": "http://194.242.45.55:8040/storage/trainer_galleries/2/1758195053_qOqDjBUwfd.webp", "title": "test title", "description": null, "size": 114509, "mime": "image/jpeg" } ] } }

Endpoint

PUT /api/v1/trainers/{trainer_id}/gallery/{photo_id}

Request Headers

{ "X-API-Key": "your_tenant_api_key", "Authorization": "Bearer token here", "Content-Type": "application/json" }

Request Body

The photo field is optional. It must be an object.

Object may contain the following fields:

Field

Type

Required

Description

photo

file

Image file (jpeg, png, jpg, gif, webp). Max size: 4 MB.

title

string

Photo title (max 255 characters).

description

string

Optional description.

position

integer

Order number (0 to the configured gallery limit, e.g., 19).

Example Request (Postman / cURL)

curl --location --request POST 'http://194.242.45.55:8040/api/v1/trainers/2/gallery/4' \ --header 'X-API-Key: your_tenant_api_key' \ --header 'Authorization: Bearer token_here' \ --form 'photo=@"/path/to/photo1.jpg"' \ --form 'title="Dog training"' \ --form 'description="Photo during training"' \ --form '_method="PUT"'

Expected Response

{ "success": true, "message": "Photos updated successfully", "data": { "id": 2, "full_name": "<Trainer`s full name>", "email": "<trainer`s email>", "gallery": [ { "id": 4, "url": "http://194.242.45.55:8040/storage/trainer_galleries/2/1758195053_qOqDjBUwfd.webp", "title": "Dog training", "description": "Photo during training", "size": 114509, "mime": "image/webp" } ] } }

Endpoint

DELETE /api/v1/trainers/{trainer_id}/gallery/{photo_id}

Request Headers

{ "X-API-Key": "your_tenant_api_key", "Authorization": "Bearer token here", "Content-Type": "application/json" }

Request Body

{}

Expected Response

{ "success": true, "message": "Photos deleted successfully", "data": { "id": 2, "full_name": "<Trainer`s full name>", "email": "<trainer`s email>", "gallery": [ { "id": 5, "url": "http://194.242.45.55:8040/storage/trainer_galleries/2/1758195053_qOqDjBUwfd.webp", "title": "Dog training", "description": "Photo during training", "size": 114509, "mime": "image/webp" } ] } }
18 September 2025