--- title: codeDiscountNodes - GraphQL Admin description: >- Returns a list of [code-based discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes). api_version: 2024-10 api_name: admin type: query api_type: graphql source_url: html: 'https://shopify.dev/docs/api/admin-graphql/2024-10/queries/codeDiscountNodes' md: >- https://shopify.dev/docs/api/admin-graphql/2024-10/queries/codeDiscountNodes.txt --- # code​Discount​Nodes query Requires Apps must have `read_discounts` access scope. Returns a list of [code-based discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes). ## DiscountCodeNodeConnection arguments [DiscountCodeNodeConnection!](https://shopify.dev/docs/api/admin-graphql/2024-10/connections/DiscountCodeNodeConnection) * after [String](https://shopify.dev/docs/api/admin-graphql/2024-10/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/2024-10/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * first [Int](https://shopify.dev/docs/api/admin-graphql/2024-10/scalars/Int) The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/2024-10/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * query [String](https://shopify.dev/docs/api/admin-graphql/2024-10/scalars/String) A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). * * default string * combines\_with string * created\_at time * discount\_type string * ends\_at time * id id * starts\_at time * status string * times\_used integer * title string * type string * updated\_at time - Filter by a case-insensitive search of multiple fields in a document. - Example: * `query=Bob Norman` * `query=title:green hoodie` Filter by the [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) that you can use in combination with [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). - Valid values: * `order_discounts` * `product_discounts` * `shipping_discounts` Example: * `combines_with:product_discounts` Filter by the date and time when the discount was created. - Example: * `created_at:>'2020-10-21T23:39:20Z'` * `created_at:'2020-10-21T23:39:20Z'` * `ends_at:=1234` * `id:<=1234` Filter by the date and time, in the shop's timezone, when the discount becomes active and is available for customer use. - Example: * `starts_at:>'2020-10-21T23:39:20Z'` * `starts_at:150` * `times_used:>=200` Filter by the discount name that displays to customers. - Example: * `title:Black Friday Sale` Filter by the [discount type](https://help.shopify.com/manual/discounts/discount-types). - Valid values: * `all` * `all_with_app` * `app` * `bxgy` * `fixed_amount` * `free_shipping` * `percentage` Example: * `type:percentage` Filter by the date and time when the discount was last updated. Example: * `updated_at:>'2020-10-21T23:39:20Z'` * `updated_at: