> ## 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.latest.product.live GET /billing-schedules
openapi: 3.0.0
info:
  title: Billing
  description: Manage Billing
  version: 0.0.1
servers:
  - url: https://dev.seqhq.io
    description: E2E
  - url: https://dev.seqhq.io
    description: DEV
  - url: https://sandbox.sequencehq.com
    description: SANDBOX
  - url: https://eu.sequencehq.com
    description: PRODUCTION
security: []
tags:
  - name: Prices
  - name: Billing Schedules
  - name: Credits
  - name: Discounts
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: recurrenceDayOfMonth
          in: query
          description: >-
            Filter by recurrence day of month (1-31). Comma-separated for
            multiple days.
          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
                      activationStatus: COMPLETED
                      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:
                            - 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
                      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
                          externalContractRef: ACME-2022-MSA
                          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'
                          creditGrants:
                            - id: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
                              name: Monthly usage credits
                              creditUnitType: CURRENCY
                              currency: GBP
                              amount: 100
                              costOfCredit: 0
                              taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                              grantRefreshFrequency: MONTHLY
                              billingFrequency: MONTHLY
                              rolloverMode: NONE
                              restrictToPrices:
                                - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
                              integrationIds:
                                - service: NetSuite
                                  id: '1234'
                                  isPending: false
                          contractReferences:
                            - type: SEQUENCE_QUOTE
                              value: 019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
                              label: Q-1042
                              url: >-
                                https://dashboard.sequencehq.com/quotes/019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
                            - type: NETSUITE
                              value: ACME-2022-MSA
                              label: ACME-2022-MSA
                          integrationIds:
                            - service: NetSuite
                              id: SO-1024
                              lastSynced: '2022-06-28T16:47:00Z'
                              url: >-
                                https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024
                              isPending: false
                          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
                          createdByType: SEQUENCE_USER
                          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
                      paymentProvider: STRIPE
                      autoCharge: true
                      lockedByQuoteId: 0199a1b2-3c4d-7e5f-8a6b-7c8d9e0f1a2b
                  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
                        activationStatus: COMPLETED
                        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:
                              - 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
                        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
                            externalContractRef: ACME-2022-MSA
                            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'
                            creditGrants:
                              - id: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
                                name: Monthly usage credits
                                creditUnitType: CURRENCY
                                currency: GBP
                                amount: 100
                                costOfCredit: 0
                                taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                                grantRefreshFrequency: MONTHLY
                                billingFrequency: MONTHLY
                                rolloverMode: NONE
                                restrictToPrices:
                                  - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
                                integrationIds:
                                  - service: NetSuite
                                    id: '1234'
                                    isPending: false
                            contractReferences:
                              - type: SEQUENCE_QUOTE
                                value: 019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
                                label: Q-1042
                                url: >-
                                  https://dashboard.sequencehq.com/quotes/019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
                              - type: NETSUITE
                                value: ACME-2022-MSA
                                label: ACME-2022-MSA
                            integrationIds:
                              - service: NetSuite
                                id: SO-1024
                                lastSynced: '2022-06-28T16:47:00Z'
                                url: >-
                                  https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024
                                isPending: false
                            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
                            createdByType: SEQUENCE_USER
                            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
                        paymentProvider: STRIPE
                        autoCharge: true
                        lockedByQuoteId: 0199a1b2-3c4d-7e5f-8a6b-7c8d9e0f1a2b
                    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
            activationStatus: COMPLETED
            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:
                  - 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
            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
                externalContractRef: ACME-2022-MSA
                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'
                creditGrants:
                  - id: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
                    name: Monthly usage credits
                    creditUnitType: CURRENCY
                    currency: GBP
                    amount: 100
                    costOfCredit: 0
                    taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                    grantRefreshFrequency: MONTHLY
                    billingFrequency: MONTHLY
                    rolloverMode: NONE
                    restrictToPrices:
                      - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
                    integrationIds:
                      - service: NetSuite
                        id: '1234'
                        isPending: false
                contractReferences:
                  - type: SEQUENCE_QUOTE
                    value: 019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
                    label: Q-1042
                    url: >-
                      https://dashboard.sequencehq.com/quotes/019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
                  - type: NETSUITE
                    value: ACME-2022-MSA
                    label: ACME-2022-MSA
                integrationIds:
                  - service: NetSuite
                    id: SO-1024
                    lastSynced: '2022-06-28T16:47:00Z'
                    url: >-
                      https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024
                    isPending: false
                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
                createdByType: SEQUENCE_USER
                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
            paymentProvider: STRIPE
            autoCharge: true
            lockedByQuoteId: 0199a1b2-3c4d-7e5f-8a6b-7c8d9e0f1a2b
        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
              activationStatus: COMPLETED
              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:
                    - 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
              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
                  externalContractRef: ACME-2022-MSA
                  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'
                  creditGrants:
                    - id: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
                      name: Monthly usage credits
                      creditUnitType: CURRENCY
                      currency: GBP
                      amount: 100
                      costOfCredit: 0
                      taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                      grantRefreshFrequency: MONTHLY
                      billingFrequency: MONTHLY
                      rolloverMode: NONE
                      restrictToPrices:
                        - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
                      integrationIds:
                        - service: NetSuite
                          id: '1234'
                          isPending: false
                  contractReferences:
                    - type: SEQUENCE_QUOTE
                      value: 019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
                      label: Q-1042
                      url: >-
                        https://dashboard.sequencehq.com/quotes/019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
                    - type: NETSUITE
                      value: ACME-2022-MSA
                      label: ACME-2022-MSA
                  integrationIds:
                    - service: NetSuite
                      id: SO-1024
                      lastSynced: '2022-06-28T16:47:00Z'
                      url: >-
                        https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024
                      isPending: false
                  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
                  createdByType: SEQUENCE_USER
                  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
              paymentProvider: STRIPE
              autoCharge: true
              lockedByQuoteId: 0199a1b2-3c4d-7e5f-8a6b-7c8d9e0f1a2b
          items:
            $ref: '#/components/schemas/BillingScheduleResponse'
        pagination:
          $ref: '#/components/schemas/PaginationMeta'
    BillingScheduleResponse:
      required:
        - activationStatus
        - 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
        activationStatus: COMPLETED
        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:
              - 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
        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
            externalContractRef: ACME-2022-MSA
            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'
            creditGrants:
              - id: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
                name: Monthly usage credits
                creditUnitType: CURRENCY
                currency: GBP
                amount: 100
                costOfCredit: 0
                taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                grantRefreshFrequency: MONTHLY
                billingFrequency: MONTHLY
                rolloverMode: NONE
                restrictToPrices:
                  - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
                integrationIds:
                  - service: NetSuite
                    id: '1234'
                    isPending: false
            contractReferences:
              - type: SEQUENCE_QUOTE
                value: 019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
                label: Q-1042
                url: >-
                  https://dashboard.sequencehq.com/quotes/019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
              - type: NETSUITE
                value: ACME-2022-MSA
                label: ACME-2022-MSA
            integrationIds:
              - service: NetSuite
                id: SO-1024
                lastSynced: '2022-06-28T16:47:00Z'
                url: >-
                  https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024
                isPending: false
            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
            createdByType: SEQUENCE_USER
            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
        paymentProvider: STRIPE
        autoCharge: true
        lockedByQuoteId: 0199a1b2-3c4d-7e5f-8a6b-7c8d9e0f1a2b
      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/ApiBillingScheduleStatus'
          description: Billing schedule status
        activationStatus:
          $ref: '#/components/schemas/ApiActivationStatus'
          description: >-
            Where the billing schedule's activation stands. NOT_REQUESTED for a
            draft, IN_PROGRESS while its first invoices are being produced,
            COMPLETED once they exist, FAILED when producing them stopped
        startDate:
          type: string
          description: Start date
          example: '2022-01-01'
        endDate:
          type: string
          description: End date
          nullable: true
          example: '2022-12-01'
        taxRates:
          type: array
          description: Tax Rate for each Product
          nullable: true
          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
          nullable: true
          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
          nullable: true
          example: PO123
        reference:
          type: string
          description: Optional reference to be added to invoices
          nullable: true
          example: ref
        label:
          type: string
          description: Optional label
          nullable: true
          example: label
        recurrenceDayOfMonth:
          type: integer
          description: The day of the month on which billing recurs
          format: int32
          nullable: true
          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:
                - 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
          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)
          nullable: true
          example: bdbf78a5-b007-4d46-aa7d-d0417a649d64
        phases:
          type: array
          description: Phases
          example:
            - id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
              name: Onboarding
              externalContractRef: ACME-2022-MSA
              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'
              creditGrants:
                - id: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
                  name: Monthly usage credits
                  creditUnitType: CURRENCY
                  currency: GBP
                  amount: 100
                  costOfCredit: 0
                  taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                  grantRefreshFrequency: MONTHLY
                  billingFrequency: MONTHLY
                  rolloverMode: NONE
                  restrictToPrices:
                    - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
                  integrationIds:
                    - service: NetSuite
                      id: '1234'
                      isPending: false
              contractReferences:
                - type: SEQUENCE_QUOTE
                  value: 019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
                  label: Q-1042
                  url: >-
                    https://dashboard.sequencehq.com/quotes/019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
                - type: NETSUITE
                  value: ACME-2022-MSA
                  label: ACME-2022-MSA
              integrationIds:
                - service: NetSuite
                  id: SO-1024
                  lastSynced: '2022-06-28T16:47:00Z'
                  url: >-
                    https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024
                  isPending: false
              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.
          nullable: true
          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
              createdByType: SEQUENCE_USER
              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
          nullable: true
          example: 0194d091-f65b-7b98-b75f-a923aa0f5b1a
        defaultDueDateDays:
          type: integer
          description: Default number of days between invoice issue date and due date
          nullable: true
          example: 30
        memo:
          type: string
          description: Billing schedule memo
          nullable: true
          example: Example Billing Schedule
        customFields:
          type: object
          description: Custom key-value fields for this billing schedule
          example:
            key: value
          additionalProperties:
            type: string
        paymentProvider:
          $ref: '#/components/schemas/PaymentProvider'
          description: >-
            Payment provider configured for collecting invoices on this billing
            schedule
          nullable: true
        autoCharge:
          type: boolean
          description: Whether invoices for this billing schedule are automatically charged
          nullable: true
          example: true
        lockedByQuoteId:
          type: string
          description: >-
            ID of the amendment quote that stops this billing schedule being
            edited, archived or deleted, or its overage frequency being changed.
            If more than one amendment quote is open, this is the one furthest
            along: accepted, then out for signature, then published, then draft,
            and the newest if two are equally far along. Cleared once no
            amendment quote holds the schedule, that is once each has been
            executed, archived or deleted, or another amendment to this schedule
            was executed after it was drafted
          nullable: true
          example: 0199a1b2-3c4d-7e5f-8a6b-7c8d9e0f1a2b
    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)
          nullable: true
          example: MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3
        before:
          type: string
          description: Cursor for the page before this (if it exists)
          nullable: true
          example: MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz
        totalResultSize:
          type: integer
          description: Total number of entries across all pages
          format: int64
          nullable: true
          example: 10
    ApiBillingScheduleStatus:
      type: string
      example: ACTIVE
      enum:
        - DRAFT
        - PENDING
        - ACTIVE
        - SUSPENDED
        - CANCELLED
        - COMPLETED
    ApiActivationStatus:
      type: string
      example: COMPLETED
      enum:
        - NOT_REQUESTED
        - IN_PROGRESS
        - COMPLETED
        - FAILED
    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.
          nullable: true
          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
          nullable: true
          example: b4d7e884-e007-4183-8355-4771865c5100
        usageCalculationPeriod:
          $ref: '#/components/schemas/UsageCalculationPeriod'
          nullable: true
        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
        - contractReferences
        - createdAt
        - creditGrants
        - discounts
        - id
        - integrationIds
        - minimums
        - phasePriceMetadata
        - priceIds
        - recurrencePreference
        - startDate
      type: object
      example:
        id: 6dc54805-0ac8-4f17-9341-4d3f2db9dcd8
        name: Onboarding
        externalContractRef: ACME-2022-MSA
        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'
        creditGrants:
          - id: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
            name: Monthly usage credits
            creditUnitType: CURRENCY
            currency: GBP
            amount: 100
            costOfCredit: 0
            taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
            grantRefreshFrequency: MONTHLY
            billingFrequency: MONTHLY
            rolloverMode: NONE
            restrictToPrices:
              - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
            integrationIds:
              - service: NetSuite
                id: '1234'
                isPending: false
        contractReferences:
          - type: SEQUENCE_QUOTE
            value: 019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
            label: Q-1042
            url: >-
              https://dashboard.sequencehq.com/quotes/019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
          - type: NETSUITE
            value: ACME-2022-MSA
            label: ACME-2022-MSA
        integrationIds:
          - service: NetSuite
            id: SO-1024
            lastSynced: '2022-06-28T16:47:00Z'
            url: >-
              https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024
            isPending: false
        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
          nullable: true
          example: Onboarding
        externalContractRef:
          type: string
          description: >-
            Free-text reference to the contract this phase rolls up to in an
            external system. Phases sharing a reference belong to the same
            contract. Null means the phase rolls up to the billing schedule
            itself.
          nullable: true
          example: ACME-2022-MSA
        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
          example: '2022-01-01'
        endDate:
          type: string
          description: End date
          nullable: true
          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'
        creditGrants:
          type: array
          description: Credit grants in Phase
          example:
            - id: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
              name: Monthly usage credits
              creditUnitType: CURRENCY
              currency: GBP
              amount: 100
              costOfCredit: 0
              taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
              grantRefreshFrequency: MONTHLY
              billingFrequency: MONTHLY
              rolloverMode: NONE
              restrictToPrices:
                - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
              integrationIds:
                - service: NetSuite
                  id: '1234'
                  isPending: false
          items:
            $ref: '#/components/schemas/EmbeddableCreditGrant'
        contractReferences:
          type: array
          description: Contract references on this phase
          example:
            - type: SEQUENCE_QUOTE
              value: 019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
              label: Q-1042
              url: >-
                https://dashboard.sequencehq.com/quotes/019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
            - type: NETSUITE
              value: ACME-2022-MSA
              label: ACME-2022-MSA
          items:
            $ref: '#/components/schemas/ContractReferenceResponse'
        integrationIds:
          type: array
          description: External services which this phase is linked to
          example:
            - service: NetSuite
              id: SO-1024
              lastSynced: '2022-06-28T16:47:00Z'
              url: >-
                https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024
              isPending: false
          items:
            $ref: '#/components/schemas/IntegrationId'
        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
        - createdByType
        - fileName
        - fileSizeBytes
        - format
        - id
        - type
        - url
      type: object
      example:
        id: e007e884-5100-4183-8355-4771865cb4dd
        createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
        createdByType: SEQUENCE_USER
        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 ID of the asset creator. A Sequence user id or API key id, as
            identified by `createdByType`.
          example: 94703530-1293-479b-bd37-ccad42fd9c8b
        createdByType:
          $ref: '#/components/schemas/AssetCreatorType'
          description: Whether `createdBy` identifies a `SEQUENCE_USER` or an `API_CLIENT`
        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'
    PaymentProvider:
      type: string
      example: STRIPE
      enum:
        - STRIPE
        - GOCARDLESS
        - NONE
    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
          nullable: true
        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
          nullable: true
          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
          nullable: true
          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
          nullable: true
    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'
    EmbeddableCreditGrant:
      required:
        - amount
        - billingFrequency
        - creditUnitType
        - grantRefreshFrequency
        - id
        - integrationIds
        - name
        - restrictToPrices
        - rolloverMode
      type: object
      example:
        id: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
        name: Monthly usage credits
        creditUnitType: CURRENCY
        currency: GBP
        amount: 100
        costOfCredit: 0
        taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
        grantRefreshFrequency: MONTHLY
        billingFrequency: MONTHLY
        rolloverMode: NONE
        restrictToPrices:
          - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
        integrationIds:
          - service: NetSuite
            id: '1234'
            isPending: false
      properties:
        id:
          type: string
          description: Credit grant ID.
          example: 0199ca8a-e7e8-73b3-bd69-a316a23231a0
        name:
          type: string
          description: Name of the credit grant.
          example: Monthly usage credits
        creditUnitType:
          $ref: '#/components/schemas/CreditUnitType'
          description: Type of the unit of credit.
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency of cash credit if creditUnitType is CURRENCY.
          nullable: true
        amount:
          type: number
          description: Amount of units granted.
          example: 100
        costOfCredit:
          type: number
          description: Cost of credit grant.
          nullable: true
          example: 0
        taxRateId:
          type: string
          description: Tax rate ID for the credit grant.
          nullable: true
          example: 179d1ab3-cc96-48e2-9310-067b0b42d47c
        grantRefreshFrequency:
          $ref: '#/components/schemas/GrantRefreshFrequency'
          description: How often the credit grant refreshes its balance.
        billingFrequency:
          $ref: '#/components/schemas/GrantBillingFrequency'
          description: How often the customer is charged for the credit grant.
        rolloverMode:
          $ref: '#/components/schemas/RolloverMode'
          description: Whether unused balance carries over when the grant refreshes.
        restrictToPrices:
          type: array
          description: Price IDs the grant is consumed against.
          example:
            - 0199ca89-2d9e-7e3d-914c-7de86e8fc7ce
          items:
            type: string
        integrationIds:
          type: array
          description: >-
            IDs for this credit grant in external integrations, at most one per
            service.
          example:
            - service: NetSuite
              id: '1234'
              isPending: false
          items:
            $ref: '#/components/schemas/IntegrationId'
    ContractReferenceResponse:
      required:
        - label
        - type
        - value
      type: object
      example:
        type: SEQUENCE_QUOTE
        value: 019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
        label: Q-1042
        url: >-
          https://dashboard.sequencehq.com/quotes/019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
      properties:
        type:
          $ref: '#/components/schemas/ContractReferenceType'
          description: What the reference points at.
        value:
          type: string
          description: The ID or text of the reference.
          example: 019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
        label:
          type: string
          description: >-
            How to show the reference: the quote number for quotes, otherwise
            the value.
          example: Q-1042
        url:
          type: string
          description: >-
            A link to the reference: the quote in the dashboard for a Sequence
            quote, the opportunity in Salesforce for a Salesforce opportunity
            when the account's Salesforce address is known, the link sent on an
            OTHER reference, and none for NetSuite references.
          nullable: true
          example: >-
            https://dashboard.sequencehq.com/quotes/019a3c1e-7b2d-7e41-9c5a-2f8d6b0e4a17
    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
    AssetCreatorType:
      type: string
      example: SEQUENCE_USER
      enum:
        - SEQUENCE_USER
        - API_CLIENT
    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.
          nullable: true
          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
          nullable: true
          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.
          nullable: true
          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
          nullable: true
          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
          nullable: true
          example: '10'
        minPrice:
          type: string
          description: Minimum Price to Charge for each Unit if Price is Percentage Based
          nullable: true
          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.
          nullable: true
          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
          nullable: true
          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
    CreditUnitType:
      type: string
      example: CURRENCY
      enum:
        - CURRENCY
        - METRIC
    GrantRefreshFrequency:
      type: string
      example: MONTHLY
      enum:
        - NONE
        - MONTHLY
        - QUARTERLY
        - HALF_YEARLY
        - YEARLY
    GrantBillingFrequency:
      type: string
      example: MONTHLY
      enum:
        - ONE_TIME
        - MONTHLY
        - QUARTERLY
        - HALF_YEARLY
        - YEARLY
    RolloverMode:
      type: string
      example: NONE
      enum:
        - NONE
        - ON_GRANT_REFRESH
        - ON_GRANT_REFRESH_AND_PHASE
    ContractReferenceType:
      type: string
      example: OTHER
      enum:
        - SEQUENCE_QUOTE
        - SALESFORCE_OPPORTUNITY
        - NETSUITE
        - OTHER
    ArrCalculation:
      type: string
      example: INCLUDE
      enum:
        - INCLUDE
        - EXCLUDE

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.