Assign analyzer test templates to an attribute
Assigns one or more analyzer test templates to an attribute (export field). Each assignment includes a template ID and its configuration parameters.
Authorization
bearerAuth AuthorizationBearer <token>
ProductsUp Keycloak JWT bearer token.
In: header
Path Parameters
attributeId*integer
Attribute (export field) ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://export-template-api.productsup.com/V2/attributes/0/analyzer-tests" \ -H "Content-Type: application/json" \ -d '[ { "templateId": "length_check", "configuration": { "value": 1, "operator": ">" } }, { "templateId": "length_check", "configuration": { "value": 100, "operator": "<" } } ]'{
"data": [
{
"id": 1,
"attributeId": 123,
"templateId": "length_check",
"templateName": "Length Validation",
"configuration": {
"value": 100,
"operator": ">"
},
"createdAt": "2024-06-10T14:00:00Z",
"updatedAt": "2024-06-10T14:00:00Z",
"name": "Price must be positive",
"color": "#ff0000",
"caption": "Invalid price",
"group": "Pricing",
"hint": "Check the price column for negative values",
"errorId": 10059,
"requiredColumns": [
"price",
"currency"
],
"createdBy": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"createdByDisplayName": "Jane Doe",
"lastModifiedBy": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"lastModifiedByDisplayName": "Jane Doe"
}
]
}{
"errors": {
"message": "Request validation has encountered constraint violations.",
"errors": {
"templateId": [
"This field is missing."
],
"configuration": [
"This field is missing."
]
}
}
}{
"errors": {
"message": "Resource access denied."
}
}{
"errors": {
"message": "Resource access denied."
}
}How is this guide?