Home > Agendize Scheduling

Resources


Resource representation

{ "id": {string}, "name": {string}, "duration": {integer}, "count": {integer}, "color": {color}, "description": {string}, "price": {float}, "payable": {boolean}, "availability": {string}, "overNight": {boolean}, "overNightStartTime": {string}, "maxAppointmentsPerDay": {int}, "picture": { "url": {string}, "mimeType": {string} }, "workingHours": [ { "day": "sunday", "hours": [ { "start": {string}, "end": {string} } ] }, { "day": "monday", "hours": [ { "start": {string}, "end": {string} } ] }, { "day": "tuesday", "hours": [ { "start": {string}, "end": {string} } ] }, { "day": "wednesday", "hours": [ { "start": {string}, "end": {string} } ] }, { "day": "thursday", "hours": [ { "start": {string}, "end": {string} } ] }, { "day": "friday", "hours": [ { "start": {string}, "end": {string} } ] }, { "day": "saturday", "hours": [ { "start": {string}, "end": {string} } ] } ], "i18n": { "en": { "name": {string}, "description": {string} }, "fr": { "name": {string}, "description": {string} }, "es": { "name": {string}, "description": {string} }, "pt: { "name": {string}, "description": {string} }, "de": { "name": {string}, "description": {string} }, "nl": { "name": {string}, "description": {string} }, "it": { "name": {string}, "description": {string} } }, "externalId": {string}, "customWorkingHours": [ { "name":{string}, "startPeriod": { "dateTime": {string}, "timeZone": {string} }, "endPeriod": { "dateTime": {string}, "timeZone": {string} }, "sunday": [ { "service": { "name": {string}, "id": {string} }, "start": {string}, "end": {string} } ], "monday": [ { "service": { "name": {string}, "id": {string} }, "start": {string}, "end": {string} } ], "tuesday": [ { "service": { "name": {string}, "id": {string} }, "start": {string}, "end": {string} } ], "wednesday": [ { "service": { "name": {string}, "id": {string} }, "start": {string}, "end": {string} } ], "thursday": [ { "service": { "name": {string}, "id": {string} }, "start": {string}, "end": {string} } ], "friday": [ { "service": { "name": {string}, "id": {string} }, "start": {string}, "end": {string} } ], "saturday": [ { "service": { "name": {string}, "id": {string} }, "start": {string}, "end": {string} } ] } ], "validation: {string}, "extendedProperties": { "private": {object}, "public": {object} } }
Parameter name Value Description Notes
id string Identifier of the resource.
name string Name of the resource. writable. Max length 255.
duration integer Resource duration, in minutes. writable. Max length 11.
count integer Resource quantity available. writable. Max length 11.
color string Resource color, for dashboard displaying. Hexadecimal web color. Default Color: #EFEFEF. writable
description string Description of the resource. writable. Max length 65535.
picture object Resource picture url and mime type. writable
picture.url string Url of the resource picture.
picture.mimeType string Mime type of the resource picture file. writable
price float Resource pricing. writable
payable boolean Sets if the client can pay with paypal. writable
availability string Availability of the resource in the widget. Values are :
  • "public" available everywhere,
  • "backoffice" available in the console dashboard and can be queried by url,
  • "hidden" hide everywhere but can be queried by url,
  • "disabled" totally disabled .
writable
overNight boolean Set to True to activate the overNight mode for this resource : once activated, the service can only be booked once per day at fixed time, but can be over two different days writable
overNightStartTime datetime If the overNight is activated, set the start time of the resource in this parameter : example "15:00". writable
maxAppointmentsPerDay integer Sets how many appointments a client can book per day. Default value: 0 (no limit) writable
i18n object Resource translation. writable
workingHours list Working hours of the company's resource. writable
workingHours[].sunday list List of working hours for sunday. Only if hours are defined for the day. writable
workingHours[].sunday[].start string Start hour. Format: HH:mm. writable
workingHours[].sunday[].end string End hour. Format: HH:mm. writable
workingHours[].monday list List of working hours for monday. Only if hours are defined for the day. writable
workingHours[].monday[].start string Start hour. Format: HH:mm. writable
workingHours[].monday[].end string End hour. Format: HH:mm. writable
workingHours[].tuesday list List of working hours for tuesday. Only if hours are defined for the day. writable
workingHours[].tuesday[].start string Start hour. Format: HH:mm. writable
workingHours[].tuesday[].end string End hour. Format: HH:mm. writable
workingHours[].wednesday list List of working hours for wednesday. Only if hours are defined for the day. writable
workingHours[].wednesday[].start string Start hour. Format: HH:mm. writable
workingHours[].wednesday[].end string End hour. Format: HH:mm. writable
workingHours[].thursday list List of working hours for thursday. Only if hours are defined for the day. writable
workingHours[].thursday[].start string Start hour. Format: HH:mm. writable
workingHours[].thursday[].end string End hour. Format: HH:mm. writable
workingHours[].friday list List of working hours for friday. Only if hours are defined for the day. writable
workingHours[].friday[].start string Start hour. Format: HH:mm. writable
workingHours[].friday[].end string End hour. Format: HH:mm. writable
workingHours[].saturday list List of working hours for saturday. Only if hours are defined for the day. writable
workingHours[].saturday[].start string Start hour. Format: HH:mm. writable
workingHours[].saturday[].end string End hour. Format: HH:mm. writable
externalId string Unique resource identifier from another (external) system. Max length 255.
customWorkingHours list Custom Working hours (per period) of the company's staff member.
customWorkingHours[].name object Name of the custom period. writable
customWorkingHours[].startPeriod object Start date of the custom period. writable
customWorkingHours[].startPeriod.dateTime string The time, as a combined date-time value (formatted according to RFC 3339, without time zone information). writable
customWorkingHours[].startPeriod.timeZone string The time zone. Possible values can be found here. The default value is the time zone of the company. read-only
customWorkingHours[].endPeriod object Start date of the custom period. writable
customWorkingHours[].endPeriod.dateTime string The time, as a combined date-time value (formatted according to RFC 3339, without time zone information). writable
customWorkingHours[].endPeriod.timeZone string The time zone. Possible values can be found here. The default value is the time zone of the company. read-only
customWorkingHours[].sunday list List of custom working hours for sunday. Only if hours are defined for the day. writable
customWorkingHours[].sunday[].start string Start hour. Format: HH:mm. writable
customWorkingHours[].sunday[].end string End hour. Format: HH:mm. writable
customWorkingHours[].sunday[].service object Service concerned by the working hour. Only if a service is defined for the working hour writable
customWorkingHours[].sunday[].service.id object Id of service. writable. Max length 16.
customWorkingHours[].sunday[].service.name object Name of service.
customWorkingHours[].monday list List of custom working hours for monday. Only if hours are defined for the day. writable
customWorkingHours[].monday[].start string Start hour. Format: HH:mm. writable
customWorkingHours[].monday[].end string End hour. Format: HH:mm. writable
customWorkingHours[].monday[].service object Service concerned by the working hour. Only if a service is defined for the working hour writable
customWorkingHours[].monday[].service.id object Id of service. writable. Max length 16.
customWorkingHours[].monday[].service.name object Name of service.
customWorkingHours[].tuesday list List of custom working hours for tuesday. Only if hours are defined for the day. writable
customWorkingHours[].tuesday[].start string Start hour. Format: HH:mm. writable
customWorkingHours[].tuesday[].end string End hour. Format: HH:mm. writable
customWorkingHours[].tuesday[].service object Service concerned by the working hour. Only if a service is defined for the working hour writable
customWorkingHours[].tuesday[].service.id object Id of service. writable. Max length 16.
customWorkingHours[].tuesday[].service.name object Name of service.
customWorkingHours[].wednesday list List of custom working hours for wednesday. Only if hours are defined for the day. writable
customWorkingHours[].wednesday[].start string Start hour. Format: HH:mm. writable
customWorkingHours[].wednesday[].end string End hour. Format: HH:mm. writable
customWorkingHours[].wednesday[].service object Service concerned by the working hour. Only if a service is defined for the working hour writable
customWorkingHours[].wednesday[].service.id object Id of service. writable. Max length 16.
customWorkingHours[].wednesday[].service.name object Name of service.
customWorkingHours[].thursday list List of custom working hours for thursday. Only if hours are defined for the day. writable
customWorkingHours[].thursday[].start string Start hour. Format: HH:mm. writable
customWorkingHours[].thursday[].end string End hour. Format: HH:mm. writable
customWorkingHours[].thursday[].service object Service concerned by the working hour. Only if a service is defined for the working hour writable
customWorkingHours[].thursday[].service.id object Id of service. writable. Max length 16.
customWorkingHours[].thursday[].service.name object Name of service.
customWorkingHours[].friday list List of custom working hours for friday. Only if hours are defined for the day. writable
customWorkingHours[].friday[].start string Start hour. Format: HH:mm. writable
customWorkingHours[].friday[].end string End hour. Format: HH:mm. writable
customWorkingHours[].friday[].service object Service concerned by the working hour. Only if a service is defined for the working hour writable
customWorkingHours[].friday[].service.id object Id of service. writable. Max length 16.
customWorkingHours[].friday[].service.name object Name of service.
customWorkingHours[].saturday list List of custom working hours for saturday. Only if hours are defined for the day. writable
customWorkingHours[].saturday[].start string Start hour. Format: HH:mm. writable
customWorkingHours[].saturday[].end string End hour. Format: HH:mm. writable
customWorkingHours[].saturday[].service object Service concerned by the working hour. Only if a service is defined for the working hour writable
customWorkingHours[].saturday[].service.id object Id of service. writable. Max length 16.
customWorkingHours[].saturday[].service.name object Name of service.
validation string New appointments need to be reviewed and accepted. "auto", "manager", "location". Default value: "location". writable
extendedProperties object Extended Properties. You can defined your custom properties. Size limit: 22KB.
extendedProperties.private object Private properties. These properties are not retreive in widget.
extendedProperties.public object Private properties. These properties are retrieve in widget.

Delete

Deletes an entry on the company's resource 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}/resources/{resourceId}

Parameters

Parameter name Value Description
Path parameters
companyId string Company identifier.
resourceId string Resource identifier or external id of resource.

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 company's resource 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}/resources/{resourceId}

Parameters

Parameter name Value Description
Path parameters
companyId string Company identifier.
resourceId string Resource identifier or external id of resource.
Optional query parameters
fields string Specify the fields returned. Comma separated field names (ex: "id,name").
lang string Specify the language to use to return service details. Possible values: en, fr, es, pt, de, nl, it.

Request body

Do not supply a request body with this method.

Response

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


List

Returns entries on the company's resource 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}/resources

Parameters

Parameter name Value Description
Path parameters
companyId string Company identifier.
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").
lang string Specify the language to use to return service details. Possible values: en, fr, es, pt, de, nl, it.

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: [Resource Resource] }

Insert

Adds an entry to the company's resource 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/{companyId}/resources

Parameters

Parameter name Value Description
Path parameters
companyId string Company identifier.

Request body

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

Parameter name Value Description
Required Properties
name string Name of the resource.
Optional Properties
duration integer Resource duration, in minutes. The default value is 0 minute.
count integer Resource quantity available. The default value is 1.
color string Resource color, for dashboard displaying. Format: xxxxxx. The default value is EFEFEF.
description string Description of the resource.
picture object Resource picture .
picture.data string Data URI of the resource picture (eg: image/png;base64, xxxxx). See Data URI scheme
price float Resource pricing. The default value is 0.
payable boolean Sets if the client can pay with paypal. The default value is false.
workingHours list Working hours of the company's resource. The default values are the company's working hours.
workingHours[].sunday list List of working hours for sunday. Only if hours are defined for the day. writable
workingHours[].sunday[].start string Start hour. Format: HH:mm. writable
workingHours[].sunday[].end string End hour. Format: HH:mm. writable
workingHours[].monday list List of working hours for monday. Only if hours are defined for the day. writable
workingHours[].monday[].start string Start hour. Format: HH:mm. writable
workingHours[].monday[].end string End hour. Format: HH:mm. writable
workingHours[].tuesday list List of working hours for tuesday. Only if hours are defined for the day. writable
workingHours[].tuesday[].start string Start hour. Format: HH:mm. writable
workingHours[].tuesday[].end string End hour. Format: HH:mm. writable
workingHours[].wednesday list List of working hours for wednesday. Only if hours are defined for the day. writable
workingHours[].wednesday[].start string Start hour. Format: HH:mm. writable
workingHours[].wednesday[].end string End hour. Format: HH:mm. writable
workingHours[].thursday list List of working hours for thursday. Only if hours are defined for the day. writable
workingHours[].thursday[].start string Start hour. Format: HH:mm. writable
workingHours[].thursday[].end string End hour. Format: HH:mm. writable
workingHours[].friday list List of working hours for friday. Only if hours are defined for the day. writable
workingHours[].friday[].start string Start hour. Format: HH:mm. writable
workingHours[].friday[].end string End hour. Format: HH:mm. writable
workingHours[].saturday list List of working hours for saturday. Only if hours are defined for the day. writable
workingHours[].saturday[].start string Start hour. Format: HH:mm. writable
workingHours[].saturday[].end string End hour. Format: HH:mm. writable

Response

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


Update

Updates an entry on the company's resource 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}/resources/{resourceId}

Parameters

Parameter name Value Description
Path parameters
companyId string Company identifier.
resourceId string Resource identifier or external id of resource.

Request body

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

Parameter name Value Description
Optional Properties
name string Name of the resource.
picture object Resource picture .
picture.data string Data URI of the resource picture (eg: image/png;base64, xxxxx). See Data URI scheme
workingHours list Working hours of the company's resource. The default values are the company's working hours.
workingHours[].sunday list List of working hours for sunday. Only if hours are defined for the day. writable
workingHours[].sunday[].start string Start hour. Format: HH:mm. writable
workingHours[].sunday[].end string End hour. Format: HH:mm. writable
workingHours[].monday list List of working hours for monday. Only if hours are defined for the day. writable
workingHours[].monday[].start string Start hour. Format: HH:mm. writable
workingHours[].monday[].end string End hour. Format: HH:mm. writable
workingHours[].tuesday list List of working hours for tuesday. Only if hours are defined for the day. writable
workingHours[].tuesday[].start string Start hour. Format: HH:mm. writable
workingHours[].tuesday[].end string End hour. Format: HH:mm. writable
workingHours[].wednesday list List of working hours for wednesday. Only if hours are defined for the day. writable
workingHours[].wednesday[].start string Start hour. Format: HH:mm. writable
workingHours[].wednesday[].end string End hour. Format: HH:mm. writable
workingHours[].thursday list List of working hours for thursday. Only if hours are defined for the day. writable
workingHours[].thursday[].start string Start hour. Format: HH:mm. writable
workingHours[].thursday[].end string End hour. Format: HH:mm. writable
workingHours[].friday list List of working hours for friday. Only if hours are defined for the day. writable
workingHours[].friday[].start string Start hour. Format: HH:mm. writable
workingHours[].friday[].end string End hour. Format: HH:mm. writable
workingHours[].saturday list List of working hours for saturday. Only if hours are defined for the day. writable
workingHours[].saturday[].start string Start hour. Format: HH:mm. writable
workingHours[].saturday[].end string End hour. Format: HH:mm. writable

Response

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


Watch

Watch for changes to Resource resources.

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

The watch send an Resource resource in the request body

Request

HTTP Request

POST https://api.agendize.com/api/2.1/scheduling/companies/{companyId}/resources/watch

Parameters

Parameter name Value Description
Path parameters
companyId string Company identifier.

Request body

{ "address": {string}, "name": {string}, "basicAuth": { "username": {string}, "password": {string} }, "httpRequestHeader": { {name}: {string} }, "schema": {object} "method": {string}, "status": {string}, "oauth2Auth": { "clientId": {string}, "clientSecret": {string}, "refreshToken": {string}, "authUrl": {string}, "accessTokenUrl": {string}, "redirectUri": {string} }, "signature": { "enabled": {boolean}, "cryptoKeyIds": [ {string} ] } }
Required Properties
address string The address where notifications are delivered for this watch.
Optional Properties
name string Name of the watch.
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.
method string HTTP Method to use for sending content. DELETE Method doesn't accept body content.
status string Status of the watcher. Values: "enabled", "disabled"
oauth2Auth string Credentials parameters for HTTP OAuth2 authentication on the destination watch address. Only if you use this authentication method.
oauth2Auth.clientId string OAuth2 client id.
oauth2Auth.refreshToken string OAuth2 refresh token.
oauth2Auth.authUrl string OAuth2 interactive end point to initiate the generation of the refresh token.
oauth2Auth.accessTokenUrl string OAuth2 end point to generation an access token from the refresh token.
oauth2Auth.scope string OAuth2 api scope.
signature object Produces a crypto signature of the watched content.
signature.enabled boolean Sets if the signature is enabled or not.
signature.cryptoKeyIds list Arrays of string of crypto keys identifier.

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

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