Agendize Client API

Clients/CRM API Reference

The Clients/CRM API empowers you to manage your entire client list and their interactions. This API reference is organized around several objects that can have dependencies with other engagement tools:


Resource representation

{ "id": {string}, "firstName": {string}, "lastName": {string}, "emailAddresses": [ { "email": {string}, "primary": {boolean} } ], "phoneNumbers": [ { "number": {string}, "primary": {boolean}, "mobile": {boolean} } ], "gender": {string}, "timeZone": {string}, "language": {string}, "description": {string}, "picture": { "url": {string}, "mimeType": {string}, "data": {string} }, "address": { "street": {string}, "otherStreet": {string}, "zipCode": {string}, "state": {string}, "city": {string}, "country": {string} }, "tags": [ { "tag": {string}, "color": {string} } ], "externalId": {string}, "companyName": {string}, "title": {string}, "jobTitle": {string}, "webSiteLink": {string}, "additionalAddresses": [ { "street": {string}, "otherStreet": {string}, "zipCode": {string}, "state": {string}, "city": {string}, "country": {string} } ], "relationship": [ { client resource } ], "birthDate": {string}, "additionalFields": [ { "id": {string}, "name": {string}, "value": {string} } ], "explicitConsent": { "dateTime": {dateTime}, "text": {string} }, "marketingConsent": { "dateTime": {dateTime}, "text": {string} }, "companies": [ { "id": {string} "name": {string} } ], "mergedClient": {object}, "status": {integer}, "extendedProperties": { "private": {object}, "public": {object} } }
Parameter name Value Description
id string Identifier of the client.
firstName string First name of the client. Max length: 127.
lastName string Last name of the client. Max length: 127.
emailAddresses[] list Email addresses of the client.
emailAddresses[].email string Email address. Max length: 255.
emailAddresses[].primary boolean Whether the email address is the primary email address of the client.
phoneNumbers[] string Phone numbers of the client.
phoneNumbers[].number string Phone number. Max length: 255.
phoneNumbers[].primary boolean Whether the phone number is the primary phone number of the client.
phoneNumbers[].mobile boolean Whether the phone number is a mobile phone number.
gender string Gender of the client. Values: "male", "female" or "undefined".
timeZone string Time zone of the client. Only if time zone has been specified. Default value: the time zone of the company if the client has been created from an appointment otherwise the time zone of the account.
language string Spoken language of the client. Only if client language has been specified. Default value: the language of the account.
description string Description of the client. Max length: 4 GB.
address object Postal address of the client.
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. Max length: 127.
picture object Client picture url and mime type.
picture.url string Url of the client picture.
picture.mimeType string Mime type of the client picture file.
picture.data string Binary data of the client picture file, base64 encoded with Data URI Scheme. Only use with insert and update methods.
tags[] list Tags of the client.
tags[].tag string Text of tag. Max length: 255.
tags[].color boolean Color of tag. Web format (#xxxxxx)
externalId string Unique client identifier from another (external) system. Max length: 65535.
companyName string company name of the client. Max length: 255.
title string Title of the client. Values: "mr" or "mrs", "dr".
jobTitle string Job title of the client. Max length: 255.
webSiteLink string Web site URL of the client. Max length: 255.
additionalAddresses[] list Additional postal address of the client.
additionalAddresses[].street string Main street address. Max length: 255.
additionalAddresses[].otherStreet string Optional street address. Max length: 255.
additionalAddresses[].zipCode string Zip code of address. Max length: 45.
additionalAddresses[].state string State of address. Max length: 100.
additionalAddresses[].city string City of address. Max length: 100.
additionalAddresses[].country string Country of address. Max length: 45.
relationship[] list list of client linked width the current client. Use a client resource.
birthDate string birth date of the client. Format yyyy-MM-dd (year-month-day).
additionalFields list List of fields.
additionalFields[].id string Identifier of the field.
additionalFields[].name string Name of the field.
additionalFields[].value string Value of the field.
explicitConsent object Last client's explicit consent.
explicitConsent.dateTime dateTime Date of the consent.
explicitConsent.text string Text of the consent.
marketingConsent object Last client's marketing consent.
marketingConsent.dateTime dateTime Date of the consent.
marketingConsent.text string Text of the consent.
companies[] list List of company of the client. writable
companies[].id string Identifier of the company. writable
companies[].name boolean Name of the company
mergedClient object Properties of the merged client. Only for merged watch and merge function.
status integer Status of the client. Possible values are :
  • 0 : no status, by default
  • 1 : blocked client, this client can not take appointments
extendedProperties object Extended Properties. You can defined your custom properties. Size limit: 22KB.
extendedProperties.private object Private properties. These properties are not retrieve in widget.
extendedProperties.public object Private properties. These properties are retrieve in widget.

Delete

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

Request

HTTP Request

DELETE https://api.agendize.com/api/2.0/clients/{clientId}

Parameters

Parameter name Value Description
Path parameters
clientId string Client identifier.

Request body

Do not supply a request body with this method.

Response

If successful, this method returns an empty response body.


Get

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

Request

HTTP Request

GET https://api.agendize.com/api/2.0/clients/{clientId}

Parameters

Parameter name Value Description
Path parameters
clientId string Client identifier or externalId.

Request body

Do not supply a request body with this method.

Response

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


List

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

Request

HTTP Request

GET https://api.agendize.com/api/2.0/clients

Parameters

Parameter name Value Description
Optional query parameters
search string Search clients by first name, last name, phone number and email address. Incompleted value can by used.
maxResults integer Maximum number of clients returned on one result page. By default the value is no limit.
resultsOffset integer Starting index in the clients list.
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.

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: [Client Resource], totalCount: {integer} }

Insert

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

Request

HTTP Request

POST https://api.agendize.com/api/2.0/clients

Request body

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

Parameter name Value Description
Required Properties
lastName string Last name of the client.
Optional Properties
firstName string First name of the client.
emailAddresses[] list Email addresses of the client.
emailAddresses[].email string Email address.
emailAddresses[].primary boolean Whether the email address is the primary email address of the client.
phoneNumbers(] string Phone numbers of the client.
phoneNumbers[].number string Phone number.
phoneNumbers[].primary boolean Whether the phone number is the primary phone number of the client.
phoneNumbers[].mobile boolean Whether the phone number is a mobile phone number.
gender string Gender of the client. Values: "male", "female" or "undefined".
timeZone string Time zone of the client. Only if time zone has been specified.
language string Spoken language of the client. Only if client language has been specified.
description string Description of the client.
address object Postal address of the client.
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.
picture object Client picture url and mime type.
picture.url string Url of the client picture.
picture.mimeType string Mime type of the client picture file.
picture.data string Binary data of the client picture file, base64 encoded with Data URI Scheme. Only use with insert and update methods.
tags[] list Tags of the client.
tags[].tag string Text of tag.
tags[].color boolean Color of tag. Web format (#xxxxxx)
externalId string Unique client identifier from another (external) system.
companyName string company name of the client.
title string Title of the client. Values: "mr" or "mrs", "dr".
jobTitle string Job title of the client.
webSiteLink string Web site URL of the client.
marketingConsent object Marketing consent.
marketingConsent.text string Text of the consent.
status integer Status of the client. Possible values are :
  • 0 : no status, by default
  • 1 : blocked client, this client can not take appointments

Response

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


Merge

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

Request

HTTP Request

POST https://api.agendize.com/api/2.3/clients/functions/merge

Parameters

Parameter name Value Description
Required query parameters
clientId string Identifier of the main client.
mergeClientId string Identifier of the client to merge in the main client.

Request body

Do not supply a request body with this method.

Response

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


Update

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

Request

HTTP Request

PUT https://api.agendize.com/api/2.0/clients/{clientId}

Parameters

Parameter name Value Description
Path parameters
clientId string Client identifier or externalId.

Request body

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

Parameter name Value Description
Optional Properties
firstName string First name of the client.
lastName string Last name of the client.
emailAddresses[] list Email addresses of the client.
emailAddresses[].email string Email address.
emailAddresses[].primary boolean Whether the email address is the primary email address of the client.
phoneNumbers(] string Phone numbers of the client.
phoneNumbers[].number string Phone number.
phoneNumbers[].primary boolean Whether the phone number is the primary phone number of the client.
phoneNumbers[].mobile boolean Whether the phone number is a mobile phone number.
gender string Gender of the client. Values: "male", "female" or "undefined".
timeZone string Time zone of the client. Only if time zone has been specified.
language string Spoken language of the client. Only if client language has been specified.
description string Description of the client.
address object Postal address of the client.
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.
picture object Client picture url and mime type.
picture.mimeType string Mime type of the client picture file.
picture.data string Binary data of the client picture file, base64 encoded with Data URI Scheme. Only use with insert and update methods.
tags[] list Tags of the client.
tags[].tag string Text of tag.
tags[].color boolean Color of tag. Web format (#xxxxxx)
externalId string Unique client identifier from another (external) system.
companyName string company name of the client.
title string Title of the client. Values: "mr" or "mrs", "dr".
jobTitle string Job title of the client.
webSiteLink string Web site URL of the client.
marketingConsent object Marketing consent.
marketingConsent.text string Text of the consent.
status integer Status of the client. Possible values are :
  • 0 : no status, by default
  • 1 : blocked client, this client can not take appointments

Response

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


Patch

Add values in arrays of properties of an entry. 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.0/clients/{clientId}

Parameters

Parameter name Value Description
Path parameters
clientId string Client identifier or externalId.

Request body

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

Parameter name Value Description
Optional Properties
companies[] list List of company of the client. writable
companies[].id string Identifier of the company. writable
companies[].name boolean Name of the company

Response

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


Watch

Watch for changes to clients.

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

The watch send an Client resource in the request body

Request

HTTP Request

POST https://api.agendize.com/api/2.0/clients/watch

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.

Response

If successful, this method returns an of Watch resource in the response body.

Watch event supported

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