Skip to main content
POST
/
organizations
/
{orgId}
/
office-hours
Set office hours
curl --request POST \
  --url https://api.helloannie.com/v1/organizations/{orgId}/office-hours \
  --header 'Content-Type: application/json' \
  --data '
{
  "isClosed": true,
  "open": "<string>",
  "close": "<string>"
}
'
import requests

url = "https://api.helloannie.com/v1/organizations/{orgId}/office-hours"

payload = {
"isClosed": True,
"open": "<string>",
"close": "<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({isClosed: true, open: '<string>', close: '<string>'})
};

fetch('https://api.helloannie.com/v1/organizations/{orgId}/office-hours', 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.helloannie.com/v1/organizations/{orgId}/office-hours",
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([
'isClosed' => true,
'open' => '<string>',
'close' => '<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.helloannie.com/v1/organizations/{orgId}/office-hours"

payload := strings.NewReader("{\n \"isClosed\": true,\n \"open\": \"<string>\",\n \"close\": \"<string>\"\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.helloannie.com/v1/organizations/{orgId}/office-hours")
.header("Content-Type", "application/json")
.body("{\n \"isClosed\": true,\n \"open\": \"<string>\",\n \"close\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.helloannie.com/v1/organizations/{orgId}/office-hours")

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 \"isClosed\": true,\n \"open\": \"<string>\",\n \"close\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "isClosed": true,
    "open": "<string>",
    "close": "<string>"
  }
}
{
"success": false,
"data": {},
"message": "<string>"
}
{
"success": false,
"data": {},
"message": "<string>"
}
{
"success": false,
"data": {},
"message": "<string>"
}

Path Parameters

orgId
string<uuid>
required

The ID of the organization

Body

Payload to create or update office hours for a specific day

dayOfWeek
enum<string>
required
Available options:
MONDAY,
TUESDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY,
SUNDAY
isClosed
boolean
required

Whether the office is closed on this day. When true, open and close times are not required.

open
string | null

Opening time in HH:mm format (e.g., '09:00'). Required when isClosed is false.

Pattern: ^([01]?[0-9]|2[0-3]):[0-5][0-9]$
close
string | null

Closing time in HH:mm format (e.g., '17:00'). Required when isClosed is false.

Pattern: ^([01]?[0-9]|2[0-3]):[0-5][0-9]$

Response

Response returned when retrieving or updating office hours for a single day

success
enum<boolean>
required
Available options:
true
data
object
required

Office hours for a specific day of the week