Contact Field

Prev Next

Contact field

Contact field object

Name Type Description
id guid The id of custom field.
name string Unique name of the field.
isSystem bool Whether the field is a system field or not.
isIdentity bool Whether the field is an identity field or not.
identityType string Allowed values are visitor, Email, SMS, facebook, twitter, wechat, SSOID, externalID, whatsApp, instagram, telegram, line, SecureMessaging. Available when isIdentity is true.
isRequired bool Whether the field is required or not.
isVisible bool Whether the field is visible in UI or not.
isReadOnly string Whether the field is read only or not.
type string Type of the field. Allowed values are text, textArea, email, url, date, date time, integer, float, radio, checkbox, dropdownlist, checkboxlist, timezone.
length integer Field length.
helpText string Help text of the field.
defaultValue string Default value of the field.
order integer Order of the field.
fieldOptions fieldOptions[] Reference to Field Option.

Field option object

Name Type Description
id guid Id of the field option.
fieldId guid Id of the field which the option belongs to.
value string Value of the option.
order integer Order of the option.
displayText string Display text of the option.

Get the list of contact field

GET /contact/fields

  • Parameters:

No Parameters

  • Response

Contact field

  • Example

Sample Request:

curl https://api11.comm100.io/v4/contact/fields \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

[
  {
      "id": "c5cfcb28-3ce8-496a-8782-b90946aa549e",
      "siteId": 70000687,
      "isSystem": false,
      "type": "text",
      "name": "testField",
      "isRequired": true,
      "isIdentity": false,
      "identityType": "",
      "isVisible": true,
      "isReadOnly": false,
      "length": 256,
      "helpText": "help",
      "defaultValue": "",
      "order": 30,
      "fieldOptions": []
  }
]

Get a single contact field

GET /contact/fields/{id}

  • Parameters

No Parameters

  • Response

Contact field

  • Example

Sample Request:

curl https://api11.comm100.io/v4/contact/fields/c5cfcb28-3ce8-496a-8782-b90946aa549e \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "id": "c5cfcb28-3ce8-496a-8782-b90946aa549e",
  "siteId": 70000687,
  "isSystem": false,
  "type": "text",
  "name": "testField",
  "isRequired": true,
  "isIdentity": false,
  "identityType": "",
  "isVisible": true,
  "isReadOnly": false,
  "length": 256,
  "helpText": "help",
  "defaultValue": "",
  "order": 30,
  "fieldOptions": []
}

Create a new contact field

POST /contact/fields

  • Parameters

    Name Type in Required Description
    name string body yes Name of the field.
    isVisible bool body no Whether the field is visible in UI or not.
    isRequired bool body no Whether the field is required or not.
    isIdentity bool body no Whether the field is an identity field or not.
    identityType string body no Allowed values are visitor, Email, SMS, facebook, twitter, wechat, SSOID, externalID, whatsApp, instagram, telegram, line, SecureMessaging. Available when isIdentity is true.
    isReadOnly string body no Whether the field is read only or not.
    type string body yes Type of the field. Allowed values are "text", "textArea", "email", "url", "date", "integer", "float".
    length integer body yes Field length.
    helpText string body no Help text of the field.
    defaultValue string body no Default value of the field.
    order integer body no Field order.
    fieldOptions fieldOptions[] body no fieldOptions
  • Response

Contact Field

  • Example

Sample Request:

curl https://api11.comm100.io/v4/contact/fields \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \
    -D '{"name":"testfield01","isVisible":true,"isRequired":false,"isReadOnly":false,"type":"text","length":256,"helpText":"","defaultValue":"","order": 33,"fieldOptions": []}'

Response:

HTTP/1.1 201 OK

{
  "id": "9aa1027e-e5e1-4db9-87d9-92fd2731ed32",
  "siteId": 70000687,
  "isSystem": false,
  "type": "text",
  "name": "testfield01",
  "isRequired": false,
  "isIdentity": false,
  "identityType": "",
  "isVisible": true,
  "isReadOnly": false,
  "length": 256,
  "helpText": "",
  "defaultValue": "",
  "order": 33,
  "fieldOptions": []
}

Update a Contact Field

PUT /contact/fields/{id}

  • Parameters

    Name Type in Required Description
    name string body yes Unique name of the field. Cannot be changed.
    isVisible bool body no Whether the field is visible in UI or not.
    isRequired bool body no Whether the field is required or not.
    isIdentity bool body no Whether the field is an identity field or not.
    identityType string body no Allowed values are visitor, Email, SMS, facebook, twitter, wechat, SSOID, externalID, whatsApp, instagram, telegram, line, SecureMessaging. Available when isIdentity is true.
    isReadOnly string body no Whether the field is read only or not.
    type string body yes Type of the field. Allowed values are "text", "textArea", "email", "url", "date", "integer", "float"
    length integer body yes Field length.
    helpText string body no Help text of the field.
    defaultValue string body no Default value of the field.
    order integer body no Field order.
    fieldOptions Field option body no fieldOptions[]
  • Response

Contact Field

  • Example

Sample Request:

curl https://api11.comm100.io/v4/contact/fields/9aa1027e-e5e1-4db9-87d9-92fd2731ed32 \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \
    -D '{"type": "text","name": "testfield01","isRequired": false,"isIdentity": false,"identityType": "","isVisible": true,"isReadOnly": false,"length": 300,"helpText": "","defaultValue": "","order": 33,"fieldOptions": []}'

Response:

HTTP/1.1 200 OK

{
  "id": "9aa1027e-e5e1-4db9-87d9-92fd2731ed32",
  "siteId": 70000687,
  "isSystem": false,
  "type": "text",
  "name": "testfield01",
  "isRequired": false,
  "isIdentity": false,
  "identityType": "",
  "isVisible": true,
  "isReadOnly": false,
  "length": 300,
  "helpText": "",
  "defaultValue": "",
  "order": 33,
  "fieldOptions": []
}

Delete a Contact Field

Delete /contact/fields/{id}

  • Parameters

No Parameters

  • Response

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/contact/fields/9aa1027e-e5e1-4db9-87d9-92fd2731ed32 \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content

Reorder Contact Fields

POST /contact/fields:reorder

  • Parameters

    Name Type Required Description
    id array yes The array of contact field id.
  • Response

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/contact/fields:reorder \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -D '["ba896ca7-d4d6-4b7f-b3c5-1b3e43509b97","e92686d4-5eee-414d-a2c5-40a595f2b324"]'

Response:

HTTP/1.1 200 OK

Copyright © 2022 Comm100 Network Corporation. All Rights Reserved.