Skip to main content
POST
/
services
/
{serviceId}
/
photos
Assign a photo to a service
curl --request POST \
  --url https://api.guile.app/services/{serviceId}/photos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "photoId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "sortOrder": 1
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "photo": {
    "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>"
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "sortOrder": 1
}

Path Parameters

serviceId
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 assign a photo to a resource with a sort order.

photoId
string<uuid>
required

The ID of the photo to assign. The photo must have state 'approved'.

sortOrder
integer<int32>
required

The sort order for this photo. Lower numbers appear first.

Required range: x >= 0

Response

Created.

A photo assignment to a resource.

id
string<uuid>
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