POST
/
v2
/
resource
curl --request POST \
  --url https://api.sonderplan.com/v2/resource \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Edit Suite 1",
  "description": "Sydney Office, Level 2",
  "type_id": 1,
  "type_person_id": 0,
  "parent_id": 2908,
  "order": 4,
  "feed": "/feed/resource/0d17a654166d49a4337b65256...",
  "icon": [
    {
      "name": "Avid_Icon",
      "size": 174285,
      "alias": "7e73ab25155974c230d09494548201b9f5056ef",
      "extension": "png",
      "mime_type": "image/png"
    }
  ],
  "workspaces": [
    {
      "id": 9458,
      "name": "Sydney Studio",
      "description": "Sydney Office, Level 2"
    }
  ],
  "rates": [
    {
      "id": 9458,
      "type_id": 9,
      "hour_buy_cost": 62.2,
      "hour_sell_cost": 100,
      "day_buy_cost": 560,
      "day_sell_cost": 1000,
      "week_buy_cost": 1000,
      "week_sell_cost": 3500,
      "date_start": "2023-01-01",
      "date_end": "2023-12-31",
      "taxes": [
        {
          "id": 3247,
          "name": "GST",
          "rate": "10.00",
          "total": "151.00"
        }
      ],
      "currency": "AUD"
    }
  ],
  "color_background": "#B0A7F1",
  "color_text": "#000000"
}'
{
  "success": {
    "id": 1
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
Resource object that needs to be added

Resource model

name
string
required

Name of the resource

Example:

"Edit Suite 1"

type_id
enum<integer>
required

1 = Room, 2 = Person, 3 = Equipment, 4 = Resource Group, 5 = Action

Available options:
1,
2,
3,
4,
5
Example:

1

description
string

Additional info about the resource

Example:

"Sydney Office, Level 2"

type_person_id
integer

Unique id of the person (only applies if this resource is a person)

Example:

0

parent_id
integer

Unique id of the resource group that this resource is a child of

Example:

2908

order
integer

Order of the resource in relation to other resources in the same group

Example:

4

feed
string

iCalendar calendar feed URL. Contains all bookings that are booked to this resource

Example:

"/feed/resource/0d17a654166d49a4337b65256..."

icon
object[]

Simplified file model containing only a subset of fields

workspaces
object[]

Workspace model summarised

rates
object[]

Optional. Specify in the field parameter to return

Single resource rate model

color_background
string

Hex color value of the background

Example:

"#B0A7F1"

color_text
string

Hex color value of the text

Example:

"#000000"

Response

200
application/json
Successful Operation
success
object