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