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

# Get sites service offer repartition

> Returns the repartition of sites by service offer status



## OpenAPI

````yaml /api-reference/persons-sites-service-offers.yaml get /service-offers/statistics
openapi: 3.0.3
info:
  title: Person, Site and Service Offer lifecycle
  description: >
    This API manages the lifecycle of persons, sites and service offers as
    described
    [here](https://datanumia.stoplight.io/docs/DatanumiaHome/YXBpOjQ0ODQzMjMy-person-site-and-service-offer-lifecycle)

    Please refer to the following link to get a better understanding of the
    [core
    concepts](https://datanumia.stoplight.io/docs/DatanumiaHome/ZG9jOjM4MDg2NDE5-core-concepts)
    of the Home platform.


    <b>Important notice with regard to those APIs:</b>

    - When subscribing or deleting multiple subscribed offers on a site or
    subscribed offers on multiple sites please provide all sites and subscribe
    offer data in a single POST subscriptions call.

    - They are idempotent. Launching multiple times the same operation will lead
    to the same result

    - They require a complete snapshot of all the objects involved in the
    operation. Those new objects overwrite the existing one. In other words,
    missing properties will be considered empty or null when operations will be
    executed on existing person/site objects
  termsOfService: TODO
  contact:
    email: api@datanumia.com
  version: 2.0.0
servers:
  - url: https://api.home.datanumia.com/api/v2
    description: Production Server
security: []
paths:
  /service-offers/statistics:
    get:
      tags:
        - service offers
      summary: Get sites service offer repartition
      description: Returns the repartition of sites by service offer status
      operationId: getSitesServiceOfferRepartition
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSitesServiceOffersRepartitionDto'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                errorCode: INVALID_AUTHORIZATION_HEADER_VALUE
                errorDescription: The Authorization header is invalid
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                errorCode: ACCESS_DENIED
                errorDescription: >-
                  The Authorization token does not have permission to the
                  resource
        '500':
          description: Server error
          content: {}
      security:
        - Bearer:
            - home:referential:service-offers:read
components:
  schemas:
    GetSitesServiceOffersRepartitionDto:
      type: object
      properties:
        lastUpdateDate:
          type: string
          description: >
            The last update date of the statistics as defined by RFC 3339,
            section 5.6 using the following format: full-date
          format: date
          example: '2021-07-21'
        serviceOffersRepartition:
          type: array
          items:
            $ref: '#/components/schemas/SitesServiceOfferRepartition'
    ErrorResponse:
      required:
        - errorCode
        - errorDescription
      type: object
      properties:
        errorCode:
          description: The error code. Refer to the table bellow
          type: string
        errorDescription:
          type: string
          description: The error description
      description: ErrorResponse
    SitesServiceOfferRepartition:
      description: number of sites per status p for a given service offer
      type: object
      required:
        - serviceOfferCode
      properties:
        serviceOfferCode:
          type: string
          description: service offer code
          example: OF048
        repartition:
          type: array
          items:
            $ref: '#/components/schemas/SitesServiceOfferRepartitionPerStatus'
          example:
            - status: SUBSCRIBED
              count: 13456876
            - status: TERMINATED
              count: 3047
    SitesServiceOfferRepartitionPerStatus:
      type: object
      required:
        - status
        - count
      properties:
        status:
          $ref: '#/components/schemas/ServiceOfferStauts'
        count:
          type: integer
          example: 13456876
    ServiceOfferStauts:
      type: string
      enum:
        - SUBSCRIPTION_IN_PROGRESS
        - SUBSCRIBED
        - TERMINATED
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````