Skip to main content

Using POST Add Business with Custom Fields

Getting Started

  1. Ensure you are utilizing custom fields by contacting your Customer Success representative.
  2. Await confirmation that a custom field template has been added to your environment.
  3. Gather custom field IDs and review type structures in the “Custom Field Types” section.
  4. Utilize the “Adding to POST” section below to see payload structure and examples.
  5. POST

Custom Field Types

Currently, the following custom field types are supported via a POST Add Business:
  • Boolean: Standard true/false boolean values.
  • Integer: Whole number types (1, 2, 100, -1000, 999999999, etc.)
  • Decimal: Decimal number types (1.1, 2.0195, -1000.0001, 999999.9999992, etc.)
  • Text: Single strings with no line breaks.
  • Dropdown: A label/value object pair, a stringifed object pair, or a string representing the selected dropdown value.
    • Example 1: Dropdown JSON Object
    {
        "label": "Option1",
        "value": "Option1"
    }
    
    • Example 2: Stringified dropdown object: "{\"label\": \"Option1\", \"value\": \"Option1\"}"
    • Example 3: String value: "Option1" (Note: this is the value, not the label)
  • Checkbox: An array of checkbox objects or a stringified array of checkbox objects representing the checked items.
    • Example 1: Checkbox JSON Object Array - Single Checked Option
    [
        {
            "label": "Option1",
            "value": "Option1",
            "checkbox_type": "",
            "checked": true
        }
    ]
    
    • Example 2: Checkbox JSON Object Array - Multiple Checked Options
    [
        {
            "label": "Option1",
            "value": "Option1",
            "checkbox_type": "",
            "checked": true
        },
        {
            "label": "Option2",
            "value": "Option2",
            "checkbox_type": "",
            "checked": true
        }
    ]
    
    • Example 3: Stringified checkbox object array: "[{\"label\": \"Option1\", \"value\": \"Option1\", \"checkbox_type\": \"\", \"checked\": true}]"

Adding to POST

To add custom fields to the POST Add Business payload, simply include them to the payload body using a combination of “custom:” prefix and custom field ID as the property name. Then type the data appropriately using the “Custom Field Types” as reference.

POST examples

  • Simple Example 1
  • Extended Example 2
  • Advanced Example 3
Enabled Custom Fields:
  • Age of Business (years):
    • Custom field ID: age_of_business_years
    • Type: integer
  • Age of Business (months)
    • Custom field ID: age_of_business_months
    • Type: integer
  • Business Fun Fact
    • Custom field ID: fun_fact
    • Type: text
Minimum Add Business Payload:
    {
        "external_id": "Custom_Fields_Example_01",
        "name": "Company Incorporated LLC"
    }
Add Business Payload with Custom Fields:
    {
        "external_id": "Custom_Fields_Example_01",
        "name": "Company Incorporated LLC",
        "custom:age_of_business_years": 49,
        "custom:age_of_business_months": 11,
        "custom:fun_fact": "This business will always be one month short of 50 years old!"
    }