Rapidata Billing API

The Billing API from Rapidata — 24 operation(s) for billing.

OpenAPI Specification

rapidata-billing-api-openapi.yml Raw ↑
openapi: 3.0.4
info:
  title: Rapidata Asset Billing API
  description: The API for the Rapidata Asset service
  version: v1
servers:
- url: https://api.rapidata.ai/
tags:
- name: Billing
  x-displayName: Billing
paths:
  /billing/manual-charge:
    post:
      tags:
      - Billing
      summary: Creates a manual charge billing item for a customer.
      requestBody:
        description: The manual charge data.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateManualChargeEndpoint_Input'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateManualChargeEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/external-service-prices:
    post:
      tags:
      - Billing
      summary: Creates a rate-card price for an external service.
      requestBody:
        description: The external-service price data.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateExternalServicePriceEndpoint_Input'
        required: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing-period/active/billing-items:
    get:
      tags:
      - Billing
      summary: Gets the paged billing groups for the active billing period.
      parameters:
      - name: customerId
        in: query
        description: Optional customer ID. Admins can specify any customer; non-admins see their own.
        schema:
          type: string
          format: uuid
      - name: page
        in: query
        description: The 1-based page index.
        schema:
          type: integer
        x-parameter-group: page
      - name: page_size
        in: query
        description: The number of items per page.
        schema:
          type: integer
        x-parameter-group: page
      - name: sort
        in: query
        description: Sort fields. Prefix with - for descending order (e.g. -created_at).
        schema:
          type: array
          items:
            enum:
            - gross_cost
            - -gross_cost
            - discount
            - -discount
            - net_cost
            - -net_cost
            - response_count
            - -response_count
            type: string
        x-parameter-group: sort
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedResultOfIBillingGroupModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing-period/active:
    get:
      tags:
      - Billing
      summary: Gets the overview for the active billing period.
      parameters:
      - name: customerId
        in: query
        description: Optional customer ID. Admins can specify any customer; non-admins see their own.
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetActiveBillingPeriodOverviewEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing-period/{billingPeriodId}/billing-items:
    get:
      tags:
      - Billing
      summary: Gets the paged billing groups for a billing period.
      parameters:
      - name: billingPeriodId
        in: path
        description: The ID of the billing period.
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: The 1-based page index.
        schema:
          type: integer
        x-parameter-group: page
      - name: page_size
        in: query
        description: The number of items per page.
        schema:
          type: integer
        x-parameter-group: page
      - name: sort
        in: query
        description: Sort fields. Prefix with - for descending order (e.g. -created_at).
        schema:
          type: array
          items:
            enum:
            - gross_cost
            - -gross_cost
            - discount
            - -discount
            - net_cost
            - -net_cost
            - response_count
            - -response_count
            type: string
        x-parameter-group: sort
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedResultOfIBillingGroupModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing-period/{billingPeriodId}:
    get:
      tags:
      - Billing
      summary: Gets the overview for a billing period by its ID.
      parameters:
      - name: billingPeriodId
        in: path
        description: The ID of the billing period to retrieve.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBillingPeriodOverviewEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/summary:
    get:
      tags:
      - Billing
      summary: Gets the current-period usage and applicable limit for a customer.
      description: Defaults to the authenticated customer when no customerId is provided.
      parameters:
      - name: customerId
        in: query
        description: The id of the customer to get the billing summary for.
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBillingSummaryEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/cost/time-series:
    get:
      tags:
      - Billing
      summary: Gets the billing cost time series.
      parameters:
      - name: startDate
        in: query
        required: true
        schema:
          type: string
          format: date-time
      - name: endDate
        in: query
        required: true
        schema:
          type: string
          format: date-time
      - name: grouping
        in: query
        required: true
        schema:
          $ref: '#/components/schemas/TimeGrouping'
      - name: customerId
        in: query
        schema:
          type: string
          format: uuid
      - name: customerMail
        in: query
        schema:
          type: string
      - name: includeNonBillable
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCostTimeSeriesEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing-periods:
    get:
      tags:
      - Billing
      summary: Queries billing periods accessible to the current customer.
      parameters:
      - name: page
        in: query
        description: The 1-based page index.
        schema:
          type: integer
        x-parameter-group: page
      - name: page_size
        in: query
        description: The number of items per page.
        schema:
          type: integer
        x-parameter-group: page
      - name: sort
        in: query
        description: Sort fields. Prefix with - for descending order (e.g. -created_at).
        schema:
          type: array
          items:
            enum:
            - start_date
            - -start_date
            - end_date
            - -end_date
            - created_at
            - -created_at
            type: string
        x-parameter-group: sort
      - name: status
        in: query
        description: Filter by status.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: owner_id
        in: query
        description: Filter by owner_id.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: start_date
        in: query
        description: Filter by start_date.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: end_date
        in: query
        description: Filter by end_date.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: logic
        in: query
        description: 'How to combine the field filters: "and" (default) requires every filter to match, "or" requires any of them to match.'
        schema:
          enum:
          - and
          - or
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryBillingPeriodsEndpoint_PagedResultOfOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/costs/customers:
    get:
      tags:
      - Billing
      summary: Returns billing costs aggregated per customer, ranked by cost.
      parameters:
      - name: startDate
        in: query
        schema:
          type: string
          format: date-time
      - name: endDate
        in: query
        schema:
          type: string
          format: date-time
      - name: page
        in: query
        schema:
          type: integer
          format: int32
      - name: pageSize
        in: query
        schema:
          type: integer
          format: int32
      - name: customerId
        in: query
        schema:
          type: string
          format: uuid
      - name: customerMail
        in: query
        schema:
          type: string
      - name: includeNonBillable
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryCostsByCustomerEndpoint_PagedResultOfOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/costs/groups:
    get:
      tags:
      - Billing
      summary: Returns billing costs aggregated per billing group, ranked by cost.
      parameters:
      - name: startDate
        in: query
        schema:
          type: string
          format: date-time
      - name: endDate
        in: query
        schema:
          type: string
          format: date-time
      - name: customerId
        in: query
        schema:
          type: string
          format: uuid
      - name: customerMail
        in: query
        schema:
          type: string
      - name: includeNonBillable
        in: query
        schema:
          type: boolean
      - name: page
        in: query
        description: The 1-based page index.
        schema:
          type: integer
        x-parameter-group: page
      - name: page_size
        in: query
        description: The number of items per page.
        schema:
          type: integer
        x-parameter-group: page
      - name: sort
        in: query
        description: Sort fields. Prefix with - for descending order (e.g. -created_at).
        schema:
          type: array
          items:
            enum:
            - gross_cost
            - -gross_cost
            - discount
            - -discount
            - net_cost
            - -net_cost
            - response_count
            - -response_count
            type: string
        x-parameter-group: sort
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedResultOfIBillingGroupModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/costs/organizations:
    get:
      tags:
      - Billing
      summary: Returns billing costs aggregated per organization, ranked by cost.
      parameters:
      - name: startDate
        in: query
        schema:
          type: string
          format: date-time
      - name: endDate
        in: query
        schema:
          type: string
          format: date-time
      - name: page
        in: query
        schema:
          type: integer
          format: int32
      - name: pageSize
        in: query
        schema:
          type: integer
          format: int32
      - name: includeNonBillable
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryCostsByOrganizationEndpoint_PagedResultOfOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/reconciliation/bulk/{bulkReconciliationId}:
    get:
      tags:
      - Billing
      summary: Returns the aggregated status and results of all reconciliation jobs in a bulk operation.
      parameters:
      - name: bulkReconciliationId
        in: path
        description: The correlation identifier returned from the bulk reconcile endpoint.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBulkReconciliationStatusEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/reconciliation/{jobId}:
    get:
      tags:
      - Billing
      summary: Returns the status and results of a reconciliation job.
      parameters:
      - name: jobId
        in: path
        description: The unique identifier of the reconciliation job.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetReconciliationStatusEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/reconciliation/bulk/{bulkReconciliationId}/redispatch:
    post:
      tags:
      - Billing
      summary: Redispatches the individual reconciliations contained in the given bulk reconciliation.
      parameters:
      - name: bulkReconciliationId
        in: path
        description: The bulk reconciliation to redispatch.
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/reconcile:
    post:
      tags:
      - Billing
      summary: Starts reconciliation for a single billing item, all items for a customer, or all items in a billing group.
      description: "Exactly one of BillingItemId, CustomerId, or BillingGroupId must be specified.\n Date range filtering is only available with CustomerId or BillingGroupId.\n Returns a correlation ID that can be used to track progress of the bulk operation."
      requestBody:
        description: The reconciliation target and configuration options.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartBulkReconciliationEndpoint_Input'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartBulkReconciliationEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/billing-item/{billingItemId}/settings:
    post:
      tags:
      - Billing
      summary: Creates a billing setting for a billing item.
      parameters:
      - name: billingItemId
        in: path
        description: The billing item identifier.
        required: true
        schema:
          type: string
      requestBody:
        description: The billing setting data.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBillingItemBillingSettingEndpoint_Input'
        required: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/customer/{customerId}/settings:
    post:
      tags:
      - Billing
      summary: Creates a billing setting for a customer.
      parameters:
      - name: customerId
        in: path
        description: The customer identifier.
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: The billing setting data.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerBillingSettingEndpoint_Input'
        required: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/settings:
    post:
      tags:
      - Billing
      summary: Creates a global billing setting.
      requestBody:
        description: The billing setting data.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateGlobalBillingSettingEndpoint_Input'
        required: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/billing-item/{billingItemId}/settings/{settingId}:
    delete:
      tags:
      - Billing
      summary: Deletes a billing item billing setting.
      parameters:
      - name: billingItemId
        in: path
        description: The billing item identifier.
        required: true
        schema:
          type: string
      - name: settingId
        in: path
        description: The billing setting identifier.
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/customer/{customerId}/settings/{settingId}:
    delete:
      tags:
      - Billing
      summary: Deletes a customer billing setting.
      parameters:
      - name: customerId
        in: path
        description: The customer identifier.
        required: true
        schema:
          type: string
          format: uuid
      - name: settingId
        in: path
        description: The billing setting identifier.
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/settings/{settingId}:
    delete:
      tags:
      - Billing
      summary: Deletes a global billing setting.
      parameters:
      - name: settingId
        in: path
        description: The billing setting identifier.
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing/settings/timeline:
    get:
      tags:
      - Billing
      summary: Gets the billing settings timeline.
      parameters:
      - name: customerId
        in: query
        description: Optional customer identifier to scope the timeline.
        schema:
          type: string
          format: uuid
      - name: billingItemId
        in: query
        description: Optional billing item identifier to scope the timeline.
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBillingSettingsTimelineEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /billing-period/{billingPeriodId}/volume-discounts:
    post:
      tags:
      - Billing
      summary: Creates a volume discount bracket for a billing period.
      parameters:
      - name: billingPeriodId
        in: path
        description: The billing period to add the volume discount to.
        required: true
        schema:
          type: string
      requestBody:
        description: The volume discount bracket data.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVolumeDiscountEndpoint_Input'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateVolumeDiscountEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
    get:
      tags:
      - Billing
      summary: Gets all volume discount brackets for a billing period.
      parameters:
      - name: billingPeriodId
        in: path
        description: The billing period to get volume discounts for.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetVolumeDiscountsEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
components:
  sch

# --- truncated at 32 KB (78 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/rapidata/refs/heads/main/openapi/rapidata-billing-api-openapi.yml