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

# Get workshifts



## OpenAPI

````yaml /openapi/metrics.json get /v1/crm/metrics/workshifts/{id}/
openapi: 3.0.3
info:
  title: Yume API — Аналитика
  version: 1.0.0
  description: Системные метрики, аналитика и отчётность.
servers:
  - url: https://api.yume.cloud
    description: Production
  - url: https://api.stage.yume.cloud
    description: Stage
security: []
paths:
  /v1/crm/metrics/workshifts/{id}/:
    get:
      tags:
        - workshifts
      summary: Get workshifts
      operationId: workshifts_retrieve
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
        - $ref: '#/components/parameters/TenantId'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkshiftDetail'
          description: ''
      security:
        - jwtAuth: []
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    WorkshiftDetail:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        start_at:
          type: string
          format: date-time
          title: Начало смены
        end_at:
          type: string
          format: date-time
          nullable: true
          title: Конец смены
        user:
          type: integer
        rental_point:
          type: integer
        extra: {}
        payments:
          type: array
          items:
            $ref: '#/components/schemas/PaymentGroup'
          readOnly: true
        refunds:
          type: array
          items:
            $ref: '#/components/schemas/PaymentGroup'
          readOnly: true
        services:
          type: array
          items:
            $ref: '#/components/schemas/ServiceGroup'
          readOnly: true
      required:
        - id
        - payments
        - refunds
        - rental_point
        - services
        - start_at
        - user
    PaymentGroup:
      type: object
      properties:
        type:
          type: integer
          nullable: true
        name:
          type: string
          nullable: true
        count:
          type: integer
        amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
      required:
        - amount
        - count
        - name
        - type
    ServiceGroup:
      type: object
      properties:
        service:
          type: integer
        name:
          type: string
          nullable: true
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        count:
          type: integer
      required:
        - count
        - name
        - price
        - service
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````