Remove dependencies between additional fields
Petition Details
- Base URL: {host}/ASMSAPI/
- Uri: /api/v9/additionalsfields/dependents/delete
- Type: DELETE
-
Required headings:
- content-type: application/json
- X-Authorization: Bearer {token}
URL Description
- {host}: It represents the domain of the environment in which the API is located.
- ASMSAPI/: Fixed API prefix.
- URI: Specific endpoint for the request.
⚐ EXAMPLE URL:
https://{host}/ASMSAPI/api/v9/additionalsfields/dependents/delete
Description
This endpoint allows you to remove dependencies between additional fields previously configured using the LOAD endpoint. Each dependency is identified by the unique combination of sourceFieldId + targetFieldId + triggerValueId. Multiple dependencies can be removed in a single request.
Request Body Parameters
| Name | Data type | Obligatory | Description |
|---|---|---|---|
| dependencies | List | Yes | An array of objects that defines the dependencies to be deleted. Multiple dependencies can be sent in a single request. |
| sourceFieldId | Number | Yes | Identifier of the parent field of the dependency to be deleted. |
| targetFieldId | Number | Yes | Identifier of the child field of the dependency to be deleted. |
| triggerValueId | Number | Yes | Identifier of the trigger value of the dependency to be deleted. For CheckBox type fields this value is always 1 (true). |
⚐ NOTE:
- Elimination is Cascading: the system first removes the
filteredValueIdsassociated with the dependency and then the dependency itself.- If the parent field is left without any dependencies configured after deletion, its flag
hasDependenciesAutomatically switches tofalseon the LIST endpoint.- The processing is Independent by item: If one dependency does not exist or fails, the others are processed successfully.
Body of the petition
Delete a dependency:
{
"dependencies": [
{
"sourceFieldId": 543,
"targetFieldId": 544,
"triggerValueId": 494
}
]
}
Remove multiple dependencies in a single request:
{
"dependencies": [
{
"sourceFieldId": 543,
"targetFieldId": 544,
"triggerValueId": 494
},
{
"sourceFieldId": 543,
"targetFieldId": 544,
"triggerValueId": 495
},
{
"sourceFieldId": 552,
"targetFieldId": 543,
"triggerValueId": 1
}
]
}
Answer
Successful removal:
{
"content": [
{
"errorMessage": null,
"sourceFieldId": 543,
"success": true,
"targetFieldId": 544,
"triggerValueId": 494
}
],
"totalItems": 1
}
Independent processing — one valid and one invalid dependency:
{
"content": [
{
"errorMessage": null,
"sourceFieldId": 543,
"success": true,
"targetFieldId": 544,
"triggerValueId": 494
},
{
"errorMessage": "Dependency not found for source 543, target 544, triggerValue 99999",
"sourceFieldId": 543,
"success": false,
"targetFieldId": 544,
"triggerValueId": 99999
}
],
"totalItems": 2
}
Response Parameters
| Name | Data type | Description |
|---|---|---|
| totalItems | Number | Total dependencies processed in the petition. |
| content | List | List with the result of each dependency sent. |
| sourceFieldId | Number | Identifier of the parent field sent in the request. |
| targetFieldId | Number | The identifier of the child field sent in the request. |
| triggerValueId | Number | The identifier of the trigger value sent in the request. |
| success | Boolean | Indicates whether the dependency was successfully eliminated. If it is false, the errorMessage field describes the reason. |
| errorMessage | Text | Description of the error when success is false. Its value is null when the operation is successful. |
Error messages
| Code | HTTP status | Error Message |
|---|---|---|
| 200 | OK | success: false — Dependency not found for source {id}, target {id}, triggerValue {id} |
| 401 | Unauthorized | Token not provided or expired. |