Skip to main content

Update Custom Field

PATCH 

/custom-field/:id

Update a Custom Field by Custom Field UUID

Updating Custom Field Name

  • When you update the name of a custom field, the key is automatically updated to reflect the new name.
  • The key is generated based on the custom field name, so any changes to the name will result in a new key being generated.
  • This ensures that the key remains unique and consistent with the custom field name.
  • The old key will no longer be valid after the update.
  • Any references to the old key of the custom field will be automatically updated to the new key.

Example

In the Custom Field definition:

Old NameOld KeyNew NameNew Key
Shipment IDshipment_idShipment Noshipment_no
Invoice Noinvoice_noInvoice IDinvoice_id

In the Entity using the Custom Field:

  • Before Update:
{
"custom_fields": {
"shipment_id": "12345",
"invoice_no": "67890"
}
}
  • After Update:
{
"custom_fields": {
"shipment_no": "12345",
"invoice_id": "67890"
}
}

Updating Custom Field Is Active

  • When you update the is_active field of a custom field, it determines whether the custom field is shown in the entity or not.
  • If is_active is set to false, the custom field will be hidden in the entity and will not be available for use.
  • If is_active is set to true, the custom field will be shown in the entity and will be available for use.
  • The custom field will still exist in the system, but it will not be visible or usable in the entity until is_active is set to true again.
  • This allows you to temporarily hide custom fields without deleting them, making it easy to manage the visibility of custom fields in the entity.

Example

In the Custom Field definition:

NameKeyIs Active
Shipment IDshipment_idfalse
Invoice Noinvoice_notrue

In the Entity using the Custom Field:

{
"custom_fields": {
"invoice_no": "67890"
}
}
  • The shipment_id custom field is not available in the entity.
  • The invoice_no custom field remains available for use in the entity.

Note

You can only update the name or is_active field of a custom field.

Request

Responses

OK