Skip to main content
PATCH
/
barbers
/
{barberId}
/
photos
/
{photoId}
/
metadata
Update barber portfolio photo metadata
curl --request PATCH \
  --url https://api.guile.app/barbers/{barberId}/photos/{photoId}/metadata \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/merge-patch+json' \
  --data '
{
  "metadata": {
    "service": {
      "id": "<string>",
      "name": "<string>",
      "cost": "456.78",
      "duration": "<string>"
    },
    "addOns": [
      {
        "id": "<string>",
        "name": "<string>",
        "cost": "456.78",
        "duration": "<string>"
      }
    ]
  }
}
'
{
  "id": "<string>",
  "photo": {
    "id": "<string>",
    "binarySize": 123,
    "dimensions": {
      "width": 2,
      "height": 2
    },
    "url": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "thumbnail_URL": "<string>",
    "rejectionReason": "<string>"
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "sortOrder": 1,
  "metadata": {
    "service": {
      "id": "<string>",
      "name": "<string>",
      "cost": "456.78",
      "duration": "<string>"
    },
    "addOns": [
      {
        "id": "<string>",
        "name": "<string>",
        "cost": "456.78",
        "duration": "<string>"
      }
    ]
  }
}

Path Parameters

barberId
string
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.

photoId
string
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/merge-patch+json

Patch body for barber portfolio photo metadata.

metadata
object

Metadata for this portfolio photo assignment.

Response

Ok. The operation succeeded.

A photo assignment to a resource.

id
string
required

The unique identifier for this photo assignment.

photo
object
required

The photo that is assigned.

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.

sortOrder
integer<int32>

The sort order for this photo. Lower numbers appear first. Omitted for single photo assignments.

Required range: x >= 0
metadata
object

Metadata for this assignment when the photo is part of a barber's portfolio.