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

# Get subscriptions

> Get a paginated list of subscriptions.



## OpenAPI

````yaml https://platform.runonatlas.com/external/schema get /external/subscriptions
openapi: 3.0.0
info:
  title: Atlas API
  version: 1.0.0
servers:
  - url: https://platform.runonatlas.com
security: []
paths:
  /external/subscriptions:
    get:
      tags:
        - Subscriptions
      summary: Get subscriptions
      description: Get a paginated list of subscriptions.
      parameters:
        - schema:
            type: string
            minLength: 1
            description: The Atlas customer ID
            example: atlas-internal-customer-id-123
          required: false
          description: The Atlas customer ID
          name: customerId
          in: query
        - schema:
            type: string
            minLength: 1
            description: The Atlas subscription ID
            example: atlas-internal-subscription-id-123
          required: false
          description: The Atlas subscription ID
          name: id
          in: query
        - schema:
            type: string
            minLength: 1
            description: The Atlas plan ID
            example: atlas-internal-plan-id-123
          required: false
          description: The Atlas plan ID
          name: planId
          in: query
        - schema:
            type: string
            enum:
              - draft
              - pendingActivation
              - active
              - ended
              - deleted
            description: The status of the subscription
            example: active
          required: false
          description: The status of the subscription
          name: status
          in: query
        - schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
            description: The order of the results.
            example: asc
          required: false
          description: The order of the results.
          name: order
          in: query
        - schema:
            type: integer
            minimum: 1
            default: 1
            description: The page number of the results.
            example: 1
          required: false
          description: The page number of the results.
          name: page
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
            description: The number of results per page.
            example: 10
          required: false
          description: The number of results per page.
          name: pageSize
          in: query
        - schema:
            type: string
            enum:
              - createdAt
              - endDate
              - id
              - startDate
              - status
              - updatedAt
            default: id
            description: The fields that can be used to order the results by.
            example: id
          required: false
          description: The fields that can be used to order the results by.
          name: orderBy
          in: query
      responses:
        '200':
          description: The subscriptions that have been retrieved.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        billingCadence:
                          type: string
                          nullable: true
                          enum:
                            - oneTime
                            - monthly
                            - quarterly
                            - annually
                          description: The billing cadence for this subscription
                          example: monthly
                        createdAt:
                          type: string
                          format: date
                          description: The date and time the subscription was created
                          example: '2021-01-01T00:00:00.000Z'
                        currency:
                          type: string
                          nullable: true
                          enum:
                            - USD
                          description: The currency for this subscription
                          example: USD
                        endDate:
                          anyOf:
                            - type: string
                              format: date
                            - type: string
                              format: date-time
                            - nullable: true
                          description: The end date of the subscription
                          example: '2021-12-31T00:00:00.000Z'
                        id:
                          type: string
                          minLength: 1
                          description: The Atlas subscription ID
                          example: atlas-internal-subscription-id-123
                        netTerms:
                          type: string
                          nullable: true
                          enum:
                            - uponReceipt
                            - net30
                            - net60
                            - net90
                          description: >-
                            The net terms for this subscription; applies only if
                            autoChargeInvoice is false. Determines the number of
                            days after the invoice is issued before the payment
                            is due.
                          example: net30
                        startDate:
                          anyOf:
                            - type: string
                              format: date
                            - type: string
                              format: date-time
                          description: The start date of the subscription
                          example: '2021-01-01T00:00:00.000Z'
                        status:
                          type: string
                          enum:
                            - draft
                            - pendingActivation
                            - active
                            - ended
                            - deleted
                          description: The status of the subscription
                          example: active
                        updatedAt:
                          type: string
                          format: date
                          description: The date and time the subscription was last updated
                          example: '2021-01-01T00:00:00.000Z'
                        allowCustomerChanges:
                          type: boolean
                          description: >-
                            Whether the customer can change the subscription,
                            for example by cancelling it or creating another.
                          example: true
                        autoChargeInvoice:
                          type: boolean
                          description: >-
                            Whether to automatically charge invoices for this
                            subscription to the associated payment gateway.
                            Requires a valid Stripe connection. Only compatible
                            with a Stripe payment gateway.
                          example: false
                        autoSyncInvoice:
                          type: boolean
                          description: >-
                            Whether to automatically sync invoices for this
                            subscription to the associated payment gateway.
                          example: true
                        autoSendInvoice:
                          type: boolean
                          description: >-
                            Whether to automatically send invoices for this
                            subscription from the associated payment gateway to
                            the customers email address.
                          example: true
                        paymentGateway:
                          type: string
                          nullable: true
                          enum:
                            - Stripe
                            - QuickBooks
                            - Xero
                          description: The selected payment gateway for this subscription
                          example: Stripe
                        isTrial:
                          type: boolean
                          description: Whether this subscription is a trial subscription
                          example: false
                        chargeForUsageBasedPricesDuringTrial:
                          type: boolean
                          nullable: true
                          description: >-
                            Whether to charge for usage-based prices during the
                            trial period. Only applies if isTrial is true.
                          example: false
                        customerId:
                          type: string
                          minLength: 1
                          description: The Atlas customer ID
                          example: atlas-internal-customer-id-123
                        planId:
                          type: string
                          minLength: 1
                          description: The Atlas plan ID
                          example: atlas-internal-plan-id-123
                        merchantId:
                          type: string
                          minLength: 1
                          description: The Atlas merchant ID
                          example: atlas-internal-merchant-id-123
                      required:
                        - createdAt
                        - id
                        - startDate
                        - status
                        - updatedAt
                        - allowCustomerChanges
                        - autoChargeInvoice
                        - autoSyncInvoice
                        - autoSendInvoice
                        - paymentGateway
                        - isTrial
                        - customerId
                        - planId
                        - merchantId
                  count:
                    type: number
                    description: The total number of results.
                    example: 100
                  pages:
                    type: number
                    description: The total number of pages.
                    example: 10
                  currentPage:
                    type: number
                    description: The current page number.
                    example: 1
                required:
                  - results
                  - count
                  - pages
                  - currentPage
        '400':
          description: >-
            There is an issue with the request data. See the response for more
            details.
        '401':
          description: Invalid API key provided.
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        You can obtain this key from the Atlas dashboard. It must be of type
        `secret`

````