openapi: 3.0.1
info:
  title: Customer Portal APIs
  description: >-
    <b>Important Note</b>:


    The APIs in this document are for reference only and will not work directly
    in Swagger. To use these APIs, you need to call them from your shop.


    The <b>base URL</b> for these APIs is your shop's domain. For example, if
    your shop domain is <b>https://www.myshop.com/apps</b>, then the full API
    endpoint will be based on this domain <b>(e.g.,
    https://www.myshop.com/apps/memberships/cp/api/**)</b>.


    <b>Please ensure the customer is logged in when calling the Customer Portal
    Proxy API</b>. If the customer is not logged in, the API will return a 401
    Unauthorized error.
  version: 0.0.1
servers:
  - url: https://www.myshop.com/apps
tags:
  - name: Shipping & Delivery Profiles
    description: >-
      APIs for managing Shopify delivery profiles, shipping rates, zones, and
      free shipping configuration for subscription memberships
  - name: Custom CSS Styling
    description: >-
      APIs for retrieving custom CSS styles applied to subscription widgets and
      customer portal for theme customization
  - name: Customer Discount History
    description: >-
      APIs for retrieving historical discount code usage and redemption
      information for membership contracts
  - name: Customer Portal Configuration
    description: >-
      APIs for managing customer portal settings including UI customization,
      text labels, feature toggles, and branding options for the member
      self-service portal
  - name: Cancellation Flow Configuration
    description: >-
      APIs for managing membership cancellation flow settings including
      retention offers, survey questions, and cancel confirmation screens
  - name: Membership Contracts
    description: >-
      APIs for managing membership/subscription contracts including creation,
      updates, status changes, line items, discounts, and billing operations
  - name: Billing & Orders
    description: >-
      APIs for managing membership billing attempts, recurring orders, payment
      retries, order history, and order skipping
  - name: Product & Inventory Data
    description: >-
      APIs for retrieving product catalog, variants, pricing, and inventory
      information for subscription memberships
  - name: One-Time Add-Ons
    description: >-
      APIs for managing one-time product additions to upcoming subscription
      orders, including adding, retrieving, and removing one-off items
  - name: Membership Plans
    description: >-
      APIs for managing membership/subscription plan groups, including creating
      plans, configuring discounts, billing intervals, and assigning products to
      plans
  - name: Product Swap Rules
    description: >-
      APIs for retrieving product swap/substitution options allowing members to
      exchange subscription items based on configured swap rules and variant
      groups
paths:
  /memberships/cp/api/v2/subscription-contracts-add-line-item:
    put:
      tags:
        - Membership Contracts
      operationId: addLineItem
      parameters:
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: shop
          in: query
          required: true
          schema:
            type: string
        - name: quantity
          in: query
          required: true
          schema:
            type: integer
            format: int32
        - name: variantId
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
  /memberships/cp/api/subscription-contracts-update-status:
    put:
      tags:
        - Membership Contracts
      summary: Update membership contract status
      description: >-
        Updates the status of an existing membership contract (ACTIVE, PAUSED,
        CANCELLED, or EXPIRED). This is one of the most critical operations for
        managing membership lifecycles.


        **Supported Status Values:**

        - **ACTIVE**: Membership is active and will process recurring billing

        - **PAUSED**: Membership is temporarily paused, no billing will occur

        - **CANCELLED**: Membership is permanently cancelled, no future billing

        - **EXPIRED**: Membership has expired (typically used when max cycles
        reached)


        **Pause Duration:**

        - When pausing, you can optionally specify `pauseDurationCycle` to
        auto-resume after N cycles

        - If not specified, membership remains paused until manually reactivated


        **Business Rules & Validations:**

        - **Customer Portal Restrictions**: When called from customer portal,
        additional validations apply:
          - Cannot modify frozen memberships (freeze till min cycle condition)
          - Must respect billing cycle limits configured by merchant
        - **Contract Validation**: System validates that the contract belongs to
        the authenticated shop

        - **Activity Logging**: All status changes are logged with source
        (merchant portal vs customer portal)


        **Use Cases:**

        - Customer wants to pause their membership temporarily

        - Merchant needs to cancel a membership due to customer request

        - Reactivating a paused membership

        - Marking membership as expired when max cycles reached


        **Authentication:** Requires authenticated shop user or customer portal
        token
      operationId: updateStatus
      parameters:
        - name: contractId
          in: query
          description: Membership contract ID (numeric ID, not Shopify GID)
          required: true
          schema:
            type: integer
            format: int64
          example: 123456789
        - name: status
          in: query
          description: New status value
          required: true
          schema:
            type: string
            enum:
              - ACTIVE
              - PAUSED
              - CANCELLED
              - EXPIRED
          example: PAUSED
        - name: pauseDurationCycle
          in: query
          description: >-
            Optional pause duration in billing cycles. When specified,
            membership will auto-resume after N cycles
          required: false
          schema:
            type: integer
            format: int32
          example: 2
      responses:
        '204':
          description: Membership status updated successfully (no content returned)
        '400':
          description: Invalid request - validation failed
          content:
            application/json:
              examples:
                Contract Not Found:
                  description: Contract Not Found
                  value:
                    title: Bad Request
                    status: 400
                    detail: Contract not found
                    entityName: subscriptionContractDetails
                    errorKey: notfound
                Unauthorized Access:
                  description: Unauthorized Access
                  value:
                    title: Bad Request
                    status: 400
                    detail: Unauthorized access to subscription contract
                    errorKey: unauthorized
                Frozen Membership:
                  description: Customer portal attempting to modify frozen membership
                  value:
                    title: Bad Request
                    status: 400
                    detail: >-
                      This membership is frozen until minimum billing cycles are
                      completed
                    errorKey: membership_frozen
                Billing Cycle Limit:
                  description: Customer portal operation violates billing cycle limits
                  value:
                    title: Bad Request
                    status: 400
                    detail: >-
                      Cannot perform this operation due to billing cycle
                      restrictions
                    errorKey: billing_cycle_limit
        '401':
          description: Authentication required
        '500':
          description: Internal server error - Shopify API failure or system error
  /memberships/cp/api/subscription-contracts-update-shipping-address:
    put:
      tags:
        - Membership Contracts
      operationId: updateShippingAddress
      parameters:
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: shop
          in: query
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeShippingAddressVM'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
  /memberships/cp/api/subscription-contracts-update-payment-method:
    put:
      tags:
        - Membership Contracts
      operationId: updatePaymentMethod
      parameters:
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
  /memberships/cp/api/subscription-contracts-update-order-note/{contractId}:
    put:
      tags:
        - Membership Contracts
      operationId: updateOrderNote
      parameters:
        - name: contractId
          in: path
          required: true
          schema:
            type: integer
            format: int64
        - name: shop
          in: query
          required: true
          schema:
            type: string
        - name: orderNote
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: boolean
  /memberships/cp/api/subscription-contracts-update-line-item-attributes:
    put:
      tags:
        - Membership Contracts
      operationId: updateLineItemAttributes
      parameters:
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: lineId
          in: query
          required: true
          schema:
            type: string
        - name: isExternal
          in: query
          required: false
          schema:
            type: boolean
            default: false
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/AttributeInfo'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
  /memberships/cp/api/subscription-contracts-update-existing-payment-method:
    put:
      tags:
        - Membership Contracts
      operationId: updateExistingPaymentMethod
      parameters:
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: paymentMethodId
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
  /memberships/cp/api/subscription-contracts-update-billing-interval:
    put:
      tags:
        - Membership Contracts
      operationId: updateBillingInterval
      parameters:
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: shop
          in: query
          required: true
          schema:
            type: string
        - name: intervalCount
          in: query
          required: true
          schema:
            type: integer
            format: int32
        - name: interval
          in: query
          required: true
          schema:
            type: string
            enum:
              - DAY
              - WEEK
              - MONTH
              - YEAR
              - $UNKNOWN
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
  /memberships/cp/api/subscription-contracts-update-billing-date:
    put:
      tags:
        - Membership Contracts
      operationId: updateNextBillingDate
      parameters:
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: shop
          in: query
          required: true
          schema:
            type: string
        - name: nextBillingDate
          in: query
          required: true
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
  /memberships/cp/api/subscription-contracts-remove-line-item:
    put:
      tags:
        - Membership Contracts
      operationId: removeLineItem
      parameters:
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: shop
          in: query
          required: true
          schema:
            type: string
        - name: lineId
          in: query
          required: true
          schema:
            type: string
        - name: removeDiscount
          in: query
          required: false
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
  /memberships/cp/api/subscription-contracts-remove-discount:
    put:
      tags:
        - Membership Contracts
      operationId: removeDiscount
      parameters:
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: discountId
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
  /memberships/cp/api/subscription-contracts-cancellation-discount:
    put:
      tags:
        - Membership Contracts
      operationId: addCancellationDiscount
      parameters:
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: cancellationReason
          in: query
          required: false
          schema:
            type: string
        - name: feedback
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
  /memberships/cp/api/subscription-contracts-apply-discount:
    put:
      tags:
        - Membership Contracts
      operationId: applyDiscountCode
      parameters:
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: discountCode
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
  /memberships/cp/api/subscription-contracts-add-line-item:
    put:
      tags:
        - Membership Contracts
      summary: Add a product to an existing membership contract
      description: >-
        Adds a new product/variant line item to an existing active membership
        contract. This allows customers or merchants to add additional products
        to their recurring membership orders.


        **Key Features:**

        - Add any product variant to an existing membership

        - Specify custom quantity and price per line item

        - Product will be included in all future billing cycles

        - Price is per-item, total line price = price × quantity


        **Important Notes:**

        - **Immediate Effect**: Product is added immediately and will appear in
        the next billing cycle

        - **Price Override**: The price parameter allows setting a custom price
        (e.g., member discount)

        - **Activity Logging**: Addition is logged for audit trail

        - **Validation**: System validates that the variant exists and is
        available


        **Common Use Cases:**

        - Customer wants to add more products to their monthly membership box

        - Merchant adds a complimentary product to a membership

        - Upgrading membership with additional items

        - Adding seasonal or limited-time products to existing memberships


        **Price Considerations:**

        - Price is specified in shop's currency

        - Can be set to member-only pricing (different from regular product
        price)

        - Zero price is allowed for free add-ons


        **Variant ID Format:**

        - Accepts both numeric ID (e.g., '987654321') and Shopify GID format

        - System will convert to proper Shopify GraphQL format internally


        **Authentication:** Requires authenticated shop user or customer portal
        token
      operationId: addLineItem_1
      parameters:
        - name: contractId
          in: query
          description: Membership contract ID to add product to
          required: true
          schema:
            type: integer
            format: int64
          example: 123456789
        - name: shop
          in: query
          description: Shop domain (will be auto-populated from authentication)
          required: true
          schema:
            type: string
          example: example-shop.myshopify.com
        - name: quantity
          in: query
          description: Quantity of the product to add
          required: true
          schema:
            type: integer
            format: int32
          example: 2
        - name: variantId
          in: query
          description: Shopify variant ID of the product to add (numeric or GID format)
          required: true
          schema:
            type: string
          example: 987654321
        - name: price
          in: query
          description: Price per unit in shop currency (allows custom/member pricing)
          required: true
          schema:
            type: number
            format: double
          example: 19.99
      responses:
        '200':
          description: Product successfully added to membership contract
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
        '400':
          description: Invalid request - validation failed
          content:
            application/json:
              examples:
                Contract Not Found:
                  description: Contract Not Found
                  value:
                    title: Bad Request
                    status: 400
                    detail: Contract not found or doesn't belong to this shop
                    errorKey: notfound
                Invalid Variant:
                  description: Invalid Variant
                  value:
                    title: Bad Request
                    status: 400
                    detail: Product variant not found or is unavailable
                    errorKey: invalid_variant
                Invalid Quantity:
                  description: Invalid Quantity
                  value:
                    title: Bad Request
                    status: 400
                    detail: Quantity must be greater than 0
                    errorKey: invalid_quantity
        '401':
          description: Authentication required
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
        '500':
          description: Internal server error - Shopify API failure
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
  /memberships/cp/api/subscription-contract-update-variant:
    put:
      tags:
        - Membership Contracts
      operationId: updateVariant
      parameters:
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: oldLineId
          in: query
          required: false
          schema:
            type: string
        - name: oldVariantId
          in: query
          required: false
          schema:
            type: string
        - name: newVariantId
          in: query
          required: true
          schema:
            type: string
        - name: sellingPlanId
          in: query
          required: false
          schema:
            type: string
        - name: skipBilling
          in: query
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: string
  /memberships/cp/api/subscription-contract-one-offs-by-contractId-and-billing-attempt-id:
    put:
      tags:
        - One-Time Add-Ons
      operationId: saveOneOffBy
      parameters:
        - name: shop
          in: query
          required: true
          schema:
            type: string
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: billingAttemptId
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: variantId
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: variantHandle
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubscriptionContractOneOffDTO'
  /memberships/cp/api/subscription-contract-details:
    put:
      tags:
        - Membership Contracts
      operationId: updateSubscriptionContractDetails
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionContractDetailsDTO'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContractDetailsDTO'
  /memberships/cp/api/subscription-billing-attempts/skip-order/{id}:
    put:
      tags:
        - Billing & Orders
      summary: Skip an upcoming billing order
      description: >-
        Skips the next scheduled billing/order for a membership contract. The
        membership remains active, but the next billing date is moved to the
        following cycle.


        **Key Features:**

        - Skip next billing without canceling membership

        - Automatically reschedule to next billing cycle

        - Works for both regular and prepaid memberships

        - Activity logging for audit trail


        **How It Works:**

        1. Validates billing attempt exists and belongs to shop

        2. Updates next billing date to skip current cycle

        3. Moves billing to the next scheduled interval

        4. Logs activity (customer portal vs merchant portal)


        **Customer Portal Restrictions:**

        - Cannot skip if membership is frozen until min cycles

        - Validates contract ownership for security


        **Use Cases:**

        - Customer is traveling and wants to skip one delivery

        - Customer has excess inventory and wants to pause one cycle

        - Merchant wants to skip a billing due to out-of-stock items

        - Skip billing for special circumstances (holidays, etc.)


        **Prepaid Handling:**

        - Set `isPrepaid=true` for prepaid memberships

        - Different validation logic for prepaid vs pay-as-you-go


        **Authentication:** Requires authenticated shop user or customer portal
        token
      operationId: skipOrder
      parameters:
        - name: id
          in: path
          description: Billing attempt ID to skip
          required: true
          schema:
            type: integer
            format: int64
          example: 123456
        - name: subscriptionContractId
          in: query
          description: Optional subscription contract ID for additional validation
          required: false
          schema:
            type: integer
            format: int64
          example: 789012
        - name: isPrepaid
          in: query
          description: Set to true if this is a prepaid membership
          required: false
          schema:
            type: boolean
            default: false
          example: false
      responses:
        '200':
          description: Billing order successfully skipped
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionBillingAttemptDTO'
        '400':
          description: Invalid request - validation failed
          content:
            application/json:
              examples:
                Billing Attempt Not Found:
                  description: Billing Attempt Not Found
                  value:
                    title: Bad Request
                    status: 400
                    detail: Billing attempt not found or doesn't belong to this shop
                    errorKey: notfound
                Frozen Membership:
                  description: Customer portal attempting to skip frozen membership
                  value:
                    title: Bad Request
                    status: 400
                    detail: >-
                      This membership is frozen until minimum billing cycles are
                      completed
                    errorKey: membership_frozen
        '401':
          description: Authentication required
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionBillingAttemptDTO'
        '500':
          description: Internal server error - Shopify API failure
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionBillingAttemptDTO'
  /memberships/cp/api/subscription-billing-attempts/attempt-billing/{id}:
    put:
      tags:
        - Billing & Orders
      operationId: attemptBilling
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int64
        - name: shop
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
  /memberships/cp/api/subscription-billing-attempts:
    put:
      tags:
        - Billing & Orders
      operationId: updateSubscriptionBillingAttempt
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionBillingAttemptDTO'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionBillingAttemptDTO'
  /memberships/cp/api/product-swaps-by-variant-groups:
    post:
      tags:
        - Product Swap Rules
      operationId: getProductSwapsByVariantId
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VariantQuantityInfo'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  type: array
                  items:
                    $ref: '#/components/schemas/VariantQuantity'
  /memberships/cp/api/loyalty-integration/redeem:
    post:
      tags:
        - loyalty-integration-resource
      operationId: redeemPoints
      parameters:
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: redeemOptionId
          in: query
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: string
  /memberships/cp/api/customer-retention-activities:
    post:
      tags:
        - customer-retention-activity-resource
      operationId: createCustomerRetentionActivity
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerRetentionActivityDTO'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CustomerRetentionActivityDTO'
  /memberships/cp/api/subscription-customers:
    get:
      tags:
        - Membership Contracts
      operationId: getSubscriptionCustomerForCP
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Customer'
  /memberships/cp/api/subscription-customers/valid:
    get:
      tags:
        - Membership Contracts
      operationId: getValidSubscriptionCustomerForCP
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                uniqueItems: true
                type: array
                items:
                  type: integer
                  format: int64
  /memberships/cp/api/subscription-billing-attempts/top-orders:
    get:
      tags:
        - Billing & Orders
      operationId: getTopOrdersForCP
      parameters:
        - name: contractId
          in: query
          required: false
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubscriptionBillingAttemptDTO'
  /memberships/cp/api/subscription-billing-attempts/past-orders:
    get:
      tags:
        - Billing & Orders
      operationId: getPastOrdersForCP
      parameters:
        - name: contractId
          in: query
          required: false
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubscriptionBillingAttemptDTO'
  /memberships/cp/api/subscription-groups/all-selling-plans:
    get:
      tags:
        - Membership Plans
      operationId: getAllSellingPlans
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FrequencyInfoDTO'
  /memberships/cp/api/subscription-customers-detail/valid/{id}:
    get:
      tags:
        - Membership Contracts
      operationId: getValidSubscriptionCustomerDetails
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: shop
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubscriptionContractDetailsDTO'
  /memberships/cp/api/subscription-custom-csses/{id}:
    get:
      tags:
        - Custom CSS Styling
      operationId: getSubscriptionCustomCss
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionCustomCssDTO'
  /memberships/cp/api/subscription-contracts/contract/{contractId}:
    get:
      tags:
        - Membership Contracts
      operationId: getSubscriptionContractRaw
      parameters:
        - name: contractId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
  /memberships/cp/api/subscription-contracts/contract-external/{contractId}:
    get:
      tags:
        - Membership Contracts
      operationId: getSubscriptionContractRawExternal
      parameters:
        - name: contractId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContract'
  /memberships/cp/api/subscription-contracts-email-magic-link:
    get:
      tags:
        - Membership Contracts
      operationId: emailMagicLink
      parameters:
        - name: shop
          in: query
          required: true
          schema:
            type: string
        - name: email
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: string
  /memberships/cp/api/subscription-contract-one-offs-by-contractId:
    get:
      tags:
        - One-Time Add-Ons
      operationId: getOneOffsForSubscriptionContract
      parameters:
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubscriptionContractOneOffDTO'
  /memberships/cp/api/subscription-contract-details/{contractId}/pending-downgrade:
    get:
      tags:
        - Membership Contracts
      operationId: getPendingDowngrade
      parameters:
        - name: contractId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ScheduledDowngradeRequest'
    delete:
      tags:
        - Membership Contracts
      operationId: cancelPendingDowngrade
      parameters:
        - name: contractId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
  /memberships/cp/api/subscription-contract-details/subscription-fulfillments/{contractId}:
    get:
      tags:
        - Membership Contracts
      operationId: getSubscriptionFulfillments
      parameters:
        - name: contractId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Order'
  /memberships/cp/api/subscription-contract-details/shopify/customer/{customerId}/payment-methods:
    get:
      tags:
        - Membership Contracts
      operationId: getShopifyCustomerPaymentDetails
      parameters:
        - name: customerId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PaymentMethods'
  /memberships/cp/api/subscription-contract-details/customer/{contractId}:
    get:
      tags:
        - Membership Contracts
      operationId: getSubscriptionOrderNote
      parameters:
        - name: contractId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionContractDetailsDTO'
  /memberships/cp/api/subscription-contract-details/current-cycle/{contractId}:
    get:
      tags:
        - Membership Contracts
      operationId: getCurrentCycleOfSubscriptionContract
      parameters:
        - name: contractId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: integer
                format: int32
  /memberships/cp/api/shop-infos-by-current-login:
    get:
      tags:
        - shop-info-resource
      operationId: getShopInfoByCurrentLogin
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ShopInfoResponseDTO'
  /memberships/cp/api/loyalty-integration/redeem-options:
    get:
      tags:
        - loyalty-integration-resource
      operationId: getRedeemOptions
      parameters:
        - name: customerEmail
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LoyaltyPointRedemptionRule'
  /memberships/cp/api/loyalty-integration/earn-options:
    get:
      tags:
        - loyalty-integration-resource
      operationId: getEarnOptions
      parameters:
        - name: customerEmail
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LoyaltyPointEarnCampaign'
  /memberships/cp/api/loyalty-integration/customer:
    get:
      tags:
        - loyalty-integration-resource
      operationId: fetchCustomerDetail
      parameters:
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/LoyaltyCustomerDataResponse'
  /memberships/cp/api/delivery-profiles/get-locations:
    get:
      tags:
        - Shipping & Delivery Profiles
      operationId: getLocations
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Location'
  /memberships/cp/api/data/variant-contextual-pricing:
    get:
      tags:
        - Product & Inventory Data
      operationId: getVariantContextualPricing
      parameters:
        - name: variantId
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: currencyCode
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ProductVariant'
  /memberships/cp/api/data/selling-plan-products:
    get:
      tags:
        - Product & Inventory Data
      operationId: getSellingPlanProductsData
      parameters:
        - name: search
          in: query
          required: false
          schema:
            type: string
        - name: next
          in: query
          required: false
          schema:
            type: boolean
            default: false
        - name: cursor
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ProductData'
  /memberships/cp/api/data/products:
    get:
      tags:
        - Product & Inventory Data
      operationId: getProductsData
      parameters:
        - name: search
          in: query
          required: false
          schema:
            type: string
        - name: next
          in: query
          required: false
          schema:
            type: boolean
            default: false
        - name: cursor
          in: query
          required: false
          schema:
            type: string
        - name: contractId
          in: query
          required: false
          schema:
            type: integer
            format: int64
        - name: sellingPlanIds
          in: query
          required: false
          schema:
            type: string
        - name: sendAllData
          in: query
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ProductData'
  /memberships/cp/api/data/product-selling-plan-variant:
    get:
      tags:
        - Product & Inventory Data
      operationId: getProductSellingPlanVariantData
      parameters:
        - name: productId
          in: query
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Product'
  /memberships/cp/api/data/product:
    get:
      tags:
        - Product & Inventory Data
      operationId: getProductData
      parameters:
        - name: productId
          in: query
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Product'
  /memberships/cp/api/customer-portal-settings/{id}:
    get:
      tags:
        - Customer Portal Configuration
      operationId: getCustomerPortalSettings
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CustomerPortalSettingsDTO'
  /memberships/cp/api/customer-discount-code-infos/get-past-discounts:
    get:
      tags:
        - Customer Discount History
      operationId: getCustomerDiscountDetails
      parameters:
        - name: contractId
          in: query
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Node'
  /memberships/cp/api/cancellation-managements/{id}:
    get:
      tags:
        - Cancellation Flow Configuration
      operationId: getCancellationManagement
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CancellationManagementDTO'
  /memberships/cp/api/subscription-contracts/{id}:
    delete:
      tags:
        - Membership Contracts
      summary: Cancel a membership contract
      description: >-
        Permanently cancels an active membership contract in Shopify. This
        operation stops all future billing and marks the membership as
        CANCELLED.


        **Important Notes:**

        - **Permanent Action**: Cancellation cannot be undone. A new membership
        must be created to re-subscribe.

        - **Email Notification**: Cancellation email is automatically sent to
        the customer

        - **Activity Logging**: Cancellation is logged with reason/feedback for
        analytics

        - **Immediate Effect**: No future billing attempts will be made


        **Customer Portal Restrictions:**

        When called from customer portal, additional validations apply:

        - **Minimum Cycles**: Cannot cancel if membership hasn't completed
        minimum required billing cycles

        - **Frozen Memberships**: Cannot cancel memberships that are frozen
        until min cycle completion

        - **Attribute-Based Limits**: Respects any custom attribute-based
        cancellation restrictions


        **Cancellation Feedback:**

        - Optional `cancellationFeedback` parameter to capture why customer is
        cancelling

        - Common values: 'TOO_EXPENSIVE', 'NO_LONGER_NEEDED',
        'SWITCHING_TO_COMPETITOR', 'OTHER'

        - Helps merchants understand churn reasons


        **Use Cases:**

        - Customer requests to cancel their membership

        - Merchant manually cancels membership (e.g., payment issues, customer
        request)

        - Automated cancellation after max cycles reached


        **Authentication:** Requires authenticated shop user or customer portal
        token
      operationId: deleteSubscriptionContract
      parameters:
        - name: id
          in: path
          description: Membership contract ID to cancel
          required: true
          schema:
            type: integer
            format: int64
          example: 123456789
        - name: cancellationFeedback
          in: query
          description: Optional cancellation reason/feedback from customer
          required: false
          schema:
            type: string
          example: TOO_EXPENSIVE
        - name: cancellationNote
          in: query
          description: Optional cancellation note with additional details
          required: false
          schema:
            type: string
          example: Customer found a cheaper alternative
      responses:
        '204':
          description: >-
            Membership successfully cancelled (no content returned).
            Cancellation email sent to customer.
        '400':
          description: Invalid request - validation failed
          content:
            application/json:
              examples:
                Contract Not Found:
                  description: Contract Not Found
                  value:
                    title: Bad Request
                    status: 400
                    detail: Contract not found or doesn't belong to this shop
                    errorKey: notfound
                Minimum Cycles Not Met:
                  description: >-
                    Customer portal attempting to cancel before minimum cycles
                    completed
                  value:
                    title: Bad Request
                    status: 400
                    detail: >-
                      This membership requires a minimum of 3 billing cycles
                      before cancellation. Current cycle: 1
                    errorKey: min_cycles_not_met
                Frozen Membership:
                  description: Membership is frozen and cannot be cancelled yet
                  value:
                    title: Bad Request
                    status: 400
                    detail: >-
                      This membership is frozen until minimum billing cycles are
                      completed
                    errorKey: membership_frozen
        '401':
          description: Authentication required
        '500':
          description: Internal server error - Shopify API failure or email sending error
components:
  schemas:
    AdjustmentValue:
      type: object
      properties:
        get__typename:
          type: string
    Amount:
      type: object
      properties:
        get__typename:
          type: string
        amount:
          type: object
        currencyCode:
          type: string
          enum:
            - USD
            - EUR
            - GBP
            - CAD
            - AFN
            - ALL
            - DZD
            - AOA
            - ARS
            - AMD
            - AWG
            - AUD
            - BBD
            - AZN
            - BDT
            - BSD
            - BHD
            - BIF
            - BYN
            - BZD
            - BMD
            - BTN
            - BAM
            - BRL
            - BOB
            - BWP
            - BND
            - BGN
            - MMK
            - KHR
            - CVE
            - KYD
            - XAF
            - CLP
            - CNY
            - COP
            - KMF
            - CDF
            - CRC
            - HRK
            - CZK
            - DKK
            - DJF
            - DOP
            - XCD
            - EGP
            - ERN
            - ETB
            - FKP
            - XPF
            - FJD
            - GIP
            - GMD
            - GHS
            - GTQ
            - GYD
            - GEL
            - GNF
            - HTG
            - HNL
            - HKD
            - HUF
            - ISK
            - INR
            - IDR
            - ILS
            - IRR
            - IQD
            - JMD
            - JPY
            - JEP
            - JOD
            - KZT
            - KES
            - KID
            - KWD
            - KGS
            - LAK
            - LVL
            - LBP
            - LSL
            - LRD
            - LYD
            - LTL
            - MGA
            - MKD
            - MOP
            - MWK
            - MVR
            - MRU
            - MXN
            - MYR
            - MUR
            - MDL
            - MAD
            - MNT
            - MZN
            - NAD
            - NPR
            - ANG
            - NZD
            - NIO
            - NGN
            - NOK
            - OMR
            - PAB
            - PKR
            - PGK
            - PYG
            - PEN
            - PHP
            - PLN
            - QAR
            - RON
            - RUB
            - RWF
            - WST
            - SHP
            - SAR
            - RSD
            - SCR
            - SLL
            - SGD
            - SDG
            - SOS
            - SYP
            - ZAR
            - KRW
            - SSP
            - SBD
            - LKR
            - SRD
            - SZL
            - SEK
            - CHF
            - TWD
            - THB
            - TJS
            - TZS
            - TOP
            - TTD
            - TND
            - TRY
            - TMT
            - UGX
            - UAH
            - AED
            - UYU
            - UZS
            - VUV
            - VES
            - VND
            - XOF
            - YER
            - ZMW
            - USDC
            - BYR
            - STD
            - STN
            - VED
            - VEF
            - XXX
            - $UNKNOWN
    Anchor:
      type: object
      properties:
        get__typename:
          type: string
        cutoffDay:
          type: integer
          format: int32
        day:
          type: integer
          format: int32
        month:
          type: integer
          format: int32
        type:
          type: string
          enum:
            - WEEKDAY
            - MONTHDAY
            - YEARDAY
            - $UNKNOWN
    Anchor1:
      type: object
      properties:
        get__typename:
          type: string
        cutoffDay:
          type: integer
          format: int32
        day:
          type: integer
          format: int32
        month:
          type: integer
          format: int32
        type:
          type: string
          enum:
            - WEEKDAY
            - MONTHDAY
            - YEARDAY
            - $UNKNOWN
    BasePrice:
      type: object
      properties:
        get__typename:
          type: string
        amount:
          type: object
        currencyCode:
          type: string
          enum:
            - USD
            - EUR
            - GBP
            - CAD
            - AFN
            - ALL
            - DZD
            - AOA
            - ARS
            - AMD
            - AWG
            - AUD
            - BBD
            - AZN
            - BDT
            - BSD
            - BHD
            - BIF
            - BYN
            - BZD
            - BMD
            - BTN
            - BAM
            - BRL
            - BOB
            - BWP
            - BND
            - BGN
            - MMK
            - KHR
            - CVE
            - KYD
            - XAF
            - CLP
            - CNY
            - COP
            - KMF
            - CDF
            - CRC
            - HRK
            - CZK
            - DKK
            - DJF
            - DOP
            - XCD
            - EGP
            - ERN
            - ETB
            - FKP
            - XPF
            - FJD
            - GIP
            - GMD
            - GHS
            - GTQ
            - GYD
            - GEL
            - GNF
            - HTG
            - HNL
            - HKD
            - HUF
            - ISK
            - INR
            - IDR
            - ILS
            - IRR
            - IQD
            - JMD
            - JPY
            - JEP
            - JOD
            - KZT
            - KES
            - KID
            - KWD
            - KGS
            - LAK
            - LVL
            - LBP
            - LSL
            - LRD
            - LYD
            - LTL
            - MGA
            - MKD
            - MOP
            - MWK
            - MVR
            - MRU
            - MXN
            - MYR
            - MUR
            - MDL
            - MAD
            - MNT
            - MZN
            - NAD
            - NPR
            - ANG
            - NZD
            - NIO
            - NGN
            - NOK
            - OMR
            - PAB
            - PKR
            - PGK
            - PYG
            - PEN
            - PHP
            - PLN
            - QAR
            - RON
            - RUB
            - RWF
            - WST
            - SHP
            - SAR
            - RSD
            - SCR
            - SLL
            - SGD
            - SDG
            - SOS
            - SYP
            - ZAR
            - KRW
            - SSP
            - SBD
            - LKR
            - SRD
            - SZL
            - SEK
            - CHF
            - TWD
            - THB
            - TJS
            - TZS
            - TOP
            - TTD
            - TND
            - TRY
            - TMT
            - UGX
            - UAH
            - AED
            - UYU
            - UZS
            - VUV
            - VES
            - VND
            - XOF
            - YER
            - ZMW
            - USDC
            - BYR
            - STD
            - STN
            - VED
            - VEF
            - XXX
            - $UNKNOWN
    BillingAttempts:
      type: object
      properties:
        get__typename:
          type: string
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/Node3'
    BillingPolicy:
      type: object
      properties:
        get__typename:
          type: string
        interval:
          type: string
          enum:
            - DAY
            - WEEK
            - MONTH
            - YEAR
            - $UNKNOWN
        intervalCount:
          type: integer
          format: int32
        anchors:
          type: array
          items:
            $ref: '#/components/schemas/Anchor'
        maxCycles:
          type: integer
          format: int32
        minCycles:
          type: integer
          format: int32
    ComputedPrice:
      type: object
      properties:
        get__typename:
          type: string
        amount:
          type: object
        currencyCode:
          type: string
          enum:
            - USD
            - EUR
            - GBP
            - CAD
            - AFN
            - ALL
            - DZD
            - AOA
            - ARS
            - AMD
            - AWG
            - AUD
            - BBD
            - AZN
            - BDT
            - BSD
            - BHD
            - BIF
            - BYN
            - BZD
            - BMD
            - BTN
            - BAM
            - BRL
            - BOB
            - BWP
            - BND
            - BGN
            - MMK
            - KHR
            - CVE
            - KYD
            - XAF
            - CLP
            - CNY
            - COP
            - KMF
            - CDF
            - CRC
            - HRK
            - CZK
            - DKK
            - DJF
            - DOP
            - XCD
            - EGP
            - ERN
            - ETB
            - FKP
            - XPF
            - FJD
            - GIP
            - GMD
            - GHS
            - GTQ
            - GYD
            - GEL
            - GNF
            - HTG
            - HNL
            - HKD
            - HUF
            - ISK
            - INR
            - IDR
            - ILS
            - IRR
            - IQD
            - JMD
            - JPY
            - JEP
            - JOD
            - KZT
            - KES
            - KID
            - KWD
            - KGS
            - LAK
            - LVL
            - LBP
            - LSL
            - LRD
            - LYD
            - LTL
            - MGA
            - MKD
            - MOP
            - MWK
            - MVR
            - MRU
            - MXN
            - MYR
            - MUR
            - MDL
            - MAD
            - MNT
            - MZN
            - NAD
            - NPR
            - ANG
            - NZD
            - NIO
            - NGN
            - NOK
            - OMR
            - PAB
            - PKR
            - PGK
            - PYG
            - PEN
            - PHP
            - PLN
            - QAR
            - RON
            - RUB
            - RWF
            - WST
            - SHP
            - SAR
            - RSD
            - SCR
            - SLL
            - SGD
            - SDG
            - SOS
            - SYP
            - ZAR
            - KRW
            - SSP
            - SBD
            - LKR
            - SRD
            - SZL
            - SEK
            - CHF
            - TWD
            - THB
            - TJS
            - TZS
            - TOP
            - TTD
            - TND
            - TRY
            - TMT
            - UGX
            - UAH
            - AED
            - UYU
            - UZS
            - VUV
            - VES
            - VND
            - XOF
            - YER
            - ZMW
            - USDC
            - BYR
            - STD
            - STN
            - VED
            - VEF
            - XXX
            - $UNKNOWN
    CurrentPrice:
      type: object
      properties:
        get__typename:
          type: string
        amount:
          type: object
        currencyCode:
          type: string
          enum:
            - USD
            - EUR
            - GBP
            - CAD
            - AFN
            - ALL
            - DZD
            - AOA
            - ARS
            - AMD
            - AWG
            - AUD
            - BBD
            - AZN
            - BDT
            - BSD
            - BHD
            - BIF
            - BYN
            - BZD
            - BMD
            - BTN
            - BAM
            - BRL
            - BOB
            - BWP
            - BND
            - BGN
            - MMK
            - KHR
            - CVE
            - KYD
            - XAF
            - CLP
            - CNY
            - COP
            - KMF
            - CDF
            - CRC
            - HRK
            - CZK
            - DKK
            - DJF
            - DOP
            - XCD
            - EGP
            - ERN
            - ETB
            - FKP
            - XPF
            - FJD
            - GIP
            - GMD
            - GHS
            - GTQ
            - GYD
            - GEL
            - GNF
            - HTG
            - HNL
            - HKD
            - HUF
            - ISK
            - INR
            - IDR
            - ILS
            - IRR
            - IQD
            - JMD
            - JPY
            - JEP
            - JOD
            - KZT
            - KES
            - KID
            - KWD
            - KGS
            - LAK
            - LVL
            - LBP
            - LSL
            - LRD
            - LYD
            - LTL
            - MGA
            - MKD
            - MOP
            - MWK
            - MVR
            - MRU
            - MXN
            - MYR
            - MUR
            - MDL
            - MAD
            - MNT
            - MZN
            - NAD
            - NPR
            - ANG
            - NZD
            - NIO
            - NGN
            - NOK
            - OMR
            - PAB
            - PKR
            - PGK
            - PYG
            - PEN
            - PHP
            - PLN
            - QAR
            - RON
            - RUB
            - RWF
            - WST
            - SHP
            - SAR
            - RSD
            - SCR
            - SLL
            - SGD
            - SDG
            - SOS
            - SYP
            - ZAR
            - KRW
            - SSP
            - SBD
            - LKR
            - SRD
            - SZL
            - SEK
            - CHF
            - TWD
            - THB
            - TJS
            - TZS
            - TOP
            - TTD
            - TND
            - TRY
            - TMT
            - UGX
            - UAH
            - AED
            - UYU
            - UZS
            - VUV
            - VES
            - VND
            - XOF
            - YER
            - ZMW
            - USDC
            - BYR
            - STD
            - STN
            - VED
            - VEF
            - XXX
            - $UNKNOWN
    CustomAttribute:
      type: object
      properties:
        get__typename:
          type: string
        key:
          type: string
        value:
          type: string
    CustomAttribute1:
      type: object
      properties:
        get__typename:
          type: string
        key:
          type: string
        value:
          type: string
    Customer:
      type: object
      properties:
        get__typename:
          type: string
        id:
          type: string
        email:
          type: string
          deprecated: true
        displayName:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        phone:
          type: string
          deprecated: true
    CustomerPaymentMethod:
      type: object
      properties:
        get__typename:
          type: string
        id:
          type: string
        instrument:
          $ref: '#/components/schemas/Instrument'
        revokedAt:
          type: object
        revokedReason:
          type: string
          enum:
            - AUTHORIZE_NET_GATEWAY_NOT_ENABLED
            - AUTHORIZE_NET_RETURNED_NO_PAYMENT_METHOD
            - FAILED_TO_UPDATE_CREDIT_CARD
            - STRIPE_API_AUTHENTICATION_ERROR
            - STRIPE_API_INVALID_REQUEST_ERROR
            - STRIPE_GATEWAY_NOT_ENABLED
            - STRIPE_RETURNED_NO_PAYMENT_METHOD
            - STRIPE_PAYMENT_METHOD_NOT_CARD
            - BRAINTREE_API_AUTHENTICATION_ERROR
            - BRAINTREE_GATEWAY_NOT_ENABLED
            - BRAINTREE_RETURNED_NO_PAYMENT_METHOD
            - BRAINTREE_PAYMENT_METHOD_NOT_CARD
            - PAYMENT_METHOD_VERIFICATION_FAILED
            - THREE_D_SECURE_FLOW_IN_VERIFICATION_NOT_IMPLEMENTED
            - MANUALLY_REVOKED
            - FAILED_TO_RETRIEVE_BILLING_ADDRESS
            - MERGED
            - CUSTOMER_REDACTED
            - TOO_MANY_CONSECUTIVE_FAILURES
            - CVV_ATTEMPTS_LIMIT_EXCEEDED
            - $UNKNOWN
    CycleDiscount:
      type: object
      properties:
        get__typename:
          type: string
        afterCycle:
          type: integer
          format: int32
        computedPrice:
          $ref: '#/components/schemas/ComputedPrice'
        adjustmentType:
          type: string
          enum:
            - PERCENTAGE
            - FIXED_AMOUNT
            - PRICE
            - $UNKNOWN
        adjustmentValue:
          $ref: '#/components/schemas/AdjustmentValue'
    DeliveryMethod:
      type: object
      properties:
        get__typename:
          type: string
    DeliveryPolicy:
      type: object
      properties:
        get__typename:
          type: string
        interval:
          type: string
          enum:
            - DAY
            - WEEK
            - MONTH
            - YEAR
            - $UNKNOWN
        intervalCount:
          type: integer
          format: int32
        anchors:
          type: array
          items:
            $ref: '#/components/schemas/Anchor1'
    DeliveryPrice:
      type: object
      properties:
        get__typename:
          type: string
        amount:
          type: object
        currencyCode:
          type: string
          enum:
            - USD
            - EUR
            - GBP
            - CAD
            - AFN
            - ALL
            - DZD
            - AOA
            - ARS
            - AMD
            - AWG
            - AUD
            - BBD
            - AZN
            - BDT
            - BSD
            - BHD
            - BIF
            - BYN
            - BZD
            - BMD
            - BTN
            - BAM
            - BRL
            - BOB
            - BWP
            - BND
            - BGN
            - MMK
            - KHR
            - CVE
            - KYD
            - XAF
            - CLP
            - CNY
            - COP
            - KMF
            - CDF
            - CRC
            - HRK
            - CZK
            - DKK
            - DJF
            - DOP
            - XCD
            - EGP
            - ERN
            - ETB
            - FKP
            - XPF
            - FJD
            - GIP
            - GMD
            - GHS
            - GTQ
            - GYD
            - GEL
            - GNF
            - HTG
            - HNL
            - HKD
            - HUF
            - ISK
            - INR
            - IDR
            - ILS
            - IRR
            - IQD
            - JMD
            - JPY
            - JEP
            - JOD
            - KZT
            - KES
            - KID
            - KWD
            - KGS
            - LAK
            - LVL
            - LBP
            - LSL
            - LRD
            - LYD
            - LTL
            - MGA
            - MKD
            - MOP
            - MWK
            - MVR
            - MRU
            - MXN
            - MYR
            - MUR
            - MDL
            - MAD
            - MNT
            - MZN
            - NAD
            - NPR
            - ANG
            - NZD
            - NIO
            - NGN
            - NOK
            - OMR
            - PAB
            - PKR
            - PGK
            - PYG
            - PEN
            - PHP
            - PLN
            - QAR
            - RON
            - RUB
            - RWF
            - WST
            - SHP
            - SAR
            - RSD
            - SCR
            - SLL
            - SGD
            - SDG
            - SOS
            - SYP
            - ZAR
            - KRW
            - SSP
            - SBD
            - LKR
            - SRD
            - SZL
            - SEK
            - CHF
            - TWD
            - THB
            - TJS
            - TZS
            - TOP
            - TTD
            - TND
            - TRY
            - TMT
            - UGX
            - UAH
            - AED
            - UYU
            - UZS
            - VUV
            - VES
            - VND
            - XOF
            - YER
            - ZMW
            - USDC
            - BYR
            - STD
            - STN
            - VED
            - VEF
            - XXX
            - $UNKNOWN
    Discount:
      type: object
      properties:
        get__typename:
          type: string
    DiscountAllocation:
      type: object
      properties:
        get__typename:
          type: string
        amount:
          $ref: '#/components/schemas/Amount'
        discount:
          $ref: '#/components/schemas/Discount'
    Discounts:
      type: object
      properties:
        get__typename:
          type: string
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/Node2'
        pageInfo:
          $ref: '#/components/schemas/PageInfo2'
    FulfillmentOrders:
      type: object
      properties:
        get__typename:
          type: string
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/Node1'
        pageInfo:
          $ref: '#/components/schemas/PageInfo1'
    Instrument:
      type: object
      properties:
        get__typename:
          type: string
    LineDiscountedPrice:
      type: object
      properties:
        get__typename:
          type: string
        amount:
          type: object
        currencyCode:
          type: string
          enum:
            - USD
            - EUR
            - GBP
            - CAD
            - AFN
            - ALL
            - DZD
            - AOA
            - ARS
            - AMD
            - AWG
            - AUD
            - BBD
            - AZN
            - BDT
            - BSD
            - BHD
            - BIF
            - BYN
            - BZD
            - BMD
            - BTN
            - BAM
            - BRL
            - BOB
            - BWP
            - BND
            - BGN
            - MMK
            - KHR
            - CVE
            - KYD
            - XAF
            - CLP
            - CNY
            - COP
            - KMF
            - CDF
            - CRC
            - HRK
            - CZK
            - DKK
            - DJF
            - DOP
            - XCD
            - EGP
            - ERN
            - ETB
            - FKP
            - XPF
            - FJD
            - GIP
            - GMD
            - GHS
            - GTQ
            - GYD
            - GEL
            - GNF
            - HTG
            - HNL
            - HKD
            - HUF
            - ISK
            - INR
            - IDR
            - ILS
            - IRR
            - IQD
            - JMD
            - JPY
            - JEP
            - JOD
            - KZT
            - KES
            - KID
            - KWD
            - KGS
            - LAK
            - LVL
            - LBP
            - LSL
            - LRD
            - LYD
            - LTL
            - MGA
            - MKD
            - MOP
            - MWK
            - MVR
            - MRU
            - MXN
            - MYR
            - MUR
            - MDL
            - MAD
            - MNT
            - MZN
            - NAD
            - NPR
            - ANG
            - NZD
            - NIO
            - NGN
            - NOK
            - OMR
            - PAB
            - PKR
            - PGK
            - PYG
            - PEN
            - PHP
            - PLN
            - QAR
            - RON
            - RUB
            - RWF
            - WST
            - SHP
            - SAR
            - RSD
            - SCR
            - SLL
            - SGD
            - SDG
            - SOS
            - SYP
            - ZAR
            - KRW
            - SSP
            - SBD
            - LKR
            - SRD
            - SZL
            - SEK
            - CHF
            - TWD
            - THB
            - TJS
            - TZS
            - TOP
            - TTD
            - TND
            - TRY
            - TMT
            - UGX
            - UAH
            - AED
            - UYU
            - UZS
            - VUV
            - VES
            - VND
            - XOF
            - YER
            - ZMW
            - USDC
            - BYR
            - STD
            - STN
            - VED
            - VEF
            - XXX
            - $UNKNOWN
    Lines:
      type: object
      properties:
        get__typename:
          type: string
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/Node'
        pageInfo:
          $ref: '#/components/schemas/PageInfo'
    Node:
      type: object
      properties:
        get__typename:
          type: string
        id:
          type: string
        sellingPlanId:
          type: string
        sellingPlanName:
          type: string
        productId:
          type: string
        sku:
          type: string
        title:
          type: string
        variantId:
          type: string
        quantity:
          type: integer
          format: int32
        customAttributes:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
        lineDiscountedPrice:
          $ref: '#/components/schemas/LineDiscountedPrice'
        variantImage:
          $ref: '#/components/schemas/VariantImage'
        variantTitle:
          type: string
        currentPrice:
          $ref: '#/components/schemas/CurrentPrice'
        discountAllocations:
          type: array
          items:
            $ref: '#/components/schemas/DiscountAllocation'
        pricingPolicy:
          $ref: '#/components/schemas/PricingPolicy'
        taxable:
          type: boolean
    Node1:
      type: object
      properties:
        get__typename:
          type: string
        fulfillAt:
          type: object
        id:
          type: string
        status:
          type: string
          enum:
            - OPEN
            - IN_PROGRESS
            - CANCELLED
            - INCOMPLETE
            - CLOSED
            - SCHEDULED
            - ON_HOLD
            - $UNKNOWN
    Node2:
      type: object
      properties:
        get__typename:
          type: string
        id:
          type: string
        title:
          type: string
        value:
          $ref: '#/components/schemas/Value'
        recurringCycleLimit:
          type: integer
          format: int32
        targetType:
          type: string
          enum:
            - LINE_ITEM
            - SHIPPING_LINE
            - $UNKNOWN
        type:
          type: string
          enum:
            - MANUAL
            - CODE_DISCOUNT
            - AUTOMATIC_DISCOUNT
            - $UNKNOWN
        rejectionReason:
          type: string
          enum:
            - NOT_FOUND
            - NO_ENTITLED_LINE_ITEMS
            - QUANTITY_NOT_IN_RANGE
            - PURCHASE_NOT_IN_RANGE
            - CUSTOMER_NOT_ELIGIBLE
            - USAGE_LIMIT_REACHED
            - CUSTOMER_USAGE_LIMIT_REACHED
            - CURRENTLY_INACTIVE
            - NO_ENTITLED_SHIPPING_LINES
            - INCOMPATIBLE_PURCHASE_TYPE
            - INTERNAL_ERROR
            - $UNKNOWN
    Node3:
      type: object
      properties:
        get__typename:
          type: string
        completedAt:
          type: object
        createdAt:
          type: object
        id:
          type: string
        idempotencyKey:
          type: string
        ready:
          type: boolean
    OriginOrder:
      type: object
      properties:
        get__typename:
          type: string
        id:
          type: string
        name:
          type: string
        fulfillmentOrders:
          $ref: '#/components/schemas/FulfillmentOrders'
    PageInfo:
      type: object
      properties:
        get__typename:
          type: string
        hasPreviousPage:
          type: boolean
        hasNextPage:
          type: boolean
        startCursor:
          type: string
        endCursor:
          type: string
    PageInfo1:
      type: object
      properties:
        get__typename:
          type: string
        hasPreviousPage:
          type: boolean
        hasNextPage:
          type: boolean
        startCursor:
          type: string
        endCursor:
          type: string
    PageInfo2:
      type: object
      properties:
        get__typename:
          type: string
        hasPreviousPage:
          type: boolean
        hasNextPage:
          type: boolean
        startCursor:
          type: string
        endCursor:
          type: string
    PricingPolicy:
      type: object
      properties:
        get__typename:
          type: string
        basePrice:
          $ref: '#/components/schemas/BasePrice'
        cycleDiscounts:
          type: array
          items:
            $ref: '#/components/schemas/CycleDiscount'
    SubscriptionContract:
      type: object
      properties:
        get__typename:
          type: string
        id:
          type: string
        createdAt:
          type: object
        updatedAt:
          type: object
        nextBillingDate:
          type: object
        status:
          type: string
          enum:
            - ACTIVE
            - PAUSED
            - CANCELLED
            - EXPIRED
            - FAILED
            - $UNKNOWN
        deliveryPrice:
          $ref: '#/components/schemas/DeliveryPrice'
        lastPaymentStatus:
          type: string
          enum:
            - SUCCEEDED
            - FAILED
            - $UNKNOWN
        billingPolicy:
          $ref: '#/components/schemas/BillingPolicy'
        deliveryPolicy:
          $ref: '#/components/schemas/DeliveryPolicy'
        lines:
          $ref: '#/components/schemas/Lines'
        customerPaymentMethod:
          $ref: '#/components/schemas/CustomerPaymentMethod'
        deliveryMethod:
          $ref: '#/components/schemas/DeliveryMethod'
        originOrder:
          $ref: '#/components/schemas/OriginOrder'
        customer:
          $ref: '#/components/schemas/Customer'
        discounts:
          $ref: '#/components/schemas/Discounts'
        note:
          type: string
        customAttributes:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute1'
        billingAttempts:
          $ref: '#/components/schemas/BillingAttempts'
    Value:
      type: object
      properties:
        get__typename:
          type: string
    VariantImage:
      type: object
      properties:
        get__typename:
          type: string
        transformedSrc:
          type: object
          deprecated: true
    ChangeShippingAddressVM:
      type: object
      properties:
        address1:
          type: string
        address2:
          type: string
        city:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        phone:
          type: string
        province:
          type: string
        zip:
          type: string
        country:
          type: string
        countryCode:
          type: string
        provinceCode:
          type: string
        company:
          type: string
    AttributeInfo:
      type: object
      properties:
        key:
          type: string
        value:
          type: string
    SubscriptionContractOneOffDTO:
      required:
        - shop
      type: object
      properties:
        id:
          type: integer
          format: int64
        shop:
          type: string
        billingAttemptId:
          type: integer
          format: int64
        subscriptionContractId:
          type: integer
          format: int64
        variantId:
          type: integer
          format: int64
        variantHandle:
          type: string
    SubscriptionContractDetailsDTO:
      required:
        - shop
      type: object
      properties:
        id:
          type: integer
          format: int64
        shop:
          type: string
        graphSubscriptionContractId:
          type: string
        subscriptionContractId:
          type: integer
          format: int64
        billingPolicyInterval:
          type: string
        billingPolicyIntervalCount:
          type: integer
          format: int32
        currencyCode:
          type: string
        customerId:
          type: integer
          format: int64
        graphCustomerId:
          type: string
        deliveryPolicyInterval:
          type: string
        deliveryPolicyIntervalCount:
          type: integer
          format: int32
        status:
          type: string
        graphOrderId:
          type: string
        orderId:
          type: integer
          format: int64
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        nextBillingDate:
          type: string
          format: date-time
        orderAmount:
          type: number
          format: double
        orderName:
          type: string
        customerName:
          type: string
        customerEmail:
          type: string
        subscriptionCreatedEmailSent:
          type: boolean
        endsAt:
          type: string
          format: date-time
        startsAt:
          type: string
          format: date-time
        subscriptionCreatedEmailSentStatus:
          type: string
          enum:
            - SENT
            - UNSENT
            - FAILED
            - EMAIL_SETTINGS_DISABLED
            - CUSTOMER_PAYMENT_EMPTY
            - CONTRACT_PAUSED_STATUS
        minCycles:
          type: integer
          format: int32
        maxCycles:
          type: integer
          format: int32
        customerFirstName:
          type: string
        customerLastName:
          type: string
        autoCharge:
          type: boolean
        importedId:
          type: string
        stopUpComingOrderEmail:
          type: boolean
        pausedFromActive:
          type: boolean
        subscriptionCreatedSmsSentStatus:
          type: string
          enum:
            - SENT
            - UNSENT
            - FAILED
            - SMS_SETTINGS_DISABLED
            - CUSTOMER_PAYMENT_EMPTY
            - CONTRACT_PAUSED_STATUS
            - PHONE_NUMBER_EMPTY
        phone:
          type: string
        activatedOn:
          type: string
          format: date-time
        pausedOn:
          type: string
          format: date-time
        cancelledOn:
          type: string
          format: date-time
        contractDetailsJSON:
          type: string
        cancellationFeedback:
          type: string
        orderNote:
          type: string
        orderNoteAttributes:
          type: string
        allowDeliveryPriceOverride:
          type: boolean
        orderAmountUSD:
          type: number
          format: double
        billingDateAfterTrial:
          type: string
          format: date-time
        trialEndDate:
          type: string
          format: date-time
        pausedBySecurityChallenge:
          type: boolean
        dunning:
          type: boolean
        contractAmount:
          type: number
          format: double
        contractAmountUSD:
          type: number
          format: double
        upcomingSwapRule:
          type: string
        emailBouncedOrFailed:
          type: boolean
    SubscriptionBillingAttemptDTO:
      required:
        - retryingNeeded
        - shop
      type: object
      properties:
        id:
          type: integer
          format: int64
        shop:
          type: string
        billingAttemptId:
          type: string
        status:
          type: string
          enum:
            - SUCCESS
            - FAILURE
            - REQUESTING
            - PROGRESS
            - QUEUED
            - SKIPPED
            - SOCIAL_CONNECTION_NULL
            - CONTRACT_CANCELLED
            - CONTRACT_ENDED
            - CONTRACT_PAUSED
            - AUTO_CHARGE_DISABLED
            - SKIPPED_DUNNING_MGMT
            - SECURITY_CHALLENGE
            - SHOPIFY_EXCEPTION
        billingDate:
          type: string
          format: date-time
        contractId:
          type: integer
          format: int64
        attemptCount:
          type: integer
          format: int32
        attemptTime:
          type: string
          format: date-time
        graphOrderId:
          type: string
        orderId:
          type: integer
          format: int64
        orderAmount:
          type: number
          format: double
        orderName:
          type: string
        retryingNeeded:
          type: boolean
        transactionFailedEmailSentStatus:
          type: string
          enum:
            - SENT
            - UNSENT
            - FAILED
            - EMAIL_SETTINGS_DISABLED
            - CUSTOMER_PAYMENT_EMPTY
            - CONTRACT_CANCELLED
        upcomingOrderEmailSentStatus:
          type: string
          enum:
            - SENT
            - UNSENT
            - FAILED
            - EMAIL_SETTINGS_DISABLED
            - CUSTOMER_PAYMENT_EMPTY
            - CONTRACT_CANCELLED
            - STOP_FROM_CONTRACT
            - CONTRACT_PAUSED
        applyUsageCharge:
          type: boolean
        recurringChargeId:
          type: integer
          format: int64
        transactionRate:
          type: number
          format: double
        usageChargeStatus:
          type: string
          enum:
            - SUCCESS
            - FAILED
            - TO_BE_TRIED
        transactionFailedSmsSentStatus:
          type: string
          enum:
            - SENT
            - UNSENT
            - FAILED
            - SMS_SETTINGS_DISABLED
            - CUSTOMER_PAYMENT_EMPTY
            - CONTRACT_CANCELLED
            - PHONE_NUMBER_EMPTY
        upcomingOrderSmsSentStatus:
          type: string
          enum:
            - SENT
            - UNSENT
            - FAILED
            - SMS_SETTINGS_DISABLED
            - CUSTOMER_PAYMENT_EMPTY
            - CONTRACT_CANCELLED
            - STOP_FROM_CONTRACT
            - CONTRACT_PAUSED
            - PHONE_NUMBER_EMPTY
        billingAttemptResponseMessage:
          type: string
        progressAttemptCount:
          type: integer
          format: int32
        orderNote:
          type: string
        variantList:
          type: array
          items:
            $ref: '#/components/schemas/VariantQuantity'
        orderAmountUSD:
          type: number
          format: double
        securityChallengeSentStatus:
          type: string
          enum:
            - SENT
            - UNSENT
            - FAILED
            - EMAIL_SETTINGS_DISABLED
            - CONTRACT_CANCELLED
        upgradeDowngradeBilling:
          type: boolean
    VariantQuantity:
      type: object
      properties:
        variantId:
          type: integer
          format: int64
        quantity:
          type: integer
          format: int32
        title:
          type: string
        image:
          type: string
        productTitle:
          type: string
        productId:
          type: string
        sellingPlanId:
          type: string
    VariantQuantityInfo:
      type: object
      properties:
        variantQuantityList:
          type: array
          items:
            $ref: '#/components/schemas/VariantQuantity'
    CustomerRetentionActivityDTO:
      type: object
      properties:
        id:
          type: integer
          format: int64
        shop:
          type: string
        contractId:
          type: integer
          format: int64
        activityOn:
          type: string
          format: date-time
        retentionAction:
          type: string
        cancellationReason:
          type: string
        discountApplied:
          type: string
        additionalInfo:
          type: string
        eventSource:
          type: string
          enum:
            - PAUSE
            - CANCELLATION
    FrequencyInfoDTO:
      type: object
      properties:
        frequencyCount:
          type: integer
          format: int32
        frequencyInterval:
          type: string
          enum:
            - DAY
            - WEEK
            - MONTH
            - YEAR
        billingFrequencyCount:
          type: integer
          format: int32
        billingFrequencyInterval:
          type: string
          enum:
            - DAY
            - WEEK
            - MONTH
            - YEAR
        frequencyName:
          type: string
        discountOffer:
          type: number
          format: double
        discountOffer2:
          type: number
          format: double
        afterCycle1:
          type: integer
          format: int32
        afterCycle2:
          type: integer
          format: int32
        discountType:
          type: string
          enum:
            - PERCENTAGE
            - FIXED
            - PRICE
        discountType2:
          type: string
          enum:
            - PERCENTAGE
            - FIXED
            - PRICE
        discountEnabled:
          type: boolean
        discountEnabled2:
          type: boolean
        discountEnabledMasked:
          type: boolean
        discountEnabled2Masked:
          type: boolean
        id:
          type: string
        frequencyType:
          type: string
          enum:
            - ON_PURCHASE_DAY
            - ON_SPECIFIC_DAY
        specificDayValue:
          type: integer
          format: int32
        specificMonthValue:
          type: integer
          format: int32
        specificDayEnabled:
          type: boolean
        maxCycles:
          type: integer
          format: int32
        minCycles:
          type: integer
          format: int32
        cutOff:
          type: integer
          format: int32
        prepaidFlag:
          type: string
        idNew:
          type: string
        planType:
          type: string
          enum:
            - PAY_AS_YOU_GO
            - PREPAID
            - ADVANCED_PREPAID
        deliveryPolicyPreAnchorBehavior:
          type: string
          enum:
            - ASAP
            - NEXT
            - $UNKNOWN
        freeTrialEnabled:
          type: boolean
        freeTrialCount:
          type: integer
          format: int32
        freeTrialInterval:
          type: string
          enum:
            - DAY
            - WEEK
            - MONTH
            - YEAR
        frequencyDescription:
          type: string
        keepOriginalNextBillingDateAfterTrial:
          type: boolean
        planSequence:
          type: integer
          format: int32
        groupName:
          type: string
        groupId:
          type: integer
          format: int64
        memberOnly:
          type: boolean
        nonMemberOnly:
          type: boolean
        memberInclusiveTags:
          type: string
        memberExclusiveTags:
          type: string
        lifeTimeMembership:
          type: boolean
        rulesJson:
          type: string
    SubscriptionCustomCssDTO:
      required:
        - shop
      type: object
      properties:
        id:
          type: integer
          format: int64
        shop:
          type: string
        customCss:
          type: string
        customerPoratlCSS:
          type: string
        bundlingCSS:
          type: string
        bundlingIframeCSS:
          type: string
    ScheduledDowngradeRequest:
      type: object
      properties:
        shop:
          type: string
        contractId:
          type: integer
          format: int64
        waitTillTimestamp:
          type: string
        oldLineId:
          type: string
        oldVariantId:
          type: string
        newVariantId:
          type: string
        sellingPlanId:
          type: string
        sellingPlanName:
          type: string
        oldPrice:
          type: number
          format: double
        newPrice:
          type: number
          format: double
        newCustomerTag:
          type: string
        oldCustomerTags:
          type: string
        newOrderTag:
          type: string
        eventSource:
          type: string
        retryCount:
          type: integer
          format: int32
        customerId:
          type: integer
          format: int64
        executionArn:
          type: string
    Order:
      type: object
      properties:
        get__typename:
          type: string
        id:
          type: string
        fulfillmentOrders:
          $ref: '#/components/schemas/FulfillmentOrders'
    PaymentMethods:
      type: object
      properties:
        get__typename:
          type: string
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/Node'
        pageInfo:
          $ref: '#/components/schemas/PageInfo'
    ShopInfoResponseDTO:
      type: object
      properties:
        shop:
          type: string
        appstleLoyaltyIntegrated:
          type: boolean
        immediateTagRemoveOnCancel:
          type: boolean
        immediateTagRemoveOnPause:
          type: boolean
    LoyaltyPointRedemptionRule:
      type: object
      properties:
        id:
          type: integer
          format: int64
        icon:
          type: string
        pointsCostText:
          type: string
        description:
          type: string
        type:
          type: string
        name:
          type: string
    LoyaltyPointEarnCampaign:
      type: object
      properties:
        id:
          type: integer
          format: int64
        type:
          type: string
        name:
          type: string
        createAt:
          type: string
          format: date-time
        updateAt:
          type: string
          format: date-time
        details:
          type: string
        reward_text:
          type: string
        productData:
          type: string
        basePoints:
          type: integer
          format: int32
    LoyaltyCustomerDataResponse:
      type: object
      properties:
        availablePointsBalance:
          type: integer
          format: int64
    LocalPickupSettingsV2:
      type: object
      properties:
        get__typename:
          type: string
        instructions:
          type: string
        pickupTime:
          type: string
          enum:
            - ONE_HOUR
            - TWO_HOURS
            - FOUR_HOURS
            - TWENTY_FOUR_HOURS
            - TWO_TO_FOUR_DAYS
            - FIVE_OR_MORE_DAYS
            - CUSTOM
            - $UNKNOWN
    Location:
      type: object
      properties:
        get__typename:
          type: string
        id:
          type: string
        name:
          type: string
        localPickupSettingsV2:
          $ref: '#/components/schemas/LocalPickupSettingsV2'
    ContextualPricing:
      type: object
      properties:
        get__typename:
          type: string
        price:
          $ref: '#/components/schemas/Price'
    FeaturedMedia:
      type: object
      properties:
        get__typename:
          type: string
    Media:
      type: object
      properties:
        get__typename:
          type: string
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/Node'
    Price:
      type: object
      properties:
        get__typename:
          type: string
        amount:
          type: object
        currencyCode:
          type: string
          enum:
            - USD
            - EUR
            - GBP
            - CAD
            - AFN
            - ALL
            - DZD
            - AOA
            - ARS
            - AMD
            - AWG
            - AUD
            - BBD
            - AZN
            - BDT
            - BSD
            - BHD
            - BIF
            - BYN
            - BZD
            - BMD
            - BTN
            - BAM
            - BRL
            - BOB
            - BWP
            - BND
            - BGN
            - MMK
            - KHR
            - CVE
            - KYD
            - XAF
            - CLP
            - CNY
            - COP
            - KMF
            - CDF
            - CRC
            - HRK
            - CZK
            - DKK
            - DJF
            - DOP
            - XCD
            - EGP
            - ERN
            - ETB
            - FKP
            - XPF
            - FJD
            - GIP
            - GMD
            - GHS
            - GTQ
            - GYD
            - GEL
            - GNF
            - HTG
            - HNL
            - HKD
            - HUF
            - ISK
            - INR
            - IDR
            - ILS
            - IRR
            - IQD
            - JMD
            - JPY
            - JEP
            - JOD
            - KZT
            - KES
            - KID
            - KWD
            - KGS
            - LAK
            - LVL
            - LBP
            - LSL
            - LRD
            - LYD
            - LTL
            - MGA
            - MKD
            - MOP
            - MWK
            - MVR
            - MRU
            - MXN
            - MYR
            - MUR
            - MDL
            - MAD
            - MNT
            - MZN
            - NAD
            - NPR
            - ANG
            - NZD
            - NIO
            - NGN
            - NOK
            - OMR
            - PAB
            - PKR
            - PGK
            - PYG
            - PEN
            - PHP
            - PLN
            - QAR
            - RON
            - RUB
            - RWF
            - WST
            - SHP
            - SAR
            - RSD
            - SCR
            - SLL
            - SGD
            - SDG
            - SOS
            - SYP
            - ZAR
            - KRW
            - SSP
            - SBD
            - LKR
            - SRD
            - SZL
            - SEK
            - CHF
            - TWD
            - THB
            - TJS
            - TZS
            - TOP
            - TTD
            - TND
            - TRY
            - TMT
            - UGX
            - UAH
            - AED
            - UYU
            - UZS
            - VUV
            - VES
            - VND
            - XOF
            - YER
            - ZMW
            - USDC
            - BYR
            - STD
            - STN
            - VED
            - VEF
            - XXX
            - $UNKNOWN
    Product:
      type: object
      properties:
        get__typename:
          type: string
        id:
          type: string
        handle:
          type: string
        title:
          type: string
        featuredMedia:
          $ref: '#/components/schemas/FeaturedMedia'
        vendor:
          type: string
    ProductVariant:
      type: object
      properties:
        get__typename:
          type: string
        id:
          type: string
        title:
          type: string
        media:
          $ref: '#/components/schemas/Media'
        product:
          $ref: '#/components/schemas/Product'
        price:
          type: object
        contextualPricing:
          $ref: '#/components/schemas/ContextualPricing'
        sku:
          type: string
    ProductData:
      type: object
      properties:
        products:
          type: array
          items:
            $ref: '#/components/schemas/Product'
        pageInfo:
          $ref: '#/components/schemas/PageInfo'
        productHandleData:
          type: object
          additionalProperties:
            type: string
    CustomerPortalSettingsDTO:
      required:
        - amountLbl
        - cancelAccordionTitle
        - cancelFreqBtnText
        - cancelSubscriptionBtnText
        - cardExpiryText
        - cardHolderNameText
        - cardLastFourDigitText
        - cardTypeText
        - editFrequencyBtnText
        - nextOrderDateLbl
        - nextOrderText
        - noSubscriptionMessage
        - orderFrequencyText
        - orderNoLbl
        - paymentDetailAccordionTitle
        - paymentInfoText
        - paymentMethodTypeText
        - quantityLbl
        - shop
        - statusLbl
        - statusText
        - subscriptionNoText
        - totalProductsText
        - upcomingOrderAccordionTitle
        - updateFreqBtnText
        - updatePaymentBtnText
        - updatePaymentMessage
      type: object
      properties:
        id:
          type: integer
          format: int64
        shop:
          type: string
        orderFrequencyText:
          type: string
        totalProductsText:
          type: string
        nextOrderText:
          type: string
        statusText:
          type: string
        cancelSubscriptionBtnText:
          type: string
        noSubscriptionMessage:
          type: string
        subscriptionNoText:
          type: string
        updatePaymentMessage:
          type: string
        cardLastFourDigitText:
          type: string
        cardExpiryText:
          type: string
        cardHolderNameText:
          type: string
        cardTypeText:
          type: string
        paymentMethodTypeText:
          type: string
        cancelAccordionTitle:
          type: string
        paymentDetailAccordionTitle:
          type: string
        upcomingOrderAccordionTitle:
          type: string
        paymentInfoText:
          type: string
        updatePaymentBtnText:
          type: string
        nextOrderDateLbl:
          type: string
        statusLbl:
          type: string
        quantityLbl:
          type: string
        amountLbl:
          type: string
        orderNoLbl:
          type: string
        editFrequencyBtnText:
          type: string
        cancelFreqBtnText:
          type: string
        updateFreqBtnText:
          type: string
        pauseResumeSub:
          type: boolean
        changeNextOrderDate:
          type: boolean
        cancelSub:
          type: boolean
        changeOrderFrequency:
          type: boolean
        createAdditionalOrder:
          type: boolean
        manageSubscriptionButtonText:
          type: string
        editChangeOrderBtnText:
          type: string
        cancelChangeOrderBtnText:
          type: string
        updateChangeOrderBtnText:
          type: string
        editProductButtonText:
          type: string
        deleteButtonText:
          type: string
        updateButtonText:
          type: string
        cancelButtonText:
          type: string
        addProductButtonText:
          type: string
        downgradeMembershipLabel:
          type: string
        addProductLabelText:
          type: string
        activeBadgeText:
          type: string
        closeBadgeText:
          type: string
        skipOrderButtonText:
          type: string
        productLabelText:
          type: string
        seeMoreDetailsText:
          type: string
        hideDetailsText:
          type: string
        productInSubscriptionText:
          type: string
        subTotalLabelText:
          type: string
        paymentNotificationText:
          type: string
        editProductFlag:
          type: boolean
        deleteProductFlag:
          type: boolean
        showShipment:
          type: boolean
        addAdditionalProduct:
          type: boolean
        successText:
          type: string
        cancelSubscriptionConfirmPrepaidText:
          type: string
        cancelSubscriptionConfirmPayAsYouGoText:
          type: string
        cancelSubscriptionPrepaidButtonText:
          type: string
        cancelSubscriptionPayAsYouGoButtonText:
          type: string
        upcomingFulfillmentText:
          type: string
        creditCardText:
          type: string
        endingWithText:
          type: string
        weekText:
          type: string
        dayText:
          type: string
        monthText:
          type: string
        yearText:
          type: string
        skipBadgeText:
          type: string
        queueBadgeText:
          type: string
        shippingLabelText:
          type: string
        address1LabelText:
          type: string
        address2LabelText:
          type: string
        companyLabelText:
          type: string
        cityLabelText:
          type: string
        countryLabelText:
          type: string
        firstNameLabelText:
          type: string
        lastNameLabelText:
          type: string
        phoneLabelText:
          type: string
        provinceLabelText:
          type: string
        zipLabelText:
          type: string
        addressHeaderTitleText:
          type: string
        changeShippingAddressFlag:
          type: boolean
        updateEditShippingButtonText:
          type: string
        cancelEditShippingButtonText:
          type: string
        pauseSubscriptionText:
          type: string
        resumeSubscriptionText:
          type: string
        pauseBadgeText:
          type: string
        customerPortalSettingJson:
          type: string
        discountNoteTitle:
          type: string
        initialDiscountNoteDescription:
          type: string
        afterCycleDiscountNoteDescription:
          type: string
        productRemovedTooltip:
          type: string
        deliveryPriceText:
          type: string
        shippingOptionText:
          type: string
        nextDeliveryDate:
          type: string
        everyLabelText:
          type: string
        orderNoteFlag:
          type: boolean
        orderNoteText:
          type: string
        useUrlWithCustomerId:
          type: boolean
        expiredTokenText:
          type: string
        portalLoginLinkText:
          type: string
        localeDate:
          type: string
        productSelectionOption:
          type: string
          enum:
            - ALL_PRODUCTS
            - PRODUCTS_FROM_ALL_PLANS
            - PRODUCTS_FROM_CURRENT_PLAN
        includeOutOfStockProduct:
          type: boolean
        customerIdText:
          type: string
        helloNameText:
          type: string
        goBackButtonText:
          type: string
        changeVariantLabelText:
          type: string
        provinceCodeLabelText:
          type: string
        countryCodeLabelText:
          type: string
        pleaseWaitLoaderText:
          type: string
        openBadgeText:
          type: string
        cancelSubscriptionMinimumBillingIterationsMessage:
          type: string
        topHtml:
          type: string
        bottomHtml:
          type: string
        updateShipmentBillingDate:
          type: boolean
        discountCodeText:
          type: string
        discountCodeApplyButtonText:
          type: string
        discountCode:
          type: boolean
        applySubscriptionDiscount:
          type: boolean
        subscriptionDiscountTypeUnit:
          type: string
          enum:
            - PERCENTAGE
            - AMOUNT
        subscriptionDiscount:
          type: number
          format: double
        upSellMessage:
          type: string
        freezeOrderTillMinCycle:
          type: boolean
        freezeUpdateSubscriptionMessage:
          type: string
        addOneTimeProduct:
          type: boolean
        selectProductLabelText:
          type: string
        purchaseOptionLabelText:
          type: string
        finishLabelText:
          type: string
        nextBtnText:
          type: string
        previousBtnText:
          type: string
        closeBtnText:
          type: string
        deleteConfirmationMsgText:
          type: string
        deleteMsgText:
          type: string
        yesBtnText:
          type: string
        noBtnText:
          type: string
        oneTimePurchaseNoteText:
          type: string
        clickHereText:
          type: string
        productAddMessageText:
          type: string
        choosePurchaseOptionLabelText:
          type: string
        oneTimePurchaseMessageText:
          type: string
        contractUpdateMessageText:
          type: string
        oneTimePurchaseDisplayMessageText:
          type: string
        addProductFinishedMessageText:
          type: string
        contractErrorMessageText:
          type: string
        addToSubscriptionTitleCP:
          type: string
        oneTimePurchaseTitleCP:
          type: string
        seeMoreProductBtnText:
          type: string
        totalPricePerDeliveryText:
          type: string
        fulfilledText:
          type: string
        dateFormat:
          type: string
        discountCouponAppliedText:
          type: string
        subscriptionPausedMessageText:
          type: string
        subscriptionActivatedMessageText:
          type: string
        unableToUpdateSubscriptionStatusMessageText:
          type: string
        selectCancellationReasonLabelText:
          type: string
        upcomingOrderChangePopupSuccessTitleText:
          type: string
        upcomingOrderChangePopupSuccessDescriptionText:
          type: string
        upcomingOrderChangePopupSuccessClosebtnText:
          type: string
        upcomingOrderChangePopupFailureTitleText:
          type: string
        upcomingOrderChangePopupFailureDescriptionText:
          type: string
        upcomingOrderChangePopupFailureClosebtnText:
          type: string
        viewAttributeLabelText:
          type: string
        attributeNameLabelText:
          type: string
        attributeValue:
          type: string
        addNewButtonText:
          type: string
        attributeHeadingText:
          type: string
        enableViewAttributes:
          type: boolean
        addProductOnlyForSameProductVariant:
          type: boolean
        enableMembershipHistory:
          type: boolean
        enableShowProductDescription:
          type: boolean
        descriptionLength:
          type: string
        historyLabelText:
          type: string
        orderNoLabelText:
          type: string
        orderDateLabelText:
          type: string
        lastAttemptDateLabelText:
          type: string
        membershipExpireText:
          type: string
        membershipExpireDescription:
          type: string
        discountRecurringCycleLimitOnCancellation:
          type: integer
          format: int32
        discountMessageOnCancellation:
          type: string
        conformationPopupForCancellationDiscountText:
          type: string
        enableResendMagicLink:
          type: boolean
        redeemRewardsText:
          type: string
        rewardsText:
          type: string
        yourRewardsText:
          type: string
        yourAvailableRewardsPointsText:
          type: string
        productReplaceWarningText:
          type: string
        additionalFeedbackLabel:
          type: string
        backToAccountLabel:
          type: string
        missedBillingAlertText:
          type: string
        acceptBtnText:
          type: string
        cancelledOnLabelText:
          type: string
        cancellationReasonLabelText:
          type: string
        cancellationFeedbackLabelText:
          type: string
        preventCancellationBeforeDaysMessage:
          type: string
        membershipSwap:
          type: string
          enum:
            - UPGRADE_ONLY
            - DOWNGRADE_ONLY
            - UPGRADE_AND_DOWNGRADE
            - NONE
        retrieveMagicLinkDescription:
          type: string
        retrieveMagicLinkText:
          type: string
        lastBillingAttemptFailedText:
          type: string
        preventCancellationBeforeDays:
          type: string
        allowCancellationBeforeDays:
          type: string
        enableRedirectMyAccountButton:
          type: boolean
        goBackRedirectLink:
          type: string
        resumeSub:
          type: boolean
        deliveryFrequencyLabelText:
          type: string
        deliverLabelText:
          type: string
        daysLabelText:
          type: string
        weeksLabelText:
          type: string
        monthsLabelText:
          type: string
        yearsLabelText:
          type: string
        removedTagOnFreeTrial:
          type: string
        chooseAnotherPaymentMethodText:
          type: string
        editShippingModalLabel:
          type: string
        continueButtonLabel:
          type: string
        selectDeliveryMethodLabel:
          type: string
        saveButtonLabel:
          type: string
        showUpcomingOrdersLabel:
          type: string
        shippingAddressLabel:
          type: string
        shippingMethodLabel:
          type: string
        subtotalLabel:
          type: string
        resumeMembershipLabel:
          type: string
        closeButtonLabel:
          type: string
        pauseMembershipLabel:
          type: string
        pauseMembershipMessageText:
          type: string
        noPaymentMethodFoundText:
          type: string
        membershipPerksDetailsText:
          type: string
        resumeSubscriptionDescriptionText:
          type: string
        skipFirstPage:
          type: boolean
        welcomeText:
          type: string
        removeButtonText:
          type: string
        productConfirmationButtonLabel:
          type: string
        editQuantityLabelText:
          type: string
    CancellationManagementDTO:
      required:
        - shop
      type: object
      properties:
        id:
          type: integer
          format: int64
        shop:
          type: string
        cancellationType:
          type: string
          enum:
            - CANCEL_IMMEDIATELY
            - CANCELLATION_INSTRUCTIONS
            - CUSTOMER_RETENTION_FLOW
        cancellationInstructionsText:
          type: string
        cancellationReasonsJSON:
          type: string
        cancellationRetentionMessage:
          type: string
        pauseDurationCycle:
          type: integer
          format: int32
        dynamicallyPauseCycleOnCancellation:
          type: boolean
        discountRecurringCycleLimit:
          type: integer
          format: int32
