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

# List all Billing Schedules

> List all Billing Schedules.



## OpenAPI

````yaml billing.2024-07-30.product.live GET /billing-schedules
openapi: 3.0.0
info:
  title: Billing
  description: Manage Billing
  version: '0.1'
servers:
  - url: https://dev.seqhq.io/api
    description: DEV
  - url: https://sandbox.sequencehq.com/api
    description: SANDBOX
  - url: https://eu.sequencehq.com/api
    description: PRODUCTION
security: []
tags: []
paths:
  /billing-schedules:
    servers: []
    parameters: []
    get:
      tags:
        - Billing Schedules
      summary: List all Billing Schedules
      description: List all Billing Schedules.
      operationId: getBillingSchedules
      parameters:
        - name: Authorization
          in: header
          description: >-
            Your [API credentials](/reference/authentication). Eg. `Basic
            {credentials}`.
          required: true
          schema:
            type: string
        - name: customerId
          in: query
          description: Filter by customer ID.
          required: false
          schema:
            type: string
        - name: billingScheduleStatus
          in: query
          description: Filter by status.
          required: false
          schema:
            type: string
        - name: autoSendInvoices
          in: query
          description: Filter by auto send invoices.
          required: false
          schema:
            type: string
        - name: label
          in: query
          description: Filter by label.
          required: false
          schema:
            type: string
        - name: includeArchivedSchedules
          in: query
          description: Include archived schedules.
          required: false
          schema:
            type: string
        - name: startingBefore
          in: query
          description: 'Filter by schedule starting before. Format: yyyy-MM-dd'
          required: false
          schema:
            type: string
        - name: startingAfter
          in: query
          description: 'Filter by schedule starting after. Format: yyyy-MM-dd'
          required: false
          schema:
            type: string
        - name: endingBefore
          in: query
          description: 'Filter by schedule ending before. Format: yyyy-MM-dd'
          required: false
          schema:
            type: string
        - name: endingAfter
          in: query
          description: 'Filter by schedule ending after. Format: yyyy-MM-dd'
          required: false
          schema:
            type: string
        - name: includeOpenEndedSchedules
          in: query
          description: Include open-ended schedules.
          required: false
          schema:
            type: string
        - name: sortBy
          in: query
          description: >-
            Sort column. Default: creation time. Use customFields.<key> to sort
            by a custom field value.
          required: false
          schema:
            type: string
        - name: before
          in: query
          description: >-
            Pagination cursor. To page through items, omit this parameter to
            retrieve the first page, and then successively use the value you get
            from `pagination.after` or `pagination.before` to retrieve each
            page.
          required: false
          schema:
            type: string
        - name: after
          in: query
          description: >-
            Pagination cursor. To page through items, omit this parameter to
            retrieve the first page, and then successively use the value you get
            from `pagination.after` or `pagination.before` to retrieve each
            page.
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: >-
            Maximum number of objects to return per-page. Must be between 1 and
            100 (inclusive).
          required: false
          schema:
            type: integer
        - name: sortOrder
          in: query
          description: >-
            Sort order. Default: DESC (descending, most often used for reverse
            chronological sorting).
          required: false
          schema:
            type: string
        - name: Sequence-Version
          in: header
          description: Use this header to select an API version
          required: false
          schema:
            type: string
            enum:
              - '2024-07-30'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListBillingSchedulesResponse'
                example:
                  items:
                    - id: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                      customerId: cca32597-b6b0-4499-9669-128aef8702e4
                      status: ACTIVE
                      startDate: '2022-01-01'
                      endDate: '2022-12-01'
                      taxRates:
                        - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                          taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
                      firstBillingDate: '2022-02-02'
                      autoIssueInvoices: false
                      purchaseOrderNumber: PO123
                      reference: ref
                      label: label
                      recurrenceDayOfMonth: 1
                      prices:
                        - id: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                          productId: f409d651-c475-4142-aafd-a5d2bd74d4f9
                          name: Demo Product
                          currency: GBP
                          structure:
                            pricePerUnit: '0.25'
                            usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
                            isPricePercentage: false
                            pricingType: LINEAR
                          billingFrequency: MONTHLY
                          billingType: IN_ARREARS
                          createdAt: '2022-06-28T16:47:00Z'
                          updatedAt: '2022-06-28T16:47:00Z'
                          integrationIds: []
                          customMetricParameters:
                            - parameterId: 94703530-1293-479b-bd37-ccad42fd9c8b
                              value: '10'
                          listPriceId: b4d7e884-e007-4183-8355-4771865c5100
                          status: ACTIVE
                      createdAt: '2022-06-28T16:47:00Z'
                      updatedAt: '2022-06-28T16:47:00Z'
                      lastInvoiceId: bdbf78a5-b007-4d46-aa7d-d0417a649d64
                      phases:
                        - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                          name: Onboarding
                          createdAt: '2022-06-28T16:47:00Z'
                          billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                          priceIds:
                            - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                          startDate: '2022-01-01'
                          endDate: '2022-06-30'
                          discounts:
                            - id: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
                              restrictToPrices:
                                - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                              type: PERCENTAGE
                              amount: 15
                              message: 15% Discount
                              separateLineItem: true
                              seatDiscountType: ALL_SEATS
                          minimums:
                            - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                              sequenceAccountId: c4602d51-0fb4-4b48-b689-6ba28f540d1e
                              billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                              phaseId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                              amount: 100
                              restrictToPrices:
                                - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                              createdAt: '2022-06-28T16:47:00Z'
                              updatedAt: '2022-06-28T16:47:00Z'
                          recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
                          phasePriceMetadata:
                            - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                              arrCalculation: INCLUDE
                      archivedAt: '2022-06-28T16:47:00Z'
                      rollUpBilling: false
                      integrationIds:
                        - service: Salesforce
                          id: a0CQy00000Ipz5VMAR
                          lastSynced: '2024-08-14T17:14:17Z'
                          url: >-
                            https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view
                          isPending: false
                      attachmentAssets:
                        - id: e007e884-5100-4183-8355-4771865cb4dd
                          createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
                          type: IMAGE
                          format: PNG
                          fileName: my-image.png
                          fileSizeBytes: 12345
                          url: >-
                            https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png
                          createdAt: '2022-06-28T16:47:00Z'
                      contractId: 0194d091-f65b-7b98-b75f-a923aa0f5b1a
                      defaultDueDateDays: 30
                      memo: Example Billing Schedule
                      customFields:
                        key: value
                  pagination:
                    after: MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3
                    before: MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz
                    totalResultSize: 10
              examples:
                ListBillingSchedulesResponse:
                  summary: ''
                  value:
                    items:
                      - id: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                        customerId: cca32597-b6b0-4499-9669-128aef8702e4
                        status: ACTIVE
                        startDate: '2022-01-01'
                        endDate: '2022-12-01'
                        taxRates:
                          - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                            taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
                        firstBillingDate: '2022-02-02'
                        autoIssueInvoices: false
                        purchaseOrderNumber: PO123
                        reference: ref
                        label: label
                        recurrenceDayOfMonth: 1
                        prices:
                          - id: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                            productId: f409d651-c475-4142-aafd-a5d2bd74d4f9
                            name: Demo Product
                            currency: GBP
                            structure:
                              pricePerUnit: '0.25'
                              usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
                              isPricePercentage: false
                              pricingType: LINEAR
                            billingFrequency: MONTHLY
                            billingType: IN_ARREARS
                            createdAt: '2022-06-28T16:47:00Z'
                            updatedAt: '2022-06-28T16:47:00Z'
                            integrationIds: []
                            customMetricParameters:
                              - parameterId: 94703530-1293-479b-bd37-ccad42fd9c8b
                                value: '10'
                            listPriceId: b4d7e884-e007-4183-8355-4771865c5100
                            status: ACTIVE
                        createdAt: '2022-06-28T16:47:00Z'
                        updatedAt: '2022-06-28T16:47:00Z'
                        lastInvoiceId: bdbf78a5-b007-4d46-aa7d-d0417a649d64
                        phases:
                          - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                            name: Onboarding
                            createdAt: '2022-06-28T16:47:00Z'
                            billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                            priceIds:
                              - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                            startDate: '2022-01-01'
                            endDate: '2022-06-30'
                            discounts:
                              - id: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
                                restrictToPrices:
                                  - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                                type: PERCENTAGE
                                amount: 15
                                message: 15% Discount
                                separateLineItem: true
                                seatDiscountType: ALL_SEATS
                            minimums:
                              - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                                sequenceAccountId: c4602d51-0fb4-4b48-b689-6ba28f540d1e
                                billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                                phaseId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                                amount: 100
                                restrictToPrices:
                                  - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                                createdAt: '2022-06-28T16:47:00Z'
                                updatedAt: '2022-06-28T16:47:00Z'
                            recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
                            phasePriceMetadata:
                              - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                                arrCalculation: INCLUDE
                        archivedAt: '2022-06-28T16:47:00Z'
                        rollUpBilling: false
                        integrationIds:
                          - service: Salesforce
                            id: a0CQy00000Ipz5VMAR
                            lastSynced: '2024-08-14T17:14:17Z'
                            url: >-
                              https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view
                            isPending: false
                        attachmentAssets:
                          - id: e007e884-5100-4183-8355-4771865cb4dd
                            createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
                            type: IMAGE
                            format: PNG
                            fileName: my-image.png
                            fileSizeBytes: 12345
                            url: >-
                              https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png
                            createdAt: '2022-06-28T16:47:00Z'
                        contractId: 0194d091-f65b-7b98-b75f-a923aa0f5b1a
                        defaultDueDateDays: 30
                        memo: Example Billing Schedule
                        customFields:
                          key: value
                    pagination:
                      after: MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3
                      before: MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz
                      totalResultSize: 10
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '500':
          description: Internal Server Error
          content: {}
components:
  schemas:
    ListBillingSchedulesResponse:
      required:
        - items
        - pagination
      type: object
      example:
        items:
          - id: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
            customerId: cca32597-b6b0-4499-9669-128aef8702e4
            status: ACTIVE
            startDate: '2022-01-01'
            endDate: '2022-12-01'
            taxRates:
              - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
            firstBillingDate: '2022-02-02'
            autoIssueInvoices: false
            purchaseOrderNumber: PO123
            reference: ref
            label: label
            recurrenceDayOfMonth: 1
            prices:
              - id: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                productId: f409d651-c475-4142-aafd-a5d2bd74d4f9
                name: Demo Product
                currency: GBP
                structure:
                  pricePerUnit: '0.25'
                  usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
                  isPricePercentage: false
                  pricingType: LINEAR
                billingFrequency: MONTHLY
                billingType: IN_ARREARS
                createdAt: '2022-06-28T16:47:00Z'
                updatedAt: '2022-06-28T16:47:00Z'
                integrationIds: []
                customMetricParameters:
                  - parameterId: 94703530-1293-479b-bd37-ccad42fd9c8b
                    value: '10'
                listPriceId: b4d7e884-e007-4183-8355-4771865c5100
                status: ACTIVE
            createdAt: '2022-06-28T16:47:00Z'
            updatedAt: '2022-06-28T16:47:00Z'
            lastInvoiceId: bdbf78a5-b007-4d46-aa7d-d0417a649d64
            phases:
              - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                name: Onboarding
                createdAt: '2022-06-28T16:47:00Z'
                billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                priceIds:
                  - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                startDate: '2022-01-01'
                endDate: '2022-06-30'
                discounts:
                  - id: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
                    restrictToPrices:
                      - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                    type: PERCENTAGE
                    amount: 15
                    message: 15% Discount
                    separateLineItem: true
                    seatDiscountType: ALL_SEATS
                minimums:
                  - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                    sequenceAccountId: c4602d51-0fb4-4b48-b689-6ba28f540d1e
                    billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                    phaseId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                    amount: 100
                    restrictToPrices:
                      - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                    createdAt: '2022-06-28T16:47:00Z'
                    updatedAt: '2022-06-28T16:47:00Z'
                recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
                phasePriceMetadata:
                  - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                    arrCalculation: INCLUDE
            archivedAt: '2022-06-28T16:47:00Z'
            rollUpBilling: false
            integrationIds:
              - service: Salesforce
                id: a0CQy00000Ipz5VMAR
                lastSynced: '2024-08-14T17:14:17Z'
                url: >-
                  https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view
                isPending: false
            attachmentAssets:
              - id: e007e884-5100-4183-8355-4771865cb4dd
                createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
                type: IMAGE
                format: PNG
                fileName: my-image.png
                fileSizeBytes: 12345
                url: >-
                  https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png
                createdAt: '2022-06-28T16:47:00Z'
            contractId: 0194d091-f65b-7b98-b75f-a923aa0f5b1a
            defaultDueDateDays: 30
            memo: Example Billing Schedule
            customFields:
              key: value
        pagination:
          after: MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3
          before: MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz
          totalResultSize: 10
      properties:
        items:
          type: array
          description: Billing Schedules
          example:
            - id: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
              customerId: cca32597-b6b0-4499-9669-128aef8702e4
              status: ACTIVE
              startDate: '2022-01-01'
              endDate: '2022-12-01'
              taxRates:
                - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                  taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
              firstBillingDate: '2022-02-02'
              autoIssueInvoices: false
              purchaseOrderNumber: PO123
              reference: ref
              label: label
              recurrenceDayOfMonth: 1
              prices:
                - id: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                  productId: f409d651-c475-4142-aafd-a5d2bd74d4f9
                  name: Demo Product
                  currency: GBP
                  structure:
                    pricePerUnit: '0.25'
                    usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
                    isPricePercentage: false
                    pricingType: LINEAR
                  billingFrequency: MONTHLY
                  billingType: IN_ARREARS
                  createdAt: '2022-06-28T16:47:00Z'
                  updatedAt: '2022-06-28T16:47:00Z'
                  integrationIds: []
                  customMetricParameters:
                    - parameterId: 94703530-1293-479b-bd37-ccad42fd9c8b
                      value: '10'
                  listPriceId: b4d7e884-e007-4183-8355-4771865c5100
                  status: ACTIVE
              createdAt: '2022-06-28T16:47:00Z'
              updatedAt: '2022-06-28T16:47:00Z'
              lastInvoiceId: bdbf78a5-b007-4d46-aa7d-d0417a649d64
              phases:
                - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                  name: Onboarding
                  createdAt: '2022-06-28T16:47:00Z'
                  billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                  priceIds:
                    - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                  startDate: '2022-01-01'
                  endDate: '2022-06-30'
                  discounts:
                    - id: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
                      restrictToPrices:
                        - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                      type: PERCENTAGE
                      amount: 15
                      message: 15% Discount
                      separateLineItem: true
                      seatDiscountType: ALL_SEATS
                  minimums:
                    - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                      sequenceAccountId: c4602d51-0fb4-4b48-b689-6ba28f540d1e
                      billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                      phaseId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                      amount: 100
                      restrictToPrices:
                        - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                      createdAt: '2022-06-28T16:47:00Z'
                      updatedAt: '2022-06-28T16:47:00Z'
                  recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
                  phasePriceMetadata:
                    - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                      arrCalculation: INCLUDE
              archivedAt: '2022-06-28T16:47:00Z'
              rollUpBilling: false
              integrationIds:
                - service: Salesforce
                  id: a0CQy00000Ipz5VMAR
                  lastSynced: '2024-08-14T17:14:17Z'
                  url: >-
                    https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view
                  isPending: false
              attachmentAssets:
                - id: e007e884-5100-4183-8355-4771865cb4dd
                  createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
                  type: IMAGE
                  format: PNG
                  fileName: my-image.png
                  fileSizeBytes: 12345
                  url: >-
                    https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png
                  createdAt: '2022-06-28T16:47:00Z'
              contractId: 0194d091-f65b-7b98-b75f-a923aa0f5b1a
              defaultDueDateDays: 30
              memo: Example Billing Schedule
              customFields:
                key: value
          items:
            $ref: '#/components/schemas/BillingScheduleResponse'
        pagination:
          $ref: '#/components/schemas/PaginationMeta'
    BillingScheduleResponse:
      required:
        - attachmentAssets
        - autoIssueInvoices
        - createdAt
        - customFields
        - customerId
        - id
        - integrationIds
        - phases
        - prices
        - rollUpBilling
        - startDate
        - status
        - updatedAt
      type: object
      example:
        id: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
        customerId: cca32597-b6b0-4499-9669-128aef8702e4
        status: ACTIVE
        startDate: '2022-01-01'
        endDate: '2022-12-01'
        taxRates:
          - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
            taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
        firstBillingDate: '2022-02-02'
        autoIssueInvoices: false
        purchaseOrderNumber: PO123
        reference: ref
        label: label
        recurrenceDayOfMonth: 1
        prices:
          - id: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
            productId: f409d651-c475-4142-aafd-a5d2bd74d4f9
            name: Demo Product
            currency: GBP
            structure:
              pricePerUnit: '0.25'
              usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
              isPricePercentage: false
              pricingType: LINEAR
            billingFrequency: MONTHLY
            billingType: IN_ARREARS
            createdAt: '2022-06-28T16:47:00Z'
            updatedAt: '2022-06-28T16:47:00Z'
            integrationIds: []
            customMetricParameters:
              - parameterId: 94703530-1293-479b-bd37-ccad42fd9c8b
                value: '10'
            listPriceId: b4d7e884-e007-4183-8355-4771865c5100
            status: ACTIVE
        createdAt: '2022-06-28T16:47:00Z'
        updatedAt: '2022-06-28T16:47:00Z'
        lastInvoiceId: bdbf78a5-b007-4d46-aa7d-d0417a649d64
        phases:
          - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            name: Onboarding
            createdAt: '2022-06-28T16:47:00Z'
            billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
            priceIds:
              - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            startDate: '2022-01-01'
            endDate: '2022-06-30'
            discounts:
              - id: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
                restrictToPrices:
                  - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                type: PERCENTAGE
                amount: 15
                message: 15% Discount
                separateLineItem: true
                seatDiscountType: ALL_SEATS
            minimums:
              - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                sequenceAccountId: c4602d51-0fb4-4b48-b689-6ba28f540d1e
                billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                phaseId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                amount: 100
                restrictToPrices:
                  - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                createdAt: '2022-06-28T16:47:00Z'
                updatedAt: '2022-06-28T16:47:00Z'
            recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
            phasePriceMetadata:
              - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                arrCalculation: INCLUDE
        archivedAt: '2022-06-28T16:47:00Z'
        rollUpBilling: false
        integrationIds:
          - service: Salesforce
            id: a0CQy00000Ipz5VMAR
            lastSynced: '2024-08-14T17:14:17Z'
            url: >-
              https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view
            isPending: false
        attachmentAssets:
          - id: e007e884-5100-4183-8355-4771865cb4dd
            createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
            type: IMAGE
            format: PNG
            fileName: my-image.png
            fileSizeBytes: 12345
            url: >-
              https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png
            createdAt: '2022-06-28T16:47:00Z'
        contractId: 0194d091-f65b-7b98-b75f-a923aa0f5b1a
        defaultDueDateDays: 30
        memo: Example Billing Schedule
        customFields:
          key: value
      properties:
        id:
          type: string
          description: Billing Schedule ID
          example: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
        customerId:
          type: string
          description: Customer ID
          example: cca32597-b6b0-4499-9669-128aef8702e4
        status:
          $ref: >-
            #/components/schemas/GetBillingScheduleEndpointApiBillingScheduleStatus
          description: Billing schedule status
        startDate:
          type: string
          description: Start date
          format: date
          example: '2022-01-01'
        endDate:
          type: string
          description: End date
          format: date
          example: '2022-12-01'
        taxRates:
          type: array
          description: Tax Rate for each Product
          example:
            - priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
              taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
          items:
            $ref: '#/components/schemas/ProductTaxRateRepresentation'
        firstBillingDate:
          type: string
          description: First billing date
          format: date
          example: '2022-02-02'
        autoIssueInvoices:
          type: boolean
          description: >-
            If true, invoices will be automatically sent for this billing
            schedule
          example: false
        purchaseOrderNumber:
          type: string
          description: Optional purchase order number to be added to invoices
          example: PO123
        reference:
          type: string
          description: Optional reference to be added to invoices
          example: ref
        label:
          type: string
          description: Optional label
          example: label
        recurrenceDayOfMonth:
          type: integer
          description: The day of the month on which billing recurs
          format: int32
          example: 1
        prices:
          type: array
          description: Prices
          example:
            - id: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
              productId: f409d651-c475-4142-aafd-a5d2bd74d4f9
              name: Demo Product
              currency: GBP
              structure:
                pricePerUnit: '0.25'
                usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
                isPricePercentage: false
                pricingType: LINEAR
              billingFrequency: MONTHLY
              billingType: IN_ARREARS
              createdAt: '2022-06-28T16:47:00Z'
              updatedAt: '2022-06-28T16:47:00Z'
              integrationIds: []
              customMetricParameters:
                - parameterId: 94703530-1293-479b-bd37-ccad42fd9c8b
                  value: '10'
              listPriceId: b4d7e884-e007-4183-8355-4771865c5100
              status: ACTIVE
          items:
            $ref: '#/components/schemas/PriceResponse'
        createdAt:
          type: string
          description: >-
            Time at which the schedule was initially created, in ISO 8601
            format.
          example: '2022-06-28T16:47:00Z'
        updatedAt:
          type: string
          description: Time at which the schedule was last updated, in ISO 8601 format.
          example: '2022-06-28T16:47:00Z'
        lastInvoiceId:
          type: string
          description: ID of the last invoice (if there has been one)
          example: bdbf78a5-b007-4d46-aa7d-d0417a649d64
        phases:
          type: array
          description: Phases
          example:
            - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              name: Onboarding
              createdAt: '2022-06-28T16:47:00Z'
              billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
              priceIds:
                - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              startDate: '2022-01-01'
              endDate: '2022-06-30'
              discounts:
                - id: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
                  restrictToPrices:
                    - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                  type: PERCENTAGE
                  amount: 15
                  message: 15% Discount
                  separateLineItem: true
                  seatDiscountType: ALL_SEATS
              minimums:
                - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                  sequenceAccountId: c4602d51-0fb4-4b48-b689-6ba28f540d1e
                  billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
                  phaseId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                  amount: 100
                  restrictToPrices:
                    - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                  createdAt: '2022-06-28T16:47:00Z'
                  updatedAt: '2022-06-28T16:47:00Z'
              recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
              phasePriceMetadata:
                - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
                  arrCalculation: INCLUDE
          items:
            $ref: '#/components/schemas/Phase'
        archivedAt:
          type: string
          description: Time at which the schedule was archived, in ISO 8601 format.
          example: '2022-06-28T16:47:00Z'
        rollUpBilling:
          type: boolean
          description: Roll up billing
          example: false
        integrationIds:
          type: array
          description: External services which are linked to this customer
          example:
            - service: Salesforce
              id: a0CQy00000Ipz5VMAR
              lastSynced: '2024-08-14T17:14:17Z'
              url: >-
                https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view
              isPending: false
          items:
            $ref: '#/components/schemas/IntegrationId'
        attachmentAssets:
          type: array
          description: Assets attached to this billing schedule
          example:
            - id: e007e884-5100-4183-8355-4771865cb4dd
              createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
              type: IMAGE
              format: PNG
              fileName: my-image.png
              fileSizeBytes: 12345
              url: >-
                https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png
              createdAt: '2022-06-28T16:47:00Z'
          items:
            $ref: '#/components/schemas/AssetResponse'
        contractId:
          type: string
          description: Optional ID of the contract used to create this billing schedule
          example: 0194d091-f65b-7b98-b75f-a923aa0f5b1a
        defaultDueDateDays:
          type: integer
          description: Default number of days between invoice issue date and due date
          example: 30
        memo:
          type: string
          description: Billing schedule memo
          example: Example Billing Schedule
        customFields:
          type: object
          description: Custom key-value fields for this billing schedule
          additionalProperties:
            type: string
    PaginationMeta:
      type: object
      description: Results pagination
      example:
        after: MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3
        before: MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz
        totalResultSize: 10
      properties:
        after:
          type: string
          description: Cursor for the page after this (if it exists)
          example: MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3
        before:
          type: string
          description: Cursor for the page before this (if it exists)
          example: MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz
        totalResultSize:
          type: integer
          description: Total number of entries across all pages
          format: int64
          example: 10
    GetBillingScheduleEndpointApiBillingScheduleStatus:
      type: string
      example: ACTIVE
      enum:
        - DRAFT
        - PENDING
        - ACTIVE
        - SUSPENDED
        - CANCELLED
        - COMPLETED
    ProductTaxRateRepresentation:
      required:
        - priceId
        - taxRateId
      type: object
      example:
        priceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        taxRateId: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
      properties:
        priceId:
          type: string
          description: ID of the Price
          example: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        taxRateId:
          type: string
          description: ID of the Tax Rate
          example: 50c0d53b-8460-41e6-b4e9-a4e157fc1a64
    PriceResponse:
      required:
        - billingFrequency
        - billingType
        - createdAt
        - currency
        - customMetricParameters
        - id
        - integrationIds
        - name
        - productId
        - status
        - structure
      type: object
      example:
        id: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        productId: d07037d5-3e31-4c3a-a360-e58555e2bf44
        name: Demo Product
        currency: GBP
        structure:
          tiers:
            - upperBound: '200'
              price: '1.00'
              fee: '50.00'
              isPricePercentage: false
            - upperBound: '400'
              price: '0.75'
              fee: '25.00'
              isPricePercentage: false
            - price: '0.50'
              fee: '0.00'
              isPricePercentage: false
          usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
          usageCalculationMode: BILLING_PERIOD
          pricingType: GRADUATED
        billingFrequency: MONTHLY
        billingType: IN_ARREARS
        createdAt: '2022-06-28T16:47:00Z'
        updatedAt: '2022-06-28T16:47:00Z'
        integrationIds:
          - service: Xero
            id: '123'
            isPending: false
        customMetricParameters:
          - parameterId: 94703530-1293-479b-bd37-ccad42fd9c8b
            value: '10'
        listPriceId: b4d7e884-e007-4183-8355-4771865c5100
        usageCalculationPeriod:
          frequency: MONTHLY
          interval: 1
        status: ACTIVE
      properties:
        id:
          type: string
          description: Unique Price ID, generated by Sequence on creation.
          example: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        productId:
          type: string
          description: The ID of the Product that this Price is associated with.
          example: d07037d5-3e31-4c3a-a360-e58555e2bf44
        name:
          type: string
          description: >-
            A short form description of the price, which appears as the title of
            line items on invoices.
          example: Demo Product
        currency:
          $ref: '#/components/schemas/Currency'
          description: >-
            The currency in which this price is denominated. This must be a
            valid ISO 4217 currency code, that is currently part of currencies
            supported by Sequence.
        structure:
          oneOf:
            - $ref: '#/components/schemas/GraduatedPricingStructure'
            - $ref: '#/components/schemas/VolumePricingStructure'
            - $ref: '#/components/schemas/SeatBasedPricingStructure'
            - $ref: '#/components/schemas/PackagePricingStructure'
            - $ref: '#/components/schemas/LinearPricingStructure'
            - $ref: '#/components/schemas/FixedPricingStructure'
            - $ref: '#/components/schemas/OneTimePricingStructure'
        billingFrequency:
          $ref: '#/components/schemas/BillingFrequency'
          description: The frequency with which this price is billed.
        billingType:
          $ref: '#/components/schemas/BillingType'
          description: >-
            Indicate at which point of the billing period to generate the
            invoice for this price. This can be either in-arrears (after the
            period ends), or in-advnace (at the beginning of the period).
        createdAt:
          type: string
          description: Time at which the Price was initially created, in ISO 8601 format.
          example: '2022-06-28T16:47:00Z'
        updatedAt:
          type: string
          description: Time at which the Price was last updated, in ISO 8601 format.
          example: '2022-06-28T16:47:00Z'
        integrationIds:
          type: array
          description: Alternate IDs for this Price in third-party integration systems
          example:
            - service: Xero
              id: '123'
              isPending: false
          items:
            $ref: '#/components/schemas/IntegrationId'
        customMetricParameters:
          type: array
          description: >-
            Specific parameters to influence usage calculation for this Price,
            and are only required when using custom metric. Please speak to your
            Sequence contacts for further information prior to usage.
          example:
            - parameterId: 94703530-1293-479b-bd37-ccad42fd9c8b
              value: '10'
          items:
            $ref: '#/components/schemas/PriceParameter'
        listPriceId:
          type: string
          description: >-
            The list price ID, if this price variant was created from a list
            price
          example: b4d7e884-e007-4183-8355-4771865c5100
        usageCalculationPeriod:
          $ref: '#/components/schemas/UsageCalculationPeriod'
        status:
          $ref: '#/components/schemas/PriceStatus'
          description: >-
            Price status:

            - DRAFT means the price has been extracted from a contract and has
            not yet been approved. It cannot be used while it is in DRAFT.

            - ACTIVE is the default state when a price is created via API or
            dashboard.
    Phase:
      required:
        - billingScheduleId
        - createdAt
        - discounts
        - id
        - minimums
        - phasePriceMetadata
        - priceIds
        - recurrencePreference
        - startDate
      type: object
      example:
        id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        name: Onboarding
        createdAt: '2022-06-28T16:47:00Z'
        billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
        priceIds:
          - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        startDate: '2022-01-01'
        endDate: '2022-06-30'
        discounts:
          - id: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
            restrictToPrices:
              - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            type: PERCENTAGE
            amount: 15
            message: 15% Discount
            separateLineItem: true
            seatDiscountType: ALL_SEATS
        minimums:
          - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            sequenceAccountId: c4602d51-0fb4-4b48-b689-6ba28f540d1e
            billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
            phaseId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            amount: 100
            restrictToPrices:
              - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            createdAt: '2022-06-28T16:47:00Z'
            updatedAt: '2022-06-28T16:47:00Z'
        recurrencePreference: CONTINUE_FROM_PREVIOUS_PHASE
        phasePriceMetadata:
          - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
            arrCalculation: INCLUDE
      properties:
        id:
          type: string
          description: Phase ID
          example: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        name:
          type: string
          description: Name
          example: Onboarding
        createdAt:
          type: string
          description: Created at
          example: '2022-06-28T16:47:00Z'
        billingScheduleId:
          type: string
          description: Billing Schedule ID
          example: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
        priceIds:
          type: array
          description: Price IDs
          example:
            - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
          items:
            type: string
        startDate:
          type: string
          description: Start Date
          format: date
          example: '2022-01-01'
        endDate:
          type: string
          description: End date
          format: date
          example: '2022-06-30'
        discounts:
          type: array
          description: Discounts in Phase
          example:
            - id: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
              restrictToPrices:
                - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              type: PERCENTAGE
              amount: 15
              message: 15% Discount
              separateLineItem: true
              seatDiscountType: ALL_SEATS
          items:
            $ref: '#/components/schemas/EmbeddableDiscount'
        minimums:
          type: array
          example:
            - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              sequenceAccountId: c4602d51-0fb4-4b48-b689-6ba28f540d1e
              billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
              phaseId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              amount: 100
              restrictToPrices:
                - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              createdAt: '2022-06-28T16:47:00Z'
              updatedAt: '2022-06-28T16:47:00Z'
          items:
            $ref: '#/components/schemas/Minimum'
        recurrencePreference:
          $ref: '#/components/schemas/PhaseRecurrencePreference'
        phasePriceMetadata:
          type: array
          description: >-
            Additional metadata for the relationship between this phase and each
            price
          example:
            - priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              arrCalculation: INCLUDE
          items:
            $ref: '#/components/schemas/PhasePriceMetadata'
    IntegrationId:
      required:
        - id
        - isPending
        - service
      type: object
      example:
        service: Xero
        id: '123'
        isPending: false
      properties:
        service:
          $ref: '#/components/schemas/IntegrationService'
        id:
          type: string
          example: '123'
        isPending:
          type: boolean
          example: false
    AssetResponse:
      required:
        - createdAt
        - createdBy
        - fileName
        - fileSizeBytes
        - format
        - id
        - type
        - url
      type: object
      example:
        id: e007e884-5100-4183-8355-4771865cb4dd
        createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
        type: IMAGE
        format: PNG
        fileName: my-image.png
        fileSizeBytes: 12345
        url: >-
          https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png
        createdAt: '2022-06-28T16:47:00Z'
      properties:
        id:
          type: string
          description: Unique ID
          example: e007e884-5100-4183-8355-4771865cb4dd
        createdBy:
          type: string
          description: The Sequence user who created this asset
          example: 94703530-1293-479b-bd37-ccad42fd9c8b
        type:
          $ref: '#/components/schemas/AssetType'
          description: Either image or document
        format:
          $ref: '#/components/schemas/AssetFormat'
          description: >-
            Identifies the intended data format. Allowed formats are: jpg, jpeg,
            png, and pdf
        fileName:
          type: string
          description: Filename of the uploaded file
          example: my-image.png
        fileSizeBytes:
          type: integer
          description: Size of the uploaded file in bytes
          format: int32
          example: 12345
        url:
          type: string
          description: URL to download the asset
          example: >-
            https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png
        createdAt:
          type: string
          description: Creation timestamp. Formatted as an ISO 8601 timestamp.
          example: '2022-06-28T16:47:00Z'
    Currency:
      type: string
      example: GBP
      enum:
        - AED
        - ARS
        - AUD
        - BRL
        - BGN
        - CAD
        - CHF
        - CLP
        - CNY
        - COP
        - CZK
        - DKK
        - EGP
        - EUR
        - GBP
        - HKD
        - ILS
        - INR
        - ISK
        - JPY
        - KRW
        - MXN
        - NOK
        - NZD
        - PLN
        - SAR
        - SEK
        - SGD
        - THB
        - USD
        - UYU
        - ZAR
    GraduatedPricingStructure:
      required:
        - pricingType
        - tiers
        - usageCalculationMode
        - usageMetricId
      type: object
      description: >-
        The pricing structure for this price. This can be a simple fixed price,
        or a more complex structure that varies based on usage.
      example:
        tiers:
          - upperBound: '200'
            price: '1.00'
            fee: '50.00'
            isPricePercentage: false
          - upperBound: '400'
            price: '0.75'
            fee: '25.00'
            isPricePercentage: false
          - price: '0.50'
            fee: '0.00'
            isPricePercentage: false
        usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
        usageCalculationMode: BILLING_PERIOD
        pricingType: GRADUATED
      properties:
        tiers:
          type: array
          description: A list of contiguous pricing tiers
          example:
            - upperBound: '200'
              price: '1.00'
              fee: '50.00'
              isPricePercentage: false
            - upperBound: '400'
              price: '0.75'
              fee: '25.00'
              isPricePercentage: false
            - price: '0.50'
              fee: '0.00'
              isPricePercentage: false
          items:
            $ref: '#/components/schemas/GraduatedUsageTier'
        usageMetricId:
          type: string
          description: The usage metric associated to this pricing structure
          example: 04c62961-04ba-48e6-b985-758bb7d3e712
        usageCalculationMode:
          $ref: '#/components/schemas/UsageCalculationMode'
          description: Indicates the scope of usage calculation
        pricingType:
          $ref: '#/components/schemas/GraduatedPricingType'
          description: The type of pricing
    VolumePricingStructure:
      required:
        - pricingType
        - tiers
        - usageMetricId
      type: object
      description: >-
        The pricing structure for this price. This can be a simple fixed price,
        or a more complex structure that varies based on usage.
      example:
        tiers:
          - upperBound: '100'
            price: '1.00'
            fee: '50.00'
            isPricePercentage: true
            maxPrice: '10'
            minPrice: '5'
          - price: '0.75'
            fee: '25.00'
            isPricePercentage: true
            maxPrice: '10'
            minPrice: '5'
        usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
        pricingType: VOLUME
      properties:
        tiers:
          type: array
          description: A list of contiguous pricing tiers
          example:
            - upperBound: '100'
              price: '1.00'
              fee: '50.00'
              isPricePercentage: true
              maxPrice: '10'
              minPrice: '5'
            - price: '0.75'
              fee: '25.00'
              isPricePercentage: true
              maxPrice: '10'
              minPrice: '5'
          items:
            $ref: '#/components/schemas/VolumeUsageTier'
        usageMetricId:
          type: string
          description: The usage metric associated to this tier
          example: 04c62961-04ba-48e6-b985-758bb7d3e712
        pricingType:
          $ref: '#/components/schemas/VolumePricingType'
          description: The type of pricing
    SeatBasedPricingStructure:
      required:
        - contractedMinimumSeats
        - pricePerSeat
        - pricingType
        - prorationStrategy
        - seatMetricId
        - tiers
      type: object
      description: >-
        The pricing structure for this price. This can be a simple fixed price,
        or a more complex structure that varies based on usage.
      example:
        seatMetricId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        pricePerSeat: '0.25'
        prorationStrategy: USE_MAXIMUM
        contractedMinimumSeats: 10
        overagesBillingFrequency: YEARLY
        tiers:
          - upperBound: '100'
            price: '1.00'
            fee: '50.00'
          - price: '0.75'
            fee: '25.00'
        prorateFlatFees: false
        pricingType: SEAT_BASED
      properties:
        seatMetricId:
          type: string
          description: Seat metric associated to this pricing structure
          example: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        pricePerSeat:
          type: string
          description: Price charged per seat per full billing period
          example: '0.25'
        prorationStrategy:
          $ref: '#/components/schemas/SeatProrationStrategy'
          description: >-
            The proration strategy to use when calculating the price for a seat.
            A `USE_MAXIMUM` will not prorate and charge the highest seat balance
            for the entire billing period, while a PRORATE_INCREMENTS will
            charge incremental seats from the day they're added
        contractedMinimumSeats:
          type: integer
          description: The number of contractually agreed minimum seats
          example: 10
        overagesBillingFrequency:
          $ref: '#/components/schemas/OveragesFrequency'
          description: The frequency with which to charge overages
        tiers:
          type: array
          description: A list of contiguous pricing tiers
          example:
            - upperBound: '100'
              price: '1.00'
              fee: '50.00'
            - price: '0.75'
              fee: '25.00'
          items:
            $ref: '#/components/schemas/SeatUsageTier'
        prorateFlatFees:
          type: boolean
          description: >-
            If set any flat fees will be pro-rated if the invoice service period
            length does not match the billing frequency
          example: false
        pricingType:
          $ref: '#/components/schemas/SeatBasedPricingType'
          description: The type of pricing
    PackagePricingStructure:
      required:
        - packageSize
        - pricePerPackage
        - pricingType
        - usageMetricId
      type: object
      description: >-
        The pricing structure for this price. This can be a simple fixed price,
        or a more complex structure that varies based on usage.
      example:
        packageSize: '50'
        pricePerPackage: '2.00'
        usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
        pricingType: PACKAGE
      properties:
        packageSize:
          type: string
          description: The amount of usage allowed for the price in this structure
          example: '50'
        pricePerPackage:
          type: string
          description: The price charged for each package
          example: '2.00'
        usageMetricId:
          type: string
          description: The usage metric associated to this tier
          example: 04c62961-04ba-48e6-b985-758bb7d3e712
        pricingType:
          $ref: '#/components/schemas/PackagePricingType'
          description: The type of pricing
    LinearPricingStructure:
      required:
        - isPricePercentage
        - pricePerUnit
        - pricingType
        - usageMetricId
      type: object
      description: >-
        The pricing structure for this price. This can be a simple fixed price,
        or a more complex structure that varies based on usage.
      example:
        pricePerUnit: '0.25'
        usageMetricId: 04c62961-04ba-48e6-b985-758bb7d3e712
        isPricePercentage: false
        pricingType: LINEAR
      properties:
        pricePerUnit:
          type: string
          description: >-
            The per unit rate to apply to usage for this product. In the case of
            percentage pricing where `isPricePercentage` is set to `true`, a
            value of 1 represents 100%.
          example: '0.25'
        usageMetricId:
          type: string
          description: Usage metric associated to this pricing structure
          example: 04c62961-04ba-48e6-b985-758bb7d3e712
        isPricePercentage:
          type: boolean
          description: >-
            Indicate whether the price attribute is to be considered as a
            percentage or an absolute value.
          example: false
        pricingType:
          $ref: '#/components/schemas/LinearPricingType'
          description: The type of pricing
    FixedPricingStructure:
      required:
        - price
        - pricingType
      type: object
      description: >-
        The pricing structure for this price. This can be a simple fixed price,
        or a more complex structure that varies based on usage.
      example:
        price: '20.00'
        pricingType: FIXED
      properties:
        price:
          type: string
          description: A fixed amount that is charged once every billing period.
          example: '20.00'
        pricingType:
          $ref: '#/components/schemas/FixedPricingType'
          description: The type of pricing
    OneTimePricingStructure:
      required:
        - price
        - pricingType
      type: object
      description: >-
        The pricing structure for this price. This can be a simple fixed price,
        or a more complex structure that varies based on usage.
      example:
        price: '150.00'
        pricingType: ONE_TIME
      properties:
        price:
          type: string
          description: A fixed amount that is charged once.
          example: '150.00'
        pricingType:
          $ref: '#/components/schemas/OneTimePricingType'
          description: The type of pricing
    BillingFrequency:
      type: string
      example: MONTHLY
      enum:
        - ON_DEMAND
        - ONE_TIME
        - MONTHLY
        - QUARTERLY
        - HALF_YEARLY
        - YEARLY
        - PER_EVENT
    BillingType:
      type: string
      example: IN_ARREARS
      enum:
        - IN_ARREARS
        - IN_ADVANCE
    PriceParameter:
      required:
        - parameterId
        - value
      type: object
      example:
        parameterId: 94703530-1293-479b-bd37-ccad42fd9c8b
        value: '10'
      properties:
        parameterId:
          type: string
          description: Custom metric parameter ID
          example: 94703530-1293-479b-bd37-ccad42fd9c8b
        value:
          type: string
          description: Parameter value
          example: '10'
    UsageCalculationPeriod:
      required:
        - frequency
        - interval
      type: object
      description: The period over which usage is aggregated.
      example:
        frequency: MONTHLY
        interval: 1
      properties:
        frequency:
          $ref: '#/components/schemas/UsageCalculationFrequency'
          description: Frequency determines the time period over which usage is aggregated.
        interval:
          type: integer
          description: >-
            Interval determines the time period over which usage is aggregated.
            For example, if the frequency is MONTHLY and the interval is 3, the
            usage is aggregated over 3 months before starting at 0 again.
          format: int32
          example: 1
    PriceStatus:
      type: string
      example: ACTIVE
      enum:
        - DRAFT
        - ACTIVE
    EmbeddableDiscount:
      required:
        - amount
        - id
        - message
        - separateLineItem
        - type
      type: object
      example:
        id: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
        restrictToPrices:
          - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        type: PERCENTAGE
        amount: 15
        message: 15% Discount
        separateLineItem: true
        seatDiscountType: ALL_SEATS
      properties:
        id:
          type: string
          description: Discount ID
          example: 4451f62c-0c1f-491c-aeb2-9eb41b28149c
        restrictToPrices:
          type: array
          description: Price IDs to which this discount applies
          example:
            - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
          items:
            type: string
        type:
          $ref: '#/components/schemas/DiscountCalculationType'
          description: Whether the discount is a nominal or percentage amount
        amount:
          type: number
          description: The discount amount
          example: 15
        message:
          type: string
          description: The message to show on an invoice
          example: 15% Discount
        separateLineItem:
          type: boolean
          description: If true the discount will show as a separate line item on an invoice
          example: true
        seatDiscountType:
          $ref: '#/components/schemas/SeatDiscountType'
          description: Determines how the discount is applied to any seat-based prices
    Minimum:
      required:
        - amount
        - billingScheduleId
        - createdAt
        - id
        - phaseId
        - restrictToPrices
        - sequenceAccountId
        - updatedAt
      type: object
      example:
        id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        sequenceAccountId: c4602d51-0fb4-4b48-b689-6ba28f540d1e
        billingScheduleId: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
        phaseId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        amount: 100
        restrictToPrices:
          - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        createdAt: '2022-06-28T16:47:00Z'
        updatedAt: '2022-06-28T16:47:00Z'
      properties:
        id:
          type: string
          description: Minimum ID
          example: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        sequenceAccountId:
          type: string
          description: Sequence Account ID
          example: c4602d51-0fb4-4b48-b689-6ba28f540d1e
        billingScheduleId:
          type: string
          description: Billing Schedule ID
          example: b102e007-f5d7-4b1a-8a1d-9a51135ae73b
        phaseId:
          type: string
          description: Phase ID
          example: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        amount:
          type: number
          description: Minimum amount
          example: 100
        restrictToPrices:
          type: array
          description: Price IDs the minimum is restricted to
          example:
            - 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
          items:
            type: string
        createdAt:
          type: string
          description: Created at
          example: '2022-06-28T16:47:00Z'
        updatedAt:
          type: string
          description: Updated at
          example: '2022-06-28T16:47:00Z'
    PhaseRecurrencePreference:
      type: string
      example: CONTINUE_FROM_PREVIOUS_PHASE
      enum:
        - CONTINUE_FROM_PREVIOUS_PHASE
        - RESET
    PhasePriceMetadata:
      required:
        - arrCalculation
        - priceId
      type: object
      example:
        priceId: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        arrCalculation: INCLUDE
      properties:
        priceId:
          type: string
          example: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        arrCalculation:
          $ref: '#/components/schemas/ArrCalculation'
    IntegrationService:
      type: string
      example: Xero
      enum:
        - Amazon_Redshift
        - GoCardless
        - Google_BigQuery
        - Google_Sheets
        - HubSpot
        - NetSuite
        - QuickBooks_Online
        - Salesforce
        - Slack
        - Snowflake
        - Stripe
        - Xero
        - Avalara
        - Anrok
        - Attio
        - Numeral
        - Rillet
        - Sphere
    AssetType:
      type: string
      example: IMAGE
      enum:
        - IMAGE
        - DOCUMENT
        - BINARY
    AssetFormat:
      type: string
      example: PNG
      enum:
        - JPEG
        - JPG
        - PNG
        - PDF
        - CSV
        - TXT
        - RTF
        - MD
        - XLS
        - XLSX
        - XLSM
        - DOC
        - DOCX
        - ZIP
        - ODT
        - ODS
    GraduatedUsageTier:
      required:
        - isPricePercentage
        - price
      type: object
      example:
        upperBound: '200'
        price: '1.00'
        fee: '50.00'
        isPricePercentage: false
      properties:
        upperBound:
          type: string
          description: >-
            The upper bound of usage for this tier. Set to null to if this is a
            final tier and is unbounded. The lower bound is set by the previous
            tier or 0 if it's the first one.
          example: '200'
        price:
          type: string
          description: >-
            The rate to apply to usage for this product in this tier. In the
            case of percentage pricing where `isPricePercentage` is set to
            `true`, a value of 1 represents 100%.
          example: '1.00'
        fee:
          type: string
          description: The nominal fee associated with usage at this tier
          example: '50.00'
        isPricePercentage:
          type: boolean
          description: >-
            Indicate whether the price attribute is to be considered as a
            percentage or an absolute value.
          example: false
    UsageCalculationMode:
      type: string
      example: BILLING_PERIOD
      enum:
        - BILLING_PERIOD
        - CUMULATIVE
        - PERIODIC
    GraduatedPricingType:
      type: string
      example: GRADUATED
      enum:
        - GRADUATED
    VolumeUsageTier:
      required:
        - isPricePercentage
        - price
      type: object
      example:
        upperBound: '100'
        price: '1.00'
        fee: '50.00'
        isPricePercentage: true
        maxPrice: '10'
        minPrice: '5'
      properties:
        upperBound:
          type: string
          description: >-
            The upper bound of usage for this tier. Set to null to if this is a
            final tier and is unbounded. The lower bound is set by the previous
            tier or 0 if it's the first one.
          example: '100'
        price:
          type: string
          description: >-
            The rate to apply to usage for this product in this tier. In the
            case of percentage pricing where `isPricePercentage` is set to
            `true`, a value of 1 represents 100%.
          example: '1.00'
        fee:
          type: string
          description: The nominal fee associated with usage at this tier
          example: '50.00'
        isPricePercentage:
          type: boolean
          description: >-
            Indicate whether the price attribute is to be considered as a
            percentage or an absolute value.
          example: true
        maxPrice:
          type: string
          description: Maximum Price to Charge for each Unit if Price is Percentage Based
          example: '10'
        minPrice:
          type: string
          description: Minimum Price to Charge for each Unit if Price is Percentage Based
          example: '5'
    VolumePricingType:
      type: string
      example: VOLUME
      enum:
        - VOLUME
    SeatProrationStrategy:
      type: string
      example: USE_MAXIMUM
      enum:
        - USE_MAXIMUM
        - PRORATE_INCREMENTS
        - PRORATE_ALL_CHANGES
    OveragesFrequency:
      type: string
      example: YEARLY
      enum:
        - NONE
        - MONTHLY
        - QUARTERLY
        - HALF_YEARLY
        - YEARLY
    SeatUsageTier:
      required:
        - price
      type: object
      example:
        upperBound: '100'
        price: '1.00'
        fee: '50.00'
      properties:
        upperBound:
          type: string
          description: >-
            The upper bound of usage for this tier. Set to null to if this is a
            final tier and is unbounded. The lower bound is set by the previous
            tier or 0 if it's the first one.
          example: '100'
        price:
          type: string
          description: >-
            The rate to apply to usage for this product in this tier. In the
            case of percentage pricing where `isPricePercentage` is set to
            `true`, a value of 1 represents 100%.
          example: '1.00'
        fee:
          type: string
          description: The nominal fee associated with usage at this tier
          example: '50.00'
    SeatBasedPricingType:
      type: string
      example: SEAT_BASED
      enum:
        - SEAT_BASED
    PackagePricingType:
      type: string
      example: PACKAGE
      enum:
        - PACKAGE
    LinearPricingType:
      type: string
      example: LINEAR
      enum:
        - LINEAR
    FixedPricingType:
      type: string
      example: FIXED
      enum:
        - FIXED
    OneTimePricingType:
      type: string
      example: ONE_TIME
      enum:
        - ONE_TIME
    UsageCalculationFrequency:
      type: string
      example: MONTHLY
      enum:
        - MONTHLY
        - QUARTERLY
        - HALF_YEARLY
        - YEARLY
    DiscountCalculationType:
      type: string
      example: PERCENTAGE
      enum:
        - PERCENTAGE
        - NOMINAL
    SeatDiscountType:
      type: string
      example: ALL_SEATS
      enum:
        - INCLUDED_SEATS_ONLY
        - OVERAGE_SEATS_ONLY
        - ALL_SEATS
    ArrCalculation:
      type: string
      example: INCLUDE
      enum:
        - INCLUDE
        - EXCLUDE

````