Skip to main content
PATCH
/
services
/
{id}
Patch a barber's service
curl --request PATCH \
  --url https://api.guile.app/services/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/merge-patch+json' \
  --data '
{
  "name": "Skin Fade",
  "duration": "PT30M",
  "cost": "45.00",
  "addOn": {
    "duration": "PT30M",
    "cost": "45.00"
  },
  "bundledAddOns": [
    {
      "id": "service-123",
      "name": "Beard Trim"
    }
  ],
  "visibility": "visible",
  "categories": [
    {
      "id": "afada02b-e9fe",
      "name": "Shaving"
    }
  ],
  "description": "Expertly transitioned fade with optional designs on the side."
}
'
{
  "name": "Skin Fade",
  "bundledAddOns": [
    {
      "id": "service-123",
      "name": "Beard Trim"
    }
  ],
  "visibility": "visible",
  "categories": [
    {
      "id": "afada02b-e9fe",
      "name": "Shaving"
    }
  ],
  "description": "Expertly transitioned fade with optional designs on the side.",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "duration": "PT30M",
  "cost": "45.00",
  "addOn": {
    "duration": "PT30M",
    "cost": "45.00"
  }
}

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

Representation used to patch a barber service using the JSON Merge Patch format and processing rules.

A service can be configured as a base service, add-on, or bundle. When configured as a bundle, the service cannot be configured as an add-on or included in another bundle.

Services that are not bundles and have configurations for being used as a base service, an add-on, or both.

When a service is updated, references to the service on existing appointments are not changed. However, any changes made by the customer to the appointment result in the service updates being applied to the appointment.

name
string | null

The display name for this service.

Example:

"Skin Fade"

duration
string<duration> | null

The duration of the service.

Example:

"PT30M"

cost
string<decimal>

The cost of the service, excluding any fees or taxes. A monetary amount in the lowest denomination for the given currency. The numeric value is represented as a string so that it can be exact with no loss of precision.

Example:

"45.00"

addOn
object

If set, the configuration for this service when used as an add-on. Composable fields for service configuration.

bundledAddOns
object[] | null

Additional add-on services included in this service bundle.

Example:
[
{ "id": "service-123", "name": "Beard Trim" }
]
visibility
enum<string>

The visibility of the service. Hidden services are not visible to customers.

Available options:
visible,
hidden
categories
object[] | null

The categories for this service.

Example:
[
{ "id": "afada02b-e9fe", "name": "Shaving" }
]
description
string | null

The description of this service.

Maximum string length: 500
Example:

"Expertly transitioned fade with optional designs on the side."

Response

Ok. The operation succeeded.

Representation of a service performed by a barber.

name
string
required

The display name for this service.

Example:

"Skin Fade"

bundledAddOns
object[]
required

Additional add-on services included in this service bundle.

Example:
[
{ "id": "service-123", "name": "Beard Trim" }
]
visibility
enum<string>
required

The visibility of the service. Hidden services are not visible to customers.

Available options:
visible,
hidden
categories
object[]
required

The categories for this service.

Example:
[
{ "id": "afada02b-e9fe", "name": "Shaving" }
]
description
string
required

The description of this service.

Maximum string length: 500
Example:

"Expertly transitioned fade with optional designs on the side."

id
string<uuid>
required

The unique identifier for this service.

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.

duration
string<duration>

The duration of the service.

Example:

"PT30M"

cost
string<decimal>

The cost of the service, excluding any fees or taxes.

Example:

"45.00"

addOn
object

If set, the configuration for this service when used as an add-on.