Create a barber service
The service is added to the catalog for this barber’s sole or primary joined location and assigned to this barber.
curl --request POST \
--url https://api.guile.app/barbers/{barberId}/catalogServices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Skin Fade",
"bundledAddOns": [
{
"id": "service-123",
"name": "Beard Trim"
}
],
"categories": [
{
"id": "afada02b-e9fe",
"name": "Shaving"
}
],
"description": "Expertly transitioned fade with optional designs on the side.",
"duration": "PT30M",
"cost": "45.00",
"ageRestrictions": {
"min": 18,
"max": 100
}
}
'import requests
url = "https://api.guile.app/barbers/{barberId}/catalogServices"
payload = {
"name": "Skin Fade",
"bundledAddOns": [
{
"id": "service-123",
"name": "Beard Trim"
}
],
"categories": [
{
"id": "afada02b-e9fe",
"name": "Shaving"
}
],
"description": "Expertly transitioned fade with optional designs on the side.",
"duration": "PT30M",
"cost": "45.00",
"ageRestrictions": {
"min": 18,
"max": 100
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Skin Fade',
bundledAddOns: [{id: 'service-123', name: 'Beard Trim'}],
categories: [{id: 'afada02b-e9fe', name: 'Shaving'}],
description: 'Expertly transitioned fade with optional designs on the side.',
duration: 'PT30M',
cost: '45.00',
ageRestrictions: {min: 18, max: 100}
})
};
fetch('https://api.guile.app/barbers/{barberId}/catalogServices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.guile.app/barbers/{barberId}/catalogServices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Skin Fade',
'bundledAddOns' => [
[
'id' => 'service-123',
'name' => 'Beard Trim'
]
],
'categories' => [
[
'id' => 'afada02b-e9fe',
'name' => 'Shaving'
]
],
'description' => 'Expertly transitioned fade with optional designs on the side.',
'duration' => 'PT30M',
'cost' => '45.00',
'ageRestrictions' => [
'min' => 18,
'max' => 100
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.guile.app/barbers/{barberId}/catalogServices"
payload := strings.NewReader("{\n \"name\": \"Skin Fade\",\n \"bundledAddOns\": [\n {\n \"id\": \"service-123\",\n \"name\": \"Beard Trim\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"afada02b-e9fe\",\n \"name\": \"Shaving\"\n }\n ],\n \"description\": \"Expertly transitioned fade with optional designs on the side.\",\n \"duration\": \"PT30M\",\n \"cost\": \"45.00\",\n \"ageRestrictions\": {\n \"min\": 18,\n \"max\": 100\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.guile.app/barbers/{barberId}/catalogServices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Skin Fade\",\n \"bundledAddOns\": [\n {\n \"id\": \"service-123\",\n \"name\": \"Beard Trim\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"afada02b-e9fe\",\n \"name\": \"Shaving\"\n }\n ],\n \"description\": \"Expertly transitioned fade with optional designs on the side.\",\n \"duration\": \"PT30M\",\n \"cost\": \"45.00\",\n \"ageRestrictions\": {\n \"min\": 18,\n \"max\": 100\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.guile.app/barbers/{barberId}/catalogServices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Skin Fade\",\n \"bundledAddOns\": [\n {\n \"id\": \"service-123\",\n \"name\": \"Beard Trim\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"afada02b-e9fe\",\n \"name\": \"Shaving\"\n }\n ],\n \"description\": \"Expertly transitioned fade with optional designs on the side.\",\n \"duration\": \"PT30M\",\n \"cost\": \"45.00\",\n \"ageRestrictions\": {\n \"min\": 18,\n \"max\": 100\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"barber": {
"id": "<string>",
"givenName": "<string>",
"surname": "<string>",
"preferredName": "<string>",
"biography": "<string>",
"spokenLanguages": [],
"experience": 50,
"instagram": "<string>",
"urlSlug": "<string>",
"profileImage_URL": "<string>"
},
"service": {
"name": "Skin Fade",
"bundledAddOns": [
{
"id": "service-123",
"name": "Beard Trim"
}
],
"categories": [
{
"id": "afada02b-e9fe",
"name": "Shaving"
}
],
"description": "Expertly transitioned fade with optional designs on the side.",
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"duration": "PT30M",
"cost": "45.00",
"addOn": {
"duration": "PT30M",
"cost": "45.00"
},
"ageRestrictions": {
"min": 18,
"max": 100
}
},
"availableForOffHours": false,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"cost": "45.00"
}{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {},
"recovery": {
"rateLimit": {
"limit": 123,
"remaining": 123,
"resetsAt": "2023-11-07T05:31:56Z"
}
},
"problems": [
{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {}
}
]
}{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {},
"recovery": {
"rateLimit": {
"limit": 123,
"remaining": 123,
"resetsAt": "2023-11-07T05:31:56Z"
}
},
"problems": [
{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {}
}
]
}{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {},
"recovery": {
"rateLimit": {
"limit": 123,
"remaining": 123,
"resetsAt": "2023-11-07T05:31:56Z"
}
},
"problems": [
{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {}
}
]
}{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {},
"recovery": {
"rateLimit": {
"limit": 123,
"remaining": 123,
"resetsAt": "2023-11-07T05:31:56Z"
}
},
"problems": [
{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {}
}
]
}{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {},
"recovery": {
"rateLimit": {
"limit": 123,
"remaining": 123,
"resetsAt": "2023-11-07T05:31:56Z"
}
},
"problems": [
{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {}
}
]
}{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {},
"recovery": {
"rateLimit": {
"limit": 123,
"remaining": 123,
"resetsAt": "2023-11-07T05:31:56Z"
}
},
"problems": [
{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {}
}
]
}Path Parameters
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
Properties for creating a new service for a barber.
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.
The display name for this service.
"Skin Fade"
The visibility of the service. Hidden services are not visible to customers.
visible, hidden Additional add-on services included in this service bundle.
Show child attributes
Show child attributes
[
{ "id": "service-123", "name": "Beard Trim" }
]
The categories for this service.
Show child attributes
Show child attributes
[
{ "id": "afada02b-e9fe", "name": "Shaving" }
]
The description of this service.
500"Expertly transitioned fade with optional designs on the side."
The duration of the service.
"PT30M"
The cost of the service, excluding any fees or taxes.
^-?(0|[1-9][0-9]*)\.[0-9][0-9]$"45.00"
If set, the configuration for this service when used as an add-on.
Show child attributes
Show child attributes
The age restrictions, if any, for this service.
Show child attributes
Show child attributes
Response
Created.
Representation of a service assigned to a barber.
The unique identifier for this barber service assignment.
The barber this service is assigned to.
Show child attributes
Show child attributes
The service that is assigned to the barber.
Show child attributes
Show child attributes
The visibility of the service for this barber. Hidden services are not visible to customers.
visible, hidden Whether this service is available for off-hours bookings. When false, the service cannot be booked during off-hours time slots.
The barber-specific cost override for the service, excluding any fees or taxes.
^-?(0|[1-9][0-9]*)\.[0-9][0-9]$"45.00"
Was this page helpful?
curl --request POST \
--url https://api.guile.app/barbers/{barberId}/catalogServices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Skin Fade",
"bundledAddOns": [
{
"id": "service-123",
"name": "Beard Trim"
}
],
"categories": [
{
"id": "afada02b-e9fe",
"name": "Shaving"
}
],
"description": "Expertly transitioned fade with optional designs on the side.",
"duration": "PT30M",
"cost": "45.00",
"ageRestrictions": {
"min": 18,
"max": 100
}
}
'import requests
url = "https://api.guile.app/barbers/{barberId}/catalogServices"
payload = {
"name": "Skin Fade",
"bundledAddOns": [
{
"id": "service-123",
"name": "Beard Trim"
}
],
"categories": [
{
"id": "afada02b-e9fe",
"name": "Shaving"
}
],
"description": "Expertly transitioned fade with optional designs on the side.",
"duration": "PT30M",
"cost": "45.00",
"ageRestrictions": {
"min": 18,
"max": 100
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Skin Fade',
bundledAddOns: [{id: 'service-123', name: 'Beard Trim'}],
categories: [{id: 'afada02b-e9fe', name: 'Shaving'}],
description: 'Expertly transitioned fade with optional designs on the side.',
duration: 'PT30M',
cost: '45.00',
ageRestrictions: {min: 18, max: 100}
})
};
fetch('https://api.guile.app/barbers/{barberId}/catalogServices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.guile.app/barbers/{barberId}/catalogServices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Skin Fade',
'bundledAddOns' => [
[
'id' => 'service-123',
'name' => 'Beard Trim'
]
],
'categories' => [
[
'id' => 'afada02b-e9fe',
'name' => 'Shaving'
]
],
'description' => 'Expertly transitioned fade with optional designs on the side.',
'duration' => 'PT30M',
'cost' => '45.00',
'ageRestrictions' => [
'min' => 18,
'max' => 100
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.guile.app/barbers/{barberId}/catalogServices"
payload := strings.NewReader("{\n \"name\": \"Skin Fade\",\n \"bundledAddOns\": [\n {\n \"id\": \"service-123\",\n \"name\": \"Beard Trim\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"afada02b-e9fe\",\n \"name\": \"Shaving\"\n }\n ],\n \"description\": \"Expertly transitioned fade with optional designs on the side.\",\n \"duration\": \"PT30M\",\n \"cost\": \"45.00\",\n \"ageRestrictions\": {\n \"min\": 18,\n \"max\": 100\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.guile.app/barbers/{barberId}/catalogServices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Skin Fade\",\n \"bundledAddOns\": [\n {\n \"id\": \"service-123\",\n \"name\": \"Beard Trim\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"afada02b-e9fe\",\n \"name\": \"Shaving\"\n }\n ],\n \"description\": \"Expertly transitioned fade with optional designs on the side.\",\n \"duration\": \"PT30M\",\n \"cost\": \"45.00\",\n \"ageRestrictions\": {\n \"min\": 18,\n \"max\": 100\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.guile.app/barbers/{barberId}/catalogServices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Skin Fade\",\n \"bundledAddOns\": [\n {\n \"id\": \"service-123\",\n \"name\": \"Beard Trim\"\n }\n ],\n \"categories\": [\n {\n \"id\": \"afada02b-e9fe\",\n \"name\": \"Shaving\"\n }\n ],\n \"description\": \"Expertly transitioned fade with optional designs on the side.\",\n \"duration\": \"PT30M\",\n \"cost\": \"45.00\",\n \"ageRestrictions\": {\n \"min\": 18,\n \"max\": 100\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"barber": {
"id": "<string>",
"givenName": "<string>",
"surname": "<string>",
"preferredName": "<string>",
"biography": "<string>",
"spokenLanguages": [],
"experience": 50,
"instagram": "<string>",
"urlSlug": "<string>",
"profileImage_URL": "<string>"
},
"service": {
"name": "Skin Fade",
"bundledAddOns": [
{
"id": "service-123",
"name": "Beard Trim"
}
],
"categories": [
{
"id": "afada02b-e9fe",
"name": "Shaving"
}
],
"description": "Expertly transitioned fade with optional designs on the side.",
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"duration": "PT30M",
"cost": "45.00",
"addOn": {
"duration": "PT30M",
"cost": "45.00"
},
"ageRestrictions": {
"min": 18,
"max": 100
}
},
"availableForOffHours": false,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"cost": "45.00"
}{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {},
"recovery": {
"rateLimit": {
"limit": 123,
"remaining": 123,
"resetsAt": "2023-11-07T05:31:56Z"
}
},
"problems": [
{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {}
}
]
}{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {},
"recovery": {
"rateLimit": {
"limit": 123,
"remaining": 123,
"resetsAt": "2023-11-07T05:31:56Z"
}
},
"problems": [
{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {}
}
]
}{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {},
"recovery": {
"rateLimit": {
"limit": 123,
"remaining": 123,
"resetsAt": "2023-11-07T05:31:56Z"
}
},
"problems": [
{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {}
}
]
}{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {},
"recovery": {
"rateLimit": {
"limit": 123,
"remaining": 123,
"resetsAt": "2023-11-07T05:31:56Z"
}
},
"problems": [
{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {}
}
]
}{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {},
"recovery": {
"rateLimit": {
"limit": 123,
"remaining": 123,
"resetsAt": "2023-11-07T05:31:56Z"
}
},
"problems": [
{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {}
}
]
}{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {},
"recovery": {
"rateLimit": {
"limit": 123,
"remaining": 123,
"resetsAt": "2023-11-07T05:31:56Z"
}
},
"problems": [
{
"type": "<string>",
"title": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"attributes": {}
}
]
}