price_rule_id path parameter is the ID of the price rule that the discount code belongs to.discount_code_id path parameter is the ID of the discount code to update for the associated price rule.curl --location --request PUT 'https://demo.myshopify.com//admin/api//price_rules//discount_codes/.json'{
    "discount_code": {
        "id": 507328175,
        "price_rule_id": 507328175,
        "code": "WINTERSALE20OFF",
        "usage_count": 0,
        "created_at": "2023-01-03T12:21:36-05:00",
        "updated_at": "2023-01-03T12:38:31-05:00"
    }
}