---
title: "Returns billing costs aggregated per billing group, ranked by cost."
method: GET
path: "/billing/costs/groups"
tags: ["Billing"]
---

# Returns billing costs aggregated per billing group, ranked by cost.

`GET /billing/costs/groups`

## Query parameters

- `startDate` string, date-time
- `endDate` string, date-time
- `customerId` string, uuid
- `customerMail` string
- `includeNonBillable` boolean
- `page` integer
- `page_size` integer
- `sort` string[]

## Response `200`

OK

- PagedResultOfIBillingGroup
  - `total` integer, required
  - `page` integer, required
  - `pageSize` integer, required
  - `items` IBillingGroup[], required
    - union — A billable group of responses on a billing period, identified by a discriminator. Implementations describe the source of the charges (order, benchmark, audience job, etc.).
      - object — A billing group for responses produced by an audience distillation run.
        - `_t` 'AudienceDistillationBillingGroup', required
        - `id` string, required — The unique identifier of the billing group.
        - `name` string, required — A human-readable name for the billing group.
        - `grossCost` number, double, required — The gross cost of the responses in this group, before any discount.
        - `discount` number, double, required — The absolute discount applied to the gross cost.
        - `netCost` number, double, required — The net cost of the responses in this group after discount.
        - `responseCount` integer, required — The number of responses attributed to this billing group.
        - `audienceId` string, required — The identifier of the audience the distillation run was executed for.
      - object — A billing group for responses produced by an audience job.
        - `_t` 'AudienceJobBillingGroup', required
        - `id` string, required — The unique identifier of the billing group.
        - `name` string, required — A human-readable name for the billing group.
        - `grossCost` number, double, required — The gross cost of the responses in this group, before any discount.
        - `discount` number, double, required — The absolute discount applied to the gross cost.
        - `netCost` number, double, required — The net cost of the responses in this group after discount.
        - `responseCount` integer, required — The number of responses attributed to this billing group.
        - `jobId` string, required — The identifier of the audience job that produced the responses.
        - `audienceId` string, required — The identifier of the audience the job belongs to.
      - object — A billing group for responses produced by a benchmark.
        - `_t` 'BenchmarkBillingGroup', required
        - `id` string, required — The unique identifier of the billing group.
        - `name` string, required — A human-readable name for the billing group.
        - `grossCost` number, double, required — The gross cost of the responses in this group, before any discount.
        - `discount` number, double, required — The absolute discount applied to the gross cost.
        - `netCost` number, double, required — The net cost of the responses in this group after discount.
        - `responseCount` integer, required — The number of responses attributed to this billing group.
        - `benchmarkId` string, required — The identifier of the benchmark that produced the responses.
      - object — A billing group for responses produced by an order.
        - `_t` 'OrderBillingGroup', required
        - `id` string, required — The unique identifier of the billing group.
        - `name` string, required — A human-readable name for the billing group.
        - `grossCost` number, double, required — The gross cost of the responses in this group, before any discount.
        - `discount` number, double, required — The absolute discount applied to the gross cost.
        - `netCost` number, double, required — The net cost of the responses in this group after discount.
        - `responseCount` integer, required — The number of responses attributed to this billing group.
        - `orderId` string, required — The identifier of the order that produced the responses.
      - object — A billing group for responses produced by a ranking flow.
        - `_t` 'RankingFlowBillingGroup', required
        - `id` string, required — The unique identifier of the billing group.
        - `name` string, required — A human-readable name for the billing group.
        - `grossCost` number, double, required — The gross cost of the responses in this group, before any discount.
        - `discount` number, double, required — The absolute discount applied to the gross cost.
        - `netCost` number, double, required — The net cost of the responses in this group after discount.
        - `responseCount` integer, required — The number of responses attributed to this billing group.
        - `flowId` string, required — The identifier of the ranking flow that produced the responses.
      - object — A billing group for responses produced by a validation set.
        - `_t` 'ValidationSetBillingGroup', required
        - `id` string, required — The unique identifier of the billing group.
        - `name` string, required — A human-readable name for the billing group.
        - `grossCost` number, double, required — The gross cost of the responses in this group, before any discount.
        - `discount` number, double, required — The absolute discount applied to the gross cost.
        - `netCost` number, double, required — The net cost of the responses in this group after discount.
        - `responseCount` integer, required — The number of responses attributed to this billing group.
        - `validationSetId` string, required — The identifier of the validation set that produced the responses.
  - `totalPages` integer

## Other responses

- `400` — Bad Request
- `401` — Unauthenticated
- `403` — Forbidden

---

[API](https://skmtc.net/rapidata/apis/rapidata-api.md) · [All operations](https://skmtc.net/rapidata/apis/rapidata-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rapidata/rapidata-api/versions/e42ec51c7b88/schema)
