get:
  operationId: get-all-destinations
  summary: Zustellpunkte auflisten
  description: Auflistung aller verfügbaren Zustellpunkte und ihrer unterstützen Antragsschemata.
  tags:
    - Destination Management
  security:
    - OAuth20:
        - 'destination:subscribe'
        - 'destination:manage'
  responses:
    '200':
      description: OK
      content:
        application/json:
          schema:
            $ref: '../../schemas/get-all-destinations-response.yml'
          examples:
            example-1:
              $ref: '../../examples/destination-list.yml'
    '400':
      description: Bad Request
      content:
        application/problem+json:
          schema:
            $ref: '../../schemas/error-response.yml'
    '401':
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: '../../schemas/error-response.yml'
    '403':
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: '../../schemas/error-response.yml'
post:
  operationId: create-destination
  summary: Zustellpunkt anlegen
  description: Erstellung eines neuen Zustellpunktes mit unterstüzten Antragsschemata.
  tags:
    - Destination Management
  security:
    - OAuth20:
        - 'destination:manage'
  requestBody:
    required: true
    content:
      application/json:
        schema:
          $ref: '../../schemas/create-destination-request.yml'
        examples:
          example-1:
            $ref: '../../examples/destination-request.yml'
  responses:
    '201':
      description: Created
      content:
        application/json:
          schema:
            $ref: '../../schemas/get-destination-response.yml'
          examples:
            example-1:
              $ref: '../../examples/destination-response.yml'
    '400':
      description: Bad Request
      content:
        application/problem+json:
          schema:
            $ref: ../../schemas/error-response.yml
    '401':
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: ../../schemas/error-response.yml
    '403':
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: ../../schemas/error-response.yml
  callbacks:
    ApplicationSubmitted:
      '{$request.body#/callback}':
        post:
          requestBody:
            required: true
            content:
              application/json:
                schema:
                  $ref: '../../schemas/list-of-application-ids.yml'
          responses:
            '202':
              description: Accepted
