page
parameter will return an error. To learn more, see Make paginated requests to the REST Admin API.price_rule_id
path parameter is the ID of the price rule that the discount codes belongs to.curl --location --request GET 'https://demo.myshopify.com//admin/api//price_rules//discount_codes.json'
{
"discount_codes": [
{
"id": 507328175,
"price_rule_id": 507328175,
"code": "SUMMERSALE10OFF",
"usage_count": 0,
"created_at": "2023-01-03T12:21:36-05:00",
"updated_at": "2023-01-03T12:21:36-05:00"
}
]
}