> ## 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 customer details with subscriptions

> Retrieves comprehensive customer information including their subscription contracts. This endpoint provides customer profile data along with a paginated list of their active and historical subscriptions.

**Key Features:**
- Customer profile information (name, email, phone, addresses)
- Complete subscription history with pagination
- Payment method details
- Customer account state and metadata
- Order history related to subscriptions
- Customer tags and notes

**Subscription Data Included:**
- All subscription contracts (active, paused, cancelled)
- Contract details with line items
- Billing and delivery policies
- Next billing dates and amounts
- Applied discounts

**Pagination:**
- Subscription contracts are paginated
- Default page size varies by Shopify plan
- Use cursor for subsequent pages
- Cursor-based pagination ensures consistency

**Use Cases:**
- Customer service representatives viewing customer details
- Integration with CRM systems
- Customer analytics and reporting
- Subscription management interfaces
- Billing reconciliation

**Important Notes:**
- Customer ID is numeric (without gid:// prefix)
- Returns null if customer not found
- Includes both active and inactive subscriptions
- Payment methods may be masked for security

**Authentication:** Requires valid X-API-Key header



## OpenAPI

````yaml /subscription/admin-api-swagger.json get /api/external/v2/subscription-customers/{id}
openapi: 3.0.1
info:
  description: >-
    Comprehensive API documentation for managing subscriptions, payments, and
    related operations. These APIs allow you to programmatically manage
    subscription lifecycles, handle payments, configure products, and integrate
    subscription functionality into your applications.
  title: Admin APIs
  version: 0.0.1
servers:
  - url: https://subscription-admin.appstle.com
security: []
tags:
  - description: >-
      Core APIs for managing the complete subscription lifecycle including
      creation, updates, pausing, resuming, and cancellation of subscriptions.
    name: Subscription Management
  - description: >-
      APIs for managing subscription payment methods, processing payments,
      handling payment retries, and updating billing information.
    name: Subscription Payments
  - description: >-
      APIs for managing subscription contracts including delivery schedules,
      pricing, order notes, billing cycles, and shipping addresses.
    name: Subscription Contracts
  - description: >-
      APIs for managing products within subscriptions including adding,
      removing, updating quantities, and swapping products.
    name: Subscription Products
  - description: >-
      APIs for handling billing operations, payment processing, and financial
      transactions related to subscriptions.
    name: Billing & Payments
  - description: >-
      APIs for managing discounts and promotional codes applied to
      subscriptions.
    name: Subscription Discounts
  - description: >-
      APIs for managing one-time add-on products that can be purchased alongside
      recurring subscription items.
    name: Subscription One-Time Products
  - description: >-
      APIs for managing subscription plans, pricing tiers, and plan
      configurations.
    name: Subscription Plans
  - description: >-
      APIs for managing customizable product boxes and bundles where customers
      can select multiple items.
    name: Build-a-Box & Bundles
  - description: >-
      APIs for managing the product catalog including product information,
      variants, and inventory.
    name: Product Catalog
  - description: >-
      APIs for managing operational settings, configurations, and administrative
      functions.
    name: Operations & Settings
  - description: >-
      APIs powering the customer-facing portal where subscribers can manage
      their own subscriptions.
    name: Customer Portal
  - description: APIs for managing customer information, profiles, and account details.
    name: Customers
  - description: >-
      APIs for retrieving aggregated subscription data, customer subscription
      history, and account-level subscription information.
    name: Subscription Data
  - description: >-
      APIs for managing delivery profiles, shipping rates, free shipping
      configuration, and delivery method options on subscriptions.
    name: Delivery & Shipping
  - description: >-
      APIs for managing storefront customization including custom CSS, theme
      settings, label translations, and merchant-defined widget configuration.
    name: Customization
  - description: >-
      APIs for configuring cancellation flows, retention offers, cancellation
      reason management, and win-back automation.
    name: Customer Retention
paths:
  /api/external/v2/subscription-customers/{id}:
    get:
      tags:
        - Customers
        - Subscription Contracts
      summary: Get customer details with subscriptions
      description: >-
        Retrieves comprehensive customer information including their
        subscription contracts. This endpoint provides customer profile data
        along with a paginated list of their active and historical
        subscriptions.


        **Key Features:**

        - Customer profile information (name, email, phone, addresses)

        - Complete subscription history with pagination

        - Payment method details

        - Customer account state and metadata

        - Order history related to subscriptions

        - Customer tags and notes


        **Subscription Data Included:**

        - All subscription contracts (active, paused, cancelled)

        - Contract details with line items

        - Billing and delivery policies

        - Next billing dates and amounts

        - Applied discounts


        **Pagination:**

        - Subscription contracts are paginated

        - Default page size varies by Shopify plan

        - Use cursor for subsequent pages

        - Cursor-based pagination ensures consistency


        **Use Cases:**

        - Customer service representatives viewing customer details

        - Integration with CRM systems

        - Customer analytics and reporting

        - Subscription management interfaces

        - Billing reconciliation


        **Important Notes:**

        - Customer ID is numeric (without gid:// prefix)

        - Returns null if customer not found

        - Includes both active and inactive subscriptions

        - Payment methods may be masked for security


        **Authentication:** Requires valid X-API-Key header
      operationId: getSubscriptionCustomerV2
      parameters:
        - description: >-
            Customer ID to retrieve. Provide the numeric ID without the gid://
            prefix
          example: 987654321
          in: path
          name: id
          required: true
          schema:
            format: int64
            minimum: 1
            type: integer
        - deprecated: true
          description: API Key (Deprecated - Use X-API-Key header instead)
          in: query
          name: api_key
          required: false
          schema:
            type: string
        - description: API Key for authentication
          example: sk_live_1234567890abcdef
          in: header
          name: X-API-Key
          required: true
          schema:
            type: string
        - description: >-
            Pagination cursor for subscription contracts. Use the cursor from
            previous response's pageInfo.endCursor to get the next page
          example: >-
            eyJsYXN0X2lkIjoxMjM0NTY3ODksImxhc3RfdmFsdWUiOiIyMDI0LTAxLTE1IDEwOjAwOjAwIn0=
          in: query
          name: cursor
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                Success Response:
                  description: Success Response
                  value:
                    __typename: Customer
                    id: gid://shopify/Customer/10053873467694
                    productSubscriberStatus: ACTIVE
                    subscriptionContracts:
                      __typename: SubscriptionContractConnection
                      nodes:
                        - __typename: SubscriptionContract
                          billingPolicy:
                            __typename: SubscriptionBillingPolicy
                            interval: MONTH
                            intervalCount: 1
                          createdAt: '2026-06-02T22:22:01Z'
                          deliveryPrice:
                            __typename: MoneyV2
                            amount: '4.9'
                          id: gid://shopify/SubscriptionContract/34053357870
                          lastPaymentStatus: null
                          lines:
                            __typename: SubscriptionLineConnection
                            nodes:
                              - __typename: SubscriptionLine
                                currentPrice:
                                  __typename: MoneyV2
                                  amount: '22.5'
                                  currencyCode: USD
                                customAttributes:
                                  - __typename: Attribute
                                    key: products
                                    value: >-
                                      1x Apple Macbook Air M3 13, 1x Bottle -
                                      10ml, 9x Bottle - 20ml, 10x Bottle - 30ml
                                  - __typename: Attribute
                                    key: _appstle-bb-id
                                    value: tvksrgmrfd
                                  - __typename: Attribute
                                    key: __appstle-bb-name
                                    value: New Fixed one
                                  - __typename: Attribute
                                    key: __appstle-bb-variants
                                    value: >-
                                      51533106970926:1,51652244832558:1,51652244865326:9,51652244898094:10
                                  - __typename: Attribute
                                    key: _appstle-bb-product-sku
                                    value: ''
                                  - __typename: Attribute
                                    key: _appstle_bundles_type
                                    value: SINGLE_PRODUCT_BUILD_A_BOX
                                discountAllocations: []
                                id: >-
                                  gid://shopify/SubscriptionLine/5d22da79-2b9e-49ae-9af6-f010d791c09a
                                lineDiscountedPrice:
                                  __typename: MoneyV2
                                  amount: '22.5'
                                  currencyCode: USD
                                pricingPolicy:
                                  __typename: SubscriptionPricingPolicy
                                  basePrice:
                                    __typename: MoneyV2
                                    amount: '25.0'
                                    currencyCode: USD
                                  cycleDiscounts:
                                    - __typename: SubscriptionCyclePriceAdjustment
                                      adjustmentType: PERCENTAGE
                                      adjustmentValue:
                                        __typename: SellingPlanPricingPolicyPercentageValue
                                        percentage: 10
                                      afterCycle: 0
                                      computedPrice:
                                        __typename: MoneyV2
                                        amount: '22.5'
                                        currencyCode: USD
                                productId: gid://shopify/Product/10295267918126
                                quantity: 1
                                sellingPlanId: gid://shopify/SellingPlan/692806091054
                                sellingPlanName: Monthly Subscription
                                sku: null
                                taxable: true
                                title: Custom 7-Day Meal Plan
                                variantId: gid://shopify/ProductVariant/51533108379950
                                variantImage:
                                  __typename: Image
                                  url: >-
                                    https://cdn.shopify.com/s/files/1/0874/3157/7902/files/vegan-lunch-chocolate-smoothie-bowl-buddha-bowl-with-tofu-chickpeas-and-quinoa-lentil-soup_fe298f9d-152b-4d0b-85bd-11611d20701d.jpg?v=1766604366
                                variantTitle: null
                            pageInfo:
                              __typename: PageInfo
                              endCursor: >-
                                eyJsYXN0X2lkIjoiNWQyMmRhNzktMmI5ZS00OWFlLTlhZjYtZjAxMGQ3OTFjMDlhIiwibGFzdF92YWx1ZSI6IjVkMjJkYTc5LTJiOWUtNDlhZS05YWY2LWYwMTBkNzkxYzA5YSJ9
                              hasNextPage: false
                              hasPreviousPage: false
                              startCursor: >-
                                eyJsYXN0X2lkIjoiNWQyMmRhNzktMmI5ZS00OWFlLTlhZjYtZjAxMGQ3OTFjMDlhIiwibGFzdF92YWx1ZSI6IjVkMjJkYTc5LTJiOWUtNDlhZS05YWY2LWYwMTBkNzkxYzA5YSJ9
                          nextBillingDate: '2026-07-02T22:00:00Z'
                          status: ACTIVE
                      pageInfo:
                        __typename: PageInfo
                        endCursor: >-
                          eyJsYXN0X2lkIjo1NDQxMDA1ODE2NzgsImxhc3RfdmFsdWUiOiIyMDI2LTA2LTAyIDIyOjIyOjAxLjc3Njg1NiJ9
                        hasNextPage: false
                        hasPreviousPage: false
                        startCursor: >-
                          eyJsYXN0X2lkIjo1NDQxMDA1ODE2NzgsImxhc3RfdmFsdWUiOiIyMDI2LTA2LTAyIDIyOjIyOjAxLjc3Njg1NiJ9
                    tags:
                      - Angel
                      - APPSTLE_ONE_TIME278044475564
                      - appstle_subscription_active_customer
                      - Silver
                      - 'source: appstle℠ subscriptions'
              schema:
                $ref: '#/components/schemas/Customer'
          description: Customer details successfully retrieved
        '400':
          content:
            application/json:
              examples:
                Invalid Cursor:
                  description: Invalid Cursor
                  value:
                    detail: The provided cursor is malformed or expired
                    status: 400
                    title: Invalid pagination cursor
                    type: https://example.com/errors/bad-request
                Invalid Customer ID:
                  description: Invalid Customer ID
                  value:
                    detail: Customer ID must be a positive number
                    status: 400
                    title: Invalid customer ID
                    type: https://example.com/errors/bad-request
          description: Invalid request parameters
        '401':
          content:
            application/json:
              example:
                detail: Valid API key is required to access this endpoint
                status: 401
                title: Authentication required
                type: https://example.com/errors/unauthorized
          description: Authentication required - missing or invalid API key
        '403':
          content:
            application/json:
              example:
                detail: API key does not have permission to read customer data
                status: 403
                title: Insufficient permissions
                type: https://example.com/errors/forbidden
          description: Insufficient permissions to access customer data
        '404':
          content:
            application/json:
              example:
                detail: No customer found with ID 987654321
                status: 404
                title: Customer not found
                type: https://example.com/errors/not-found
          description: Customer not found
        '500':
          content:
            application/json:
              example:
                detail: An unexpected error occurred while retrieving customer data
                status: 500
                title: Internal server error
                type: https://example.com/errors/internal-error
          description: Internal server error
components:
  schemas:
    Customer:
      properties:
        displayName:
          type: string
        email:
          deprecated: true
          type: string
        firstName:
          type: string
        get__typename:
          type: string
        id:
          type: string
        lastName:
          type: string
        phone:
          deprecated: true
          type: string
      type: object

````