DiscountCodeBasic object

Version unstable

A basic code discount.

Required access

Apps must have read_discounts access scope.

Connections

  • A list of redeem codes for the discount.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • times_used

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    savedSearchId ( ID )

    The ID of an existing saved search. The search’s query string is used as the query argument. Refer to SavedSearch.

    sortKey ( DiscountCodeSortKeys )

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

Fields

  • appliesOncePerCustomer (Boolean!)

    Whether the discount can be applied only once per customer.

  • asyncUsageCount (Int!)

    The number of times that the discount has been used.

  • codeCount (Int!)

    The number of redeem codes for the discount.

  • createdAt (DateTime!)

    The date and time when the discount was created.

  • customerGets (DiscountCustomerGets!)

    The qualifying items in an order, the quantity of each one, and the total value of the discount.

  • customerSelection (DiscountCustomerSelection!)

    The customers that can use the discount.

  • endsAt (DateTime)

    The date and time when the discount ends. For open-ended discounts, use