price_rule_id
path parameter is the ID of the price rule that the discount code will belong to. This is required becausecurl --location --request POST 'https://demo.myshopify.com//admin/api//price_rules//discount_codes.json'
{
"discount_code": {
"id": 1054381139,
"price_rule_id": 507328175,
"code": "SUMMERSALE10OFF",
"usage_count": 0,
"created_at": "2023-01-03T12:38:34-05:00",
"updated_at": "2023-01-03T12:38:34-05:00"
}
}