DiscountCodeFreeShipping object

A free shipping code discount.

Required access

Apps must have read_discounts access scope.


On this page


Connections

  • codes ([DiscountRedeemCodeConnection!](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/discountredeemcode))
    A list of redeem codes for the discount.
Argument Description
after
(
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)

)
Returns the elements that come after the specified cursor.
before
(
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)

)
Returns the elements that come before the specified cursor.
first
(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)

)
Returns up to the first n elements from the list.
last
(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)

)
Returns up to the last n elements from the list.
query
(
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)

)
Supported filter parameters:
+ times_used
See the detailed search syntax for more information about using filters.
reverse
(
[Boolean](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01)

)
Reverse the order of the underlying list.
Default value: false
savedSearchId
(
[ID](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01)

)
ID of an existing saved search. The search’s query string is used as the query argument.
sortKey
(
[DiscountCodeSortKeys](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/discountcodesortkeys)

)
Sort the underlying list by the given key.
Default value: ID


Fields

  • appliesOnOneTimePurchase ([Boolean!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01))
    Whether the discount applies on regular one-time-purchase shipping lines.
  • appliesOnSubscription ([Boolean!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01))
    Whether the discount applies on subscription shipping lines.
  • appliesOncePerCustomer ([Boolean!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01))
    Whether the discount can be applied only once per customer.
  • asyncUsageCount ([Int!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
    The number of times that the discount has been used.
  • codeCount ([Int!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
    The number of redeem codes for the discount.
  • createdAt ([DateTime!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#datetime-2021-01))
    The date and time when the discount was created.
  • customerSelection ([DiscountCustomerSelection!](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/discountcustomerselection))
    The customers that can use the discount.
  • destinationSelection ([DiscountShippingDestinationSelection!](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/discountshippingdestinationselection))
    A shipping destination that qualifies for the discount.
  • endsAt ([DateTime](https://shopify.dev/docs/admin-api/graphql/reference/scalar#datetime-2021-01))
    The date and time when the discount ends. For open-ended discounts, use null.
  • hasTimelineComment ([Boolean!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01))
    Indicates whether there are any timeline comments on the discount.
  • maximumShippingPrice ([MoneyV2](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/moneyv2))
    The maximum shipping price amount accepted to qualify for the discount.
  • minimumRequirement ([DiscountMinimumRequirement](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/discountminimumrequirement))
    The minimum subtotal or quantity that’s required for the discount to be applied.
  • recurringCycleLimit ([Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
    The number of times a discount applies on recurring purchases (subscriptions).
  • shareableUrls ([[DiscountShareableUrl!]!](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/discountshareableurl))
    URLs that can be used to share the discount.
  • shortSummary ([String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
    A short summary of the discount.
  • startsAt ([DateTime!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#datetime-2021-01))
    The date and time when the discount starts.
  • status ([DiscountStatus!](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/discountstatus))
    The status of the discount.
  • summary ([String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
    A detailed summary of the discount.
  • title ([String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
    The title of the discount.
  • totalSales ([MoneyV2](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/moneyv2))
    The total sales from orders where the discount was used.
  • usageLimit ([Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
    The maximum number of times that the discount can be used.


Mutations for DiscountCodeFreeShipping