> ## 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.

# Create customer with default plan subscription

> Create a new customer with a unique external ID (e.g. the customer ID in your system). Also automatically subscribes the customer to the default plan if eligible.



## OpenAPI

````yaml https://platform.runonatlas.com/external/schema post /external/customers
openapi: 3.0.0
info:
  title: Atlas API
  version: 1.0.0
servers:
  - url: https://platform.runonatlas.com
security: []
paths:
  /external/customers:
    post:
      tags:
        - Customers
      summary: Create customer with default plan subscription
      description: >-
        Create a new customer with a unique external ID (e.g. the customer ID in
        your system). Also automatically subscribes the customer to the default
        plan if eligible.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                billingAddress1:
                  type: string
                  nullable: true
                  minLength: 1
                  description: Billing address line 1
                  example: 123 Main St
                billingAddress2:
                  type: string
                  nullable: true
                  minLength: 1
                  description: Billing address line 2
                  example: Apt 1
                billingCity:
                  type: string
                  nullable: true
                  minLength: 1
                  description: Billing city
                  example: Anytown
                billingCountry:
                  type: string
                  nullable: true
                  minLength: 1
                  description: Billing country
                  example: US
                billingState:
                  type: string
                  nullable: true
                  minLength: 1
                  description: Billing state
                  example: CA
                billingZipCode:
                  type: string
                  nullable: true
                  pattern: ^\d{5}(-\d{4})?$
                  description: Billing zip code. Must be 5 digits or 5+4 format.
                  example: '12345'
                shippingAddress1:
                  type: string
                  nullable: true
                  minLength: 1
                  description: Shipping address line 1
                  example: 123 Main St
                shippingAddress2:
                  type: string
                  nullable: true
                  minLength: 1
                  description: Shipping address line 2
                  example: Apt 1
                shippingCity:
                  type: string
                  nullable: true
                  minLength: 1
                  description: Shipping city
                  example: Anytown
                shippingCountry:
                  type: string
                  nullable: true
                  minLength: 1
                  description: Shipping country
                  example: US
                shippingState:
                  type: string
                  nullable: true
                  minLength: 1
                  description: Shipping state
                  example: CA
                shippingZipCode:
                  type: string
                  nullable: true
                  pattern: ^\d{5}(-\d{4})?$
                  description: Shipping zip code. Must be 5 digits or 5+4 format.
                  example: '12345'
                email:
                  type: string
                  nullable: true
                  minLength: 1
                  format: email
                  description: The email of the customer
                  example: john.doe@example.com
                externalId:
                  type: string
                  minLength: 1
                  description: >-
                    The external ID of the customer (e.g. the customer ID in
                    your system)
                  example: external-customer-id-123
                name:
                  type: string
                  nullable: true
                  minLength: 1
                  description: The name of the customer
                  example: John Doe
                quickBooksId:
                  type: string
                  nullable: true
                  minLength: 1
                  description: The QuickBooks ID of the customer
                  example: quickbooks-customer-id-123
                stripeId:
                  type: string
                  nullable: true
                  minLength: 1
                  description: The Stripe ID of the customer
                  example: stripe-customer-id-123
                xeroId:
                  type: string
                  nullable: true
                  minLength: 1
                  description: The Xero ID of the customer
                  example: xero-customer-id-123
              required:
                - externalId
              additionalProperties: false
      responses:
        '201':
          description: The customer that has been created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  billingAddress1:
                    type: string
                    nullable: true
                    minLength: 1
                    description: Billing address line 1
                    example: 123 Main St
                  billingAddress2:
                    type: string
                    nullable: true
                    minLength: 1
                    description: Billing address line 2
                    example: Apt 1
                  billingCity:
                    type: string
                    nullable: true
                    minLength: 1
                    description: Billing city
                    example: Anytown
                  billingCountry:
                    type: string
                    nullable: true
                    minLength: 1
                    description: Billing country
                    example: US
                  billingState:
                    type: string
                    nullable: true
                    minLength: 1
                    description: Billing state
                    example: CA
                  billingZipCode:
                    type: string
                    nullable: true
                    pattern: ^\d{5}(-\d{4})?$
                    description: Billing zip code. Must be 5 digits or 5+4 format.
                    example: '12345'
                  shippingAddress1:
                    type: string
                    nullable: true
                    minLength: 1
                    description: Shipping address line 1
                    example: 123 Main St
                  shippingAddress2:
                    type: string
                    nullable: true
                    minLength: 1
                    description: Shipping address line 2
                    example: Apt 1
                  shippingCity:
                    type: string
                    nullable: true
                    minLength: 1
                    description: Shipping city
                    example: Anytown
                  shippingCountry:
                    type: string
                    nullable: true
                    minLength: 1
                    description: Shipping country
                    example: US
                  shippingState:
                    type: string
                    nullable: true
                    minLength: 1
                    description: Shipping state
                    example: CA
                  shippingZipCode:
                    type: string
                    nullable: true
                    pattern: ^\d{5}(-\d{4})?$
                    description: Shipping zip code. Must be 5 digits or 5+4 format.
                    example: '12345'
                  createdAt:
                    type: string
                    format: date
                    description: The date and time the customer was created
                    example: '2021-01-01T00:00:00.000Z'
                  email:
                    type: string
                    nullable: true
                    minLength: 1
                    format: email
                    description: The email of the customer
                    example: john.doe@example.com
                  externalId:
                    type: string
                    nullable: true
                    minLength: 1
                    description: >-
                      The external ID of the customer (e.g. the customer ID in
                      your system)
                    example: external-customer-id-123
                  id:
                    type: string
                    minLength: 1
                    description: The Atlas customer ID
                    example: atlas-internal-customer-id-123
                  name:
                    type: string
                    nullable: true
                    minLength: 1
                    description: The name of the customer
                    example: John Doe
                  updatedAt:
                    type: string
                    format: date
                    description: The date and time the customer was last updated
                    example: '2021-01-01T00:00:00.000Z'
                  quickBooksId:
                    type: string
                    nullable: true
                    minLength: 1
                    description: The QuickBooks ID of the customer
                    example: quickbooks-customer-id-123
                  stripeId:
                    type: string
                    nullable: true
                    minLength: 1
                    description: The Stripe ID of the customer
                    example: stripe-customer-id-123
                  merchantId:
                    type: string
                    minLength: 1
                    description: The Atlas merchant ID
                    example: atlas-internal-merchant-id-123
                  subscriptions:
                    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
                        plan:
                          type: object
                          properties:
                            createdAt:
                              type: string
                              format: date
                              description: The date and time the plan was created
                              example: '2021-01-01T00:00:00.000Z'
                            crossEnvironmentId:
                              type: string
                              minLength: 1
                              description: The cross environment ID of the plan
                              example: plan-cross-env-id-123
                            currency:
                              type: string
                              enum:
                                - USD
                              description: The currency for this plan
                              example: USD
                            description:
                              type: string
                              minLength: 1
                              description: The description of the plan
                              example: A great plan for your needs
                            externalId:
                              type: string
                              nullable: true
                              minLength: 1
                              description: >-
                                The external ID of the plan (e.g. the plan ID in
                                your system)
                              example: external-plan-id-123
                            id:
                              type: string
                              minLength: 1
                              description: The Atlas plan ID
                              example: atlas-internal-plan-id-123
                            isPrivate:
                              type: boolean
                              description: Whether the plan is private
                              example: false
                            name:
                              type: string
                              minLength: 1
                              description: The name of the plan
                              example: Pro
                            netTerms:
                              type: string
                              enum:
                                - uponReceipt
                                - net30
                                - net60
                                - net90
                              description: The net terms for this plan
                              example: net30
                            purchasable:
                              type: boolean
                              description: Whether the plan is purchasable
                              example: true
                            requestPricingText:
                              type: string
                              minLength: 0
                              default: Request pricing
                              description: >-
                                The text to display when requesting pricing for
                                non-purchasable plans
                              example: Contact us for pricing
                            requestPricingUrl:
                              type: string
                              minLength: 0
                              description: >-
                                The URL to redirect to when requesting pricing
                                for non-purchasable plans
                              example: https://example.com/request-pricing
                            status:
                              type: string
                              enum:
                                - available
                                - draft
                                - archived
                                - deleted
                              description: The status of the plan
                              example: available
                            updatedAt:
                              type: string
                              format: date
                              description: The date and time the plan was last updated
                              example: '2021-01-01T00:00:00.000Z'
                            basePlanPriceId:
                              type: string
                              nullable: true
                              minLength: 1
                              description: The ID of the monthly base plan price
                              example: atlas-internal-price-id-123
                            basePlanPriceQuarterlyId:
                              type: string
                              nullable: true
                              minLength: 1
                              description: The ID of the quarterly base plan price
                              example: atlas-internal-price-id-123
                            basePlanPriceAnnuallyId:
                              type: string
                              nullable: true
                              minLength: 1
                              description: The ID of the annual base plan price
                              example: atlas-internal-price-id-123
                            basePlanPriceMonthlyStatus:
                              type: string
                              nullable: true
                              enum:
                                - active
                                - archived
                              description: The status of the monthly base plan price
                              example: active
                            basePlanPriceQuarterlyStatus:
                              type: string
                              nullable: true
                              enum:
                                - active
                                - archived
                              description: The status of the quarterly base plan price
                              example: active
                            basePlanPriceAnnuallyStatus:
                              type: string
                              nullable: true
                              enum:
                                - active
                                - archived
                              description: The status of the annual base plan price
                              example: active
                            merchantId:
                              type: string
                              minLength: 1
                              description: The Atlas merchant ID
                              example: atlas-internal-merchant-id-123
                            basePlanPrice:
                              type: object
                              nullable: true
                              properties:
                                billingCadence:
                                  type: string
                                  enum:
                                    - oneTime
                                    - monthly
                                    - quarterly
                                    - annually
                                  description: The billing cadence for this price
                                  example: monthly
                                billingMode:
                                  type: string
                                  enum:
                                    - advance
                                    - arrears
                                    - realTime
                                  description: The billing mode for this price
                                  example: advance
                                blockOverage:
                                  type: boolean
                                  default: false
                                  description: >-
                                    Whether to block overage for this price;
                                    applies only to real-time credit-based
                                    features
                                  example: false
                                createdAt:
                                  type: string
                                  format: date
                                  description: The date and time the price was created
                                  example: '2021-01-01T00:00:00.000Z'
                                entityType:
                                  type: string
                                  enum:
                                    - entitlement
                                    - metric
                                  description: The entity type for this price
                                  example: entitlement
                                id:
                                  type: string
                                  minLength: 1
                                  description: The Atlas price ID
                                  example: atlas-internal-price-id-123
                                limit:
                                  type: integer
                                  nullable: true
                                  minimum: 0
                                  description: >-
                                    The limit for this price; applies only to
                                    limit-based features
                                  example: 100
                                maxUsage:
                                  type: integer
                                  nullable: true
                                  minimum: 0
                                  description: >-
                                    The maximum usage for this price; applies
                                    only to usage-based features
                                  example: 1000
                                name:
                                  type: string
                                  minLength: 1
                                  description: >-
                                    The name of the price. Inherited from the
                                    feature that this price is for.
                                  example: Pro Price
                                priceType:
                                  type: string
                                  enum:
                                    - bulk
                                    - matrix
                                    - none
                                    - package
                                    - tier
                                    - unit
                                    - fixed
                                  description: The price type for this price
                                  example: unit
                                rules:
                                  type: object
                                  properties: {}
                                  additionalProperties:
                                    nullable: true
                                  description: The pricing rules for this price
                                  example:
                                    quantity: 1
                                    price: 10
                                status:
                                  type: string
                                  enum:
                                    - active
                                    - deleted
                                  description: The status of the price
                                  example: active
                                usesCustomPricingUnit:
                                  type: boolean
                                  default: false
                                  description: >-
                                    Whether this price uses a custom pricing
                                    unit
                                  example: false
                                billableId:
                                  type: string
                                  minLength: 1
                                  description: The Atlas billable ID
                                  example: atlas-internal-billable-id-123
                                customPricingUnitId:
                                  type: string
                                  nullable: true
                                  minLength: 1
                                  description: The Atlas custom pricing unit ID
                                  example: atlas-internal-custom-pricing-unit-id-123
                                merchantId:
                                  type: string
                                  minLength: 1
                                  description: The Atlas merchant ID
                                  example: atlas-internal-merchant-id-123
                              required:
                                - billingCadence
                                - billingMode
                                - blockOverage
                                - createdAt
                                - entityType
                                - id
                                - name
                                - priceType
                                - rules
                                - status
                                - usesCustomPricingUnit
                                - billableId
                                - merchantId
                          required:
                            - createdAt
                            - crossEnvironmentId
                            - currency
                            - description
                            - id
                            - isPrivate
                            - name
                            - netTerms
                            - purchasable
                            - requestPricingText
                            - requestPricingUrl
                            - status
                            - updatedAt
                            - merchantId
                      required:
                        - createdAt
                        - id
                        - startDate
                        - status
                        - updatedAt
                        - allowCustomerChanges
                        - autoChargeInvoice
                        - autoSyncInvoice
                        - autoSendInvoice
                        - paymentGateway
                        - isTrial
                        - customerId
                        - planId
                        - merchantId
                        - plan
                    description: The subscriptions associated with the customer
                  activeSubscriptions:
                    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
                        plan:
                          type: object
                          properties:
                            createdAt:
                              type: string
                              format: date
                              description: The date and time the plan was created
                              example: '2021-01-01T00:00:00.000Z'
                            crossEnvironmentId:
                              type: string
                              minLength: 1
                              description: The cross environment ID of the plan
                              example: plan-cross-env-id-123
                            currency:
                              type: string
                              enum:
                                - USD
                              description: The currency for this plan
                              example: USD
                            description:
                              type: string
                              minLength: 1
                              description: The description of the plan
                              example: A great plan for your needs
                            externalId:
                              type: string
                              nullable: true
                              minLength: 1
                              description: >-
                                The external ID of the plan (e.g. the plan ID in
                                your system)
                              example: external-plan-id-123
                            id:
                              type: string
                              minLength: 1
                              description: The Atlas plan ID
                              example: atlas-internal-plan-id-123
                            isPrivate:
                              type: boolean
                              description: Whether the plan is private
                              example: false
                            name:
                              type: string
                              minLength: 1
                              description: The name of the plan
                              example: Pro
                            netTerms:
                              type: string
                              enum:
                                - uponReceipt
                                - net30
                                - net60
                                - net90
                              description: The net terms for this plan
                              example: net30
                            purchasable:
                              type: boolean
                              description: Whether the plan is purchasable
                              example: true
                            requestPricingText:
                              type: string
                              minLength: 0
                              default: Request pricing
                              description: >-
                                The text to display when requesting pricing for
                                non-purchasable plans
                              example: Contact us for pricing
                            requestPricingUrl:
                              type: string
                              minLength: 0
                              description: >-
                                The URL to redirect to when requesting pricing
                                for non-purchasable plans
                              example: https://example.com/request-pricing
                            status:
                              type: string
                              enum:
                                - available
                                - draft
                                - archived
                                - deleted
                              description: The status of the plan
                              example: available
                            updatedAt:
                              type: string
                              format: date
                              description: The date and time the plan was last updated
                              example: '2021-01-01T00:00:00.000Z'
                            basePlanPriceId:
                              type: string
                              nullable: true
                              minLength: 1
                              description: The ID of the monthly base plan price
                              example: atlas-internal-price-id-123
                            basePlanPriceQuarterlyId:
                              type: string
                              nullable: true
                              minLength: 1
                              description: The ID of the quarterly base plan price
                              example: atlas-internal-price-id-123
                            basePlanPriceAnnuallyId:
                              type: string
                              nullable: true
                              minLength: 1
                              description: The ID of the annual base plan price
                              example: atlas-internal-price-id-123
                            basePlanPriceMonthlyStatus:
                              type: string
                              nullable: true
                              enum:
                                - active
                                - archived
                              description: The status of the monthly base plan price
                              example: active
                            basePlanPriceQuarterlyStatus:
                              type: string
                              nullable: true
                              enum:
                                - active
                                - archived
                              description: The status of the quarterly base plan price
                              example: active
                            basePlanPriceAnnuallyStatus:
                              type: string
                              nullable: true
                              enum:
                                - active
                                - archived
                              description: The status of the annual base plan price
                              example: active
                            merchantId:
                              type: string
                              minLength: 1
                              description: The Atlas merchant ID
                              example: atlas-internal-merchant-id-123
                            basePlanPrice:
                              type: object
                              nullable: true
                              properties:
                                billingCadence:
                                  type: string
                                  enum:
                                    - oneTime
                                    - monthly
                                    - quarterly
                                    - annually
                                  description: The billing cadence for this price
                                  example: monthly
                                billingMode:
                                  type: string
                                  enum:
                                    - advance
                                    - arrears
                                    - realTime
                                  description: The billing mode for this price
                                  example: advance
                                blockOverage:
                                  type: boolean
                                  default: false
                                  description: >-
                                    Whether to block overage for this price;
                                    applies only to real-time credit-based
                                    features
                                  example: false
                                createdAt:
                                  type: string
                                  format: date
                                  description: The date and time the price was created
                                  example: '2021-01-01T00:00:00.000Z'
                                entityType:
                                  type: string
                                  enum:
                                    - entitlement
                                    - metric
                                  description: The entity type for this price
                                  example: entitlement
                                id:
                                  type: string
                                  minLength: 1
                                  description: The Atlas price ID
                                  example: atlas-internal-price-id-123
                                limit:
                                  type: integer
                                  nullable: true
                                  minimum: 0
                                  description: >-
                                    The limit for this price; applies only to
                                    limit-based features
                                  example: 100
                                maxUsage:
                                  type: integer
                                  nullable: true
                                  minimum: 0
                                  description: >-
                                    The maximum usage for this price; applies
                                    only to usage-based features
                                  example: 1000
                                name:
                                  type: string
                                  minLength: 1
                                  description: >-
                                    The name of the price. Inherited from the
                                    feature that this price is for.
                                  example: Pro Price
                                priceType:
                                  type: string
                                  enum:
                                    - bulk
                                    - matrix
                                    - none
                                    - package
                                    - tier
                                    - unit
                                    - fixed
                                  description: The price type for this price
                                  example: unit
                                rules:
                                  type: object
                                  properties: {}
                                  additionalProperties:
                                    nullable: true
                                  description: The pricing rules for this price
                                  example:
                                    quantity: 1
                                    price: 10
                                status:
                                  type: string
                                  enum:
                                    - active
                                    - deleted
                                  description: The status of the price
                                  example: active
                                usesCustomPricingUnit:
                                  type: boolean
                                  default: false
                                  description: >-
                                    Whether this price uses a custom pricing
                                    unit
                                  example: false
                                billableId:
                                  type: string
                                  minLength: 1
                                  description: The Atlas billable ID
                                  example: atlas-internal-billable-id-123
                                customPricingUnitId:
                                  type: string
                                  nullable: true
                                  minLength: 1
                                  description: The Atlas custom pricing unit ID
                                  example: atlas-internal-custom-pricing-unit-id-123
                                merchantId:
                                  type: string
                                  minLength: 1
                                  description: The Atlas merchant ID
                                  example: atlas-internal-merchant-id-123
                              required:
                                - billingCadence
                                - billingMode
                                - blockOverage
                                - createdAt
                                - entityType
                                - id
                                - name
                                - priceType
                                - rules
                                - status
                                - usesCustomPricingUnit
                                - billableId
                                - merchantId
                          required:
                            - createdAt
                            - crossEnvironmentId
                            - currency
                            - description
                            - id
                            - isPrivate
                            - name
                            - netTerms
                            - purchasable
                            - requestPricingText
                            - requestPricingUrl
                            - status
                            - updatedAt
                            - merchantId
                      required:
                        - createdAt
                        - id
                        - startDate
                        - status
                        - updatedAt
                        - allowCustomerChanges
                        - autoChargeInvoice
                        - autoSyncInvoice
                        - autoSendInvoice
                        - paymentGateway
                        - isTrial
                        - customerId
                        - planId
                        - merchantId
                        - plan
                    description: The active subscriptions associated with the customer
                  upcomingSubscriptions:
                    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
                        plan:
                          type: object
                          properties:
                            createdAt:
                              type: string
                              format: date
                              description: The date and time the plan was created
                              example: '2021-01-01T00:00:00.000Z'
                            crossEnvironmentId:
                              type: string
                              minLength: 1
                              description: The cross environment ID of the plan
                              example: plan-cross-env-id-123
                            currency:
                              type: string
                              enum:
                                - USD
                              description: The currency for this plan
                              example: USD
                            description:
                              type: string
                              minLength: 1
                              description: The description of the plan
                              example: A great plan for your needs
                            externalId:
                              type: string
                              nullable: true
                              minLength: 1
                              description: >-
                                The external ID of the plan (e.g. the plan ID in
                                your system)
                              example: external-plan-id-123
                            id:
                              type: string
                              minLength: 1
                              description: The Atlas plan ID
                              example: atlas-internal-plan-id-123
                            isPrivate:
                              type: boolean
                              description: Whether the plan is private
                              example: false
                            name:
                              type: string
                              minLength: 1
                              description: The name of the plan
                              example: Pro
                            netTerms:
                              type: string
                              enum:
                                - uponReceipt
                                - net30
                                - net60
                                - net90
                              description: The net terms for this plan
                              example: net30
                            purchasable:
                              type: boolean
                              description: Whether the plan is purchasable
                              example: true
                            requestPricingText:
                              type: string
                              minLength: 0
                              default: Request pricing
                              description: >-
                                The text to display when requesting pricing for
                                non-purchasable plans
                              example: Contact us for pricing
                            requestPricingUrl:
                              type: string
                              minLength: 0
                              description: >-
                                The URL to redirect to when requesting pricing
                                for non-purchasable plans
                              example: https://example.com/request-pricing
                            status:
                              type: string
                              enum:
                                - available
                                - draft
                                - archived
                                - deleted
                              description: The status of the plan
                              example: available
                            updatedAt:
                              type: string
                              format: date
                              description: The date and time the plan was last updated
                              example: '2021-01-01T00:00:00.000Z'
                            basePlanPriceId:
                              type: string
                              nullable: true
                              minLength: 1
                              description: The ID of the monthly base plan price
                              example: atlas-internal-price-id-123
                            basePlanPriceQuarterlyId:
                              type: string
                              nullable: true
                              minLength: 1
                              description: The ID of the quarterly base plan price
                              example: atlas-internal-price-id-123
                            basePlanPriceAnnuallyId:
                              type: string
                              nullable: true
                              minLength: 1
                              description: The ID of the annual base plan price
                              example: atlas-internal-price-id-123
                            basePlanPriceMonthlyStatus:
                              type: string
                              nullable: true
                              enum:
                                - active
                                - archived
                              description: The status of the monthly base plan price
                              example: active
                            basePlanPriceQuarterlyStatus:
                              type: string
                              nullable: true
                              enum:
                                - active
                                - archived
                              description: The status of the quarterly base plan price
                              example: active
                            basePlanPriceAnnuallyStatus:
                              type: string
                              nullable: true
                              enum:
                                - active
                                - archived
                              description: The status of the annual base plan price
                              example: active
                            merchantId:
                              type: string
                              minLength: 1
                              description: The Atlas merchant ID
                              example: atlas-internal-merchant-id-123
                            basePlanPrice:
                              type: object
                              nullable: true
                              properties:
                                billingCadence:
                                  type: string
                                  enum:
                                    - oneTime
                                    - monthly
                                    - quarterly
                                    - annually
                                  description: The billing cadence for this price
                                  example: monthly
                                billingMode:
                                  type: string
                                  enum:
                                    - advance
                                    - arrears
                                    - realTime
                                  description: The billing mode for this price
                                  example: advance
                                blockOverage:
                                  type: boolean
                                  default: false
                                  description: >-
                                    Whether to block overage for this price;
                                    applies only to real-time credit-based
                                    features
                                  example: false
                                createdAt:
                                  type: string
                                  format: date
                                  description: The date and time the price was created
                                  example: '2021-01-01T00:00:00.000Z'
                                entityType:
                                  type: string
                                  enum:
                                    - entitlement
                                    - metric
                                  description: The entity type for this price
                                  example: entitlement
                                id:
                                  type: string
                                  minLength: 1
                                  description: The Atlas price ID
                                  example: atlas-internal-price-id-123
                                limit:
                                  type: integer
                                  nullable: true
                                  minimum: 0
                                  description: >-
                                    The limit for this price; applies only to
                                    limit-based features
                                  example: 100
                                maxUsage:
                                  type: integer
                                  nullable: true
                                  minimum: 0
                                  description: >-
                                    The maximum usage for this price; applies
                                    only to usage-based features
                                  example: 1000
                                name:
                                  type: string
                                  minLength: 1
                                  description: >-
                                    The name of the price. Inherited from the
                                    feature that this price is for.
                                  example: Pro Price
                                priceType:
                                  type: string
                                  enum:
                                    - bulk
                                    - matrix
                                    - none
                                    - package
                                    - tier
                                    - unit
                                    - fixed
                                  description: The price type for this price
                                  example: unit
                                rules:
                                  type: object
                                  properties: {}
                                  additionalProperties:
                                    nullable: true
                                  description: The pricing rules for this price
                                  example:
                                    quantity: 1
                                    price: 10
                                status:
                                  type: string
                                  enum:
                                    - active
                                    - deleted
                                  description: The status of the price
                                  example: active
                                usesCustomPricingUnit:
                                  type: boolean
                                  default: false
                                  description: >-
                                    Whether this price uses a custom pricing
                                    unit
                                  example: false
                                billableId:
                                  type: string
                                  minLength: 1
                                  description: The Atlas billable ID
                                  example: atlas-internal-billable-id-123
                                customPricingUnitId:
                                  type: string
                                  nullable: true
                                  minLength: 1
                                  description: The Atlas custom pricing unit ID
                                  example: atlas-internal-custom-pricing-unit-id-123
                                merchantId:
                                  type: string
                                  minLength: 1
                                  description: The Atlas merchant ID
                                  example: atlas-internal-merchant-id-123
                              required:
                                - billingCadence
                                - billingMode
                                - blockOverage
                                - createdAt
                                - entityType
                                - id
                                - name
                                - priceType
                                - rules
                                - status
                                - usesCustomPricingUnit
                                - billableId
                                - merchantId
                          required:
                            - createdAt
                            - crossEnvironmentId
                            - currency
                            - description
                            - id
                            - isPrivate
                            - name
                            - netTerms
                            - purchasable
                            - requestPricingText
                            - requestPricingUrl
                            - status
                            - updatedAt
                            - merchantId
                      required:
                        - createdAt
                        - id
                        - startDate
                        - status
                        - updatedAt
                        - allowCustomerChanges
                        - autoChargeInvoice
                        - autoSyncInvoice
                        - autoSendInvoice
                        - paymentGateway
                        - isTrial
                        - customerId
                        - planId
                        - merchantId
                        - plan
                    description: The upcoming subscriptions associated with the customer
                  conditionalBillableAccess:
                    type: array
                    items:
                      type: object
                      properties:
                        access:
                          type: boolean
                          description: Whether the customer has access to the billable
                          example: true
                        createdAt:
                          type: string
                          format: date
                          description: >-
                            The date and time the conditional billable access
                            was created
                          example: '2021-01-01T00:00:00.000Z'
                        currentUsage:
                          type: number
                          nullable: true
                          minimum: 0
                          description: >-
                            The current usage for this conditional billable
                            access
                          example: 50
                        endDate:
                          type: string
                          format: date
                          description: The end date of the conditional billable access
                          example: '2021-12-31T00:00:00.000Z'
                        id:
                          type: string
                          minLength: 1
                          description: The Atlas conditional billable access ID
                          example: atlas-internal-conditional-billable-access-id-123
                        invalidated:
                          type: boolean
                          description: >-
                            Whether the conditional billable access has been
                            invalidated
                          example: false
                        startDate:
                          type: string
                          format: date
                          description: The start date of the conditional billable access
                          example: '2021-01-01T00:00:00.000Z'
                        updatedAt:
                          type: string
                          format: date
                          description: >-
                            The date and time the conditional billable access
                            was last updated
                          example: '2021-01-01T00:00:00.000Z'
                        billableId:
                          type: string
                          minLength: 1
                          description: The Atlas billable ID
                          example: atlas-internal-billable-id-123
                        customerId:
                          type: string
                          minLength: 1
                          description: The Atlas customer ID
                          example: atlas-internal-customer-id-123
                        merchantId:
                          type: string
                          minLength: 1
                          description: The Atlas merchant ID
                          example: atlas-internal-merchant-id-123
                        subscriptionId:
                          type: string
                          minLength: 1
                          description: The Atlas subscription ID
                          example: atlas-internal-subscription-id-123
                      required:
                        - access
                        - createdAt
                        - endDate
                        - id
                        - invalidated
                        - startDate
                        - updatedAt
                        - billableId
                        - customerId
                        - merchantId
                        - subscriptionId
                    description: >-
                      The conditional billable access associated with the
                      customer
                  customPricingUnits:
                    type: array
                    items:
                      type: object
                      properties:
                        customPricingUnitId:
                          type: string
                          description: The ID of the custom pricing unit
                          example: atlas-internal-custom-pricing-unit-id-123
                        balance:
                          type: number
                          description: The balance of the custom pricing unit
                          example: 100
                      required:
                        - customPricingUnitId
                        - balance
                    description: The custom pricing units associated with the customer
                  customerPrivatePlans:
                    type: array
                    items:
                      type: object
                      properties:
                        planId:
                          type: string
                          description: The ID of the private plan
                          example: atlas-internal-plan-id-123
                      required:
                        - planId
                    description: The private plans associated with the customer
                  isEligibleForTrial:
                    type: boolean
                    description: >-
                      Whether the customer is eligible for a trial subscription.
                      Only returns true if the customer has no previous or
                      current paid or trial subscriptions.
                    example: true
                required:
                  - createdAt
                  - id
                  - updatedAt
                  - merchantId
                  - subscriptions
                  - activeSubscriptions
                  - upcomingSubscriptions
                  - conditionalBillableAccess
                  - customPricingUnits
                  - customerPrivatePlans
                  - isEligibleForTrial
        '400':
          description: >-
            There is an issue with the request data. See the response for more
            details.
        '401':
          description: Invalid API key provided.
        '409':
          description: A customer with this external ID already exists.
      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`

````