> ## Documentation Index
> Fetch the complete documentation index at: https://developers.appstle.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get membership/subscription contract list

> Retrieves a paginated list of membership/subscription contracts with advanced filtering capabilities. This endpoint provides comprehensive access to all subscription contracts in your store with flexible query options.

**Key Information Returned:**
- **Contract Details**: Contract ID, status, creation date, billing cycle
- **Customer Information**: Customer name, email, Shopify customer ID
- **Subscription Items**: Products, variants, quantities in subscription
- **Billing Information**: Next billing date, billing frequency, pricing
- **Delivery Details**: Shipping address, delivery method, next delivery date
- **Plan Information**: Membership plan type, selling plan IDs
- **Status Tracking**: Active, paused, cancelled, expired states

**Filtering Capabilities:**
- **Date Ranges**: Filter by creation date or next billing date
- **Customer Search**: Search by customer name or email
- **Status Filter**: Filter by contract status (active, paused, cancelled)
- **Plan Type**: Filter by membership plan type
- **Billing Frequency**: Filter by billing interval (weekly, monthly, etc.)
- **Product/Variant**: Find contracts containing specific products or variants
- **Order Name**: Search by Shopify order name/number
- **Selling Plan**: Filter by Shopify selling plan IDs
- **Special Filters**: Contracts with deleted products or bounced emails

**Pagination:**
- Supports standard pagination parameters (page, size, sort)
- Returns pagination headers for total count and navigation
- Default page size configurable via request parameters

**Use Cases:**
- Export subscription data to external CRM or analytics systems
- Build custom subscription dashboards and reports
- Sync membership data with external platforms
- Identify subscriptions needing attention (bounced emails, deleted products)
- Generate subscription activity reports by date range
- Find all subscriptions for a specific product or variant
- Monitor subscription health and churn metrics

**Authentication:** Requires API key authentication via X-API-Key header or api_key parameter



## OpenAPI

````yaml /memberships/admin-api-swagger.json get /api/external/v2/subscription-contract-details
openapi: 3.0.1
info:
  description: >-
    Comprehensive API documentation for managing memberships, payments, and
    related operations. These APIs allow you to programmatically manage
    membership lifecycles, handle payments, configure products, and integrate
    membership functionality into your applications.
  title: Admin APIs
  version: 0.0.1
servers:
  - url: https://membership-admin.appstle.com
security: []
tags:
  - description: >-
      APIs for managing Shopify delivery profiles, shipping rates, zones, and
      free shipping configuration for subscription memberships
    name: Shipping & Delivery Profiles
  - description: >-
      APIs for retrieving historical discount code usage and redemption
      information for membership contracts
    name: Customer Discount History
  - description: >-
      APIs for managing membership cancellation flow settings including
      retention offers, survey questions, and cancel confirmation screens
    name: Cancellation Flow Configuration
  - description: >-
      APIs for managing membership billing attempts, recurring orders, payment
      retries, order history, and order skipping
    name: Billing & Orders
  - description: >-
      APIs for managing one-time product additions to upcoming subscription
      orders, including adding, retrieving, and removing one-off items
    name: One-Time Add-Ons
  - description: >-
      APIs for managing membership/subscription plan groups, including creating
      plans, configuring discounts, billing intervals, and assigning products to
      plans
    name: Membership Plans
  - description: >-
      APIs for managing subscription product bundles, bundle configurations,
      item grouping, and bundle-specific discount codes
    name: Product Bundles
  - description: >-
      APIs for retrieving custom CSS styles applied to subscription widgets and
      customer portal for theme customization
    name: Custom CSS Styling
  - description: >-
      APIs for managing customer portal settings including UI customization,
      text labels, feature toggles, and branding options for the member
      self-service portal
    name: Customer Portal Configuration
  - description: >-
      APIs for managing membership/subscription contracts including creation,
      updates, status changes, line items, discounts, and billing operations
    name: Membership Contracts
  - description: >-
      APIs for managing subscription bundle configuration settings including
      bundle behavior, pricing rules, and display options
    name: Bundle Settings
  - description: >-
      APIs for managing customer payment methods, payment tokens, and payment
      method retrieval for subscriptions
    name: Customer Payment Methods
  - description: >-
      APIs for retrieving product swap/substitution options allowing members to
      exchange subscription items based on configured swap rules and variant
      groups
    name: Product Swap Rules
  - description: >-
      APIs for retrieving product catalog, variants, pricing, and inventory
      information for subscription memberships.
    name: Product & Inventory Data
  - description: >-
      APIs for managing shop-level membership settings, configuration, and
      general store information.
    name: Shop Settings
  - description: >-
      APIs for performing bulk/mass operations on multiple membership contracts
      including status updates, product replacements, and billing date changes.
    name: Bulk Operations
paths:
  /api/external/v2/subscription-contract-details:
    get:
      tags:
        - Membership Contracts
      summary: Get membership/subscription contract list
      description: >-
        Retrieves a paginated list of membership/subscription contracts with
        advanced filtering capabilities. This endpoint provides comprehensive
        access to all subscription contracts in your store with flexible query
        options.


        **Key Information Returned:**

        - **Contract Details**: Contract ID, status, creation date, billing
        cycle

        - **Customer Information**: Customer name, email, Shopify customer ID

        - **Subscription Items**: Products, variants, quantities in subscription

        - **Billing Information**: Next billing date, billing frequency, pricing

        - **Delivery Details**: Shipping address, delivery method, next delivery
        date

        - **Plan Information**: Membership plan type, selling plan IDs

        - **Status Tracking**: Active, paused, cancelled, expired states


        **Filtering Capabilities:**

        - **Date Ranges**: Filter by creation date or next billing date

        - **Customer Search**: Search by customer name or email

        - **Status Filter**: Filter by contract status (active, paused,
        cancelled)

        - **Plan Type**: Filter by membership plan type

        - **Billing Frequency**: Filter by billing interval (weekly, monthly,
        etc.)

        - **Product/Variant**: Find contracts containing specific products or
        variants

        - **Order Name**: Search by Shopify order name/number

        - **Selling Plan**: Filter by Shopify selling plan IDs

        - **Special Filters**: Contracts with deleted products or bounced emails


        **Pagination:**

        - Supports standard pagination parameters (page, size, sort)

        - Returns pagination headers for total count and navigation

        - Default page size configurable via request parameters


        **Use Cases:**

        - Export subscription data to external CRM or analytics systems

        - Build custom subscription dashboards and reports

        - Sync membership data with external platforms

        - Identify subscriptions needing attention (bounced emails, deleted
        products)

        - Generate subscription activity reports by date range

        - Find all subscriptions for a specific product or variant

        - Monitor subscription health and churn metrics


        **Authentication:** Requires API key authentication via X-API-Key header
        or api_key parameter
      operationId: getAllSubscriptionContractDetailsExternal
      parameters:
        - description: API Key (Deprecated - Use Header X-API-Key instead)
          in: query
          name: api_key
          required: false
          schema:
            type: string
        - in: header
          name: X-API-Key
          required: false
          schema:
            type: string
        - description: Filter contracts created on or after this date
          example: '2024-01-01T00:00:00Z'
          in: query
          name: fromCreatedDate
          required: false
          schema:
            format: date-time
            type: string
        - description: Filter contracts created on or before this date
          example: '2024-12-31T23:59:59Z'
          in: query
          name: toCreatedDate
          required: false
          schema:
            format: date-time
            type: string
        - description: Filter contracts with next billing date on or after this date
          example: '2024-01-01T00:00:00Z'
          in: query
          name: fromNextDate
          required: false
          schema:
            format: date-time
            type: string
        - description: Filter contracts with next billing date on or before this date
          example: '2024-12-31T23:59:59Z'
          in: query
          name: toNextDate
          required: false
          schema:
            format: date-time
            type: string
        - description: Filter by specific subscription/membership contract ID
          example: gid://shopify/SubscriptionContract/12345
          in: query
          name: subscriptionContractId
          required: false
          schema:
            type: string
        - description: Filter by customer name or email (partial match)
          example: john@example.com
          in: query
          name: customerName
          required: false
          schema:
            type: string
        - description: Filter by Shopify order name
          example: '#1001'
          in: query
          name: orderName
          required: false
          schema:
            type: string
        - description: Filter by subscription status
          example: ACTIVE
          in: query
          name: status
          required: false
          schema:
            enum:
              - ACTIVE
              - PAUSED
              - CANCELLED
              - FAILED
              - EXPIRED
            type: string
        - description: Filter by billing frequency count (e.g., 1 for every 1 month)
          example: 1
          in: query
          name: billingPolicyIntervalCount
          required: false
          schema:
            format: int32
            type: integer
        - description: Filter by billing frequency interval
          example: MONTH
          in: query
          name: billingPolicyInterval
          required: false
          schema:
            enum:
              - DAY
              - WEEK
              - MONTH
              - YEAR
            type: string
        - description: Filter by plan type (PAY_AS_YOU_GO or PREPAID)
          example: PAY_AS_YOU_GO
          in: query
          name: planType
          required: false
          schema:
            enum:
              - PAY_AS_YOU_GO
              - PREPAID
            type: string
        - description: Filter by record type (CONTRACT or SELLING_PLAN_GROUP)
          example: CONTRACT
          in: query
          name: recordType
          required: false
          schema:
            type: string
        - description: Filter by Shopify product ID
          example: 123456789
          in: query
          name: productId
          required: false
          schema:
            format: int64
            type: integer
        - description: Filter by Shopify product variant ID
          example: 987654321
          in: query
          name: variantId
          required: false
          schema:
            format: int64
            type: integer
        - description: Filter by selling plan IDs (comma-separated for multiple)
          example: 123,456,789
          in: query
          name: sellingPlanIds
          required: false
          schema:
            type: string
        - description: Include only contracts with products deleted from Shopify store
          example: false
          in: query
          name: havingProductsDeletedFromStore
          required: false
          schema:
            default: false
            type: boolean
        - description: Include only contracts where email notifications bounced or failed
          example: false
          in: query
          name: emailBouncedOrFailed
          required: false
          schema:
            default: false
            type: boolean
        - description: Pagination parameters (page number and size)
          example:
            page: 0
            size: 10
            sort:
              - id,desc
          in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionContractDetailsDTO'
          description: >-
            Subscription contracts successfully retrieved with pagination
            headers
        '400':
          content:
            '*/*':
              schema:
                items:
                  $ref: '#/components/schemas/SubscriptionContractDetailsDTO'
                type: array
          description: Invalid filter parameters or date format
        '401':
          content:
            '*/*':
              schema:
                items:
                  $ref: '#/components/schemas/SubscriptionContractDetailsDTO'
                type: array
          description: Authentication required - invalid or missing API key
components:
  schemas:
    Pageable:
      properties:
        page:
          format: int32
          minimum: 0
          type: integer
        size:
          format: int32
          minimum: 1
          type: integer
        sort:
          items:
            type: string
          type: array
      type: object
    SubscriptionContractDetailsDTO:
      properties:
        activatedOn:
          format: date-time
          type: string
        allowDeliveryPriceOverride:
          type: boolean
        autoCharge:
          type: boolean
        billingDateAfterTrial:
          format: date-time
          type: string
        billingPolicyInterval:
          type: string
        billingPolicyIntervalCount:
          format: int32
          type: integer
        cancellationFeedback:
          type: string
        cancelledOn:
          format: date-time
          type: string
        contractAmount:
          format: double
          type: number
        contractAmountUSD:
          format: double
          type: number
        contractDetailsJSON:
          type: string
        createdAt:
          format: date-time
          type: string
        currencyCode:
          type: string
        customerEmail:
          type: string
        customerFirstName:
          type: string
        customerId:
          format: int64
          type: integer
        customerLastName:
          type: string
        customerName:
          type: string
        deliveryPolicyInterval:
          type: string
        deliveryPolicyIntervalCount:
          format: int32
          type: integer
        dunning:
          type: boolean
        emailBouncedOrFailed:
          type: boolean
        endsAt:
          format: date-time
          type: string
        graphCustomerId:
          type: string
        graphOrderId:
          type: string
        graphSubscriptionContractId:
          type: string
        id:
          format: int64
          type: integer
        importedId:
          type: string
        maxCycles:
          format: int32
          type: integer
        minCycles:
          format: int32
          type: integer
        nextBillingDate:
          format: date-time
          type: string
        orderAmount:
          format: double
          type: number
        orderAmountUSD:
          format: double
          type: number
        orderId:
          format: int64
          type: integer
        orderName:
          type: string
        orderNote:
          type: string
        orderNoteAttributes:
          type: string
        pausedBySecurityChallenge:
          type: boolean
        pausedFromActive:
          type: boolean
        pausedOn:
          format: date-time
          type: string
        phone:
          type: string
        shop:
          type: string
        startsAt:
          format: date-time
          type: string
        status:
          type: string
        stopUpComingOrderEmail:
          type: boolean
        subscriptionContractId:
          format: int64
          type: integer
        subscriptionCreatedEmailSent:
          type: boolean
        subscriptionCreatedEmailSentStatus:
          enum:
            - SENT
            - UNSENT
            - FAILED
            - EMAIL_SETTINGS_DISABLED
            - CUSTOMER_PAYMENT_EMPTY
            - CONTRACT_PAUSED_STATUS
          type: string
        subscriptionCreatedSmsSentStatus:
          enum:
            - SENT
            - UNSENT
            - FAILED
            - SMS_SETTINGS_DISABLED
            - CUSTOMER_PAYMENT_EMPTY
            - CONTRACT_PAUSED_STATUS
            - PHONE_NUMBER_EMPTY
          type: string
        trialEndDate:
          format: date-time
          type: string
        upcomingSwapRule:
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - shop
      type: object

````