Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

All services requires a Bearer-token, this process is described here.

For audience, use value https://api.bokbasen.io/reporting/

API-specification

Confluence open api
openapi: 3.0.3
info:
  title: Reporting API Specification
  description: Reporting API Specification. All operations requires Bearer token from login-process. For more information, please visit https://bokbasen.jira.com/wiki/spaces/api/pages/2994962433/Authentication+Service+upcoming
  version: 1.0.0

servers:
  - url: 'https://api.bokbasen.io/reporting'

paths:
  /rental:
    post:
      summary: POST rental report
      operationId: createRentalReport
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RentalReport'
        required: true
      responses:
        '204':
          description: Successfully created
        '400':
          description: Bad Request

components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas:
    RentalReport:
      type: object
      required:
        - period
        - items
      properties:
        period:
          type: object
          required:
            - year
            - month
          properties:
            year:
              type: integer
              example: 2023
            month:
              type: integer
              minimum: 1
              maximum: 12
              example: 8
        items:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/RentalItem'
    RentalItem:
      type: object
      required:
        - isbn
        - number
        - pricePrItem
        - sum
        - net
      properties:
        isbn:
          type: string
          example: "9788252119695"
        number:
          type: integer
          example: 10
        pricePrItem:
          type: number
          example: 99.99
        sum:
          type: number
          example: 999.9
        net:
          type: number
          example: 949.99

security:
  - bearerAuth: []

...