Skip to main content
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.

Photo Workflow

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.

Photo States

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.

Resource Assignment

Once approved, photos can be assigned to different types of resources:

Service Photos

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.

Shop Photos

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.

Barber Photos

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.

Photo Reusability

The same approved photo can be assigned to multiple resources simultaneously. For example, a photo of excellent barbering work could be assigned to:
  • The specific service it demonstrates
  • The barber’s portfolio who performed the work
  • The shop’s portfolio where it was performed
This flexibility reduces storage needs while maximizing the value of quality photos.

Deletion Protection

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.

Error Handling

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.

Best Practices

  1. Upload Early: Upload photos as soon as available to allow time for the review process
  2. Check States: Use the state filter to monitor photo approval progress
  3. Plan Assignments: Consider which resources will use each photo before upload
  4. Organize with Sort Orders: Use meaningful sort orders to control photo display sequence
  5. 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.