Invitations
Revoke an invitation
Revoke a barber invitation that has not yet been accepted so the invite link stops working.
POST
/
invitations
/
{invitationCode}
/
revoked
Revoke an invitation
curl --request POST \
--url https://api.guile.app/invitations/{invitationCode}/revoked \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.guile.app/invitations/{invitationCode}/revoked"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.guile.app/invitations/{invitationCode}/revoked', 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/invitations/{invitationCode}/revoked",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.guile.app/invitations/{invitationCode}/revoked"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/invitations/{invitationCode}/revoked")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.guile.app/invitations/{invitationCode}/revoked")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"barber": {
"user": {
"id": "<string>",
"givenName": "<string>",
"surname": "<string>",
"phoneNumber": "<string>",
"emailAddress": "<string>"
},
"location": {
"id": "<string>",
"name": "<string>",
"shopName": "<string>"
},
"terms": {
"commissionRate": 123,
"rent": {
"amount": 1
}
}
}
}{
"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 an invitation.
Required string length:
6Pattern:
^[A-Z0-9]{6}$Response
Ok. The operation succeeded.
A resource allowing professional users to join a shop as an owner or a shop location as a barber.
The opaque system identifier for this invitation.
Required string length:
6Pattern:
^[A-Z0-9]{6}$The type of the invitation. This value determines additional properties that are needed for the invitation.
Available options:
shopOwner, barber The state of the invitation.
Available options:
created, accepted, rejected Shop location information for this invitation.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Revoke an invitation
curl --request POST \
--url https://api.guile.app/invitations/{invitationCode}/revoked \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.guile.app/invitations/{invitationCode}/revoked"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.guile.app/invitations/{invitationCode}/revoked', 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/invitations/{invitationCode}/revoked",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.guile.app/invitations/{invitationCode}/revoked"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/invitations/{invitationCode}/revoked")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.guile.app/invitations/{invitationCode}/revoked")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"barber": {
"user": {
"id": "<string>",
"givenName": "<string>",
"surname": "<string>",
"phoneNumber": "<string>",
"emailAddress": "<string>"
},
"location": {
"id": "<string>",
"name": "<string>",
"shopName": "<string>"
},
"terms": {
"commissionRate": 123,
"rent": {
"amount": 1
}
}
}
}{
"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": {}
}
]
}