Offices: CreateOffice

This method creates an office in a Rooms account. You can configure the following information for the new office:

  • Office name
  • Region
  • Address
  • Country ID and time zone
  • Phone number

When you create an office, the Rooms API service assigns it an ID (officeId) and timestamp (createdDate), which are returned in the response along with the above data elements you specified. See the Offices object for descriptions of these data elements.

Request

HTTP request

POST /restapi/v2/accounts/{accountId}/offices

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

(Required) The globally unique identifier (GUID) for the account.

Request Body

office

Responses

CodeDescriptionReference
201

Office successfully created.

Office
400

Bad request. See ErrorCode and Message for details

ApiError
401

Not authorized to make this request.

ApiError

SDK Method

Offices::CreateOffice

Definitions

ApiError

This object describes errors that occur. It is valid only for responses and ignored in requests.

errorCodestring

The code associated with the error condition.

messagestring

A brief message describing the error condition.

Office

Contains information about an office.

officeIdinteger

The id of the office. This is the id that the system generated when you created the office.

namestring

The name of the office.

regionIdinteger

The id of the region. This is the id that the system generated when you created the region.

address1string

First line of the office street address.

address2string

Second line of the office street address.

citystring

City name or metropolitan area of the office address.

stateIdstring

A concatenation of the two-letter country code with the state/province/region of the office address.

Example: US-OH (for Ohio)

postalCodestring

Postal code or ZIP code of the office address.

countryIdstring

The two-letter country code of the office address (for example, "UK" for United Kingdom).

timeZoneIdstring

The id of the time zone for the office address.

Example: eastern (for the Eastern US Time Zone)

phonestring

Phone number of the office.

createdDatestring

The UTC date and time when the item was created. This is a read-only value that the service assigns.

Example: 2019-07-17T17:45:42.783Z

OfficeForCreate

Contains details about the office that you want to create.

namestring

The name of the office.

regionIdinteger

The id of the region. This is the id that the system generated when you created the region.

address1string

First line of the office street address.

address2string

Second line of the office street address.

citystring

City name or metropolitan area of the office address.

stateIdstring

A concatenation of the two-letter country code with the state/province/region of the office address.

Example: US-OH (for Ohio)

postalCodestring

Postal code or ZIP code of the office address.

countryIdstring

The two-letter country code of the office address (for example, "UK" for United Kingdom).

timeZoneIdstring

The id of the time zone for the office address.

Example: eastern (for the Eastern US Time Zone)

phonestring

Phone number of the office.

}} />