Home > Agendize Scheduling

Scheduling Widget Forms


Resource representation : Widget Form

{ "id": {string}, "author": {string}, "name": {string}, "contactFields": [ {FormItem object} ], "additionalFields": [ [ {FormItem object} ] ], "objects": [ { "id": {string}, "type": {string} } ] }
Parameter name Value Description Notes
id string Identifier of the form's company. read only
author string Author of the form. read only
name string Name of the form.
contactFields list Primary fields of the form, will always contains following bind fields : crm-last-name, crm-first-name, crm-email and crm-phone. If absent, a default value will be set, example here
additionalFields list Additional fields pages of the form. Each json array in this field are equals to a page in the scheduling widget
objects list List of object assignement for this form. An object can not be assigned twice.
objects[].id string Identifier of the object : service Id, resource Id, location Id or user Id
objects[].type string Type of the object. Values: "location", "service", "resource" or "allLocations"

Additional representation : FormItem

{ "id": {string}, "type": {string}, "title": {string}, "help": {string}, "mandatory": {boolean}, "visible" : {boolean}, "bindGroup": {string}, "bind": {string), "valueFormat": { "maxLength": {string}, "regexType: {string}, "regexValue: {string}, "valueFormat": {string} }, "values": [ { "id": {string), "name": {string}, "value": {string} } ], "subItem": [ {FormItem object} ] }
Parameter name Value Description Notes
FormItem.id string Id of the field. Can not be empty.
FormItem.type string Type of the field. Values:
  • "input": input text
  • "select": dropdown
  • "checkbox": check box
  • "radio": radio button list
  • "textarea": textaera
  • "title": text label
  • "file": file upload
  • "address": client full address
  • "date": date
FormItem.title string Title of the field.
FormItem.bind string Binding string form special fields. Values:
  • crm-address
  • crm-address-firstline
  • crm-address-secondline
  • crm-address-city
  • crm-address-postalcode
  • crm-address-state
  • crm-address-country
  • crm-job-title
  • crm-company
  • crm-notifications
  • crm-language
  • crm-reference
  • crm-reminder
  • crm-birthdate
  • crm-miscellaneous-* : CRM additional fields (from 1 to 10)
Some other values are available but can only be set in the contactFields field :
  • crm-first-name
  • crm-last-name
  • crm-email
  • crm-phone
FormItem.bindGroup string Binding group string form special group of fields. Values:
  • crm
FormItem.help string Help text of the field.
FormItem.mandatory boolean If the field is mandatory.
FormItem.values list Values list of the field.
FormItem.values[].id string Identifier of the field value.
FormItem.values[].name string Name of the field value.
FormItem.values[].value string Identifier of the field value.
FormItem.visible boolean If the field is visible by client.
FormItem.valueFormat object Input rules.
FormItem.valueFormat.maxLength string Max length.
FormItem.valueFormat.regexType string Type of regex.
FormItem.valueFormat.regexValue string Value of regex.
FormItem.valueFormat.valueFormat string Type or format
  • alphanumeric
  • numeric
  • regex
  • none
FormItem.subItem list List of sub FormItem, used only with crm-address field.

Get

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

Request

HTTP Request

GET http://api.agendize.com/api/2.1/scheduling/widgetForms/{formId}

Parameters

Parameter name Value Description
formId string formId identifier.

Request body

Do not supply a request body with this method.

Response

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


List

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

Request

HTTP Request

GET http://api.agendize.com/api/2.1/scheduling/widgetForms

Parameters

Parameter name Value Description
Optional parameters
companyId string company identifier.
serviceId string company service identifier.
resourceId string company resource identifier.

Request body

Do not supply a request body with this method.

Response

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

If no widget form was found, a default one will be build and return as response to the query, this widget form is not saved into data base.


Insert

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

Request

HTTP Request

POST http://api.agendize.com/api/2.1/scheduling/widgetForms

Request body

In the request body, supply a Form resource

Response

If successful, this method returns a Form 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 http://api.agendize.com/api/2.1/scheduling/widgetForms/{formId}

Parameters

Parameter name Value Description
formId string formId identifier.

Request body

In the request body, supply a Form resource

Response

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


Delete

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

Request

HTTP Request

DELETE http://api.agendize.com/api/2.1/scheduling/widgetForms/{formId}

Parameters

Parameter name Value Description
formId string Form identifier.

Request body

Do not supply a request body with this method.

Response

If successful, this method returns an empty response body.

Contact default value

"contactFields": [ { "bind": "crm-first-name", "bindGroup": "crm", "id": 1540564150983, "mandatory": true, "title": "First Name:", "type": "input", "visible": true }, { "bind": "crm-last-name", "bindGroup": "crm", "id": 1540564150984, "mandatory": true, "title": "Last Name:", "type": "input", "visible": true }, { "bind": "crm-email", "bindGroup": "crm", "id": 1540564150985, "mandatory": true, "title": "Email", "type": "input", "visible": true }, { "bind": "crm-phone", "bindGroup": "crm", "id": 1540564150986, "mandatory": true, "title": "Phone Number", "type": "input", "visible": true } ]