# Discount Code API

**URL:** <https://community.shopify.com/t/discount-code-api/213163>\
**Category:** Custom Storefronts\
**Created:** [May 3, 2023, 5:51am UTC](https://community.shopify.com/t/discount-code-api/213163 "2023-05-03T05:51:09Z")\
**Posts on this page:** 1\
**Page:** 1

## AI-generated summary

A developer is trying to retrieve discount code data filtered by customer ID and determine whether specific codes have been used. They've consulted the Shopify Admin REST API documentation for the price rule discount codes endpoint but report it's not working as expected. The post includes a reference link to the relevant API documentation (though the URL appears corrupted in the original message). They're seeking assistance from the community on how to properly implement this functionality.

<div class="post-metadata">

**Author:** ![buddyman1](https://avatars.discourse-cdn.com/v4/letter/b/f9ae1b/32.png) [@buddyman1](https://community.shopify.com/u/buddyman1)\
**Post date:** [May 3, 2023, 5:51am UTC](https://community.shopify.com/t/discount-code-api/213163/1 "2023-05-03T05:51:09Z")

</div>

**Hi. Everyone**

I have question So i have case, i need get all data discount code using filter by customer id. And i wanna see the discount code is have been used or not

I see at the documentation at the shopify API documentation but it’s not effect, anyone can help.  
src documentation : [https://shopify.dev/docs/api/admin-rest/2023-04/resources/discountcode#get-price-rules-price-rule-id-discount-codes](https://shopify.dev/docs/api/admin-rest/2023-04/resources/discountcode#get-price-rules-price-rule-id-discount-codes)
