- 28 Jul 2022
- 6 Minutes to read
- Print
- DarkLight
Secure Form
- Updated on 28 Jul 2022
- 6 Minutes to read
- Print
- DarkLight
Secure Form
You need the Manage Secure Form permission to manage Secure Forms.
Secure Forms
- Secure Forms ManageGET livechat/secureForms
- Get the list of Secure FormsGET livechat/secureForms/{id}
- Get a single Secure FormPOST livechat/secureForms
- Create a new Secure FormPUT livechat/secureForms/{id}
- Update the Secure FormDELETE livechat/secureForms/{id}
- Remove the Secure Form
Secure Form Fields
- Secure Form Fields ManageGET livechat/secureFormFields
- Get the list of Secure Form FieldsGET livechat/secureFormFields/{id}
- Get a single Secure Form FieldPOST livechat/secureFormFields
- Create a new Secure Form FieldPUT livechat/secureFormFields/{id}
- Update the Secure Form FieldDELETE livechat/secureFormFields/{id}
- Remove the Secure Form Field
Secure Form JSON Format
Secure Form is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
id | guid | Id of the secure form. |
name | string | Name of the secure form. |
description | string | Description of the secure form. |
secureFormFields | secureFormFields[] | Reference to Secure Form Field. |
Secure Form Field Option JSON Format:
Name | Type | Description |
---|---|---|
id | guid | Id of the secure form field which the secure form field option belongs to. |
fieldId | guid | Id of the secure form field which the secure form field option belongs to. |
displayText | string | Display text of this secure form field option. |
order | int | Order of the secure form field option. |
Get the list of Secure Forms
GET livechat/secureForms
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
include | string | query | no | Allowed value is "secureFormField". |
Response:
An array of Secure Form
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/secureForms \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"secureForms": [
{
"id": "1B2A4C26-471B-421C-8CA3-757B2137584A",
"name": "Test form",
"description": "This is a test form",
"secureFormFields": [
{
"id": "c99c75de-427c-44b4-941b-7cebc9c21cdd",
"secureFormId": "0a6d3cf5-8e4d-4125-86b8-d41414efaa03",
"name": "Card Number",
"label": "",
"type": "cardNumber",
"isSystem": false,
"isVisible": true,
"isRequired": true,
"order": 0,
"secureFormFieldOptions": [
{
"id": "2e4c607a-e08c-4f94-8ea1-af8f949f857d",
"fieldId": "c99c75de-427c-44b4-941b-7cebc9c21cdd",
"displayText": "pci-rb1",
"order": 0
}
]
}
]
}
],
"nextPage": null,
"previousPage": null,
"total": 1
}
Get a single Secure Form
GET livechat/secureForms/{id}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
include | string | query | no | Allowed value is "secureFormField". |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/secureForms/1B2A4C26-471B-421C-8CA3-757B2137584A \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"id": "1B2A4C26-471B-421C-8CA3-757B2137584A",
"name": "Test form",
"description": "This is a test form",
"secureFormFields": [
{
"id": "c99c75de-427c-44b4-941b-7cebc9c21cdd",
"secureFormId": "0a6d3cf5-8e4d-4125-86b8-d41414efaa03",
"name": "Card Number",
"label": "",
"type": "cardNumber",
"isSystem": false,
"isVisible": true,
"isRequired": true,
"order": 0,
"secureFormFieldOptions": [
{
"id": "2e4c607a-e08c-4f94-8ea1-af8f949f857d",
"fieldId": "c99c75de-427c-44b4-941b-7cebc9c21cdd",
"displayText": "pci-rb1",
"order": 0
}
]
}
]
}
Create a new Secure Form
POST livechat/secureForms
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
name | string | body | yes | Name of the secure form. |
description | string | body | no | Description of the secure form. |
secureFormFields | secureFormFields[] | body | no | Reference to Secure Form Field. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/secureForms \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"name":"Test form","description":"This is a test form","secureFormFields":[{"name":"Card Number","label":"","type":"cardNumber","isSystem":false,"isVisible":true,"isRequired":true,"order":0,"secureFormFieldOptions":[{"displayText":"pci-rb1","order":0}]}]}'
Response:
HTTP/1.1 201 Created
{
"id": "1B2A4C26-471B-421C-8CA3-757B2137584A",
"name": "Test form",
"description": "This is a test form",
"secureFormFields": [
{
"id": "c99c75de-427c-44b4-941b-7cebc9c21cdd",
"secureFormId": "0a6d3cf5-8e4d-4125-86b8-d41414efaa03",
"name": "Card Number",
"label": "",
"type": "cardNumber",
"isSystem": false,
"isVisible": true,
"isRequired": true,
"order": 0,
"secureFormFieldOptions": [
{
"id": "2e4c607a-e08c-4f94-8ea1-af8f949f857d",
"fieldId": "c99c75de-427c-44b4-941b-7cebc9c21cdd",
"displayText": "pci-rb1",
"order": 0
}
]
}
]
}
Update the Secure Form
PUT livechat/secureForms/{id}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
name | string | body | no | Name of the secure form. |
description | string | body | no | Description of the secure form. |
secureFormFields | secureFormFields[] | body | no | Reference to Secure Form Field. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/secureForms/1B2A4C26-471B-421C-8CA3-757B2137584A \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"name":"Test form","description":"This is a test form","secureFormFields":[{"name":"Card Number","label":"","type":"cardNumber","isSystem":false,"isVisible":true,"isRequired":true,"order":0,"secureFormFieldOptions":[{"displayText":"pci-rb1","order":0}]}]}'
Response:
HTTP/1.1 200 OK
{
"id": "1B2A4C26-471B-421C-8CA3-757B2137584A",
"name": "Test form",
"description": "This is a test form",
"secureFormFields": [
{
"id": "c99c75de-427c-44b4-941b-7cebc9c21cdd",
"secureFormId": "0a6d3cf5-8e4d-4125-86b8-d41414efaa03",
"name": "Card Number",
"label": "",
"type": "cardNumber",
"isSystem": false,
"isVisible": true,
"isRequired": true,
"order": 0,
"secureFormFieldOptions": [
{
"id": "2e4c607a-e08c-4f94-8ea1-af8f949f857d",
"fieldId": "c99c75de-427c-44b4-941b-7cebc9c21cdd",
"displayText": "pci-rb1",
"order": 0
}
]
}
]
}
Remove the Secure Form
DELETE livechat/secureForms/{id}
Parameters:
No Parameters
Response:
No Content
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/secureForms/1B2A4C26-471B-421C-8CA3-757B2137584A \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 204 No Content
Secure Form Field JSON Format
Secure Form Field is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
id | guid | Id of the secure form field |
secureFormId | guid | Id of the secure form which the secure form field belongs to. |
name | string | Name of the secure form field. |
label | string | Label of the secure form field. |
type | string | Allowed values are "text", "textArea", "radioBox", "checkbox", "dropdownList", "checkboxList", "datePicker", "cardNumber", "expiration", "csc/cvv". |
isSystem | bool | Whether the form field is a system form field or not. |
isVisible | bool | Whether the form field is visible or not. |
isRequired | bool | Whether the form field is required or not. |
order | int | Order of the secure form field. |
secureFormFieldOptions | secureFormFieldOptions[] | Reference to Secure Form Field Option. |
Get the list of Secure Form Fields
GET livechat/secureFormFields
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
include | string | query | no | Allowed value is "secureFormFieldOption". |
Response:
An array of Secure Form Field
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/secureFormFields \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
[
{
"id": "c99c75de-427c-44b4-941b-7cebc9c21cdd",
"secureFormId": "0a6d3cf5-8e4d-4125-86b8-d41414efaa03",
"name": "Card Number",
"label": "",
"type": "cardNumber",
"isSystem": false,
"isVisible": true,
"isRequired": true,
"order": 0,
"secureFormFieldOptions": [
{
"id": "2e4c607a-e08c-4f94-8ea1-af8f949f857d",
"fieldId": "c99c75de-427c-44b4-941b-7cebc9c21cdd",
"displayText": "pci-rb1",
"order": 0
}
]
}
]
Get a single Secure Form Field
GET livechat/secureFormFields/{id}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
include | string | query | no | Allowed value is "secureFormFieldOption". |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/secureFormFields/c99c75de-427c-44b4-941b-7cebc9c21cdd \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"id": "c99c75de-427c-44b4-941b-7cebc9c21cdd",
"secureFormId": "0a6d3cf5-8e4d-4125-86b8-d41414efaa03",
"name": "Card Number",
"label": "",
"type": "cardNumber",
"isSystem": false,
"isVisible": true,
"isRequired": true,
"order": 0,
"secureFormFieldOptions": [
{
"id": "2e4c607a-e08c-4f94-8ea1-af8f949f857d",
"fieldId": "c99c75de-427c-44b4-941b-7cebc9c21cdd",
"displayText": "pci-rb1",
"order": 0
}
]
}
Create a new Secure Form Field
POST livechat/secureFormFields
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
secureFormId | guid | body | no | Id of the secure form which the secure form field belongs to. |
name | string | body | yes | Name of the secure form field. |
label | string | body | no | Label of the secure form field. |
type | string | body | yes | Allowed values are "text", "textArea", "radioBox", "checkbox", "dropdownList", "checkboxList", "datePicker", "cardNumber", "expiration", "csc/cvv". |
isSystem | bool | body | no | Whether the form field is a system form field or not. |
isVisible | bool | body | no | Whether the form field is visible or not. |
isRequired | bool | body | no | Whether the form field is required or not. |
order | int | body | no | Order of the secure form field. |
secureFormFieldOptions | secureFormFieldOptions[] | body | yes | Reference to Secure Form Field Option. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/secureFormFields \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"secureFormId":"0a6d3cf5-8e4d-4125-86b8-d41414efaa03","name":"Card Number","label":"","type":"cardNumber","isSystem":false,"isVisible":true,"isRequired":true,"order":0,"secureFormFieldOptions":[{"displayText":"pci-rb1","order":0}]}'
Response:
HTTP/1.1 201 Created
{
"id": "c99c75de-427c-44b4-941b-7cebc9c21cdd",
"secureFormId": "0a6d3cf5-8e4d-4125-86b8-d41414efaa03",
"name": "Card Number",
"label": "",
"type": "cardNumber",
"isSystem": false,
"isVisible": true,
"isRequired": true,
"order": 0,
"secureFormFieldOptions": [
{
"id": "2e4c607a-e08c-4f94-8ea1-af8f949f857d",
"fieldId": "c99c75de-427c-44b4-941b-7cebc9c21cdd",
"displayText": "pci-rb1",
"order": 0
}
]
}
Update the Secure Form Field
PUT livechat/secureFormFields/{id}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
secureFormId | guid | body | no | Id of the secure form which the secure form field belongs to. |
name | string | body | no | Name of the secure form field. |
label | string | body | no | Label of the secure form field. |
type | string | body | no | Allowed values are "text", "textArea", "radioBox", "checkbox", "dropdownList", "checkboxList", "datePicker", "cardNumber", "expiration", "csc/cvv". |
isSystem | bool | body | no | Whether the form field is a system form field or not. |
isVisible | bool | body | no | Whether the form field is visible or not. |
isRequired | bool | body | no | Whether the form field is required or not. |
order | int | body | no | Order of the secure form field. |
secureFormFieldOptions | secureFormFieldOptions[] | body | yes | Reference to Secure Form Field Option. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/secureFormFields/c99c75de-427c-44b4-941b-7cebc9c21cdd \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"secureFormId":"0a6d3cf5-8e4d-4125-86b8-d41414efaa03","name":"Card Number","label":"","type":"cardNumber","isSystem":false,"isVisible":true,"isRequired":true,"order":0,"secureFormFieldOptions":[{"displayText":"pci-rb1","order":0}]}'
Response:
HTTP/1.1 200 OK
{
"id": "c99c75de-427c-44b4-941b-7cebc9c21cdd",
"secureFormId": "0a6d3cf5-8e4d-4125-86b8-d41414efaa03",
"name": "Card Number",
"label": "",
"type": "cardNumber",
"isSystem": false,
"isVisible": true,
"isRequired": true,
"order": 0,
"secureFormFieldOptions": [
{
"id": "2e4c607a-e08c-4f94-8ea1-af8f949f857d",
"fieldId": "c99c75de-427c-44b4-941b-7cebc9c21cdd",
"displayText": "pci-rb1",
"order": 0
}
]
}
Remove the Secure Form Field
DELETE livechat/secureFormFields/{id}
Parameters:
No Parameters
Response:
No Content
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/secureFormFields/c99c75de-427c-44b4-941b-7cebc9c21cdd \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 204 No Content