v1

latestOpenAPI 3.0.02026-07-14800227.2 KB
Offices

Create a new office.

Creates a new office.<br><br>The required fields are name, companyId, calendarId.<br>Optional fields are street, postalCode, city and country. <br> The country field has to be a valid ISO country code.

post/offices

Headers

Authorizationstring required
Example:Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2FwaS5rZW5qby5pbyIsInN1YiI6IjYwZjBhOTE2MjE0OTg3MjU2YmU5YzhmZiIsImF1ZCI6Imh0dHBzOi8vYXBpLmtlbmpvLmlvIiwiaWF0IjoxNjI2Mzg1MTE1LCJuYmYiOjE2MjYzODUxMTUsImV4cCI6MTYyNjU1NzkxNSwiYWNjZXNzVHlwZSI6IkFwaUFjY2VzcyIsInNfb3JnSWQiOiI2MGYwNGVhN2RmN2JhMjFlY2U0YmYzYzIifQ.cxG_7dIS-VbmDXdJuLkekoyuyCIzQG2fMcgc0nkfbWE8cihhcb5FnALbQkjU9b5-qVcEoMHZlSuUA-jMEBMMVQ

A valid bearer token.

Request body

namestring

The new name of the office to create. Required field.

companyIdstring

The company id of the office to create. Required field.

calendarIdstring

The calendar id of the office to create. Required field.

countrystring

The country of the office to create in ISO code.

postalCodestring

The postal code of the office to create.

citystring

The city of the office to create.

streetstring

The street of the office to create.

Example request

{
  "name": "Spain office",
  "companyId": "60dadb6362702d057f8fb486",
  "calendarId": "60f808f727ad58fe791bae91",
  "country": "ES",
  "postalCode": "28030",
  "city": "ES",
  "street": "Paseo Castellana, 13"
}

Response

CREATED

_idstring

The Kenjo id of the new office.

namestring

The new name of the office to create.

companyIdstring

The company id of the office to create.

calendarIdstring

The calendar id of the office to create.

countrystring

The country of the office to create.

postalCodestring

The postalcode of the office to create.

citystring

The city of the office to create.

streetstring

The street of the office to create.

Example response

{
  "_id": "60f808f727ad58fe791bae9e",
  "name": "Spain office",
  "companyId": "60dadb6362702d057f8fb486",
  "calendarId": "60f808f727ad58fe791bae91",
  "country": "ES",
  "postalCode": "28030",
  "city": "Madrid",
  "street": "Paseo Castellana"
}