attribute_values v1 API endpoints
/v1/attribute-values
/v1/attribute-values/{attributeId}
/v1/attribute-values/{attributeId}/{attributeValue}/{periodFrom}
/v1/objects/attribute-values
Sample Request
{
"attribute": "ABSREASON",
"attributeId": "C06",
"attributeValue": "99",
"companyId": "EN",
"description": "New absence reason example",
"owner": "",
"ownerAttributeId": "",
"ownerAttributeName": "",
"periodFrom": 0,
"periodTo": 209999,
"status": "N"
}
{
"attributeName": "ABSREASON",
"attributeId": "C06",
"companyId": "EN",
"description": "Leave of absence-test",
"attributeValue": "102",
"periodFrom": "0",
"periodTo": "209999",
"ownerAttributeName": "",
"ownerAttributeId": "",
"owner": "",
"status": "N",
"customValue": 0,
"relatedValues": [
{
"unitValue": 0,
"relationGroup": "",
"relationId": "REL1",
"relationName": "TEST1",
"relatedValue": "TEST1",
"percentage": 100,
"dateFrom": "1900-01-01T00:00:00.000",
"dateTo": "2099-12-31T00:00:00.000"
}
]
}
{
"attributeName": "ABSREASON",
"attributeId": "C06",
"companyId": "EN",
"description": "Leave of absence-test",
"attributeValue": "102",
"periodFrom": "0",
"periodTo": "209999",
"ownerAttributeName": "",
"ownerAttributeId": "",
"owner": "",
"status": "N",
"customValue": 0,
"relatedValues": [
{
"unitValue": 0,
"relationGroup": "",
"relationId": "REL1",
"relationName": "TEST1",
"relatedValue": "TEST1",
"percentage": 100,
"dateFrom": "1900-01-01T00:00:00.000",
"dateTo": "2099-12-31T00:00:00.000"
},
{
"unitValue": 0,
"relationGroup": "",
"relationId": "REL2",
"relationName": "TEST1",
"relatedValue": "TEST1",
"percentage": 100,
"dateFrom": "1900-01-01T00:00:00.000",
"dateTo": "2099-12-31T00:00:00.000"
}
]
}
{
"attributeName": "ABSREASON",
"attributeId": "C06",
"companyId": "EN",
"description": "Leave of absence",
"attributeValue": "201",
"periodFrom": "0",
"periodTo": "209999",
"ownerAttributeName": "",
"ownerAttributeId": "",
"owner": "",
"status": "N",
"customValue": 0,
"contactPoints": [
{
"additionalContactInfo": {
"contactPerson": "Test person",
"contactPosition": "Test",
"eMail": "test.primary@unit4.com",
"eMailCc": "test@test.com",
"gtin": "",
"url": ""
},
"address": {
"countryCode": "EN",
"place": "Test place",
"postcode": "test post code",
"province": "test province",
"streetAddress": "test street"
},
"contactPointType": "1",
"phoneNumbers": {
"telephone1": "99966633322255",
"telephone2": "",
"telephone3": "",
"telephone4": "",
"telephone5": "",
"telephone6": "",
"telephone7": ""
},
"sortOrder": 0
}
]
}
Limits & Notes
- Attribute must have manual maintenance option (M) enabled.
- To add contact points, attribute must have contact information option (A) enabled.
- Relations must exist before being added to attribute values.
- Related attribute values must exist before creating relation values.
Validation Rules for POST Method
POST_001 - User is not authorised
| Element | Details |
|---|
| Scenario ID | POST_001 |
| Scenario Name | User is not authorised |
| HTTP Code | 403 |
| GIVEN | A new attribute value needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | User does NOT have permissions |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
POST_002 - Unknown companyID
| Element | Details |
|---|
| Scenario ID | POST_002 |
| Scenario Name | Unknown companyID |
| HTTP Code | 403 |
| GIVEN | A new attribute value needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | The companyID does not exist |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
POST_003 - Incorrect attribute maintenance
| Element | Details |
|---|
| Scenario ID | POST_003 |
| Scenario Name | Incorrect attribute maintenance |
| HTTP Code | 400 |
| GIVEN | A new attribute value needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | Attribute has an incorrect maintenance option |
| THEN | Attribute value is not created; 422 response is returned |
| Example Error Message | “The attribute {0} does not allow manual maintenance. You must use the specific API dedicated for updating that attribute” |
POST_004 - Missing mandatory fields
| Element | Details |
|---|
| Scenario ID | POST_004 |
| Scenario Name | Missing mandatory fields |
| HTTP Code | 422 |
| GIVEN | A new attribute value needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | A mandatory field is missing |
| THEN | Attribute value is not created; 422 response is returned |
| Example Error Message | “The {0} field is required” |
POST_005 - Invalid format of fields
| Element | Details |
|---|
| Scenario ID | POST_005 |
| Scenario Name | Invalid format of fields |
| HTTP Code | 422 |
| GIVEN | A new attribute value needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | Field format is invalid |
| THEN | Attribute value is not created; 422 response is returned |
| Example Error Message | “{0} is not a valid value for the attribute {0}. You cannot use a space or any invalid characters” |
POST_006 - Unsatisfied model restrictions
| Element | Details |
|---|
| Scenario ID | POST_006 |
| Scenario Name | Unsatisfied model restrictions |
| HTTP Code | 422 |
| GIVEN | A new attribute value needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | Field violates model restrictions (length, range, numeric limits) |
| THEN | Attribute value is not created; 422 response is returned |
| Example Error Message | “The field {0} must be a string with max length {1}” / “{0} must be equal or earlier than {1}” |
POST_007 - Attribute value already exists
| Element | Details |
|---|
| Scenario ID | POST_007 |
| Scenario Name | Attribute value already exists |
| HTTP Code | 422 |
| GIVEN | A new attribute value needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | Attribute value already exists for given companyId |
| THEN | Attribute value is not created; 409 response is returned |
| Example Error Message | “{0}: already exists. Please enter a unique value” |
POST_008 - Invalid period
| Element | Details |
|---|
| Scenario ID | POST_008 |
| Scenario Name | Invalid period |
| HTTP Code | 422 |
| GIVEN | A new attribute value needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | Period does not exist |
| THEN | Attribute value is not created; 422 response is returned |
| Example Error Message | “Illegal period” |
POST_009 - Contact points are not maintained
| Element | Details |
|---|
| Scenario ID | POST_009 |
| Scenario Name | Contact points are not maintained |
| HTTP Code | 422 |
| GIVEN | A new attribute value needs to be created with contact points |
| WHEN | Calling the POST method of the API |
| BUT | Property is not present on the body |
| THEN | Attribute value is not created; 422 response is returned |
| Example Error Message | “The attribute {0} does not allow to enter contact information” |
POST_010 - Attribute value is created
| Element | Details |
|---|
| Scenario ID | POST_010 |
| Scenario Name | Attribute value is created |
| HTTP Code | 201 |
| GIVEN | A new attribute value needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | — |
| THEN | Attribute value is created |
| Example Error Message | RESPONSE: returns the created attribute value |
POST_011 - Attribute value is created with auto-numbering
| Element | Details |
|---|
| Scenario ID | POST_011 |
| Scenario Name | Attribute value is created when auto-numbering is active |
| HTTP Code | 201 |
| GIVEN | A new attribute value needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | Auto-numbering is active for the given attribute |
| THEN | Attribute value is created |
| Example Error Message | RESPONSE: returns the created attribute value with value from auto-numbering |
POST_012 - Incorrect relationId
| Element | Details |
|---|
| Scenario ID | POST_012 |
| Scenario Name | Attribute value is not created with incorrect relationId |
| HTTP Code | 422 |
| GIVEN | A new attribute value needs to be created with given relation |
| WHEN | Calling the POST method of the API |
| BUT | Relation between attributes does not exist |
| THEN | Attribute value is not created; 422 response is returned |
| Example Error Message | “The relation ‘{0}’ – {1} - does not exist” |
POST_013 - Incorrect relatedValue
| Element | Details |
|---|
| Scenario ID | POST_013 |
| Scenario Name | Attribute value is not created with incorrect relatedValue |
| HTTP Code | 422 |
| GIVEN | A new attribute value needs to be created with given relation |
| WHEN | Calling the POST method of the API |
| BUT | Relation value does not exist for the given relation |
| THEN | Attribute value is not created; 422 response is returned |
| Example Error Message | “{0} is not a legal {1}” |
POST_014 - Incorrect percentage
| Element | Details |
|---|
| Scenario ID | POST_014 |
| Scenario Name | Attribute value is not created with incorrect percentage |
| HTTP Code | 422 |
| GIVEN | A new attribute value needs to be created with given relation |
| WHEN | Calling the POST method of the API |
| BUT | Relation percentage is above 100 |
| THEN | Attribute value is not created; 422 response is returned |
| Example Error Message | “The field Percentage must be between 0 and 100” |
POST_015 - Multi-relations with one incorrect
| Element | Details |
|---|
| Scenario ID | POST_015 |
| Scenario Name | Attribute value is not created with multi-relations but one is incorrect |
| HTTP Code | 422 |
| GIVEN | A new attribute value needs to be created with given relation |
| WHEN | Calling the POST method of the API |
| BUT | The first relation in the array has an incorrect relationId |
| THEN | Attribute value is not created; 422 response is returned |
| Example Error Message | “{0} is not a legal {1}” |
POST_016 - Created with multi-relations
| Element | Details |
|---|
| Scenario ID | POST_016 |
| Scenario Name | Attribute value is created with multi-relations |
| HTTP Code | 201 |
| GIVEN | A new attribute value needs to be created with given relation |
| WHEN | Calling the POST method of the API |
| BUT | — |
| THEN | Attribute value is created |
| Example Error Message | RESPONSE: returns the created attribute value with relations array |
POST_017 - Created with contact points
| Element | Details |
|---|
| Scenario ID | POST_017 |
| Scenario Name | Attribute value is created with contact points |
| HTTP Code | 201 |
| GIVEN | A new attribute value needs to be created with given contact point |
| WHEN | Calling the POST method of the API |
| BUT | — |
| THEN | Attribute value is created |
| Example Error Message | RESPONSE: returns the created attribute value with contact points array |
POST_018 - Incorrect contact point type
| Element | Details |
|---|
| Scenario ID | POST_018 |
| Scenario Name | Attribute value is not created with incorrect contact point type |
| HTTP Code | 422 |
| GIVEN | A new attribute value needs to be created with given contact point |
| WHEN | Calling the POST method of the API |
| BUT | contactPointType is not a valid ADDRTYPE attribute value |
| THEN | Attribute value is not created; 422 response is returned |
| Example Error Message | “{0} is not a legal ADDRTYPE” |
POST_019 - Multiple contact points with one incorrect
| Element | Details |
|---|
| Scenario ID | POST_019 |
| Scenario Name | Attribute value is not created with multiple contact points when one has incorrect contact point type |
| HTTP Code | 422 |
| GIVEN | A new attribute value needs to be created with given contact point |
| WHEN | Calling the POST method of the API |
| BUT | contactPointType is not a valid ADDRTYPE attribute value |
| THEN | Attribute value is not created; 422 response is returned |
| Example Error Message | “{0} is not a legal ADDRTYPE” |
Sample Request
GET /v1/attribute-values/C06/99/0?companyId=EN
Additional Parameters
The following parameters help retrieve attribute value information:
| Parameter | Value | Description | Data Type | Default Value |
|---|
| companyId | optional | Specify if you wish to retrieve an attribute value that exists in a specific company or client. | string | empty |
| | | | | |
Limits & Notes
- Only one attribute value per call.
- attributeId must be correct.
- attributeValue must be correct.
- Period value must be correctly formatted PERIOD attribute value.
- Returns complete attribute value including relations and contact points.
Validation Rules for GET Method (Single Value)
GET_001 - User is not authorised
| Element | Details |
|---|
| Scenario ID | GET_001 |
| Scenario Name | User is not authorised |
| HTTP Code | 403 |
| GIVEN | Existing attribute value needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | User does NOT have permissions |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_002 - Unknown companyID
| Element | Details |
|---|
| Scenario ID | GET_002 |
| Scenario Name | Unknown companyID |
| HTTP Code | 403 |
| GIVEN | Existing attribute value needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | companyID does not exist |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_003 - attributeId does not exist
| Element | Details |
|---|
| Scenario ID | GET_003 |
| Scenario Name | attributeId does not exist |
| HTTP Code | 404 |
| GIVEN | Existing attribute value needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | attributeId does not exist for the companyId |
| THEN | Attribute value is not retrieved; 404 response is returned |
| Example Error Message | “{0} is not a valid attribute” |
GET_004 - Attribute value does not exist
| Element | Details |
|---|
| Scenario ID | GET_004 |
| Scenario Name | Attribute value does not exist |
| HTTP Code | 404 |
| GIVEN | Existing attribute value needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | Attribute value does not exist for the companyId |
| THEN | Attribute value is not retrieved; 404 response is returned |
| Example Error Message | “The entity of the following parameters [Company: {0}, Attribute ID: {1}, Attribute value: {2}, Period from: {3}] was not found” |
GET_005 - Period does not exist
| Element | Details |
|---|
| Scenario ID | GET_005 |
| Scenario Name | Period does not exist |
| HTTP Code | 404 |
| GIVEN | Existing attribute value needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | Period does not exist for the companyId |
| THEN | Attribute value is not retrieved; 404 response is returned |
| Example Error Message | “The entity of the following parameters [Company: {0}, Attribute ID: {1}, Attribute value: {2}, Period from: {3}] was not found” |
GET_006 - Attribute value exists
| Element | Details |
|---|
| Scenario ID | GET_006 |
| Scenario Name | Attribute value exists |
| HTTP Code | 200 |
| GIVEN | Existing attribute value needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | — |
| THEN | 200 response is returned together with the information on the attribute value |
| Example Error Message | RESPONSE: DTO with data |
GET_007 - Attribute value exists with no relations
| Element | Details |
|---|
| Scenario ID | GET_007 |
| Scenario Name | Attribute value exists with no relations |
| HTTP Code | 200 |
| GIVEN | Data from an existing attribute value needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | Attribute value has no relations |
| THEN | 200 response is returned together with the information on the attribute value |
| Example Error Message | RESPONSE: Attribute value DTO with empty array of relatedValues |
GET_008 - Attribute value exists with relations
| Element | Details |
|---|
| Scenario ID | GET_008 |
| Scenario Name | Attribute value exists with relations |
| HTTP Code | 200 |
| GIVEN | Data from an existing attribute value needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | Attribute value has relations |
| THEN | 200 response is returned together with the information on the attribute value |
| Example Error Message | RESPONSE: Attribute value DTO with array of relatedValues |
GET_009 - Attribute value exists with no contact points
| Element | Details |
|---|
| Scenario ID | GET_009 |
| Scenario Name | Attribute value exists with no contact points |
| HTTP Code | 200 |
| GIVEN | Data from an existing attribute value needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | Attribute value has no contact points |
| THEN | 200 response is returned together with the information on the attribute value |
| Example Error Message | RESPONSE: Attribute value DTO with empty array of contactPoints |
GET_010 - Attribute value exists with contact points
| Element | Details |
|---|
| Scenario ID | GET_010 |
| Scenario Name | Attribute value exists with contact points |
| HTTP Code | 200 |
| GIVEN | Data from an existing attribute value needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | Attribute value has contact points |
| THEN | 200 response is returned together with the information on the attribute value |
| Example Error Message | RESPONSE: Attribute value DTO with array of contactPoints |
Sample Request
GET /v1/attribute-values/C06?companyId=EN&$select=attributeValue,description&$filter=status eq 'N'&$orderby=attributeValue asc&$top=100
Additional Parameters
The following OData query parameters help filter and shape the response:
| Parameter | Value | Description | Data Type | Default Value |
|---|
| companyId | optional | Specify if you wish to retrieve attribute values that exist in a specific company or client. | string | empty |
| $select | optional | Properties to include in the response (comma-separated). | string | all properties |
| $filter | optional | Boolean filter expression (OData syntax: eq, ne, gt, and, or, etc.). | string | none |
| $orderby | optional | Sort order of results. Format: property [asc|desc], multiple values separated by commas. | string | none |
| $offset | optional | Number of items to skip before returning results (also called $skip). | integer | 0 |
| $limit | optional | Maximum number of items to return (also called $top). | integer | system default |
Limits & Notes
- Only one attributeId per call.
- attributeId must be correct.
- Does not return related data (relations and contact points).
- Returns only base-data for attribute value.
- Supports OData query syntax for filtering and sorting.
Validation Rules for GET Method (Multiple Values)
GET_001 - User is not authorised
| Element | Details |
|---|
| Scenario ID | GET_001 |
| Scenario Name | User is not authorised |
| HTTP Code | 403 |
| GIVEN | An array of existing attribute values needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | User does NOT have permissions |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_002 - Unknown companyID
| Element | Details |
|---|
| Scenario ID | GET_002 |
| Scenario Name | Unknown companyID |
| HTTP Code | 403 |
| GIVEN | An array of existing attribute values needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | The companyID does not exist |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_003 - attributeId does not exist
| Element | Details |
|---|
| Scenario ID | GET_003 |
| Scenario Name | attributeId does not exist |
| HTTP Code | 404 |
| GIVEN | An array of existing attribute values needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | attributeId does not exist for the companyId |
| THEN | Array of attribute values is not retrieved; 404 response is returned |
| Example Error Message | “Attribute with id {0} is not found” |
GET_004 - Non-existing field in select parameter
| Element | Details |
|---|
| Scenario ID | GET_004 |
| Scenario Name | Non-existing field in select parameter |
| **HTTP Code | 404 |
| GIVEN | An array of existing attribute values needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | select parameter with non-existing field |
| THEN | Array of attribute values is not retrieved; 404 response is returned |
| Example Error Message | “Select statement error at position 0, message: The provided referencePath:{0} can’t be applied on the entity: ‘attribute_{1}’” |
GET_005 - Incorrect OData syntax in query
| Element | Details |
|---|
| Scenario ID | GET_005 |
| Scenario Name | Incorrect OData syntax in query |
| HTTP Code | 404 |
| GIVEN | An array of existing attribute values needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | Wrong query syntax |
| THEN | Array of attribute values is not retrieved; 404 response is returned |
| Example Error Message | “Syntax error at position 6 in {0}” |
GET_006 - Attribute exists and has values
| Element | Details |
|---|
| Scenario ID | GET_006 |
| Scenario Name | Attribute exists and has values |
| HTTP Code | 200 |
| GIVEN | An array of existing attribute values needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | — |
| THEN | 200 response is returned together with the array of the attribute values |
| Example Error Message | RESPONSE: Object with data |
GET_007 - Attribute exists but has no values
| Element | Details |
|---|
| Scenario ID | GET_007 |
| Scenario Name | Attribute exists but has no values |
| HTTP Code | 200 |
| GIVEN | An array of existing attribute values needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | — |
| THEN | 200 response is returned together with the empty array |
| Example Error Message | RESPONSE: [] |
Sample Request
HEAD /v1/attribute-values/C06?companyId=EN
Sample Response
Headers:
HTTP/1.1 200 OK
x-u4-totalcount: 6
Additional Parameters
The following parameters help retrieve count information:
| Parameter | Value | Description | Data Type | Default Value |
|---|
| companyId | optional | Specify if you wish to count attribute values that exist in a specific company or client. | string | empty |
| | | | | |
Limits & Notes
- Only one attributeId value per call.
- Returns count in response header
X-U4-Total-Count. - No response body returned.
Validation Rules for HEAD Method
HEAD_001 - User is not authorised
| Element | Details |
|---|
| Scenario ID | HEAD_001 |
| Scenario Name | User is not authorised |
| HTTP Code | 403 |
| GIVEN | The total number of attribute values needs to be retrieved |
| WHEN | Calling the HEAD method of the API |
| BUT | User does NOT have permissions |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
HEAD_002 - attributeId does not exist
| Element | Details |
|---|
| Scenario ID | HEAD_002 |
| Scenario Name | attributeId does not exist |
| HTTP Code | 403 |
| GIVEN | The total number of attribute values needs to be retrieved |
| WHEN | Calling the HEAD method of the API |
| BUT | attributeId does not exist for the companyId |
| THEN | Attribute value is not retrieved, 404 response is returned |
| Example Error Message | “{0} is not a valid attribute” |
HEAD_003 - attributeId exists
| Element | Details |
|---|
| Scenario ID | HEAD_003 |
| Scenario Name | attributeId exists |
| HTTP Code | 200 |
| GIVEN | The total number of attribute values needs to be retrieved |
| WHEN | Calling the HEAD method of the API |
| BUT | — |
| THEN | 200 response is returned with header x-u4-totalcount: {count} |
| Example Error Message | RESPONSE: Header x-u4-totalcount: 6 |
Sample Request
{
"path": "/description",
"op": "replace",
"value": "new description"
}
{
"path": "/relatedValues/1/relatedValue",
"op": "replace",
"value": "TEST2"
}
{
"path": "/relatedValues/-",
"op": "add",
"value": {
"unitValue": 0,
"relationGroup": "",
"relationId": "1002",
"relationName": "TEST2",
"relatedValue": "TEST2",
"percentage": 100,
"dateFrom": "1900-01-01T00:00:00.000",
"dateTo": "2099-12-31T00:00:00.000"
}
}
{
"op": "add",
"path": "/contactPoints/-",
"value": {
"additionalContactInfo": {
"contactPerson": "",
"contactPosition": "",
"eMail": "",
"eMailCc": "",
"gtin": "",
"url": ""
},
"address": {
"countryCode": "AL",
"place": "",
"postcode": "",
"province": "",
"streetAddress": ""
},
"contactPointType": "1",
"phoneNumbers": {
"telephone1": "",
"telephone2": "",
"telephone3": "",
"telephone4": "",
"telephone5": "",
"telephone6": "",
"telephone7": ""
},
"sortOrder": 0
}
}
{
"path": "/contactPoints/2/phoneNumbers/telephone1",
"op": "replace",
"value": "666999555"
}
Additional Parameters
The following parameters help update attribute value information:
| Parameter | Value | Description | Data Type | Default Value |
|---|
| companyId | optional | Specify if you wish to update an attribute value that exists in a specific company or client. | string | empty |
Limits & Notes
- One attribute value per call.
- Not allowed to modify AttributeName and AttributeId fields.
- Only attributes with manual maintenance.
- Patch operators available:
replace, add, remove
Validation Rules for PATCH Method
PATCH_001 - User is not authorised
| Element | Details |
|---|
| Scenario ID | PATCH_001 |
| Scenario Name | User is not authorised |
| HTTP Code | 403 |
| GIVEN | Existing attribute value needs to be modified |
| WHEN | Calling the PATCH method of the API |
| BUT | User does NOT have permissions |
| THEN | API is not reached; 403 response is returned |
| Example Error Message | “User is not authorised.” |
PATCH_002 - Missing mandatory fields
| Element | Details |
|---|
| Scenario ID | PATCH_002 |
| Scenario Name | Missing mandatory fields |
| HTTP Code | 422 |
| GIVEN | Existing attribute value needs to be modified |
| WHEN | Calling the PATCH method of the API |
| BUT | Mandatory field is missing |
| THEN | Data is not updated; 422 response is returned |
| Example Error Message | “The {0} field is required” |
PATCH_003 - Invalid format of fields
| Element | Details |
|---|
| Scenario ID | PATCH_003 |
| Scenario Name | Invalid format of fields |
| HTTP Code | 422 |
| GIVEN | Existing attribute value needs to be modified |
| WHEN | Calling the PATCH method of the API |
| BUT | Field format is invalid |
| THEN | Data is not updated; 422 response is returned |
| Example Error Message | “Invalid date time format…” / “Error converting value {0} to type ‘{1}’…” |
PATCH_004 - Unknown companyID
| Element | Details |
|---|
| Scenario ID | PATCH_004 |
| Scenario Name | Unknown companyID |
| HTTP Code | 422 |
| GIVEN | Existing attribute value needs to be modified |
| WHEN | Calling the PATCH method of the API |
| BUT | Invalid companyID |
| THEN | Data is not updated; 422 response is returned |
| Example Error Message | “Unknown {0}” |
PATCH_005 - AttributeId does not exist
| Element | Details |
|---|
| Scenario ID | PATCH_005 |
| Scenario Name | AttributeId does not exist |
| HTTP Code | 404 |
| GIVEN | Existing attribute value needs to be modified |
| WHEN | Calling the PATCH method of the API |
| BUT | AttributeId does not exist |
| THEN | Data is not updated; 404 response is returned |
| Example Error Message | “{0} is not a valid attribute” |
PATCH_006 - Period does not exist
| Element | Details |
|---|
| Scenario ID | PATCH_006 |
| Scenario Name | Period does not exist |
| HTTP Code | 404 |
| GIVEN | Existing attribute value needs to be modified |
| WHEN | Calling the PATCH method of the API |
| BUT | Period does not exist |
| THEN | Data is not updated; 404 response is returned |
| Example Error Message | “Attribute id {0} with attribute value of {1} is not found” |
PATCH_007 - Missing mandatory parameters for operation
| Element | Details |
|---|
| Scenario ID | PATCH_007 |
| Scenario Name | Request does not have mandatory parameters |
| HTTP Code | 400 |
| GIVEN | Existing attribute value needs to be modified |
| WHEN | Calling the PATCH method of the API with operation |
| BUT | Required parameter is not present on the request |
| THEN | Data is not updated; 400 response is returned |
| Example Error Message | “The {0}-property of the patch-element must be given…” |
PATCH_008 - Modify description for attribute value
| Element | Details |
|---|
| Scenario ID | PATCH_008 |
| Scenario Name | Modify description for attribute value |
| HTTP Code | 200 |
| GIVEN | Existing attribute value needs to be modified |
| WHEN | Calling the PATCH method of the API |
| BUT | — |
| THEN | 200 response is returned together with the information of the attribute value |
| Example Error Message | RESPONSE: attribute value information is retrieved with modified description |
PATCH_009 - Update relatedValue for attribute value
| Element | Details |
|---|
| Scenario ID | PATCH_009 |
| Scenario Name | Update relatedValue for attribute value |
| HTTP Code | 200 |
| GIVEN | RelatedValue for the first relation of the attribute value needs to be updated |
| WHEN | Calling the PATCH method of the API |
| BUT | — |
| THEN | 200 response is returned together with the information of the attribute value |
| Example Error Message | RESPONSE: attribute value information is retrieved with relations and contact points |
PATCH_010 - Add relation for attribute value
| Element | Details |
|---|
| Scenario ID | PATCH_010 |
| Scenario Name | Add relation for attribute value |
| HTTP Code | 200 |
| GIVEN | A new relation for the attribute value needs to be created |
| WHEN | Calling the PATCH method of the API |
| BUT | — |
| THEN | 200 response is returned together with the information of the attribute value |
| Example Error Message | RESPONSE: attribute value information is retrieved with relations and contact points |
PATCH_011 - Relation already exists
| Element | Details |
|---|
| Scenario ID | PATCH_011 |
| Scenario Name | Add relation for attribute value but the relation already exists |
| HTTP Code | 422 |
| GIVEN | A new relation for the attribute value needs to be created |
| WHEN | Calling the PATCH method of the API |
| BUT | Relation already exists |
| THEN | 200 response is returned together with the information of the attribute value |
| Example Error Message | “{0} : {1} is already connected to {2}: {3} on client {4}. Duplicates or overlaps are not allowed” |
PATCH_012 - Cannot change contact point type
| Element | Details |
|---|
| Scenario ID | PATCH_012 |
| Scenario Name | Change contact point type for attribute value |
| HTTP Code | 422 |
| GIVEN | Contact point type for the attribute value needs to be changed |
| WHEN | Calling the PATCH method of the API |
| BUT | — |
| THEN | Data is not updated; 422 response is returned |
| Example Error Message | “PatchOperation index 0: Updating key value ContactPointType is not supported.” |
PATCH_013 - Contact point index out of range
| Element | Details |
|---|
| Scenario ID | PATCH_013 |
| Scenario Name | Change non-existing contact point type for attribute value |
| HTTP Code | 422 |
| GIVEN | Telephone1 for the third contact point of the attribute value needs to be changed |
| WHEN | Calling the PATCH method of the API |
| BUT | Attribute value has only two contact points |
| THEN | Data is not updated; 422 response is returned |
| Example Error Message | “PatchOperation index 0: Provided index (2) is out of range” |
Sample Request
DELETE /v1/attribute-values/C06/10000/199401?companyId=EN
Additional Parameters
The following parameters help to delete an attribute value:
| Parameter | Value | Description | Data Type | Default Value |
|---|
| companyId | optional | Specify if you wish to delete an attribute value that exists in a specific company or client. | string | empty |
Limits & Notes
- Changes the status to ‘C’ (Closed).
- Only one delete per call.
- Only attributes with manual maintenance.
- Does not permanently delete the attribute value - this is a soft delete.
Validation Rules for DELETE Method
DEL_001 - User is not authorised
| Element | Details |
|---|
| Scenario ID | DEL_001 |
| Scenario Name | User is not authorised |
| HTTP Code | 403 |
| GIVEN | Attribute value needs to be ‘Closed’ |
| WHEN | Calling the DELETE method of the API |
| BUT | User is not authorised |
| THEN | API is not reached; 403 response is returned |
| Example Error Message or Response | “User is not authorised.” |
DEL_002 - Missing required parameters
| Element | Details |
|---|
| Scenario ID | DEL_002 |
| Scenario Name | Missing required parameters |
| HTTP Code | 404 |
| GIVEN | Attribute value needs to be ‘Closed’ |
| WHEN | Calling the DELETE method of the API |
| BUT | Required parameter is missing |
| THEN | API is not reached; 404 response is returned |
| Example Error Message or Response | “No HTTP resource was found matching {0}” |
DEL_003 - Attribute value does not exist
| Element | Details |
|---|
| Scenario ID | DEL_003 |
| Scenario Name | Attribute value does not exist |
| HTTP Code | 404 |
| GIVEN | Attribute value needs to be ‘Closed’ |
| WHEN | Calling the DELETE method of the API |
| BUT | Attribute value does not exist |
| THEN | No deletion; 404 response is returned |
| Example Error Message or Response | “The entity of the following parameters [Company: {0}, Attribute ID: {1}, Attribute value: {2}, Period from: {3}] was not found” |
DEL_004 - Attribute value exists
| Element | Details |
|---|
| Scenario ID | DEL_004 |
| Scenario Name | Attribute value exists |
| HTTP Code | 200 |
| GIVEN | Attribute value needs to be ‘Closed’ |
| WHEN | Calling the DELETE method of the API |
| BUT | — |
| THEN | Attribute value is ‘Closed’; 200 response is returned |
| Example Error Message or Response | (Empty message - no content) |
DEL_005 - Attribute value has wrong maintenance type
| Element | Details |
|---|
| Scenario ID | DEL_005 |
| Scenario Name | Attribute value exists but has wrong maintenance |
| HTTP Code | 400 |
| GIVEN | Attribute value needs to be ‘Closed’ |
| WHEN | Calling the DELETE method of the API |
| BUT | Attribute does not allow manual maintenance |
| THEN | No deletion; 400 response is returned |
| Example Error Message or Response | “Unable to delete the attribute value with the following parameters: Company: {0}, Attribute ID: {1}, Attribute value: {2}, Period from: {3}. You cannot maintain attribute values for {1} in this window” |