---
/ill/iso18626_requesting_agencies:
  get:
    x-mojo-to: ILL::ISO18626::RequestingAgencies#list
    operationId: listIso18626IllrequestingAgencies
    tags:
      - iso18626_requesting_agencies
    summary: List ISO18626 ILL requesting agencies
    parameters:
      - name: x-koha-embed
        in: header
        required: false
        description: Embed list sent as a request header
        type: array
        items:
          type: string
          enum:
            - ill_partner
      - $ref: "../swagger.yaml#/parameters/page"
      - $ref: "../swagger.yaml#/parameters/per_page"
      - $ref: "../swagger.yaml#/parameters/match"
      - $ref: "../swagger.yaml#/parameters/order_by"
      - $ref: "../swagger.yaml#/parameters/q_param"
      - $ref: "../swagger.yaml#/parameters/q_body"
      - $ref: "../swagger.yaml#/parameters/request_id_header"
    produces:
      - application/json
    responses:
      "200":
        description: A list of ISO18626 ILL requesting agencies
        schema:
          type: array
          items:
            $ref: "../swagger.yaml#/definitions/iso18626_requesting_agency"
      "400":
        description: |
          Bad request. Possible `error_code` attribute values:

            * `invalid_query`
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      "403":
        description: Access forbidden
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      "404":
        description: Patron not found
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      "500":
        description: |
          Internal server error. Possible `error_code` attribute values:

          * `internal_server_error`
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      "503":
        description: Under maintenance
        schema:
          $ref: "../swagger.yaml#/definitions/error"
    x-koha-authorization:
      permissions:
        ill: "1"
  post:
    x-mojo-to: ILL::ISO18626::RequestingAgencies#add
    operationId: addIso18626IllrequestingAgencies
    tags:
      - iso18626_requesting_agencies
    summary: Add ISO18626 requesting agency
    consumes:
      - application/json
    produces:
      - application/json
    parameters:
      - description: A JSON object containing information about the new requesting agency
        in: body
        name: body
        required: true
        schema:
            $ref: "../swagger.yaml#/definitions/iso18626_requesting_agency"
    responses:
      201:
        description: A successfully created ISO18626 requesting agency
        schema:
          items:
            $ref: "../swagger.yaml#/definitions/iso18626_requesting_agency"
      400:
        description: Bad request
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      401:
        description: Authentication required
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      403:
        description: Access forbidden
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      404:
        description: Ressource not found
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      409:
        description: Conflict in creating resource
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      413:
        description: Payload too large
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      500:
        description: |-
          Internal server error. Possible `error_code` attribute values:
          * `internal_server_error`
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      503:
        description: Under maintenance
        schema:
          $ref: "../swagger.yaml#/definitions/error"
    x-koha-authorization:
      permissions:
        ill: 1

/ill/iso18626_requesting_agencies/{iso18626_requesting_agency_id}:
  get:
    x-mojo-to: ILL::ISO18626::RequestingAgencies#get
    operationId: getIso18626IllrequestingAgency
    tags:
      - iso18626_requesting_agencies
    summary: Retrieve a single ISO18626 ILL requesting agency
    parameters:
      - name: x-koha-embed
        in: header
        required: false
        description: Embed list sent as a request header
        type: array
        items:
          type: string
          enum:
            - ill_partner
      - $ref: "../swagger.yaml#/parameters/iso18626_requesting_agency_id_pp"
    produces:
      - application/json
    responses:
      "200":
        description: A single ISO18626 ILL requesting agency
        schema:
          $ref: "../swagger.yaml#/definitions/iso18626_requesting_agency"
      "400":
        description: |
          Bad request. Possible `error_code` attribute values:

            * `invalid_query`
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      "403":
        description: Access forbidden
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      "404":
        description: Patron not found
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      "500":
        description: |
          Internal server error. Possible `error_code` attribute values:

          * `internal_server_error`
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      "503":
        description: Under maintenance
        schema:
          $ref: "../swagger.yaml#/definitions/error"
    x-koha-authorization:
      permissions:
        ill: "1"
  put:
    x-mojo-to: ILL::ISO18626::RequestingAgencies#update
    operationId: updateIso18626IllrequestingAgency
    tags:
      - iso18626_requesting_agencies
    summary: Update ISO18626 ILL requesting agency
    consumes:
      - application/json
    produces:
      - application/json
    parameters:
      - $ref: "../swagger.yaml#/parameters/iso18626_requesting_agency_id_pp"
      - name: body
        in: body
        description: A JSON object containing new information about existing ISO18626 ILL requesting agency
        required: true
        schema:
          $ref: "../swagger.yaml#/definitions/iso18626_requesting_agency"
    responses:
      200:
        description: A successfully updated ISO18626 ILL requesting agency
        schema:
          items:
            $ref: "../swagger.yaml#/definitions/iso18626_requesting_agency"
      400:
        description: Bad request
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      403:
        description: Access forbidden
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      404:
        description: Ressource not found
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      409:
        description: Conflict in updating resource
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      413:
        description: Payload too large
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      500:
        description: |-
          Internal server error. Possible `error_code` attribute values:
          * `internal_server_error`
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      503:
        description: Under maintenance
        schema:
          $ref: "../swagger.yaml#/definitions/error"
    x-koha-authorization:
      permissions:
        erm: 1
  delete:
    x-mojo-to: ILL::ISO18626::RequestingAgencies#delete
    operationId: deleteIso18626IllrequestingAgency
    tags:
      - iso18626_requesting_agencies
    summary: Delete ISO18626 ILL requesting agency
    produces:
      - application/json
    parameters:
      - $ref: "../swagger.yaml#/parameters/iso18626_requesting_agency_id_pp"
    responses:
      204:
        description: ISO18626 ILL requesting agency deleted
      400:
        description: Bad request
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      401:
        description: Authentication required
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      403:
        description: Access forbidden
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      404:
        description: Ressource not found
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      409:
        description: Conflict in deleting resource
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      500:
        description: |-
          Internal server error. Possible `error_code` attribute values:
          * `internal_server_error`
        schema:
          $ref: "../swagger.yaml#/definitions/error"
      503:
        description: Under maintenance
        schema:
          $ref: "../swagger.yaml#/definitions/error"
    x-koha-authorization:
      permissions:
        erm: 1
