BoldSales

API Documentation

Update a company field

patch/api/v1/companies/fields/{fieldId}

This API is used to update an existing field in a company module. The updated field configuration will be applied when users interact with the field in the BoldSales application.

Code snippet

curl -X 'PATCH' \
  'https://{yourdomain}/api/v1/companies/fields/{fieldId}' \
  -H 'accept: text/plain; x-api-version=1.0' \
  -H 'x-api-key: {your API key}' \
  -H 'Content-Type: application/json-patch+json; x-api-version=1.0' \
  -d '{
    "data": {
      "fieldName": "EmailAddress",
      "placeholderText": "Enter customer's email",
      "description": "The primary email address for customer communication",
      "instructions": "Please ensure the email is valid and active",
      "isRequired": true,
      "showInCreateForm": true
    }
  }'

Path parameters

fieldIdintegerRequiredThe unique identifier of the field to be updated.

Request body

fieldNamestringThis property represents the updated name of the field.
placeholderTextstringText displayed inside the field when it is empty, guiding users on the expected input or providing examples.
descriptionstringDescribes the field's purpose in more detail, often used for instructional or contextual information to help users understand how to use the field.
instructionsstringProvides specific instructions or guidelines on how to correctly fill out the field.
isRequiredbooleanBoolean flag indicating whether this field must have a value before the form can be submitted.
showInCreateFormbooleanThis parameter determines the field's visibility on the form page used for record creation.

Example response

200 Success

{
  "message": "Field updated successfully.",
  "data": {
    "id": 101
  }
}