1. U4 ERPx
  2. API Reference
  3. Common
  4. Attribute Relations

Attribute Relations

The Attribute Relations API in Unit4 ERPx manages attribute relation data - creation, retrieval, updates, and deletion of attribute relationship records. It is designed for integration with mobile and other external applications, supporting microservice-based development, testing, and maintenance.

Purpose:
The Attribute Relations API manages all aspects of attribute relationship data, including creation, update, validation, and deletion. Attribute relations define how different attributes in ERPx are connected to each other, enabling complex master data hierarchies and dependencies between business entities.

Base URL:
/v1/attribute-relations

Authentication:
All APIs require a Client ID and Client Secret.
Refer to the global authentication documentation for details.

System Parameters:
System parameters for attribute configuration are available in Online Help → Administration → Attributes → Fixed Registers → System Parameters.    

Supported Methods

HTTP MethodEndpointDescriptionLimits & Notes
POST/v1/attribute-relationsCreate a single attribute relation recordOnly 1 attribute relation per call. Only attributes with manual maintenance.
GET/v1/attribute-relations/{attributeId}/{attributeValue}/{relatedAttributeId}/{relationValue}Retrieve single attribute relation dataReturns complete attribute relation information. All path parameters are mandatory.
GET/v1/objects/attribute-relationsRetrieve multiple attribute relationsReturns array of attribute relations. Supports OData query options. Array of objects returned per call.
PATCH/v1/attribute-relations/{attributeId}/{attributeValue}/{relatedAttributeId}/{relationValue}Update attribute relation dataOne attribute relation per call. Cannot update attributeValue field.
DELETE/v1/attribute-relations/{attributeId}/{attributeValue}/{relatedAttributeId}/{relationValue}Delete an attribute relationOne delete per call. Permanently removes the relation.

   

Swagger / Schema

Version v1

   

Method Details

Sample Request

{
  "attributeId": "C1",
  "attributeValue": "100",
  "relatedAttributeId": "C0",
  "relationValue": "907",
  "companyId": "EN",
  "dateFrom": "1900-01-01T00:00:00.000Z",
  "dateTo": "2099-12-31T00:00:00.000Z",
  "percentage": 100
}

   

Limits and notes

Attribute Relation Prerequisites:

  • Both attributeId and relatedAttributeId must exist in the ERPx client.
  • Both attributeValue and relationValue must be valid values for their respective attributes.
  • Attributes must have manual maintenance enabled.
  • The relation between the two attributes must be configured in the ERPx client.
  • Duplicates or overlapping relations are not allowed.    

Validation Rules for POST Method

POST_001 - User is not authorised
ElementDetails
Scenario IDPOST_001
Scenario NameUser is not authorised
HTTP Code403
GIVENA new attribute relation needs to be created
WHENCalling the POST method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
POST_002 - Unknown companyID
ElementDetails
Scenario IDPOST_002
Scenario NameUnknown companyID
HTTP Code403
GIVENA new attribute relation needs to be created
WHENCalling the POST method of the API
BUTcompanyID does not exist
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
POST_003 - Attribute relation created
ElementDetails
Scenario IDPOST_003
Scenario NameHappy path attribute relation
HTTP Code201
GIVENA new attribute relation needs to be created
WHENCalling the POST method of the API
BUT
THEN201 response is returned; attribute relation is created
Example Error Message
POST_004 - Relations already exist
ElementDetails
Scenario IDPOST_004
Scenario NameRelations already exist and duplicates are not allowed
HTTP Code422
GIVENA new attribute relation needs to be created
WHENCalling the POST method of the API
BUTRelation already exists
THEN422 response is returned; relation is not created
Example Error Message{"code": 3010, "message": "{0} : {1} is already connected to {2} : {3} on client {4}. Duplicates or overlaps are not allowed."}
POST_005 - Invalid AttributeId
ElementDetails
Scenario IDPOST_005
Scenario NameInvalid AttributeId
HTTP Code422
GIVENA new attribute relation needs to be created
WHENCalling the POST method of the API
BUTattributeId does not exist
THEN422 response is returned; relation is not created
Example Error Message{"code": 1040, "message": "The entity of the following parameters [Company : EN, Attribute ID : {0}, Attribute value : {1}] was not found."}
POST_006 - Invalid attributeValue
ElementDetails
Scenario IDPOST_006
Scenario NameInvalid attributeValue
HTTP Code422
GIVENA new attribute relation needs to be created
WHENCalling the POST method of the API
BUTattributeValue does not exist
THEN422 response is returned; relation is not created
Example Error Message{"code": 1040, "message": "The entity of the following parameters [Company : {0}, Attribute ID : {1}, Attribute value : {2}] was not found."}
POST_007 - Invalid relatedAttributeId
ElementDetails
Scenario IDPOST_007
Scenario NameInvalid relatedAttributeId
HTTP Code422
GIVENA new attribute relation needs to be created
WHENCalling the POST method of the API
BUTrelatedAttributeId does not exist
THEN422 response is returned; relation is not created
Example Error Message{"code": 3010, "message": "Illegal value entered"}
POST_008 - Invalid relationValue
ElementDetails
Scenario IDPOST_008
Scenario NameInvalid relationValue
HTTP Code422
GIVENA new attribute relation needs to be created
WHENCalling the POST method of the API
BUTrelationValue does not exist
THEN422 response is returned; relation is not created
Example Error Message"relationValue": [{"code": 3010, "message": "{0} is not a legal {1}"}]

   

Sample Request

GET /v1/attribute-relations/C1/100/C0/907?companyId=EN

Sample Response

{
  "attributeId": "C1",
  "attributeName": "Cost Center",
  "attributeValue": "100",
  "relatedAttributeId": "C0",
  "relatedAttributeName": "Department",
  "relationValue": "907",
  "companyId": "EN",
  "dateFrom": "1900-01-01T00:00:00.000Z",
  "dateTo": "2099-12-31T00:00:00.000Z",
  "percentage": 100
}

   

Path Parameters

The following parameters are required in the URL path:

ParameterValueDescriptionData TypeRequired
attributeIdrequiredValid attribute ID (e.g., C0, C1, C2)stringyes
attributeValuerequiredValid value of attributestringyes
relatedAttributeIdrequiredValid related attribute ID (e.g., C0, C1, C2)stringyes
relationValuerequiredValid value of related attributestringyes
   

Additional Parameters

ParameterValueDescriptionData TypeDefault Value
companyIdoptionalSpecify if you wish to retrieve an attribute relation that exists in a specific company or client.stringempty
   

Limits & Notes

  • Only one attribute relation per call.
  • All path parameters are mandatory.
  • Returns complete attribute relation information.    

Validation Rules for GET Method (Single Relation)

GET_001 - User is not authorised
ElementDetails
Scenario IDGET_001
Scenario NameUser is not authorised
HTTP Code403
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_002 - Unknown companyID
ElementDetails
Scenario IDGET_002
Scenario NameUnknown companyID
HTTP Code403
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API
BUTcompanyID does not exist
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_003 - attributeId does not exist
ElementDetails
Scenario IDGET_003
Scenario NameattributeId does not exist
HTTP Code404
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API
BUTattributeId does not exist for the companyId
THENAttribute relations are not retrieved; 404 response is returned
Example Error Message{"code": 1040, "message": "The entity of the following parameters [Company : {0}, Attribute ID : {1}, Attribute value : {2}, Related attribute ID : {3}, Relation value : {4}] was not found."}
GET_004 - attributeValue is not valid
ElementDetails
Scenario IDGET_004
Scenario NameattributeValue is not a valid value of attribute
HTTP Code404
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API
BUTattributeValue does not exist
THENAttribute relations are not retrieved; 404 response is returned
Example Error Message{"code": 1040, "message": "The entity of the following parameters [Company : {0}, Attribute ID : {1}, Attribute value : {2}, Related attribute ID : {3}, Relation value : {4}] was not found."}
GET_005 - relatedAttributeId does not exist
ElementDetails
Scenario IDGET_005
Scenario NamerelatedAttributeId does not exist
HTTP Code404
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API
BUTrelatedAttributeId does not exist
THENAttribute relations are not retrieved; 404 response is returned
Example Error Message{"code": 1040, "message": "The entity of the following parameters [Company : {0}, Attribute ID : {1}, Attribute value : {2}, Related attribute ID : {3}, Relation value : {4}] was not found."}
GET_006 - relationValue is not valid
ElementDetails
Scenario IDGET_006
Scenario NamerelationValue is not a valid value of attribute
HTTP Code404
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API
BUTrelationValue does not exist
THENAttribute relations are not retrieved; 404 response is returned
Example Error Message{"code": 1040, "message": "The entity of the following parameters [Company : {0}, Attribute ID : {1}, Attribute value : {2}, Related attribute ID : {3}, Relation value : {4}] was not found."}
GET_007 - Attribute relations get happy path
ElementDetails
Scenario IDGET_007
Scenario NameAttribute relations get happy path
HTTP Code200
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API
BUT
THEN200 attribute relation object is retrieved
Example Error Message

   

Sample Request

{
GET /v1/objects/attribute-relations?filter=attributeId%20eq%20%27C1%27&limit=10
}
{
GET /v1/objects/attribute-relations?filter=attributeId%20eq%20%27C1%27%20and%20relatedAttributeId%20eq%20%27C0%27&limit=10
}

Sample Response

[
  {
    "attributeId": "C1",
    "attributeName": "Cost Center",
    "attributeValue": "100",
    "attributeValueFrom": 0,
    "attributeValueTo": 209999,
    "relatedAttributeId": "C0",
    "relatedAttributeName": "Department",
    "relationValue": "907",
    "companyId": "EN",
    "dateFrom": "1900-01-01T00:00:00.000Z",
    "dateTo": "2099-12-31T00:00:00.000Z",
    "percentage": 100
  },
  {
    "attributeId": "C1",
    "attributeName": "Cost Center",
    "attributeValue": "120",
    "attributeValueFrom": 0,
    "attributeValueTo": 209999,
    "relatedAttributeId": "C0",
    "relatedAttributeName": "Department",
    "relationValue": "908",
    "companyId": "EN",
    "dateFrom": "1900-01-01T00:00:00.000Z",
    "dateTo": "2099-12-31T00:00:00.000Z",
    "percentage": 100
  }
]

   

Additional Parameters

The following OData query parameters help filter and shape the response:

ParameterValueDescriptionData TypeDefault Value
companyIdoptionalSpecify if you wish to retrieve attribute relations that exist in a specific company or client.stringempty
$selectoptionalProperties to include in the response (comma-separated).stringall properties
$filteroptionalOData boolean expression to select matching records. Supports: eq, ne, gt, ge, lt, le, and, or, not.stringnone
$orderbyoptionalSort order of results. Format: property [asc|desc], multiple values separated by commas.stringnone
$offset (skip)optionalNumber of items to skip before returning results.integer0
$limit (top)optionalMaximum number of items to return.integersystem default

Limits & Notes

  • Array of objects returned per call.
  • Supports OData query syntax for filtering and sorting.
  • Returns only simple attribute relation objects with no additional data.    

Validation Rules for GET Method (Objects)

GET_001 - User is not authorised
ElementDetails
Scenario IDGET_001
Scenario NameUser is not authorised
HTTP Code403
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_002 - Unknown companyID
ElementDetails
Scenario IDGET_002
Scenario NameUnknown companyID
HTTP Code403
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API
BUTcompanyID does not exist
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_003 - Happy path - no params
ElementDetails
Scenario IDGET_003
Scenario NameHappy path - no params
HTTP Code200
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API
BUT
THENA 200 OK Array with objects is returned
Example Error MessageRESPONSE: Check sample response
GET_004 - Limit results
ElementDetails
Scenario IDGET_004
Scenario NameLimit results
HTTP Code200
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API with limit=10
BUT
THENA 200 OK Array with ≤ 10 items is returned
Example Error MessageRESPONSE: Check sample response
GET_005 - Limit equal to 0
ElementDetails
Scenario IDGET_005
Scenario NameLimit equal to 0
HTTP Code400
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API with limit=0
BUT
THEN400 No data response is retrieved
Example Error Message{"code": 1020, "message": "Limit is invalid. Value should be greater than 0."}
GET_006 - Limit has a negative value
ElementDetails
Scenario IDGET_006
Scenario NameLimit has a negative value
HTTP Code400
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API with limit=-5
BUT
THEN400 No data response is retrieved
Example Error Message{"code": 1020, "message": "Limit is invalid. Value should be greater than 0."}
GET_007 - Limit exceeds int32
ElementDetails
Scenario IDGET_007
Scenario NameLimit has a bigger value than int32
HTTP Code400
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API with limit = 9999999999
BUT
THEN400 No data response is retrieved
Example Error Message{"code": 1010, "message": "The value '9999999999' is not valid.\n"}
GET_008 - Negative Offset
ElementDetails
Scenario IDGET_008
Scenario NameNegative Offset
HTTP Code400
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API with offset=-100
BUT
THEN400 No data response is retrieved
Example Error Message{"code": 1020, "message": "Offset is invalid. Value should be greater than or equal to 0."}
GET_009 - Offset exceeds int32
ElementDetails
Scenario IDGET_009
Scenario NameOffset has a bigger value than int32
HTTP Code400
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API with offset = 9999999999
BUT
THEN400 No data response is retrieved
Example Error Message{"code": 1010, "message": "The value '9999999999' is not valid.\n"}
GET_010 - Select returns only requested fields
ElementDetails
Scenario IDGET_010
Scenario NameSelect returns only requested fields
HTTP Code200
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API with select attributeId, attributeName
BUT
THENA 200 OK Array with objects is returned; response contains only selected fields
Example Error Message
GET_011 - Filter returns only expected data
ElementDetails
Scenario IDGET_011
Scenario NameFilter returns only expected data
HTTP Code200
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API with filter attributeId eq ‘C1’
BUT
THENA 200 OK Array with objects is returned, but only with attributeId field equal C1
Example Error MessageRESPONSE: Check sample response
GET_012 - OrderBy sorts data ascending
ElementDetails
Scenario IDGET_012
Scenario NameOrderBy sorts data in an ascending order by attributeValueTo
HTTP Code200
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API with orderby=attributeValueTo
BUT
THENA 200 OK The response body is a JSON array sorted by attributeValueTo in ascending order
Example Error MessageRESPONSE: Check sample response
GET_013 - OrderBy sorts data descending
ElementDetails
Scenario IDGET_013
Scenario NameOrderBy sorts data in a descending order by attributeValueTo
HTTP Code200
GIVENAttribute relations need to be retrieved
WHENCalling the GET method of the API with orderby=attributeValueTo desc
BUT
THENA 200 OK The response body is a JSON array sorted by attributeValueTo in descending order
Example Error MessageRESPONSE: Check sample response

   

Sample Request

[
    {
  "path": "/percentage",
  "op": "replace",
  "value": 50
    }
]
[
    {
  "path": "/dateTo",
  "op": "replace",
  "value": "2025-12-31T00:00:00.000Z"
    }
]
[
    {
  "path": "/relationValue",
  "op": "replace",
  "value": "908"
    }
]

Path Parameters

The following parameters are required in the URL path:

ParameterValueDescriptionData TypeRequired
attributeIdrequiredValid attribute ID (e.g., C0, C1, C2)stringyes
attributeValuerequiredValid value of attributestringyes
relatedAttributeIdrequiredValid related attribute ID (e.g., C0, C1, C2)stringyes
relationValuerequiredValid value of related attributestringyes

Additional Parameters

ParameterValueDescriptionData TypeDefault Value
companyIdoptionalSpecify if you wish to update an attribute relation that exists in a specific company or client.stringempty

   

Limits & Notes

  • One attribute relation per call.
  • Cannot update attributeValue field - this is a key field.
  • Patch operators available: replace    

Validation Rules for PATCH Method

PATCH_001 - User is not authorised
ElementDetails
Scenario IDPATCH_001
Scenario NameUser is not authorised
HTTP Code403
GIVENUser needs to modify the existing attribute relation
WHENCalling the PATCH method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 response is returned
Example Error Message“User is not authorised.”
PATCH_002 - Missing mandatory fields
ElementDetails
Scenario IDPATCH_002
Scenario NameMissing mandatory fields
HTTP Code422
GIVENUser needs to modify the existing attribute relation
WHENCalling the PATCH method of the API
BUTMandatory field is missing
THENData is not updated; 422 response is returned
Example Error Message“The {0} field is required.”
PATCH_003 - Unknown companyID
ElementDetails
Scenario IDPATCH_003
Scenario NameUnknown companyID
HTTP Code422
GIVENUser needs to modify the existing attribute relation
WHENCalling the PATCH method of the API
BUTInvalid companyID
THENData is not updated; 422 response is returned
Example Error Message“Unknown {0}.”
PATCH_004 - AttributeId does not exist
ElementDetails
Scenario IDPATCH_004
Scenario NameAttribute Id does not exist
HTTP Code404
GIVENUser needs to modify the existing attribute relation
WHENCalling the PATCH method of the API
BUTAttributeId does not exist
THENData is not updated; 404 response is returned
Example Error Message{"code": 1040, "message": "Attribute relation where attributeId = {0}, attributeValue = {1}, relatedAttributeId = {2}, relationValue = {3} was not found."}
PATCH_005 - Attribute Value does not exist
ElementDetails
Scenario IDPATCH_005
Scenario NameattributeValue does not exist
HTTP Code404
GIVENUser needs to modify the existing attribute relation
WHENCalling the PATCH method of the API
BUTattributeValue does not exist
THENData is not updated; 404 response is returned
Example Error Message{"code": 1040, "message": "Attribute relation where attributeId = {0}, attributeValue = {1}, relatedAttributeId = {2}, relationValue = {3} was not found."}
PATCH_006 - Related Attribute Id does not exist
ElementDetails
Scenario IDPATCH_006
Scenario NamerelatedAttributeId does not exist
HTTP Code404
GIVENUser needs to modify the existing attribute relation
WHENCalling the PATCH method of the API
BUTrelatedAttributeId does not exist
THENData is not updated; 404 response is returned
Example Error Message{"code": 1040, "message": "Attribute relation where attributeId = {0}, attributeValue = {1}, relatedAttributeId = {2}, relationValue = {3} was not found."}
PATCH_007 - Relation Value does not exist
ElementDetails
Scenario IDPATCH_007
Scenario NamerelationValue does not exist
HTTP Code404
GIVENUser needs to modify the existing attribute relation
WHENCalling the PATCH method of the API
BUTrelationValue does not exist
THENData is not updated; 404 response is returned
Example Error Message{"code": 1040, "message": "Attribute relation where attributeId = {0}, attributeValue = {1}, relatedAttributeId = {2}, relationValue = {3} was not found."}
PATCH_008 - Invalid path
ElementDetails
Scenario IDPATCH_008
Scenario NameInvalid path
HTTP Code422
GIVENUser needs to modify the existing attribute relation
WHENCalling the PATCH method of the API with Value path
BUTPath is not correct for attribute relation
THENData is not updated; 422 response is returned
Example Error Message{"code": 4020, "message": "PatchOperation index 0: Provided path \" Value \" is invalid"}
PATCH_009 - Invalid value for relation value
ElementDetails
Scenario IDPATCH_009
Scenario NameInvalid value for relationValue
HTTP Code422
GIVENUser needs to modify the existing attribute relation
WHENCalling the PATCH method of the API with new value for “relationValue”
BUTValue is not correct for field “relationValue”
THENData is not updated; 422 response is returned
Example Error Message"relationValue": [{"code": 3010, "message": "222 is not a legal ECMYEAR"}]
PATCH_010 - Cannot update attribute value
ElementDetails
Scenario IDPATCH_010
Scenario NameCannot update attributeValue
HTTP Code422
GIVENUser needs to modify the existing attribute relation
WHENCalling the PATCH method of the API with new value for “attributeValue”
BUTChange for attributeValue is not allowed
THENData is not updated; 422 response is returned
Example Error Message{"code": 3010, "message": "Data was rejected because of errors which were detected during saving."}

   

Sample Request

DELETE /v1/attribute-relations/C1/100/C0/907?companyId=EN

   

Path Parameters

The following parameters are required in the URL path:

ParameterValueDescriptionData TypeRequired
attributeIdrequiredValid attribute ID (e.g., C0, C1, C2)stringyes
attributeValuerequiredValid value of attributestringyes
relatedAttributeIdrequiredValid related attribute ID (e.g., C0, C1, C2)stringyes
relationValuerequiredValid value of related attributestringyes

   

Additional Parameters

ParameterValueDescriptionData TypeDefault Value
companyIdoptionalSpecify if you wish to delete an attribute relation that exists in a specific company or client.stringempty

   

Limits & Notes

  • One delete per call.
  • Permanently removes the attribute relation.
  • Cannot be undone - this is not a soft delete.

   

Validation Rules for DELETE Method

DEL_001 - User is not authorised
ElementDetails
Scenario IDDEL_001
Scenario NameUser is not authorised
HTTP Code403
GIVENAttribute relations need to be deleted
WHENCalling the DELETE method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message or Response“User is not authorised.”
DEL_002 - Unknown companyID
ElementDetails
Scenario IDDEL_002
Scenario NameUnknown companyID
HTTP Code403
GIVENAttribute relations need to be deleted
WHENCalling the DELETE method of the API
BUTcompanyID does not exist
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message or Response“User is not authorised.”
DEL_003 - attributeId does not exist
ElementDetails
Scenario IDDEL_003
Scenario NameattributeId does not exist
HTTP Code404
GIVENAttribute relations need to be deleted
WHENCalling the DELETE method of the API
BUTattributeId does not exist for the companyId
THENAttribute relations are not deleted; 404 response is returned
Example Error Message or Response{"code": 1040, "message": "Attribute relation where attributeId = {0}, attributeValue = {1}, relatedAttributeId = {2}, relationValue = {3} was not found."}
DEL_004 - attributeValue does not exist
ElementDetails
Scenario IDDEL_004
Scenario NameattributeValue does not exist
HTTP Code404
GIVENAttribute relations need to be deleted
WHENCalling the DELETE method of the API
BUTattributeValue does not exist
THENAttribute relations are not deleted; 404 response is returned
Example Error Message or Response{"code": 1040, "message": "Attribute relation where attributeId = {0}, attributeValue = {1}, relatedAttributeId = {2}, relationValue = {3} was not found."}
DEL_005 - relatedAttributeId does not exist
ElementDetails
Scenario IDDEL_005
Scenario NamerelatedAttributeId does not exist
HTTP Code404
GIVENAttribute relations need to be deleted
WHENCalling the DELETE method of the API
BUTrelatedAttributeId does not exist
THENAttribute relations are not deleted; 404 response is returned
Example Error Message or Response{"code": 1040, "message": "Attribute relation where attributeId = {0}, attributeValue = {1}, relatedAttributeId = {2}, relationValue = {3} was not found."}
DEL_006 - relationValue does not exist
ElementDetails
Scenario IDDEL_006
Scenario NamerelationValue does not exist
HTTP Code404
GIVENAttribute relations need to be deleted
WHENCalling the DELETE method of the API
BUTrelationValue does not exist
THENAttribute relations are not deleted; 404 response is returned
Example Error Message or Response{"code": 1040, "message": "Attribute relation where attributeId = {0}, attributeValue = {1}, relatedAttributeId = {2}, relationValue = {3} was not found."}
   

Best Practices

  • Verify attribute relations exist in the ERPx configuration before attempting to create attribute relations via API.
  • Validate both attribute IDs and their values before creating relations - both the source and target attributes must exist.
  • Check for existing relations before creating new ones to avoid duplicate errors.
  • Cannot update key fields - attributeValue is a key field and cannot be modified via PATCH. Delete and recreate the relation if key values need to change.
  • Understand deletion is permanent - DELETE permanently removes the relation (not a soft delete like some other APIs).
  • Use the Objects endpoint (/v1/objects/attribute-relations) for bulk queries and filtering with OData syntax.
  • Leverage OData filters to efficiently retrieve specific relations without fetching all data.
  • Test limit and offset parameters to optimize performance when working with large datasets.
  • Use Swagger UI for testing and schema validation before production calls.
  • Handle error codes gracefully - implement retry/backoff logic according to global rate limits.
  • Always check for deprecation alerts on this endpoint version.
  • Validate attribute relation before sending DELETE requests to avoid unintentional data loss.

   

Action APIs