openapi: 3.0.3
info:
  title: VTG Hermes Invoice Upload API
  version: '1.0'
servers:
  - url: 'http://localhost:8080/hermes/hermes-api'
    description: local development
  - url: 'https://hermes-int-a.vtg-portal.com/hermes/hermes-api'
    description: Hermes integration A
paths:
  /wheelset-refurbishment-invoice/workshop/{workshop}/order/{order}/new:
    parameters:
      - $ref: "#/components/parameters/Workshop"
      - $ref: "#/components/parameters/Order"
    post:
      description: Upload a Zugferd 1.0 invoice for a wheelset refurbischment order.
      requestBody:
        $ref: "#/components/requestBodies/SinglePdfFile"
      responses:
        default:
          $ref: "#/components/responses/Simple"
  /workshop-order-invoice/workshop/{workshop}/order/{order}/new:
    parameters:
      - $ref: "#/components/parameters/Workshop"
      - $ref: "#/components/parameters/Order"
    post:
      description: Upload a Zugferd 1.0 invoice for a workshop order.
      requestBody:
        $ref: "#/components/requestBodies/SinglePdfFile"
      responses:
        default:
          $ref: "#/components/responses/Simple"
components:
  parameters:
    Workshop:
      name: workshop
      in: path
      required: true
      schema:
        type: integer
    Order:
      name: order
      in: path
      required: true
      schema:
        type: string
  requestBodies:
    SinglePdfFile:
      content:
        multipart/form-data:
          schema:
            type: object
            properties:
              file:
                type: string
                format: base64
          encoding:
            file:
              contentType: application/pdf
  responses:
    Simple:
      description: Response containing a simple status as string.
      content:
        "text/plain":
          schema:
            type: string
            example: "OK"
    
  