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 Name | Old Key | New Name | New Key |
---|---|---|---|
Shipment ID | shipment_id | Shipment No | shipment_no |
Invoice No | invoice_no | Invoice ID | invoice_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 tofalse
, the custom field will be hidden in the entity and will not be available for use. - If
is_active
is set totrue
, 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 totrue
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:
Name | Key | Is Active |
---|---|---|
Shipment ID | shipment_id | false |
Invoice No | invoice_no | true |
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
oris_active
field of a custom field.
Request
Responses
- 200
- 400
- 401
- 403
- 404
OK
Bad Request
Unauthorized
Forbidden
Not Found