This API allows you to create custom fields, either applicable across all entities within the organization or specific to a single entity, such as a loyalty transaction. You can create custom fields with the same name separately for the parent and child organizations. This is useful in scenarios where you want to assign distinct values to the custom field at the parent and child levels, such as setting different header content in email campaigns for each organization.
Note: For customer registration, it is recommended to avoid using identical custom field names for both parent and child organizations. When a custom field with the same name exists at both levels, the value at the parent level will always override that of the child organization.
API endpoint example
https://eu.intouch.capillarytech.com/v2/customFields
Prerequisites
- Authentication - Basic Auth
- User name: Capillary Intouch email ID of the admin user
- Password: Intouch login password in MD5.
Resource information
URI | v2/customFields |
HTTP method | POST |
Pagination supported? | NA |
Rate limit | NA |
Batch support | NA |
Header Information
Both the headers are mandatory.
X-CAP-API-AUTH-KEY | Auth Key for internal API |
X-CAP-API-AUTH-ORG-ID | Org ID |
Body parameters
Parameter | Data Type | Description |
---|---|---|
scope |
STRING |
The entity for which the custom field will be applicable. For example, the custom fields created for the scope
|
customFields |
ARRAY |
Includes the custom fields that need to be created. |
|
STRING |
Name of the custom field. The maximum number of characters supported is 20. |
|
STRING |
Field type of the custom field. The supported types are text, textarea, select, checkbox, radio, file, template_area, datepicker, separator, button, email_body, feedback, and label |
|
Enum |
Data type of the custom field. The supported data types are Boolean, Integer, Double and String. |
|
STRING |
Name to be displayed on the UI. |
|
STRING |
Default value assigned to the custom field, e.g., |
|
STRING/INT |
This is applicable for Instore and is not in use. |
|
INT |
Specify the sequence order of the custom field. For example, 1 to appear in the first position of the form. This field applies to client-side applications like Instore and does not undergo any server-side validation. |
|
STRING |
Allows you to specify logical expressions in the Infix expression language. You can use placeholders like {{custom_field_name}}, which will be dynamically replaced with actual values during evaluation. |
|
STRING |
Allows you to define rules in Infix form. You should use the following format to specify the rule: |
|
STRING |
Regular expression for validation (if any). For example, you can use regex to validate an email field. |
|
STRING |
Error message to display for invalid input (if any). |
|
BOOLEAN |
Indicates if the custom field is disabled ( |
|
BOOLEAN |
Indicates if the custom field is mandatory ( |
|
BOOLEAN |
Indicates if the field is disabled on the server ( |
|
BOOLEAN |
Indicates if the field can be updated ( |
|
BOOLEAN |
Specifies if audit trails are enabled ( |
|
BOOLEAN |
Marks if the field contains PII data ( |
|
BOOLEAN |
Marks if the field contains PSI data ( |
|
STRING |
Help text associated with the field (if any). |
|
STRING |
Additional attributes for the field (if any). |
{
"scope": "ORG_CUSTOM_FIELD",
"customFields": [
{
"name": "Email Footer Color",
"type": "text",
"dataType": "STRING",
"label": "Mail content",
"scope": "ORG_CUSTOM_FIELD",
"defaultValue": "#1234",
"phase": "1",
"position": 0,
"rule": "",
"serverRule": "",
"regex": "",
"error": "",
"isDisabled": 0,
"isCompulsory": 0,
"disableAtServer": 0,
"isUpdatable": 0,
"enableAuditTrail": 0,
"isPiiData": 0,
"isPsiData": 0,
"helptext": "",
"attrs": ""
}
]
}
NoteThe maximum number of auditable custom fields that can be created is controlled by the
PRODUCT_CONF_ORG_AUDITABLE_CUSTOM_FIELDS_LIMIT
configuration. If this configuration is not set for a specified organisation, the default limit is set to 5 at the backend.
Response parameters
{
"entity": [
{
"orgId": 50399,
"name": "Email Footer Color",
"type": "text",
"dataType": "STRING",
"label": "Mail content",
"scope": "ORG_CUSTOM_FIELD",
"defaultValue": "#1234",
"phase": "1",
"position": 0,
"rule": "",
"serverRule": "",
"regex": "",
"error": "",
"isDisabled": 0,
"isCompulsory": 0,
"disableAtServer": 0,
"isUpdatable": 0,
"enableAuditTrail": 0,
"isPiiData": 0,
"isPsiData": 0,
"helptext": "",
"attrs": "",
"value": ""
}
],
"warnings": [],
"errors": [],
"success": true
}
Error codes
Error Code | Error | Description |
---|---|---|
91032 | NOT_AN_ADMIN_USER | Only admin user can access the endpoint. |
1018 | INVALID_CUSTOM_FIELD_SCOPE | Provided scope is invalid. |
1023 | AUDITABLE_CUSTOM_FIELDS_COUNT_BREACHED | Maximum auditable custom field limit is {0} , existing count is {1} (including the current payload). |
1024 | CUSTOM_FIELD_PARAM_NULL_OR_EMPTY | Custom field parameter {0} is null or empty. |
1025 | DUPLICATE_ORG_CUSTOM_FIELD | Duplicate organisation custom field: {0} . |
1026 | FAILED_TO_SAVE_CUSTOM_FIELDS | Failed to save custom fields. Try again. |
1028 | CUSTOM_FIELD_LIST_NULL_OR_EMPTY | Null or empty custom field list. |
Note: In the descriptions, {0}
and {1}
are placeholders that will be replaced with specific values, such as the maximum limit, current count, or field name based on the context.