> ## 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 detailed customer membership information

> Retrieves comprehensive details for all membership contracts associated with a specific customer. This endpoint returns complete membership contract data including products, pricing, billing schedule, and status.

**Key Information Returned:**
- **Contract Details**: Contract ID, status (active, paused, cancelled), creation date
- **Products**: Line items with product names, variants, quantities, and prices
- **Billing Information**: Next billing date, billing frequency, payment method
- **Delivery Details**: Shipping address, delivery method, delivery frequency
- **Pricing**: Subtotal, discounts applied, total amount per cycle
- **Membership Plan**: Associated membership plan name and details
- **Order History**: Past billing attempts and fulfillment records

**Membership Contract Details Include:**
- **Contract ID**: Unique identifier for the membership
- **Customer ID**: Shopify customer ID associated with the contract
- **Status**: ACTIVE, PAUSED, CANCELLED, EXPIRED
- **Billing Cycle**: Number of completed billing cycles
- **Next Billing Date**: When the next payment will be charged
- **Delivery Date**: When the next order will be shipped
- **Products**: All line items in the membership with pricing
- **Discount Codes**: Applied discount codes and their values
- **Custom Attributes**: Any custom metadata or tags

**Common Use Cases:**
- Display full membership list in customer account dashboard
- Retrieve all contract details for customer support inquiries
- Build custom customer portal with membership management
- Sync membership data to external CRM or analytics systems
- Generate customer membership reports and analytics
- Validate customer's active memberships before offering upgrades
- Show membership history and upcoming deliveries

**Response Format:**
Returns a List of SubscriptionContractDetailsDTO objects, one per active/paused contract. If customer has no memberships, returns an empty list.

**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-customers-detail/valid/{customerId}
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 retrieving product swap/substitution options allowing members to
      exchange membership items based on configured swap rules and variant
      groups
    name: Product Swap Rules
  - description: >-
      APIs for managing customer payment methods, payment tokens, and payment
      method retrieval for memberships
    name: Customer Payment Methods
  - description: >-
      APIs for managing one-time product additions to upcoming membership
      orders, including adding, retrieving, and removing one-off items
    name: One-Time Add-Ons
  - description: >-
      APIs for managing membership contracts including creation, updates, status
      changes, line items, discounts, and billing operations
    name: Membership Contracts
  - description: >-
      APIs for retrieving historical discount code usage and redemption
      information for membership contracts
    name: Customer Discount History
  - 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 retrieving custom CSS styles applied to membership widgets and
      customer portal for theme customization
    name: Custom CSS Styling
  - 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 Shopify delivery profiles, shipping rates, zones, and
      free shipping configuration for membership memberships
    name: Shipping & Delivery Profiles
  - description: >-
      APIs for managing membership plan groups, including creating plans,
      configuring discounts, billing intervals, and assigning products to plans
    name: Membership Plans
  - description: >-
      APIs for retrieving product catalog, variants, pricing, and inventory
      information for 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-customers-detail/valid/{customerId}:
    get:
      tags:
        - Membership Contracts
      summary: Get detailed customer membership information
      description: >-
        Retrieves comprehensive details for all membership contracts associated
        with a specific customer. This endpoint returns complete membership
        contract data including products, pricing, billing schedule, and status.


        **Key Information Returned:**

        - **Contract Details**: Contract ID, status (active, paused, cancelled),
        creation date

        - **Products**: Line items with product names, variants, quantities, and
        prices

        - **Billing Information**: Next billing date, billing frequency, payment
        method

        - **Delivery Details**: Shipping address, delivery method, delivery
        frequency

        - **Pricing**: Subtotal, discounts applied, total amount per cycle

        - **Membership Plan**: Associated membership plan name and details

        - **Order History**: Past billing attempts and fulfillment records


        **Membership Contract Details Include:**

        - **Contract ID**: Unique identifier for the membership

        - **Customer ID**: Shopify customer ID associated with the contract

        - **Status**: ACTIVE, PAUSED, CANCELLED, EXPIRED

        - **Billing Cycle**: Number of completed billing cycles

        - **Next Billing Date**: When the next payment will be charged

        - **Delivery Date**: When the next order will be shipped

        - **Products**: All line items in the membership with pricing

        - **Discount Codes**: Applied discount codes and their values

        - **Custom Attributes**: Any custom metadata or tags


        **Common Use Cases:**

        - Display full membership list in customer account dashboard

        - Retrieve all contract details for customer support inquiries

        - Build custom customer portal with membership management

        - Sync membership data to external CRM or analytics systems

        - Generate customer membership reports and analytics

        - Validate customer's active memberships before offering upgrades

        - Show membership history and upcoming deliveries


        **Response Format:**

        Returns a List of SubscriptionContractDetailsDTO objects, one per
        active/paused contract. If customer has no memberships, returns an empty
        list.


        **Authentication:** Requires API key authentication via X-API-Key header
        or api_key parameter
      operationId: getValidSubscriptionCustomerDetailsV2
      parameters:
        - description: Shopify customer ID
          example: 6789012345
          in: path
          name: customerId
          required: true
          schema:
            format: int64
            type: integer
        - 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
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionContractDetailsDTO'
          description: >-
            Customer membership details successfully retrieved (may be empty
            list if no memberships)
        '400':
          content:
            '*/*':
              schema:
                items:
                  $ref: '#/components/schemas/SubscriptionContractDetailsDTO'
                type: array
          description: Invalid customer ID format
        '401':
          content:
            '*/*':
              schema:
                items:
                  $ref: '#/components/schemas/SubscriptionContractDetailsDTO'
                type: array
          description: Authentication required - invalid or missing API key
        '404':
          content:
            '*/*':
              schema:
                items:
                  $ref: '#/components/schemas/SubscriptionContractDetailsDTO'
                type: array
          description: Customer not found
components:
  schemas:
    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
        nextActivationDate:
          format: date-time
          type: string
        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
        pauseDurationCycle:
          format: int32
          type: integer
        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

````