Update a product field
patch/api/v1/products/fields/{fieldId}This API is used to update an existing field in a product 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/products/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
| fieldIdintegerRequired | The unique identifier of the field to be updated. |
Request body
| fieldNamestring | This property represents the updated name of the field. |
| placeholderTextstring | Text displayed inside the field when it is empty, guiding users on the expected input or providing examples. |
| descriptionstring | Describes the field's purpose in more detail, often used for instructional or contextual information to help users understand how to use the field. |
| instructionsstring | Provides specific instructions or guidelines on how to correctly fill out the field. |
| isRequiredboolean | Boolean flag indicating whether this field must have a value before the form can be submitted. |
| showInCreateFormboolean | This 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
}
}