Account Office Hours

CreateAccountOfficeHours

POST https://api.opentact.org/rest/account/office_hours

Create new Account office hours entry

Headers

Name
Type
Description

X-Auth-Token

string

JWT_TOKEN

Content-Type

string

application/json

Request Body

Name
Type
Description

name

string

[ 1 .. 24 ] characters Account Office hours - entry name

type

string

Enum: "nonworking" "lunchtime" "coffeebreak" "weekends"

dow

string

Enum: "sun" "mon" "tue" "wed" "thu" "fri" "sat"

time_from

integer

<int32> [ 0 .. 235959 ] time in seconds from 00:00:00

time_to

integer

<int32> [ 0 .. 235959 ] time in seconds to 23:59:59

{
  "success": true,
  "payload": {
    "created_on": "2019-08-24T14:15:22Z",
    "modified_on": "2019-08-24T14:15:22Z",
    "uuid": "string",
    "name": "string",
    "type": "nonworking",
    "dow": "sun",
    "time_from": 0,
    "time_to": 0,
    "account": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "name": "string",
      "email": "string",
      "level": "ServiceAccount",
      "balance": 0,
      "class4_id": 0,
      "deleted_on": "2019-08-24T14:15:22Z",
      "time_zone": {},
      "users": [],
      "admin": {},
      "messaging_profile_default": {},
      "messaging_profiles": [],
      "addresses": []
    },
    "created_by": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "email": "string",
      "password": "string",
      "phone_number": "string",
      "first_name": "string",
      "last_name": "string",
      "avatar": "string",
      "gender": "Agender",
      "dob": "2019-08-24T14:15:22Z",
      "role": "Admin",
      "gmail_user_id": "string",
      "facebook_user_id": "string",
      "apple_user_id": "string",
      "wechat_user_id": "string",
      "deleted_on": "2019-08-24T14:15:22Z",
      "token": "string",
      "account": {}
    },
    "modified_by": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "email": "string",
      "password": "string",
      "phone_number": "string",
      "first_name": "string",
      "last_name": "string",
      "avatar": "string",
      "gender": "Agender",
      "dob": "2019-08-24T14:15:22Z",
      "role": "Admin",
      "gmail_user_id": "string",
      "facebook_user_id": "string",
      "apple_user_id": "string",
      "wechat_user_id": "string",
      "deleted_on": "2019-08-24T14:15:22Z",
      "token": "string",
      "account": {}
    }
  }
}

Code Example

curl -X POST "https://api.opentact.org/rest/account/office_hours" /
-H  "accept: application/json" -H  "X-Auth-Token: JWT_TOKEN" /
-H  "Content-Type: application/json" /
-d "{\"name\":\"string\",\"type\":\"nonworking\",\"dow\":\"sun\",\"time_from\":0,\"time_to\":0}"

GetAccountOfficeHoursList

GET https://api.opentact.org/rest/account/office_hours

Get account office hours list

Headers

Name
Type
Description

X-Auth-Token

string

JWT_TOKEN

Content-Type

string

application/json

Request Body

Name
Type
Description

dow

string

Enum: "sun" "mon" "tue" "wed" "thu" "fri" "sat"

{
  "success": true,
  "payload": {
    "created_on": "2019-08-24T14:15:22Z",
    "modified_on": "2019-08-24T14:15:22Z",
    "uuid": "string",
    "name": "string",
    "type": "nonworking",
    "dow": "sun",
    "time_from": 0,
    "time_to": 0,
    "account": {},
    "created_by": {},
    "modified_by": {}
  }
}

Code Example

curl -X GET "https://api.opentact.org/rest/account/office_hours?dow=sun" -H  "accept: application/json" -H  "X-Auth-Token: JWT_TOKEN"

GetAccountOfficeHours

GET https://api.opentact.org/rest/account/officehours/{uuid}

Get Account office hours extended info

Path Parameters

Name
Type
Description

uuid

string

^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

Headers

Name
Type
Description

X-Auth-Token

string

JWT_TOKEN

{
  "success": true,
  "payload": {
    "created_on": "2019-08-24T14:15:22Z",
    "modified_on": "2019-08-24T14:15:22Z",
    "uuid": "string",
    "name": "string",
    "owner": {},
    "users": []
  }
}

Code Example

curl -X GET "https://api.opentact.org/rest/account/office_hours/{uuid}" -H  "accept: application/json" -H  "X-Auth-Token: JWT_TOKEN"

UpdateAccountOfficeHours

PATCH https://api.opentact.org/rest/account/office_hours/{uuid}

Update Account Office hours

Headers

Name
Type
Description

Content-Type

string

application/json

X-Auth-Token

string

JWT_TOKEN

Request Body

Name
Type
Description

name

string

[ 1 .. 24 ] characters Account Office hours - entry name

type

string

Enum: "nonworking" "lunchtime" "coffeebreak" "weekends"

dow

string

Enum: "sun" "mon" "tue" "wed" "thu" "fri" "sat"

time_from

integer

<int32> [ 0 .. 235959 ] time in seconds from 00:00:00

time_to

integer

<int32> [ 0 .. 235959 ] time in seconds to 23:59:59

{
  "success": true,
  "payload": {
    "created_on": "2019-08-24T14:15:22Z",
    "modified_on": "2019-08-24T14:15:22Z",
    "uuid": "string",
    "name": "string",
    "type": "nonworking",
    "dow": "sun",
    "time_from": 0,
    "time_to": 0,
    "account": {},
    "created_by": {},
    "modified_by": {}
  }
}

Code Example

curl -X PATCH "https://api.opentact.org/rest/account/office_hours/{uuid}" -H  "accept: application/json" -H  "X-Auth-Token: JWT_TOKEN" -H  "Content-Type: application/json" -d "{\"name\":\"string\",\"type\":\"nonworking\",\"dow\":\"sun\",\"time_from\":0,\"time_to\":0}"

RemoveAccountOfficeHoursByUUID

DELETE https://api.opentact.org/rest/account/office_hours/{uuid}

Delete account office hours

Path Parameters

Name
Type
Description

uuid

string

^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

Headers

Name
Type
Description

Content-Type

string

application/json

X-Auth-Token

string

JWT_TOKEN

{
  "success": true,
  "payload": {
    "created_on": "2019-08-24T14:15:22Z",
    "modified_on": "2019-08-24T14:15:22Z",
    "uuid": "string",
    "name": "string",
    "type": "nonworking",
    "dow": "sun",
    "time_from": 0,
    "time_to": 0,
    "account": {},
    "created_by": {},
    "modified_by": {}
  }
}

Code Example

curl -X DELETE "https://api.opentact.org/rest/account/office_hours/{uuid}" -H  "accept: application/json" -H  "X-Auth-Token: JWT_TOKEN" -H  "Content-Type: application/json" -d "{\"name\":\"string\",\"type\":\"nonworking\",\"dow\":\"sun\",\"time_from\":0,\"time_to\":0}"

Last updated

Was this helpful?