Menu
Put Rule Definition By Code
Create or update a rule definition
PUT
/api/rest/v1/rule-definitions/{code}Use it in a workflow
- Add a step and choose the Akeneo connector.
- Pick the Put Rule Definition By Code action (under Rule definition).
- Fill in the fields below, then reference the result from later steps as
{{putRuleDefinitionByCode.response.data}}.
Request
Path parameters
Request body
Enter the body as JSON in the step's Body field.
{
"type": "product",
"actions": [
{
"type": "set",
"field": "description",
"value": "Default description",
"locale": "en_US",
"scope": "ecommerce"
}
],
"reference_entity_identifier": "brand",
"conditions": [
{
"field": "family",
"operator": "IN",
"value": [
"shoes"
]
}
],
"labels": {
"en_US": "My rule"
},
"priority": 10,
"enabled": true,
"execution_type": "triggered",
"triggers": [
{
"field": "name"
},
{
"field": "description",
"locale": "en_US",
"scope": "ecommerce"
}
]
}
Response
Returns 201 with a any. Read it in later steps with {{putRuleDefinitionByCode.response.data.<field>}}.
Need more? See the Akeneo guide for connection setup and behaviour shared by every action.
Was this page helpful?