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

# Usage summary

> Retrieve aggregate credits burned and traffic (GB) for the selected date range, compared against the previous period of the same length (`previous_period.to_date` is the day before `from_date`). If the API key is restricted to specific packages, only those packages are included. The date range may span at most 365 days.

Requires the `proxy:analytics:read` scope.



## OpenAPI

````yaml api/openapi.json POST /v1/proxy/analytics/summary
openapi: 3.1.0
info:
  title: SOAX API
  version: v1
  description: >-
    Programmatic access to your SOAX account: manage proxy packages, generate
    connection strings, browse available locations, pull usage analytics, and
    manage API keys. All endpoints are served over HTTPS and return JSON.
servers:
  - url: https://api.platform.soax.com
security:
  - bearerAuth: []
tags:
  - name: API Keys
    description: >-
      Self-service management of the API keys used to authenticate with this
      API.
  - name: Packages
    description: >-
      Read proxy packages, build proxy connection strings, and rotate package
      passwords.
  - name: Locations
    description: >-
      Location reference data: tiers, countries, regions, cities, ISPs, ASNs,
      and ZIP codes.
  - name: Account
    description: Read-only account, credit, and subscription information.
  - name: Analytics
    description: Usage analytics for your proxy packages.
paths:
  /v1/proxy/analytics/summary:
    post:
      tags:
        - Analytics
      summary: Get summary statistics for proxy usage
      description: >-
        Retrieve aggregate credits burned and traffic (GB) for the selected date
        range, compared against the previous period of the same length
        (`previous_period.to_date` is the day before `from_date`). If the API
        key is restricted to specific packages, only those packages are
        included. The date range may span at most 365 days.


        Requires the `proxy:analytics:read` scope.
      operationId: get_summary_v1_proxy_analytics_summary_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SummaryRequest'
            example:
              from_date: '2026-08-01T00:00:00Z'
              to_date: '2026-08-07T23:59:59Z'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SummaryResponse'
              example:
                selected_period:
                  from_date: '2026-08-01T00:00:00Z'
                  to_date: '2026-08-07T23:59:59Z'
                  credits_burned: 152.4
                  traffic_gb: 61
                previous_period:
                  from_date: '2026-07-25T00:00:00Z'
                  to_date: '2026-07-31T23:59:59Z'
                  credits_burned: 133.1
                  traffic_gb: 53.2
        '400':
          description: >-
            A parameter value or combination is invalid. Service-level
            validation errors use the `error` key; endpoint-level checks use
            `detail`. Read `detail ?? error`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  error:
                    type: string
              example:
                error: Date range cannot be more than 1 year
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/ForbiddenScope'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    SummaryRequest:
      properties:
        from_date:
          type: string
          format: date-time
          title: From Date
          description: Start date for the query range
        to_date:
          type: string
          format: date-time
          title: To Date
          description: End date for the query range. At most 365 days after `from_date`.
      type: object
      required:
        - from_date
        - to_date
      title: SummaryRequest
      description: Request model for summary statistics query.
    SummaryResponse:
      properties:
        selected_period:
          $ref: '#/components/schemas/PeriodSummary'
          description: Stats for the selected period
        previous_period:
          $ref: '#/components/schemas/PeriodSummary'
          description: Stats for the previous period (for comparison)
      type: object
      required:
        - selected_period
        - previous_period
      title: SummaryResponse
      description: Response schema for summary endpoint.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PeriodSummary:
      properties:
        from_date:
          type: string
          format: date-time
          title: From Date
          description: Start date of the period
        to_date:
          type: string
          format: date-time
          title: To Date
          description: End date of the period
        credits_burned:
          type: number
          title: Credits Burned
          description: Total credits burned in the period
        traffic_gb:
          type: number
          title: Traffic Gb
          description: Total traffic spent in GB
      type: object
      required:
        - from_date
        - to_date
        - credits_burned
        - traffic_gb
      title: PeriodSummary
      description: Summary data for a single period.
    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
  responses:
    Unauthorized:
      description: Missing, invalid, or revoked API key.
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
          example:
            detail: Invalid API key
    ForbiddenScope:
      description: The API key does not carry the scope this endpoint requires.
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
          example:
            detail: 'Missing required scope: proxy:packages:read'
    RateLimited:
      description: >-
        Rate limit exceeded (5 requests/second per API key, 500 requests/minute
        per IP). The response includes `Retry-After` (seconds),
        `RateLimit-Limit`, `RateLimit-Remaining`, and `RateLimit-Reset` (Unix
        time) headers — wait `Retry-After` seconds and retry.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
          example:
            error: 'Rate limit exceeded: 5 per 1 second'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key secret (starts with `s_live_`). Create keys in the dashboard
        under **Settings → API keys**, or via `POST /v1/api-keys/`. Send it as
        `Authorization: Bearer <secret>`.

````