Firmhouse for Developers
FirmhouseHelp CenterStatusPortal / Login
  • ❤️Firmhouse for Developers
  • GraphQL API
    • Introduction
    • Getting Started
    • Pagination
    • Handling Errors
    • API Reference
      • Queries
        • assets
        • currentCart
        • discountCodes
        • getCollectionCase
        • getCurrentProject
        • getDiscountCode
        • getInvoice
        • getOrder
        • getOrderBy
        • getOrderCalculations
        • getOrders
        • getPayment
        • getRefund
        • getServiceChannelBy
        • getSubscription
        • getSubscriptionAccount
        • getSubscriptionBySelfServiceCenterLoginToken
        • getSubscriptions
        • invoices
        • orderedProducts
        • orders
        • outstandingInvoices
        • payments
        • plans
        • products
        • returnOrders
        • subscriptionAccounts
        • subscriptions
      • Mutations
        • activateSubscription
        • applyPromotionToSubscription
        • assignAsset
        • cancelReturnOrder
        • cancelSubscription
        • completeReturnOrder
        • completeSubscriptionCancellation
        • createAsset
        • createCart
        • createDiscountCode
        • createInvoiceLineItem
        • createInvoicedOneTimeCharge
        • createOrder
        • createOrderedProduct
        • createOrderedProductV2
        • createProduct
        • createPromotion
        • createReturnOrder
        • createSelfServiceCenterLoginToken
        • createSelfServiceCenterLoginTokenV2
        • createServiceChannel
        • createSubscription
        • createSubscriptionFromCart
        • creditAndRefundInvoice
        • deactivateAppliedPromotion
        • destroyInvoiceLineItem
        • destroyOrderedProduct
        • editPlan
        • fulfillOrder
        • fulfillOrders
        • importSubscription
        • pauseSubscription
        • refundPayment
        • resumeSubscription
        • sendSelfServiceCenterLoginTokenEmail
        • shipOrderedProducts
        • switchSubscriptionPlan
        • syncShopifyProducts
        • unassignAsset
        • undoSubscriptionCancellation
        • updateAddressDetails
        • updateAppliedPromotion
        • updateAsset
        • updateAssetOwnership
        • updateInvoice
        • updateInvoiceLineItem
        • updateOrder
        • updateOrderedProduct
        • updateOrderedProductQuantity
        • updatePlan
        • updateProduct
        • updatePromotion
        • updateReturnOrder
        • updateShippingCostsExemption
        • updateSubscribedPlan
        • updateSubscription
      • Objects
        • AcceptanceCheck
        • AcceptanceCheckStatus
        • ActivateSubscriptionInput
        • ActivateSubscriptionPayload
        • AdyenPaymentMethodVariant
        • AppliedBillingCyclePromotion
        • AppliedOrderDiscountPromotion
        • AppliedPromotion
        • AppliedPromotionDeactivationStrategy
        • ApplyPromotionToSubscriptionInput
        • ApplyPromotionToSubscriptionPayload
        • Asset
        • AssetConnection
        • AssetCustomField
        • AssetCustomFieldInput
        • AssetCustomFieldValue
        • AssetEdge
        • AssetOwnership
        • AssetStatus
        • AssignAssetInput
        • AssignAssetPayload
        • BaseIntervalUnit
        • BillingCycleIntervalUnit
        • BillingCyclePromotion
        • Boolean
        • CancelReturnOrderInput
        • CancelReturnOrderPayload
        • CancelSubscriptionInput
        • CancelSubscriptionPayload
        • Cart
        • CollectionCase
        • CollectionCaseConnection
        • CollectionCaseEdge
        • CollectionCaseStatus
        • CommitmentUnit
        • CompleteReturnOrderInput
        • CompleteReturnOrderPayload
        • CompleteSubscriptionCancellationInput
        • CompleteSubscriptionCancellationPayload
        • CreateAssetInput
        • CreateAssetPayload
        • CreateCartInput
        • CreateCartPayload
        • CreateDiscountCodeInput
        • CreateDiscountCodePayload
        • CreateInvoiceLineItemInput
        • CreateInvoiceLineItemPayload
        • CreateInvoicedOneTimeChargeInput
        • CreateInvoicedOneTimeChargePayload
        • CreateOrderInput
        • CreateOrderPayload
        • CreateOrderedProductInput
        • CreateOrderedProductPayload
        • CreateOrderedProductV2Input
        • CreateOrderedProductV2Payload
        • CreateProductInput
        • CreateProductPayload
        • CreatePromotionInput
        • CreatePromotionPayload
        • CreateReturnOrderInput
        • CreateReturnOrderPayload
        • CreateSelfServiceCenterLoginTokenInput
        • CreateSelfServiceCenterLoginTokenPayload
        • CreateSelfServiceCenterLoginTokenV2Input
        • CreateSelfServiceCenterLoginTokenV2Payload
        • CreateServiceChannelInput
        • CreateServiceChannelPayload
        • CreateSubscriptionFromCartInput
        • CreateSubscriptionFromCartPayload
        • CreateSubscriptionInput
        • CreateSubscriptionPayload
        • CreditAndRefundInvoiceInput
        • CreditAndRefundInvoicePayload
        • CustomerFeedback
        • DeactivateAppliedPromotionInput
        • DeactivateAppliedPromotionPayload
        • DestroyInvoiceLineItemInput
        • DestroyInvoiceLineItemPayload
        • DestroyOrderedProductInput
        • DestroyOrderedProductPayload
        • DiscountCode
        • DiscountCodeConnection
        • DiscountCodeEdge
        • EditPlanInput
        • EditPlanPayload
        • ExtraField
        • ExtraFieldAnswer
        • ExtraFieldInput
        • ExtraFieldInterface
        • FeedbackTypeEnum
        • Float
        • FulfillOrderInput
        • FulfillOrderPayload
        • FulfillOrdersInput
        • FulfillOrdersPayload
        • ID
        • ISO8601Date
        • ISO8601DateTime
        • ImportSubscriptionInput
        • ImportSubscriptionPayload
        • InstalmentIntervalInterface
        • Int
        • Invoice
        • InvoiceConnection
        • InvoiceEdge
        • InvoiceLineItem
        • InvoiceReminder
        • InvoiceStatusEnum
        • InvoiceUpdatableStatusEnum
        • JSON
        • Licence
        • LineItemTypeEnum
        • MaximumCommitmentUnit
        • MetadataInterface
        • ModelValidationError
        • Offer
        • OfferTypeEnum
        • Order
        • OrderCalculation
        • OrderConnection
        • OrderDiscountPromotion
        • OrderEdge
        • OrderLine
        • OrderSortEnum
        • OrderStatus
        • OrderedProduct
        • OrderedProductEdge
        • OrderedProductInput
        • OrderedProductIntervalUnitOfMeasure
        • OrderedProductStatus
        • OrderedProductTypes
        • OrderedProductsWithSummaryConnection
        • PageInfo
        • PauseSubscriptionInput
        • PauseSubscriptionPayload
        • Payment
        • PaymentConnection
        • PaymentEdge
        • PaymentStatusEnum
        • PaymentTypeEnum
        • Plan
        • PlanConnection
        • PlanEdge
        • PlanProduct
        • Price
        • PriceDeleteInput
        • PriceInput
        • Product
        • ProductConnection
        • ProductEdge
        • Project
        • Promotion
        • Refund
        • RefundPaymentInput
        • RefundPaymentPayload
        • RefundStatus
        • ResumeSubscriptionInput
        • ResumeSubscriptionPayload
        • ReturnOrder
        • ReturnOrderConnection
        • ReturnOrderEdge
        • ReturnOrderProduct
        • ReturnOrderProductInput
        • ReturnOrderStatus
        • SelfServiceCenterLoginToken
        • SendSelfServiceCenterLoginTokenEmailInput
        • SendSelfServiceCenterLoginTokenEmailPayload
        • ServiceChannel
        • ShipOrderedProductsInput
        • ShipOrderedProductsPayload
        • String
        • SubscribedPlan
        • Subscription
        • SubscriptionAcceptanceCheck
        • SubscriptionAcceptanceCheckConnection
        • SubscriptionAcceptanceCheckEdge
        • SubscriptionAccount
        • SubscriptionAccountConnection
        • SubscriptionAccountEdge
        • SubscriptionAccountStatus
        • SubscriptionConnection
        • SubscriptionEdge
        • SubscriptionIdentity
        • SubscriptionStatus
        • SwitchSubscriptionPlanInput
        • SwitchSubscriptionPlanPayload
        • SyncShopifyProductsInput
        • SyncShopifyProductsPayload
        • TaxRate
        • UnassignAssetInput
        • UnassignAssetPayload
        • UndoSubscriptionCancellationInput
        • UndoSubscriptionCancellationPayload
        • UpdateAddressDetailsInput
        • UpdateAddressDetailsPayload
        • UpdateAppliedPromotionInput
        • UpdateAppliedPromotionPayload
        • UpdateAssetInput
        • UpdateAssetOwnershipInput
        • UpdateAssetOwnershipPayload
        • UpdateAssetPayload
        • UpdateInvoiceInput
        • UpdateInvoiceLineItemInput
        • UpdateInvoiceLineItemPayload
        • UpdateInvoicePayload
        • UpdateOrderInput
        • UpdateOrderPayload
        • UpdateOrderedProductInput
        • UpdateOrderedProductPayload
        • UpdateOrderedProductQuantityInput
        • UpdateOrderedProductQuantityPayload
        • UpdatePlanInput
        • UpdatePlanPayload
        • UpdateProductInput
        • UpdateProductPayload
        • UpdatePromotionInput
        • UpdatePromotionPayload
        • UpdateReturnOrderInput
        • UpdateReturnOrderPayload
        • UpdateShippingCostsExemptionInput
        • UpdateShippingCostsExemptionPayload
        • UpdateSubscribedPlanInput
        • UpdateSubscribedPlanPayload
        • UpdateSubscriptionInput
        • UpdateSubscriptionPayload
  • Liquid
    • Introduction
    • Email template overview
    • Using Extra Fields in Liquid
    • Available tags
  • Webhooks
    • Overview
  • Guides
    • Creating a Storefront App
    • Updating the amount of discount on each order
    • Build a switch/upgrade plan flow that requires payment
  • SDKs
    • Storefront JS SDK
      • Configuration Options
      • Create a Storefront API token
      • Shopify
        • Add an integrated cart to your Shopify store
        • Link up "View Cart" button
      • Translations and custom copy
      • Using with Next.js
    • Firmhouse SDK
      • Getting Started
      • Examples and Boilerplates
      • Handling Errors
      • Reference
        • Classes
          • FirmhouseClient
        • Resources
          • CartsResource
          • InvoicesResource
          • PlansResource
          • ProductsResource
          • ProjectsResource
          • SelfServiceCenterTokenResource
          • SubscriptionsResource
        • Errors
          • NotFoundError
          • ServerError
          • ValidationError
        • Enumerations
          • AcceptanceCheckStatus
          • Access
          • AppliedPromotionDeactivationStrategy
          • AssetStatus
          • BaseIntervalUnit
          • BillingCycleIntervalUnit
          • CollectionCaseStatus
          • CommitmentUnit
          • FeedbackTypeEnum
          • InvoiceStatusEnum
          • LineItemTypeEnum
          • MaximumCommitmentUnit
          • OrderStatus
          • OrderedProductIntervalUnitOfMeasure
          • OrderedProductStatus
          • OrderedProductTypes
          • PaymentStatusEnum
          • PaymentTypeEnum
          • RefundStatus
          • ReturnOrderStatus
          • SubscriptionStatus
        • Functions
          • mapExtraFieldsByFieldId()
        • Interfaces
          • FirmhouseAppliedOrderDiscountPromotion
          • FirmhouseAppliedPromotion
          • FirmhouseBillingCyclePromotion
          • FirmhouseCart
          • FirmhouseCollectionCase
          • FirmhouseConfig
          • FirmhouseDiscountCode
          • FirmhouseExtraField
          • FirmhouseExtraFieldAnswer
          • FirmhouseInvoice
          • FirmhouseInvoiceLineItem
          • FirmhouseInvoiceReminder
          • FirmhouseOrder
          • FirmhouseOrderLine
          • FirmhouseOrderedProduct
          • FirmhouseOrderedProductUtils
          • FirmhouseOrderedProductWithUtils
          • FirmhouseOriginalInvoice
          • FirmhousePayment
          • FirmhousePlan
          • FirmhouseProduct
          • FirmhouseProject
          • FirmhousePromotion
          • FirmhouseRefund
          • FirmhouseSubscribedPlan
          • FirmhouseSubscription
          • FirmhouseSubscriptionUtils
          • FirmhouseSubscriptionWithUtils
          • FirmhouseTaxRate
          • FirmhouseVerifiedIdentity
          • FirmouseCollectionCase
        • TypeAliases
          • PaginatedResponse
    • Headless React
      • Examples
      • Components
        • FirmhouseCartProvider
        • CheckoutForm
        • OrderedProductList
        • OrderSummary
        • Translated
Powered by GitBook
On this page

Was this helpful?

  1. GraphQL API
  2. API Reference
  3. Objects

DiscountCode

Discount codes can be applied to a subscription to activate a promotion.

Last updated 1 year ago

Was this helpful?

Fields

autoSelectPlan ()

If set the discout code will auto select this plan

code (!)

The unique code that can be applied to a checkout

createdAt (!)

When the discound code was created.

expired (!)

Whether the discount code has already expired.

id (!)

ID to identify the discount code with

maxTimesUsed ()

The max usage of this discount code

metadata ()

Metadata makes it possible to store additional information on objects.

Promotion that is attached to the discount code

ID of the promotion that is attached to the discount code

Whether the discount code can be redeemed. Returns true only if related Discount is activated and Discount code has not expired.

When the discound code was updated last time.

promotion ()

promotionId (!)

redeemable (!)

updatedAt (!)

Plan
String
ISO8601DateTime
Boolean
ID
Int
JSON
Promotion
ID
Boolean
ISO8601DateTime