Upload and manage photos on the Guile platform with assignment to services, shops, and barber profiles
The Photos API provides a comprehensive photo management system for the Guile platform. Photos follow a two-phase workflow: upload first, then assign to resources after approval.
All photos go through a structured review process before they can be used. When you upload a photo, it starts with a state of uploaded or inReview. The platform reviews photos for content appropriateness, and only approved photos can be assigned to resources.This separation ensures content quality while allowing the same photo to be reused across multiple resources.
Photos progress through four possible states:Uploaded - Photo has been successfully uploaded and is queued for review. In Review - Photo is currently being reviewed by the platform. Approved - Photo has passed review and can be assigned to resources. Rejected - Photo did not meet platform guidelines and cannot be assigned.You can filter photos by state when listing them to see photos in specific stages of the workflow.
Services can have multiple photos to showcase the work. Each photo assignment includes a sortOrder to control display sequence. Use the service photo operations to manage these assignments.
Shops support two types of photo assignments:Portfolio Photos showcase the shop’s work and environment. Like service photos, these use sortOrder for display control. Profile Photo represents the shop with a single primary image that appears in listings and profiles.
Barbers also support both portfolio and profile photos:Portfolio Photos display the barber’s work samples and can include multiple photos with sort ordering. Profile Photo serves as the barber’s primary image for their professional profile.
Photos cannot be deleted while they’re assigned to any resource. The API returns a photoAssigned error in these cases. You must first remove all assignments before deletion is allowed.This protection prevents broken references and ensures resources always have their assigned photos available.
Common photo operation failures include:Photo Not Approved - Attempting to assign a photo that hasn’t reached approved state returns a photoNotApproved error. Wait for review completion before assignment.Photo Assigned - Trying to delete a photo that’s currently assigned returns a photoAssigned error. Remove all assignments first.Request Entity Too Large - Photo files exceeding size limits return a requestEntityTooLarge error. Compress or resize the image before upload.
Upload Early: Upload photos as soon as available to allow time for the review process
Check States: Use the state filter to monitor photo approval progress
Plan Assignments: Consider which resources will use each photo before upload
Organize with Sort Orders: Use meaningful sort orders to control photo display sequence
Clean Up Unused Photos: Regularly review and delete photos that won’t be assigned
The Photos API integrates seamlessly with the broader Guile platform, supporting the visual aspects of service marketing and professional presentation.