Secure Form
  • 28 Jul 2022
  • 6 Minutes to read
  • Dark
    Light

Secure Form

  • Dark
    Light

Article Summary

Secure Form

You need the Manage Secure Form permission to manage Secure Forms.

Secure Form JSON Format

Secure Form is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idguidId of the secure form.
namestringName of the secure form.
descriptionstringDescription of the secure form.
secureFormFieldssecureFormFields[]Reference to Secure Form Field.

Secure Form Field Option JSON Format:

NameTypeDescription
idguidId of the secure form field which the secure form field option belongs to.
fieldIdguidId of the secure form field which the secure form field option belongs to.
displayTextstringDisplay text of this secure form field option.
orderintOrder of the secure form field option.

Get the list of Secure Forms

GET livechat/secureForms

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed 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:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "secureFormField".
  • Response:

Secure Form

  • 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:

NameTypeinRequiredDescription
namestringbodyyesName of the secure form.
descriptionstringbodynoDescription of the secure form.
secureFormFieldssecureFormFields[]bodynoReference to Secure Form Field.
  • Response:

Secure Form

  • 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:

NameTypeinRequiredDescription
namestringbodynoName of the secure form.
descriptionstringbodynoDescription of the secure form.
secureFormFieldssecureFormFields[]bodynoReference to Secure Form Field.
  • Response:

Secure Form

  • 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:

NameTypeDescription
idguidId of the secure form field
secureFormIdguidId of the secure form which the secure form field belongs to.
namestringName of the secure form field.
labelstringLabel of the secure form field.
typestringAllowed values are "text", "textArea", "radioBox", "checkbox", "dropdownList", "checkboxList", "datePicker", "cardNumber", "expiration", "csc/cvv".
isSystemboolWhether the form field is a system form field or not.
isVisibleboolWhether the form field is visible or not.
isRequiredboolWhether the form field is required or not.
orderintOrder of the secure form field.
secureFormFieldOptionssecureFormFieldOptions[]Reference to Secure Form Field Option.

Get the list of Secure Form Fields

GET livechat/secureFormFields

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed 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:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "secureFormFieldOption".
  • Response:

Secure Form Field

  • 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:

NameTypeinRequiredDescription
secureFormIdguidbodynoId of the secure form which the secure form field belongs to.
namestringbodyyesName of the secure form field.
labelstringbodynoLabel of the secure form field.
typestringbodyyesAllowed values are "text", "textArea", "radioBox", "checkbox", "dropdownList", "checkboxList", "datePicker", "cardNumber", "expiration", "csc/cvv".
isSystemboolbodynoWhether the form field is a system form field or not.
isVisibleboolbodynoWhether the form field is visible or not.
isRequiredboolbodynoWhether the form field is required or not.
orderintbodynoOrder of the secure form field.
secureFormFieldOptionssecureFormFieldOptions[]bodyyesReference to Secure Form Field Option.
  • Response:

Secure Form Field

  • 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:

NameTypeinRequiredDescription
secureFormIdguidbodynoId of the secure form which the secure form field belongs to.
namestringbodynoName of the secure form field.
labelstringbodynoLabel of the secure form field.
typestringbodynoAllowed values are "text", "textArea", "radioBox", "checkbox", "dropdownList", "checkboxList", "datePicker", "cardNumber", "expiration", "csc/cvv".
isSystemboolbodynoWhether the form field is a system form field or not.
isVisibleboolbodynoWhether the form field is visible or not.
isRequiredboolbodynoWhether the form field is required or not.
orderintbodynoOrder of the secure form field.
secureFormFieldOptionssecureFormFieldOptions[]bodyyesReference to Secure Form Field Option.
  • Response:

Secure Form Field

  • 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


Was this article helpful?

What's Next