Update Location Profile
curl --request PUT \
--url https://api.{tenant}.getomneo.com/api/v3/location-profiles/{locationProfile} \
--header 'Content-Type: application/json' \
--data '
{
"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/location-profiles/{locationProfile}"
payload = {
"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.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
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/location-profiles/{locationProfile}', 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/location-profiles/{locationProfile}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'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/location-profiles/{locationProfile}"
payload := strings.NewReader("{\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("PUT", 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.put("https://api.{tenant}.getomneo.com/api/v3/location-profiles/{locationProfile}")
.header("Content-Type", "application/json")
.body("{\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/location-profiles/{locationProfile}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\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
Update Location Profile
A PUT to the /location-profiles/{locationProfileId} endpoint allows your application to update a specific location profile assignment.
PUT
/
v3
/
location-profiles
/
{locationProfile}
Update Location Profile
curl --request PUT \
--url https://api.{tenant}.getomneo.com/api/v3/location-profiles/{locationProfile} \
--header 'Content-Type: application/json' \
--data '
{
"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/location-profiles/{locationProfile}"
payload = {
"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.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
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/location-profiles/{locationProfile}', 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/location-profiles/{locationProfile}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'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/location-profiles/{locationProfile}"
payload := strings.NewReader("{\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("PUT", 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.put("https://api.{tenant}.getomneo.com/api/v3/location-profiles/{locationProfile}")
.header("Content-Type", "application/json")
.body("{\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/location-profiles/{locationProfile}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\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 profile 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