Skip to main content
POST
/
barbers
/
{id}
/
photos
Upload a barber profile photo
curl --request POST \
  --url https://api.guile.app/barbers/{id}/photos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "encodedContent": "VGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUsIG5vdCBhY3R1YWxseSBmaWxlIGNvbnRlbnQu"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "contentType": "image/gif",
  "binarySize": 123,
  "dimensions": {
    "width": 2,
    "height": 2
  },
  "url": "<string>",
  "state": "uploaded",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "thumbnail_URL": "<string>"
}

Path Parameters

id
string<uuid>
required

The unique, opaque system identifier for a resource. This case-sensitive ID is also used as path parameters in URLs or in other properties or parameters that reference a resource by ID rather than URL.

Body

application/json

Request to upload a service photo.

encodedContent
file
required

Base64 encoded photo binary data.

Example:

"VGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUsIG5vdCBhY3R1YWxseSBmaWxlIGNvbnRlbnQu"

Response

Created.

An uploaded photo on the Guile Platform.

id
string<uuid>
required

The unique identifier for the photo.

contentType
enum<string>
required

The content type of the photo.

Available options:
image/gif,
image/jpg,
image/jpeg,
image/png,
image/webp
binarySize
integer<int64>
required

The size of the photo in bytes.

dimensions
object
required

The dimensions of the photo.

url
string<uri>
required

The URL to access the photo.

Maximum string length: 1024
state
enum<string>
required

The current state of the photo.

Available options:
uploaded,
inReview,
approved,
rejected
createdAt
string<date-time>
required

The date-time when this resource was created, in RFC 3339 date-time YYYY-MM-DDThh:mm:ss.sssZ format, UTC. This is derived and immutable.

updatedAt
string<date-time>
required

The date-time when this resource was updated, in RFC 3339 date-time YYYY-MM-DDThh:mm:ss.sssZ format, UTC. This is derived and immutable.

thumbnail_URL
string<uri>

The thumbnail URL to access the photo, if available.

Maximum string length: 1024