Skip to content

Magento 2: Property “ActionsHintLabel” does not have accessor method “getActionsHintLabel” in class “MagentoSalesRuleApiDataRuleInterface”

In Magento 2 I am trying to add SalesRule from API: /rest/V1/SalesRules
Post Request body:

{
    "rule": { 
    "name": "Test SalesRule",
    "store_labels": [],
    "description": "test 50% discount",
            "website_ids": [
                1
            ],
            "customer_group_ids": [
                1,
                2,
                3,
                5,
                6
            ],
            "from_date": "2019-02-26",
            "to_date": "2019-03-05",
            "uses_per_customer": 1,
            "is_active": true,
            "condition": {
                "condition_type": "Magento\SalesRule\Model\Rule\Condition\Combine",
                "aggregator_type": "any",
                "operator": null,
                "value": "1"
            },
            "action_condition": {
                "condition_type": "Magento\SalesRule\Model\Rule\Condition\Product\Combine",
                "aggregator_type": "all",
                "operator": null,
                "value": "1"
            },
            "stop_rules_processing": false,
            "is_advanced": true,
            "sort_order": 1,
            "simple_action": "cart_fixed",
            "discount_amount": 25,
            "discount_qty": 1,
            "discount_step": 0,
            "apply_to_shipping": false,
            "times_used": 0,
            "is_rss": false,
            "coupon_type": "SPECIFIC_COUPON",
            "use_auto_generation": false,
            "uses_per_coupon": 500,
            "simple_free_shipping": "0"
    }
}

But it gives me an error which says

SQLSTATE[23000]: Integrity constraint violation: 1048 Column
‘actions_hint_label’ cannot be null.

When I add this field and gave it some value 1, 0 or something it gives me an error like

Property “ActionsHintLabel” does not have accessor method
“getActionsHintLabel” in class
“MagentoSalesRuleApiDataRuleInterface”.

Do you have any clue about that? and how to resolve that issue?
thanks for reading, thank you in advance 🙂