Add Location Profile
curl --request POST \
--url https://api.{tenant}.getomneo.com/api/v3/locations/{location}/profiles \
--header 'Content-Type: application/json' \
--data '
{
"profile_id": "<string>",
"is_default": true,
"is_active": true,
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"profile_external_id": "<string>",
"sort_order": 1,
"notes": "<string>",
"meta": [
"<string>"
],
"excluded_service_handles": [
"<string>"
]
}
'import requests
url = "https://api.{tenant}.getomneo.com/api/v3/locations/{location}/profiles"
payload = {
"profile_id": "<string>",
"is_default": True,
"is_active": True,
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"profile_external_id": "<string>",
"sort_order": 1,
"notes": "<string>",
"meta": ["<string>"],
"excluded_service_handles": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
profile_id: '<string>',
is_default: true,
is_active: true,
starts_at: '2023-11-07T05:31:56Z',
ends_at: '2023-11-07T05:31:56Z',
external_id: '<string>',
profile_external_id: '<string>',
sort_order: 1,
notes: '<string>',
meta: ['<string>'],
excluded_service_handles: ['<string>']
})
};
fetch('https://api.{tenant}.getomneo.com/api/v3/locations/{location}/profiles', 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.{tenant}.getomneo.com/api/v3/locations/{location}/profiles",
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([
'profile_id' => '<string>',
'is_default' => true,
'is_active' => true,
'starts_at' => '2023-11-07T05:31:56Z',
'ends_at' => '2023-11-07T05:31:56Z',
'external_id' => '<string>',
'profile_external_id' => '<string>',
'sort_order' => 1,
'notes' => '<string>',
'meta' => [
'<string>'
],
'excluded_service_handles' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"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.{tenant}.getomneo.com/api/v3/locations/{location}/profiles"
payload := strings.NewReader("{\n \"profile_id\": \"<string>\",\n \"is_default\": true,\n \"is_active\": true,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"external_id\": \"<string>\",\n \"profile_external_id\": \"<string>\",\n \"sort_order\": 1,\n \"notes\": \"<string>\",\n \"meta\": [\n \"<string>\"\n ],\n \"excluded_service_handles\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.{tenant}.getomneo.com/api/v3/locations/{location}/profiles")
.header("Content-Type", "application/json")
.body("{\n \"profile_id\": \"<string>\",\n \"is_default\": true,\n \"is_active\": true,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"external_id\": \"<string>\",\n \"profile_external_id\": \"<string>\",\n \"sort_order\": 1,\n \"notes\": \"<string>\",\n \"meta\": [\n \"<string>\"\n ],\n \"excluded_service_handles\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/locations/{location}/profiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"profile_id\": \"<string>\",\n \"is_default\": true,\n \"is_active\": true,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"external_id\": \"<string>\",\n \"profile_external_id\": \"<string>\",\n \"sort_order\": 1,\n \"notes\": \"<string>\",\n \"meta\": [\n \"<string>\"\n ],\n \"excluded_service_handles\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"location_id": 123,
"profile_id": "<string>",
"assignment_type": "<string>",
"role_type": "<string>",
"is_default": true,
"is_active": true,
"starts_at": "<string>",
"ends_at": "<string>",
"external_id": "<string>",
"profile_external_id": "<string>",
"sort_order": 123,
"notes": "<string>",
"meta": [
"<unknown>"
],
"excluded_service_handles": [
"<unknown>"
],
"location": {
"id": "<string>",
"name": "<string>",
"handle": "<string>"
},
"profile": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>",
"deleted_at": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Location Profile
Add Location Profile
A POST to the /locations/{locationId}/profiles endpoint allows your application to assign a profile to a location.
POST
/
v3
/
locations
/
{location}
/
profiles
Add Location Profile
curl --request POST \
--url https://api.{tenant}.getomneo.com/api/v3/locations/{location}/profiles \
--header 'Content-Type: application/json' \
--data '
{
"profile_id": "<string>",
"is_default": true,
"is_active": true,
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"profile_external_id": "<string>",
"sort_order": 1,
"notes": "<string>",
"meta": [
"<string>"
],
"excluded_service_handles": [
"<string>"
]
}
'import requests
url = "https://api.{tenant}.getomneo.com/api/v3/locations/{location}/profiles"
payload = {
"profile_id": "<string>",
"is_default": True,
"is_active": True,
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"profile_external_id": "<string>",
"sort_order": 1,
"notes": "<string>",
"meta": ["<string>"],
"excluded_service_handles": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
profile_id: '<string>',
is_default: true,
is_active: true,
starts_at: '2023-11-07T05:31:56Z',
ends_at: '2023-11-07T05:31:56Z',
external_id: '<string>',
profile_external_id: '<string>',
sort_order: 1,
notes: '<string>',
meta: ['<string>'],
excluded_service_handles: ['<string>']
})
};
fetch('https://api.{tenant}.getomneo.com/api/v3/locations/{location}/profiles', 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.{tenant}.getomneo.com/api/v3/locations/{location}/profiles",
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([
'profile_id' => '<string>',
'is_default' => true,
'is_active' => true,
'starts_at' => '2023-11-07T05:31:56Z',
'ends_at' => '2023-11-07T05:31:56Z',
'external_id' => '<string>',
'profile_external_id' => '<string>',
'sort_order' => 1,
'notes' => '<string>',
'meta' => [
'<string>'
],
'excluded_service_handles' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"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.{tenant}.getomneo.com/api/v3/locations/{location}/profiles"
payload := strings.NewReader("{\n \"profile_id\": \"<string>\",\n \"is_default\": true,\n \"is_active\": true,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"external_id\": \"<string>\",\n \"profile_external_id\": \"<string>\",\n \"sort_order\": 1,\n \"notes\": \"<string>\",\n \"meta\": [\n \"<string>\"\n ],\n \"excluded_service_handles\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.{tenant}.getomneo.com/api/v3/locations/{location}/profiles")
.header("Content-Type", "application/json")
.body("{\n \"profile_id\": \"<string>\",\n \"is_default\": true,\n \"is_active\": true,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"external_id\": \"<string>\",\n \"profile_external_id\": \"<string>\",\n \"sort_order\": 1,\n \"notes\": \"<string>\",\n \"meta\": [\n \"<string>\"\n ],\n \"excluded_service_handles\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/locations/{location}/profiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"profile_id\": \"<string>\",\n \"is_default\": true,\n \"is_active\": true,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"external_id\": \"<string>\",\n \"profile_external_id\": \"<string>\",\n \"sort_order\": 1,\n \"notes\": \"<string>\",\n \"meta\": [\n \"<string>\"\n ],\n \"excluded_service_handles\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"location_id": 123,
"profile_id": "<string>",
"assignment_type": "<string>",
"role_type": "<string>",
"is_default": true,
"is_active": true,
"starts_at": "<string>",
"ends_at": "<string>",
"external_id": "<string>",
"profile_external_id": "<string>",
"sort_order": 123,
"notes": "<string>",
"meta": [
"<unknown>"
],
"excluded_service_handles": [
"<unknown>"
],
"location": {
"id": "<string>",
"name": "<string>",
"handle": "<string>"
},
"profile": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>",
"deleted_at": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Path Parameters
The location ID
Body
application/json
Available options:
staff, manager, profile Available options:
full_time, part_time, casual, other Maximum string length:
255Maximum string length:
255Required range:
x >= 0Maximum string length:
255Response
LocationProfileResource
Show child attributes
Show child attributes
⌘I