Home > Agendize Scheduling

Companies


{ "id": {string}, "name": {string}, "timeZone": {string}, "email": {string}, "phone": {string}, "address": { "street": {string}, "otherStreet": {string}, "zipCode": {string}, "state": {string}, "city": {string}, "country" : {string} }, "description": {string}, "geolocation": { "lat": {float}, "lng": {float} }, "picture": { "url": {string}, "mimeType": {string} }, "workingHours": [ { "day": "monday", "hours": [ { "start": "09:00", "end": "18:00" } ] } ], "currency": {string}, "vacations": [ { "startDate": {string}, "endDate": {string} } ], "websiteLink": {string}, "scheduledItems": {string}, "businessCategory": {string}, "updated": { "dateTime": {datetime}, "timeZone": {string} }, "externalId": {string}, "externalCalendars": [ { "address": {string}, "type": "ics" ] }
id string Identifier of the company.
name string Name of the company. Max length 127.
timeZone string The time zone of the company. Possible values can be found here.
email string Email address of the company. Max length 127.
phone string Phone number of the company. Max length 127.
address object Postal address of the company.
address.street string Main street address. Max length 127.
address.otherStreet string Optional street address. Max length 127.
address.zipCode string Zip code of address. Max length 127.
address.state string State of address. Max length 127.
address.city string City of address. Max length 127.
address.country string Country of address. ISO 3166-1 alpha-2 code.
picture object Company picture url and mime type.
picture.url string Url of the company picture.
picture.mimeType string Mime type of the company picture file.
geolocation object Company geolocation coordinates.
geolocation.lat float Latitude coordinate.
geolocation.lng float Longitude coordinate.
workingHours list Working hours of the company.
currency string Currency of the company for online payments. Values: "USD", "CAD", "EUR", "GBP", "DKK" or "JPY". Max length 5.
vacations list Vacation dates of the company.
vacations[].startDate string Start date of the vacation period, in the format "yyyy/mm/dd"
vacations[].endDate string End date of the vacation period, in the format "yyyy/mm/dd"
websiteLink string Web site address (URL) of the company. Max length 65535.
scheduledItems string Scheduled items of the company. Values: "service", "service-staff", "staff-service", "resource", "quickStart"
businessCategory list Business category of the company. Retreive category list with this API. Max length 100.
updated object The last updated time of the company.
end.dateTime string The time, as a combined date-time value (formatted according to RFC 3339, without time zone information).
end.timeZone string The time zone. Possible values can be found here. The default value is the time zone of the company.
externalId string Unique company identifier from another (external) system. Max length 255.
externalCalendars list ICS external calendar URL.
externalCalendars[].address string Address of the ICS URL.

Delete

Deletes an entry on the user's company list.

Authentication is required to execute this request. Please refer to Authentication for more.

Request

HTTP Request

DELETE https://api.agendize.com/api/2.1/scheduling/companies/{companyId}

Parameters

Parameter name Value Description
Path parameters
companyId string Company identifier or external id.

Request body

Do not supply a request body with this method.

Response

If successful, this method returns an empty response body.


Get

Returns an entry of the user's company list.

Authentication is required to execute this request. Please refer to Authentication for more.

Request

HTTP Request

GET https://api.agendize.com/api/2.1/scheduling/companies/{companyId}

Parameters

Parameter name Value Description
Path parameters
companyId string Company identifier or external id.
Optional query parameters
fields string Specify the fields returned. Comma separated field names (ex: "id,name").

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a Company resource in the response body.


List

Returns entries on the company list.

Authentication is required to execute this request. Please refer to Authentication for more.

Request

HTTP Request

GET https://api.agendize.com/api/2.1/scheduling/companies

Parameters

Parameter name Value Description
Optional query parameters
showDeleted boolean Whether to include deleted company list entries in the result. Optional. The default is false.
syncToken string Token obtained from the nextSyncToken field returned on the last page of results from the previous list request.
fields string Specify the fields returned. Comma separated field names (ex: "id,name").

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response body with the following structure:

{ items: [Company Resource] }

Insert

Adds an entry to the user's company list.

Authentication is required to execute this request. Please refer to Authentication for more.

Request

HTTP Request

POST https://api.agendize.com/api/2.1/scheduling/companies

Request body

In the request body, supply a Company resource with the following properties:

Parameter name Value Description
Optional query parameters
calculateGeolocation boolean Calculate GPS coordonates from company's address.
Required Properties
name string Name of the company.
Optional Properties
timeZone string The time zone of the company. Possible values can be found here. The default value is "US/Eastern".
email string Email address of the company.
phone string Phone number of the company.
address object Postal address of the company.
address.street string Main street address.
address.otherStreet string Optional street address.
address.zipCode string Zip code of address.
address.state string State of address.
address.city string City of address.
address.country string Country of address. Possible values can be found here. The default value is "US".
picture object Company picture url and mime type.
picture.url string Url of the company picture.
picture.mimeType string Mime type of the company picture file.
geolocation object Company geolocation coordinates.
geolocation.lat float Latitude coordinate.
geolocation.lng float Longitude coordinate.
workingHours list Working hours of the company. The default working hours are not set.
currency string Currency of the company for online payments. Values: "USD", "CAD", "EUR", "GBP", "DKK" or "JPY".

Response

If successful, this method returns a Company resource in the response body.


Update

Updates an entry on the user's company list.

Authentication is required to execute this request. Please refer to Authentication for more.

Request

HTTP Request

PUT https://api.agendize.com/api/2.1/scheduling/companies/{companyId}

Parameters

Parameter name Value Description
Path parameters
companyId string Company identifier or external id.

Request body

In the request body, supply a Company resource with the following properties:

Parameter name Value Description
Optional Properties
name string Name of the company.

Response

If successful, this method returns a Company resource in the response body.


Watch

Watch for changes to Companies resources.

Authentication is required to execute this request. Please refer to Authentication for more.

The watch send an Company resource in the request body

Request

HTTP Request

POST https://api.agendize.com/api/2.1/scheduling/companies/watch

Request body

{ "address": {string}, "basicAuth": { "username": {string}, "password": {string} }, "httpRequestHeader": { (name): {string} }, "schema": {object} }
Required Properties
address string The address where notifications are delivered for this watch.
Optional Properties
basicAuth string Credentials parameters for HTTP Basic authentication on the destination watch address. Only if you use this authentication method.
basicAuth.username string Username.
basicAuth.password string Password.
httpRequestHeader string Custom header parameters to send with the http request on the destination watch address.
httpRequestHeader.name string header parameter name.
schema object Custom json schema to apply for resource properties.

Response

If successful, this method returns a watch resource in the response body.

Examples of schema:

With JSON, only for string value:

{ "schema": "my_id_key": "{id}", "dataContent": { "givenName": "{firstName}" } } }

With string to support typed values:

{ "schema": "\"my_id_key\": ${$.id}, \"dataContent\": { \"fullName\": \"${$.firstName} ${$.lastName}\"}" }

Replacement string can by defined with jsonpath expressions.

Watch event supported

  • Company added in dashboard. In this case, the watch request add the following header property in http request:
    X-Agendize-objectEvent: created
  • Company modified in dashboard. In this case, the watch request add the following header property in http request:
    X-Agendize-objectEvent: updated