OnAutomate API V1.1.1

Welcome to onautomate Api docs.

Custom Field

GET /v1/custom-fields/

https://link.amtssl.com/v1/custom-fields/

Get all available custom fields.

Authorization:

Provide your location api key (Bearer Token).

AUTHORIZATION

Bearer Token

Token

<token>

Example Request

curl --location --request GET 'https://link.amtssl.com/v1/custom-fields/' \

--header 'Authorization: Bearer <token>'

Example Response

Unauthorized

Bad Request. please contact support!

401 Unauthorized

{

"msg": "Unauthorized"

}

400 Bad Request

{

"msg": "Bad Request"

}

Headers

Content-Type: application/json

Headers

Content-Type: application/json

Successful Response

200 OK

{

"customFields": [

{

"id": "ocQHyuzHvysMo5N5VsXc",

"name": "Select",

"fieldKey": "contact.select",

"dateType": "SINGLE_OPTIONS",

"picklistOptions": [

"first",

"first"

]

},

{

"id": "ocQHyuzHvysMo5N5VsXc",

"name": "Select",

"fieldKey": "contact.select",

"dateType": "SINGLE_OPTIONS",

"picklistOptions": [

"first",

"first"

]

}

]

}

POST /v1/custom-fields/

https://link.amtssl.com/v1/custom-fields/

Creating Custom Field.

Data Type Fields will allow these options. ex:

Options:

  • TEXT
  • LARGE_TEXT
  • NUMERICAL
  • PHONE
  • MONETORY
  • CHECKBOX
  • SINGLE_OPTIONS
  • MULTIPLE_OPTIONS
  • FLOAT
  • TIME
  • DATE
  • TEXTBOX_LIST
  • FILE_UPLOAD
  • SIGNATURE

Validation:

Name and Date Type are required to create every custom field.

On every data type of field have different validation rules. These are the different validation rules.

FILE_UPLOAD:

• acceptedFormat *(required) This will allow array of file format.

  • .pdf
  • .docx
  • .jpeg
  • .png
  • .gif
  • .csv
  • all

• isMulitpalFile (optional) it allow true or false. If you want to allow multipal files pass true

• axNumberOfFiles (options) It will allow maximum these number of files.

SINGLE_OPTIONS / MULTIPLE_OPTIONS / CHECKBOX:

options *(required) This will allow array of options.

TEXTBOX_LIST

• textBoxListOptions: (required) This will allow array of textbox list. Array will contanis label and prefillValue. ex.: {label": "Hello", "prefillValue": "value"}

Authorization:

Provide your location api key (Bearer Token).

AUTHORIZATION

Bearer Token

Token

<token>

HEADERS

Content-Type

application/json

BODY raw

{

"name": "Custom Field",

"dataType": "TEXT",

"options": [

"first option",

"last option"

],

"acceptedFormat": [

".pdf",

".docx",

".jpeg"

],

"isMultipalFile": false,

"maxNumberOfFiles": 2,

"textBoxListOptions": [

{

"label": "First",

"prefillValue": ""

},

{

"label": "First",

"prefillValue": ""

}

]

}

Example Request

curl --location --request POST 'https://link.amtssl.com/v1/custom-fields/' \

--header 'Authorization: Bearer <token>' \

--data-raw '{

"name": "Custom Field",

"dataType": "TEXT",

"options": [

"first option",

"last option"

],

"acceptedFormat": [

".pdf",

".docx",

".jpeg"

],

"isMultipalFile": false,

"maxNumberOfFiles": 2,

"textBoxListOptions": [

{

"label": "First",

"prefillValue": ""

},

{

"label": "First",

"prefillValue": ""

}

]

}'

Example Response

Unauthorized

Bad Request. please contact support!

401 Unauthorized

Body

{

"msg": "Unauthorized"

}

401 Unauthorized

Body

{

"msg": "Bad Request"

}

HEADERS

Content-Type: application/json

HEADERS

Content-Type: application/json

Unprocessable Entity

Successful Response

422 Unprocessable Entity (WebDAV) (RFC 4918)

BODY

{

"name": {

"message": "The name field is mandatory.",

"rule": "required"

},

"dataType": {

"message": "The data type field is mandatory.",

"rule": "required"

},

"options or acceptedFormat or textBoxListOptions": {

"message": "The options or acceptedFormat or textBoxListOptions field is mandatory.",

"rule": "required"

}

}

200 OK

BODY

{

"id": "ocQHyuzHvysMo5N5VsXc",

"name": "Select",

"fieldKey": "contact.select",

"dateType": "SINGLE_OPTIONS",

"picklistOptions": [

"first",

"first"

]

}

GET /v1/custom-fields/:customFieldId

https://link.amtssl.com/v1/custom-fields/:customFieldId

Get custom fields by id

Authorization:

Provide your location api key (Bearer Token).

AUTHORIZATION

Bearer Token

Token

<token>

PATH VARIABLES

customFieldId

ocQHyuzHvysMo5N5VsXc

(Required) Custom Field Id

Example Request

curl --location --request GET 'https://link.amtssl.com/v1/custom-fields/:customFieldId' \

--header 'Authorization: Bearer <token>'

Example Response

Bad Request. please contact support!

Successful response

Unauthorized

400 Bad Request

Body

{

"msg": "Bad Request"

}

200 OK

Body

{

"id": "ocQHyuzHvysMo5N5VsXc",

"name": "Select",

"fieldKey": "contact.select",

"dateType": "SINGLE_OPTIONS",

"picklistOptions": [

"first",

"first"

]

}

401 Unauthorized

Body

{

"msg": "Unauthorized"

}

Headers

Content-Type: application/json

Headers

Content-Type: application/json

Headers

Content-Type: application/json

PUT /v1/custom-fields/:customFieldId

https://link.amtssl.com/v1/custom-fields/:customFieldId

Updating Custom Field.

Data Type Fields will allow these options. ex:

Options:

  • TEXT
  • LARGE_TXT
  • NUMERICAL
  • PHONE
  • MONETORY
  • CHECKBOX
  • SINGLE_OPTIONS
  • MULTIPLE_OPTIONS
  • FLOAT
  • TIME
  • DATE
  • TEXTBOX_LIST
  • FILE_UPLOAD
  • SIGNATURE

Validation:

Name and Date Type are required to create every custom field.

On every data type of field have diffrent validation rules. These are the different validation rules.

FILE_UPLOAD:

• acceptedFormat *(required) This will allow array of file format.

  • .pdf
  • .docx
  • .jpeg
  • .png
  • .gif
  • .csv
  • all

• isMulitpalFile (optional) it allow true or false. If you want to allow multipal files pass true

• maxNumberOfFiles (options) It will allow maximum these number of files.

SINGLE_OPTIONS / MULTIPLE_OPTIONS / CHECKBOX:

• options *(required) This will allow array of options.

TEXTBOX_LIST

• textBoxListOptions: (required) This will allow array of textbox list. Array will contanis label and prefillValue. ex.: {label": "Hello", "prefillValue": "value"}

Authorization:

Provide your location api key (Bearer Token).

AUTHORIZATION

Bearer Token

Token

<token>

HEADERS

Content-Type

application/json

PATH VARIABLES

customFieldId

ocQHyuzHvysMo5N5VsXc

(Required) Custom Field Id

BODY raw

{

"name": "Custom Field",

"dataType": "TEXT",

"options": [

"first option",

"last option"

],

"acceptedFormat": [

".pdf",

".docx",

".jpeg"

],

"isMultipalFile": false,

"maxNumberOfFiles": 2,

"textBoxListOptions": [

{

"label": "First",

"prefillValue": ""

},

{

"label": "First",

"prefillValue": ""

}

]

}

Example Request

curl --location --request PUT 'https://link.amtssl.com/v1/custom-fields/:customFieldId' \

--header 'Authorization: Bearer <token>' \

--data-raw '{

"name": "Custom Field",

"dataType": "TEXT",

"options": [

"first option",

"last option"

],

"acceptedFormat": [

".pdf",

".docx",

".jpeg"

],

"isMultipalFile": false,

"maxNumberOfFiles": 2,

"textBoxListOptions": [

{

"label": "First",

"prefillValue": ""

},

{

"label": "First",

"prefillValue": ""

}

]

}'

Example Response

Unprocessable Entity

Bad Request. please contact support!

Unauthorized

Successful response

422 Unprocessable Entity (WebDAV) (RFC 4918)

Body

{

"name": {

"message": "The name field is mandatory.",

"rule": "required"

},

"dataType": {

"message": "The data type field is mandatory.",

"rule": "required"

},

"options or acceptedFormat or textBoxListOptions": {

"message": "The options or acceptedFormat or textBoxListOptions field is mandatory.",

"rule": "required"

}

}

400 Bad Request

Body

{

"msg": "Bad Request"

}

401 Unauthorized

Body

{

"msg": "Unauthorized"

}

200 OK

Body

{

"id": "ocQHyuzHvysMo5N5VsXc",

"name": "Select",

"fieldKey": "contact.select",

"dateType": "SINGLE_OPTIONS",

"picklistOptions": [

"first",

"first"

]

}

Headers

Content-Type: application/json

Headers

Content-Type: application/json

Headers

Content-Type: application/json

Headers

Content-Type: application/json

DEL /v1/custom-fields/:customFieldId

https://link.amtssl.com/v1/custom-fields/:customFieldId

Delete one of custom fields.

Authorization:

Provide your location api key (Bearer Token).

AUTHORIZATION

Bearer Token

Token

<token>

PATH VARIABLES

customFieldId

ocQHyuzHvysMo5N5VsXc

(Required) Custom Field Id

Example Request

curl --location --request DELETE 'https://link.amtssl.com/v1/custom-fields/:customFieldId' \

--header 'Authorization: Bearer <token>'

Example Response

Successful response

Unauthorized

Bad Request. please contact support!

Unprocessable Entity

200 OK

""

401 Unauthorized

{

"msg": "Unauthorized"

}

400 Bad Request

{

"msg": "Bad Request"

}

422 Unprocessable Entity (WebDAV) (RFC 4918)

{

"customFieldId": {

"message": "The custom field id is invalid.",

"rule": "invalid"

}

}

Headers

Content-Type: application/json

Headers

Content-Type: application/json

Headers

Content-Type: application/json

Headers

Content-Type: application/json