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": "monday", "hours": [ { "start": "09:00", "end": "18:00" } ] } ], "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} }, "jp": { "name": {string}, "description": {string} } }, "externalId": {string}, "customWorkingHours": [ { "name":(string}, "startPeriod": { "dateTime": {string}, "timeZone": "US/Eastern" }, "endPeriod": { "dateTime": {string}, "timeZone": "US/Eastern" }, "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} }
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
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. writable
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. writable
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[].satruday list List of custom working hours for satruday. Only if hours are defined for the day. writable
customWorkingHours[].satruday[].start string Start hour. Format: HH:mm. writable
customWorkingHours[].satruday[].end string End hour. Format: HH:mm. writable
customWorkingHours[].satruday[].service object Service concerned by the working hour. Only if a service is defined for the working hour writable
customWorkingHours[].satruday[].service.id object Id of service. writable. Max length 16.
customWorkingHours[].satruday[].service.name object Name of service.
validation string New appointments need to be reviewed and accepted. "auto", "manager", "location". Default value: "location". writable

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, jp.

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, jp.

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.

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

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}, "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

  • 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