Home > Agendize Scheduling

Services


Resource representation

{ "id": {string}, "name": {string}, "capacity": {integer}, "duration": {integer}, "bufferDuration": {integer}, "price": {float}, "payable": {boolean}, "color": {color}, "description": {string}, "picture": { "url": {string}, "mimeType": {string} }, "staff": [ { "id": {string}, "firstName": {string}, "lastName": {string}, "price": {string} } ], "resource": [ { "id": {string}, "quantity": {integer}, "name": {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} }, "jp": { "name": {string}, "description": {string} } }, "availability": {string}, "allowBookingIteration": {boolean}, "overNight": {boolean}, "overNightStartTime": {datetime}, "maxAppointmentsPerDay": {integer}, "externalId": {string}, "validation": {string}, "localization": {string} }
Parameter name Value Description
id string Identifier of the service.
name string Name of the service. writable. Max length 127.
duration integer Service duration, in minutes. writable. Max length 11.
bufferDuration integer Service buffer duration, in minutes. writable. Max length 11.
price float Service pricing. writable
payable boolean Sets if the client can pay with paypal. writable
color string Service color, for dashboard displaying. Hexadecimal web color. Default Color: EFEFEF. writable
description string Description of the service. writable. Max length 65535.
capacity integer Service capacity. writable. Max length 11.
staff list List of staff members who have the skills for the service. writable
picture object Service picture url and mime type. writable
picture.url string Url of the service picture.
picture.mimeType string Mime type of the service picture file. writable
i18n object Service translation. writable
availableForWidget boolean OUTDATED : replaced by availabilitySets if the service is available for online scheduling. Default value: true, true is availability is public
availability string Availability of the service 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
allowBookingIteration boolean Set to True to allow user to book multiple iteration during scheduling process. Not available with Widget V3 writable
maxAppointmentsPerDay integer Sets how many appointments a client can book per day. Default value: 0 (no limit) writable
overNight boolean Set to True to activate the overNight mode for this service : 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 service in this parameter : example "15:00". writable
externalId string Unique service identifier from another (external) system.
resource list List of all service resources linked to this service writable
resource.id id Identifier of the service resources. writable. Max length 16.
resource.quantity integer Quantity of the service resources.
resource.name string Name of the service resources.
validation string New appointments need to be reviewed and accepted. "auto", "manager", "staff", "location". Default value: "location". writable
localization string Localization of the service. "companyAddress", "videoconference". Default: "companyAddress". writable

Delete

Deletes an entry on the company's service 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}/services/{serviceId}

Parameters

Parameter name Value Description
Path parameters
companyId string Company identifier.
serviceId string Service identifier or external id of service.

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 service 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}/services/{serviceId}

Parameters

Parameter name Value Description
Path parameters
companyId string Company identifier.
serviceId string Service identifier or external id of service.
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 Service resource in the response body.


List

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

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.
orderBy string Order list by:
  • name[a-z]
  • name[z-a]
  • duration[0-100]
  • duration[100-0]
  • price[0-100
  • price[100-0]
  • widgetSettings. Sort services as defined in widget settings.
  • popularity
  • Or define the service list, separated with commas.
popularityPeriod string Anteriority popularity period. Values: "weeks-1", "weeks-2", "weeks-3", "months-10", "months-2", "months-3", "months-6", "years-1".

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

Insert

Adds an entry to the company's service 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}/services

Parameters

Parameter name Value Description
Path parameters
companyId string Company identifier.
Optional query parameters
staff string Values: "all". If staff=all, all existing staff members are linked to th service. Only if the "staff" property is not set in the JSON.

Request body

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

Parameter name Value Description
Required Properties
name string Name of the service.
Optional Properties
duration integer Service duration, in minutes. The default duration is 60 minutes.
bufferDuration integer Service buffer duration, in minutes. The default buffer duration is 0 minute.
price float Service pricing. Default price is 0.
payable boolean Sets if the client can pay with paypal. The default value is false.
color string Service color, for dashboard displaying. Format: xxxxxx. The default value is EFEFEF.
picture object Service picture .
picture.data string Data URI of the service picture (eg: image/png;base64, xxxxx). See Data URI scheme
description string Description of the service.
capacity integer Service capacity.
staff list List of staff members who have the skills for the service.
availableForWidget boolean OUTDATED : replaced by availabilitySets if the service is available for online scheduling. Default value: true
availability string Availability of the service 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 .
allowBookingIteration boolean Set to True to allow user to book multiple iteration during scheduling process.
maxAppointmentsPerDay integer Sets how many appointments a client can book per day. Default value: 0 (no limit)
overNight boolean Set to True to activate the overNight mode for this service : once activated, the service can only be booked once per day at fixed time, but can be over two different days
overNightStartTime datetime If the overNight is activated, set the start time of the service in this parameter : example "15:00".
resource list List of all service resources linked to this service
resource.id id Identifier of the service resources.
localization string Localization of the service. "companyAddress", "videoconference". Default: "companyAddress". writable

Response

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


Update

Updates an entry on the company's service 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}/services/{serviceId}

Parameters

Parameter name Value Description
Path parameters
companyId string Company identifier.
serviceId string Service identifier or external id of service.
Optional query parameters
staff string Values: "all". If staff=all, all existing staff members are linked to th service. Only if the "staff" property is not set in the JSON.

Request body

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

Parameter name Value Description
Optional Properties
name string Name of the service.
duration integer Service duration, in minutes. The default duration is 60 minutes.
bufferDuration integer Service buffer duration, in minutes. The default buffer duration is 0 minute.
price float Service pricing. Default price is 0.
payable boolean Sets if the client can pay with paypal. The default value is false.
color string Service color, for dashboard displaying. Format: xxxxxx. The default value is EFEFEF.
description string Description of the service.
capacity integer Service capacity.
staff list List of staff members who have the skills for the service.
picture object Service picture .
picture.data string Data URI of the service picture (eg: image/png;base64, xxxxx). See Data URI scheme
availableForWidget boolean OUTDATED : replaced by availabilitySets if the service is available for online scheduling. Default value: true
availability string Availability of the service 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 .
allowBookingIteration boolean Set to True to allow user to book multiple iteration during scheduling process.
maxAppointmentsPerDay integer Sets how many appointments a client can book per day. Default value: 0 (no limit)
overNight boolean Set to True to activate the overNight mode for this service : once activated, the service can only be booked once per day at fixed time, but can be over two different days
overNightStartTime datetime If the overNight is activated, set the start time of the service in this parameter : example "15:00".
resource list List of all service resources linked to this service
resource.id id Identifier of the service resources.
localization string Localization of the service. "companyAddress", "videoconference". Default: "companyAddress". writable

Response

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


Patch

Add values in arrays of properties of an entry on the company's service list. Only properties listed bellow are supported

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

Request

HTTP Request

PATCH https://api.agendize.com/api/2.1/scheduling/companies/{companyId}/services/{serviceId}

Parameters

Parameter name Value Description
Path parameters
companyId string Company identifier.
serviceId string Service identifier or external id of staff member.

Request body

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

Parameter name Value Description
Optional Properties
staff list List of staff members who have the skills for the service. writable
staff id Identifier of the staff member. Writable. Max length 16.
staff firstName First name of the staff member. Read only.
staff lastName Last name of the staff member. Read only.
resource list List of all service resources linked to this service writable
resource.id id Identifier of the service resources. Writable. Max length 16.
resource.quantity integer Quantity of the service resources.
resource.name string Name of the service resources.

Response

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


Watch

Watch for changes to Service resources.

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

The watch send an Service resource in the request body

Request

HTTP Request

POST https://api.agendize.com/api/2.1/scheduling/companies/{companyId}/services/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

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