Grant a reward

Grant a reward to a member that he can use.

Error cases

Malformatted value - ex: malformatted date (400)

Generic error for all fields and custom fields values types

{
    "error_key": "",
    "error": "wrong_field_type",
    "error_description": "something went wrong"
}
{
    "status": 400,
    "errors": [
        {
            "error_key": "burned_date",
            "error": "wrong_value",
            "error_description": "wrong_value"
        }
    ]
}

Reward external_id does not exist (404)

{
    "error_key": "",
    "error": "",
    "error_description": "test_reward not found"
}

Cardcode does not exist (400)

{
    "error_key": "card_code",
    "error": "not_found",
    "error_description": "card_code test_cardcode not found"
}

Reward has no more stock (400)

{
    "error_key": "reward_stock",
    "error": "not enough stock",
    "error_description": "there's not enough stock to perform this action"
}

Inconsistency between dates (400)

Master reward validity period will prevail on the values set here during the attribution - meaning it can result in 400 if there are inconsistencies

{
    "error_key": "reward.force_validity_start",
    "error": "reward_not_started",
    "error_description": "reward validity has not started the \"2003-01-12 15:00:00\", it starts the \"2004-06-11 20:12:35\""
}
{
    "error_key": "burned_date",
    "error": "inconsistent_dates",
    "error_description": "burn date should be after earned date 2018-01-12 15:00:00"
}
{
    "error_key": "burned_date",
    "error": "inconsistent_dates",
    "error_description": "burn date should be before expiration date 2050-01-01 00:00:00"
}

Store_id without burned_date (400)

{
    "status": 400,
    "errors": [
        {
            "error_key": "store_id",
            "error": "invalid_burn_data",
            "error_description": "you have to put a burned date to use store_id"
        }
    ]
}

Store_id does not exist (404)

{
    "status": 404,
    "errors": {
        "error_key": null,
        "error": "not_found",
        "error_description": "extid \"store_test\" not found in splio3_ecommerce.qa03_stores"
    }
}
Language
Credentials
Bearer
JWT
URL
Click Try It! to start a request and see the response here!