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

# Get aggregate estimates for a period

> Get estimates for a specific aggregate and customer within a date range.



## OpenAPI

````yaml /openAPI/openapi-20240301.json get /aggregates/estimates
openapi: 3.1.0
info:
  title: zenskar
  version: 2.0.0
servers:
  - url: https://api.zenskar.com
security:
  - ApiTokenAuth: []
    OrganisationAuth: []
paths:
  /aggregates/estimates:
    get:
      tags:
        - Billable Metrics
      summary: Get aggregate estimates for a period
      description: Get estimates for a specific aggregate and customer within a date range.
      operationId: Get-aggregate-estimates-for-a-period
      parameters:
        - name: aggregate_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
            title: Aggregate Id
        - name: customer_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
            title: Customer Id
        - name: start_date
          in: query
          required: true
          schema:
            type: string
            format: date
            title: Start Date
        - name: end_date
          in: query
          required: true
          schema:
            type: string
            format: date
            title: End Date
        - name: get_single
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Get Single
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/AggregateEstimateResponseSchema'
                  - type: array
                    items:
                      $ref: '#/components/schemas/AggregateEstimateResponseSchema'
                title: Response Get-Aggregate-Estimates-For-A-Period
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AggregateEstimateResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: UUID of the estimate
        organisation_id:
          type: string
          format: uuid
          title: Organisation Id
          description: UUID of the organisation
        aggregate_id:
          type: string
          format: uuid
          title: Aggregate Id
          description: UUID of the aggregate
        customer_id:
          type: string
          format: uuid
          title: Customer Id
          description: UUID of the customer
        start_date:
          type: string
          format: date
          title: Start Date
          description: Start date of the estimate
        end_date:
          type: string
          format: date
          title: End Date
          description: End date of the estimate
        value:
          $ref: '#/components/schemas/EstimateValue'
          description: Value of the estimate
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Creation timestamp of the estimate
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: Deletion timestamp of the estimate
        deleted_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deleted At
          description: Deletion timestamp of the estimate
      type: object
      required:
        - id
        - organisation_id
        - aggregate_id
        - customer_id
        - start_date
        - end_date
        - value
        - created_at
      title: AggregateEstimateResponseSchema
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EstimateValue:
      properties:
        fields:
          items:
            $ref: '#/components/schemas/EstimateValueObject'
          type: array
          title: Fields
      type: object
      required:
        - fields
      title: EstimateValue
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    EstimateValueObject:
      properties:
        dimension:
          anyOf:
            - type: string
            - type: 'null'
          title: Dimension
          description: Dimension of the quantity
        quantity:
          type: number
          title: Quantity
          description: Quantity of the dimension
      type: object
      required:
        - quantity
      title: EstimateValueObject
  securitySchemes:
    ApiTokenAuth:
      type: apiKey
      in: header
      name: x-api-key
      x-default: <your-api-key>
    OrganisationAuth:
      type: apiKey
      in: header
      name: organisation
      x-default: <your-organisation-id>

````