> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guile.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Photos overview

> Upload photos, wait for approval, then assign them to services, shops, and barbers

Use the Photos API to upload images, wait for approval, then assign them to services, shops, and barber profiles. Upload first; assign only after the photo is approved.

## Workflow

When you [upload a photo](/api-reference/photos/upload-a-photo), it starts as `uploaded` or `inReview`. Guile reviews it for content. Only `approved` photos can be assigned.

```mermaid theme={null}
sequenceDiagram
 participant User
 participant API
 participant Review
 participant Resource

 User->>API: Upload photo
 API->>User: Photo (state: uploaded)
 API->>Review: Queue for review
 Review->>API: Approve photo
 User->>API: Assign to resource
 API->>Resource: Photo assignment created
```

That split keeps quality high and lets one approved photo serve many resources.

## States

Photos move through four states:

**Uploaded**: stored and queued for review. **In review**: under review. **Approved**: ready to assign. **Rejected**: failed guidelines and cannot be assigned.

[Filter by state](/api-reference/photos/list-photos) when you list photos so you can watch the queue.

## Assign to a resource

After approval, assign the photo:

### Service photos

A service can hold several photos. Each assignment has a `sortOrder` for display. Use the [service photo operations](/api-reference/photos/assign-a-photo-to-a-service) to manage them.

### Shop photos

**Portfolio photos** show the shop's work and space, with `sortOrder`. **Profile photo** is the single primary image in listings.

### Barber photos

Barbers get the same split: portfolio samples with sort order, and one profile photo for the professional card.

## Reuse one photo

One approved photo can sit on several resources at once, for example a service, the barber's portfolio, and the shop portfolio. That cuts duplicate uploads without losing coverage.

## Deletion protection

You cannot [delete a photo](/api-reference/photos/delete-a-photo) while it is assigned. That returns `photoAssigned`. Remove every assignment first.

## When a call fails

**Photo not approved**: assign before approval and you get `photoNotApproved`. Wait for `approved`.

**Photo assigned**: delete while assigned and you get `photoAssigned`. Unassign first.

**Request entity too large**: oversized files return `requestEntityTooLarge`. Compress or resize, then upload again.
