PKK Library Koha ILS-DI

The P.K. Kelkar Library Koha catalogue exposes the ILS-DI (Integrated Library System - Discovery Interface) service, a standard Koha web service for discovery-layer integrations covering bibliographic, holdings, patron, and circulation operations. The ILS-DI landing page resolves live and identifies the underlying Koha 23.11 installation.

OpenAPI Specification

iit-kanpur-library-rest.yaml Raw ↑
openapi: 3.0.3
info:
  contact:
    name: Koha Development Team
    url: https://koha-community.org/
  description: "## Background\n\nThe API supports two sets of endpoints, one targetted at library staff\
    \ and the other at at library users.\n\nThose endpoints under the `/public` path are aimed at delivering\
    \ functionality tailored to library users and offer\na more restricted set of functions, overrides\
    \ and data in thier responses for data privacy and library policy\nreasons. Many of these endpoints\
    \ do not require authentication for fetching public data, though an authenticated\nsession will expose\
    \ additional options and allow users to see more data where it is part of their own record.\n\nAll\
    \ other endpoints are targetted at the staff interface level and allow for additional functionality\
    \ and a more\nunrestricted view of data.  These endpoints, however, have a level of redaction built\
    \ in for resources that the\napi consumer should not have access to.  For example, user data for users\
    \ who do not belong to the same library\nor library group of your api user will be reduced to just\
    \ minimum neccesary for a valid response. Object keys will\nbe consistent for all responses, but their\
    \ values may be removed depending on access.\n\n## Authentication\n\nThe API supports the following\
    \ authentication mechanisms\n\n* HTTP Basic authentication\n* OAuth2 (client credentials grant)\n\
    * Cookie-based\n\nBoth _Basic authentication_ and the _OAuth2_ flow, need to be enabled\nby system\
    \ preferences.\n\n## Authorization\n\nThe API uses existing user profiles to restrict access to resources\
    \ based on user permissions and the library the\nAPI user is assigned to.  This may result, at times,\
    \ in resources being returned in a redacted form with all keys\npresent but sensative values nulled.\n\
    \nWe do not yet support OAuth Scopes or the Authorization Code grant flow.\n\n## Errors\n\nThe API\
    \ uses standard HTTP status codes to indicate the success or failure\nof the API call. The body of\
    \ the response will be JSON in the following format:\n\n```\n{\n  \"error\": \"Current settings prevent\
    \ the passed due date to be applied\",\n  \"error_code\": \"invalid_due_date\"\n}\n```\n\nNote: Some\
    \ routes might offer additional attributes in their error responses but that\"s\nsubject to change\
    \ and thus not documented.\n\n## Filtering responses\n\nThe API allows for some advanced response\
    \ filtering using a JSON based query syntax. The\nquery can be added to the requests:\n\n* as a query\
    \ parameter `q=`\n* in the request body\n\nFor simple field equality matches we can use `{ \"fieldname\"\
    : \"value\" }` where the fieldname\nmatches one of the fields as described in the particular endpoints\
    \ response object.\n\nWe can refine that with more complex matching clauses by nesting a the clause\
    \ into the\nobject; `{ \"fieldname\": { \"clause\": \"value\" } }`.\n\nAvailable matching clauses\
    \ include `=`, `!=`, `<`, `>`, `<=`, `>=` and `-not`. We also support `-like`\nand `-not_like` string\
    \ comparisons with `%` used to denote wildcards, thus you can pass\n`{ \"fieldname\": { \"-like\"\
    : \"value%\" } }` to do a 'starts with' string match for example.\n\nWe can filter on multiple fields\
    \ by adding them to the JSON respresentation. Adding at `HASH`\nlevel will result in an \"AND\" query,\
    \ whilst combinding them in an `ARRAY` will result in an\n\"OR\" query: `{ \"field1\": \"value2\"\
    , \"field2\": \"value2\" }` will filter the response to only those\nresults with both field1 containing\
    \ value2 AND field2 containing value2 for example.\n\nThere is a collection of special operators also\
    \ available to you, including:\n\n* `-in` - Expects an array of values to perform an OR match against\n\
    * `-not_in` - Expects an array of values to perform a NOR match against\n* `-between` - Expects two\
    \ values which the value of the field is expected to fall between\n* `-not_between` - Expects two\
    \ values which the value of the field is expected to fall outside of\n* `-ident` - Expects a second\
    \ field name to match the two field values against\n* `-regexp` - Expects a perl compatible regular\
    \ expression for which the value should match\n\nLogic and nesting is also supported and you may use\
    \ `-and` and `-or` to change the logic of an ARRAY\nor HASH as described above.\n\nAdditionally, if\
    \ you are requesting related data be embedded into the response one can query\non the related data\
    \ using dot notation in the field names.\n\n### Examples\n\nThe following request would return any\
    \ patron with firstname \"Henry\" and lastname \"Acevedo\";\n\n`curl -u koha:koha --request GET \"\
    http://127.0.0.1:8081/api/v1/patrons/\" --data-raw '{ \"surname\": \"Acevedo\", \"firstname\": \"\
    Henry\" }'`\n\nThe following request would return any patron whose lastname begins with \"Ace\";\n\
    \n`curl -u koha:koha --request GET \"http://127.0.0.1:8081/api/v1/patrons/\" --data-raw '{ \"surname\"\
    : { \"-like\": \"Ace%\" }'`\n\nThe following request would return any patron whose lastname is \"\
    Acevedo\" OR \"Bernardo\"\n\n`curl -u koha:koha --request GET \"http://127.0.0.1:8081/api/v1/patrons/\"\
    \ --data-raw '{ \"surname\": [ \"Acevedo\", \"Bernardo\" ] }'`\n\nThe following request embeds the\
    \ related patron extended attributes data and filters on it.\n\n`curl -u koha:koha =--request GET\
    \ 'http://127.0.0.1:8081/api/v1/patrons/' --header 'x-koha-embed: extended_attributes' --data-raw\
    \ '{ \"extended_attributes.code\": \"internet\", \"extended_attributes.attribute\": \"1\" }'`\n\n\
    ## Special headers\n\n### x-koha-embed\n\nThis optional header allows the api consumer to request\
    \ additional related data\nto be returned in the api response.  It also allows for cross referencing\
    \ in the\nqueries as described above. It accepts a comma delimited list of relation names.\n\nRelations\
    \ may on occasion also support dot delimited nesting to allow traversal.\n\n### x-koha-library\n\n\
    This optional header should be passed to give your api request a library\ncontext; If it is not included\
    \ in the request, then the request context\nwill default to using your api comsumer\"s assigned home\
    \ library.\n"
  license:
    name: GPL v3,
    url: http://www.gnu.org/licenses/gpl.txt
  title: Koha REST API
  version: '1'
servers:
- url: https://libserv.iitk.ac.in/api/v1
  description: PKK Library Koha REST API (production)
tags:
- description: 'Manage article requests

    '
  name: article_requests
  x-displayName: Article requests
- description: 'Manage authorised value categories

    '
  name: authorised_value_categories
  x-displayName: Authorised value categories
- description: 'Manage authorised values

    '
  name: authorised_values
  x-displayName: Authorised values
- description: 'Manage batch import profiles

    '
  name: batch_import_profiles
  x-displayName: Batch import profiles
- description: 'Manage baskets for the acquisitions module

    '
  name: baskets
  x-displayName: Baskets
- description: 'Manage Authority records

    '
  name: authorities
  x-displayName: Authorities
- description: 'Manage bibliographic records

    '
  name: biblios
  x-displayName: Biblios
- description: 'Manage bookings

    '
  name: bookings
  x-displayName: Bookings
- description: 'Manage cash registers

    '
  name: cash_registers
  x-displayName: Cash registers
- description: 'Manage cash register cashups

    '
  name: cashups
  x-displayName: Cashups
- description: 'Manage checkouts

    '
  name: checkouts
  x-displayName: Checkouts
- description: 'Manage circulation rules

    '
  name: circulation_rules
  x-displayName: Circulation rules
- description: 'Manage cities

    '
  name: cities
  x-displayName: Cities
- description: 'Manage patron clubs

    '
  name: clubs
  x-displayName: Clubs
- description: 'Manage circulation desks

    '
  name: desks
  x-displayName: Circulation desks
- description: 'Manage ERM agreements

    '
  name: erm_agreements
  x-displayName: ERM agreements
- description: 'Manage ERM configuration

    '
  name: erm_config
  x-displayName: ERM configuration
- description: 'Manage ERM counter files

    '
  name: erm_counter_files
  x-displayName: ERM counter files
- description: 'Manage ERM counter logs

    '
  name: erm_counter_logs
  x-displayName: ERM counter logs
- description: 'Retrieve counter registry data

    '
  name: erm_counter_registry
  x-displayName: ERM counter registry
- description: 'Manage ERM saved reports

    '
  name: erm_default_usage_reports
  x-displayName: ERM saved reports
- description: 'Manage ERM docuemnts

    '
  name: erm_documents
  x-displayName: ERM documents
- description: 'Manage ERM eHoldings packages

    '
  name: erm_eholdings_packages
  x-displayName: ERM eHoldings packages
- description: 'Manage ERM eHoldings resources

    '
  name: erm_eholdings_resources
  x-displayName: ERM eHoldings resources
- description: 'Manage ERM eHoldings titles

    '
  name: erm_eholdings_titles
  x-displayName: ERM eHoldings titles
- description: 'Manage ERM licences

    '
  name: erm_licences
  x-displayName: ERM licences
- description: 'Retrieve SUSHI service data

    '
  name: erm_sushi_service
  x-displayName: ERM SUSHI services
- description: 'Manage ERM usage data providers

    '
  name: erm_usage_data_providers
  x-displayName: ERM usage data providers
- description: 'Manage ERM usage databases

    '
  name: erm_usage_databases
  x-displayName: ERM usage databases
- description: 'Manage ERM usage items

    '
  name: erm_usage_items
  x-displayName: ERM usage items
- description: 'Manage ERM usage platforms

    '
  name: erm_usage_platforms
  x-displayName: ERM usage platforms
- description: 'Manage ERM usage titles

    '
  name: erm_usage_titles
  x-displayName: ERM usage titles
- description: 'Manage ERM usage reports

    '
  name: erm_usage_reports
  x-displayName: ERM usage reports
- description: 'Manage ERM users

    '
  name: erm_users
  x-displayName: ERM users
- description: 'Manage funds for the acquisitions module

    '
  name: funds
  x-displayName: Funds
- description: 'Manage holds

    '
  name: holds
  x-displayName: Holds
- description: 'Manage identity providers

    '
  name: identity_providers
  x-displayName: Identity providers
- description: 'Manage ILL module backends

    '
  name: ill_backends
  x-displayName: ILL backends
- description: 'Manage ILL module batches

    '
  name: ill_batches
  x-displayName: ILL batches
- description: 'Manage ILL module batch statuses

    '
  name: ill_batchstatuses
  x-displayName: ILL batch statuses
- description: 'Manage ILL requests

    '
  name: ill_requests
  x-displayName: ILL requests
- description: 'Manage import batches

    '
  name: import_batches
  x-displayName: Import batches
- description: 'Manage item groups

    '
  name: item_groups
  x-displayName: Item groups
- description: 'Manage items

    '
  name: items
  x-displayName: Items
- description: 'Manage item types

    '
  name: item_types
  x-displayName: Item Types
- description: 'Manage jobs

    '
  name: jobs
  x-displayName: Jobs
- description: 'Manage libraries

    '
  name: libraries
  x-displayName: Libraries
- description: 'Manage macros

    '
  name: macros
  x-displayName: Macros
- description: 'Manage acquisition orders

    '
  name: orders
  x-displayName: Orders
- description: 'Handle OAuth flows

    '
  name: oauth
  x-displayName: OAuth
- description: 'Manage patron categories

    '
  name: patron_categories
  x-displayName: Patron categories
- description: 'Manage patrons

    '
  name: patrons
  x-displayName: Patrons
- description: 'Manage preservation tasks

    '
  name: preservation
  x-displayName: Preservation
- description: 'Manage purchase suggestions

    '
  name: suggestions
  x-displayName: Purchase suggestions
- description: 'Manage quotes

    '
  name: quotes
  x-displayName: Quotes
- description: 'Manage recalls

    '
  name: recalls
  x-displayName: Recalls
- description: 'Manage return claims

    '
  name: return_claims
  x-displayName: Return claims
- description: 'Manage rotas

    '
  name: rotas
  x-displayName: Rotas
- description: Manage search filters
  name: search_filters
  x-displayName: Search filters
- description: 'Manage SMTP servers configurations

    '
  name: smtp_servers
  x-displayName: SMTP servers
- description: 'Manage tickets

    '
  name: tickets
  x-displayName: Tickets
- description: 'Manage transfer limits

    '
  name: transfer_limits
  x-displayName: Transfer limits
- description: 'Handle two factor authentication flows

    '
  name: 2fa
  x-displayName: Two factor authentication
- description: 'Manage vendors for the acquisitions module

    '
  name: vendors
  x-displayName: Vendors
paths:
  /acquisitions/baskets/managers:
    get:
      tags:
      - baskets
      summary: List possibe managers for baskets
      description: This resource returns a list of patron allowed to be a manager for baskets
      operationId: listBasketsManagers
      parameters:
      - name: _match
        in: query
        required: false
        description: Matching criteria
        schema:
          type: string
          enum:
          - contains
          - exact
          - starts_with
          - ends_with
      - name: _order_by
        in: query
        required: false
        description: Sorting criteria
        schema:
          type: array
          items:
            type: string
      - name: _page
        in: query
        required: false
        description: Page number, for paginated object listing
        schema:
          type: integer
      - name: _per_page
        in: query
        required: false
        description: Page size, for paginated object listing
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Query filter sent as a request parameter
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: x-koha-embed
        in: header
        required: false
        description: Embed list sent as a request header
        schema:
          type: array
          items:
            enum:
            - extended_attributes
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
        description: Query filter sent through request"s body
      responses:
        '200':
          description: A list of orders' managers
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/patron_yaml'
                type: array
        '400':
          description: "Bad request. Possible `error_code` attribute values:\n\n  * `invalid_query`\n"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '401':
          description: Default response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultResponse'
        '403':
          description: Access forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '404':
          description: Default response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultResponse'
        '500':
          description: 'Internal server error. Possible `error_code` attribute values:


            * `internal_server_error`

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '501':
          description: Default response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultResponse'
        '503':
          description: Under maintenance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
  /acquisitions/funds:
    get:
      tags:
      - funds
      summary: List funds
      operationId: listFunds
      parameters:
      - name: name
        in: query
        required: false
        description: Case insensitive search on fund name
        schema:
          type: string
      - name: fund_owner_id
        in: query
        required: false
        description: Display only the funds that belongs to the given patron ID
        schema:
          type: integer
      - name: _match
        in: query
        required: false
        description: Matching criteria
        schema:
          type: string
          enum:
          - contains
          - exact
          - starts_with
          - ends_with
      - name: _order_by
        in: query
        required: false
        description: Sorting criteria
        schema:
          type: array
          items:
            type: string
      - name: _page
        in: query
        required: false
        description: Page number, for paginated object listing
        schema:
          type: integer
      - name: _per_page
        in: query
        required: false
        description: Page size, for paginated object listing
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Query filter sent as a request parameter
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: x-koha-request-id
        in: header
        required: false
        description: Request id header
        schema:
          type: integer
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
        description: Query filter sent through request"s body
      responses:
        '200':
          description: A list of funds
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/fund_yaml'
                type: array
        '400':
          description: "Bad request. Possible `error_code` attribute values:\n\n  * `invalid_query`\n"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '403':
          description: Access forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '404':
          description: Fund not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '500':
          description: 'Internal server error. Possible `error_code` attribute values:


            * `internal_server_error`

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '501':
          description: Default response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultResponse'
        '503':
          description: Under maintenance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
  /acquisitions/funds/owners:
    get:
      tags:
      - funds
      summary: List possibe owners for funds
      description: This resource returns a list of patron allowed to be owner of funds
      operationId: listFundsOwners
      parameters:
      - name: _match
        in: query
        required: false
        description: Matching criteria
        schema:
          type: string
          enum:
          - contains
          - exact
          - starts_with
          - ends_with
      - name: _order_by
        in: query
        required: false
        description: Sorting criteria
        schema:
          type: array
          items:
            type: string
      - name: _page
        in: query
        required: false
        description: Page number, for paginated object listing
        schema:
          type: integer
      - name: _per_page
        in: query
        required: false
        description: Page size, for paginated object listing
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Query filter sent as a request parameter
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: x-koha-embed
        in: header
        required: false
        description: Embed list sent as a request header
        schema:
          type: array
          items:
            enum:
            - extended_attributes
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
        description: Query filter sent through request"s body
      responses:
        '200':
          description: A list of funds' owners
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/patron_yaml'
                type: array
        '400':
          description: "Bad request. Possible `error_code` attribute values:\n\n  * `invalid_query`\n"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '401':
          description: Default response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultResponse'
        '403':
          description: Access forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '404':
          description: Default response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultResponse'
        '500':
          description: 'Internal server error. Possible `error_code` attribute values:


            * `internal_server_error`

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '501':
          description: Default response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultResponse'
        '503':
          description: Under maintenance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
  /acquisitions/funds/users:
    get:
      tags:
      - funds
      summary: List possibe users for funds
      description: This resource returns a list of patron allowed to be owner of funds
      operationId: listFundsUsers
      parameters:
      - name: _match
        in: query
        required: false
        description: Matching criteria
        schema:
          type: string
          enum:
          - contains
          - exact
          - starts_with
          - ends_with
      - name: _order_by
        in: query
        required: false
        description: Sorting criteria
        schema:
          type: array
          items:
            type: string
      - name: _page
        in: query
        required: false
        description: Page number, for paginated object listing
        schema:
          type: integer
      - name: _per_page
        in: query
        required: false
        description: Page size, for paginated object listing
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Query filter sent as a request parameter
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: x-koha-embed
        in: header
        required: false
        description: Embed list sent as a request header
        schema:
          type: array
          items:
            enum:
            - extended_attributes
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
        description: Query filter sent through request"s body
      responses:
        '200':
          description: A list of funds' users
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/patron_yaml'
                type: array
        '400':
          description: "Bad request. Possible `error_code` attribute values:\n\n  * `invalid_query`\n"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '401':
          description: Default response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultResponse'
        '403':
          description: Access forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '404':
          description: Default response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultResponse'
        '500':
          description: 'Internal server error. Possible `error_code` attribute values:


            * `internal_server_error`

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '501':
          description: Default response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultResponse'
        '503':
          description: Under maintenance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
  /acquisitions/orders:
    get:
      tags:
      - orders
      summary: List orders
      operationId: listOrders
      parameters:
      - name: biblio_id
        in: query
        required: false
        description: Identifier for a linked bibliographic record
        schema:
          type: integer
      - name: basket_id
        in: query
        required: false
        description: Identifier for a linked acquisition basket
        schema:
          type: integer
      - name: fund_id
        in: query
        required: false
        description: Identifier for the fund the order goes against
        schema:
          type: integer
      - name: status
        in: query
        required: false
        description: Current status for the order. Can be 'new', 'ordered', 'partial', 'complete' or 'cancelled'
        schema:
          type: string
      - name: only_active
        in: query
        required: false
        description: If only active orders should be listed
        schema:
          type: boolean
      - name: _match
        in: query
        required: false
        description: Matching criteria
        schema:
          type: string
          enum:
          - contains
          - exact
          - starts_with
          - ends_with
      - name: _order_by
        in: query
        required: false
        description: Sorting criteria
        schema:
          type: array
          items:
            type: string
      - name: _page
        in: query
        required: false
        description: Page number, for paginated object listing
        schema:
          type: integer
      - name: _per_page
        in: query
        required: false
        description: Page size, for paginated object listing
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Query filter sent as a request parameter
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: x-koha-request-id
        in: header
        required: false
        description: Request id header
        schema:
          type: integer
      - name: x-koha-embed
        in: header
        required: false
        description: Embed list sent as a request header
        schema:
          type: array
          items:
            enum:
            - basket
            - basket.basket_group
            - basket.creator
            - biblio
            - biblio.active_orders+count
            - biblio.holds+count
            - biblio.items+count
            - biblio.suggestions.suggester
            - creator
            - fund
            - fund.budget
            - current_item_level_holds+count
            - invoice
            - items
            - items+strings
            - subscription
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
        description: Query filter sent through request"s body
      responses:
        '200':
          description: A list of orders
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/order_yaml'
                type: array
        '400':
          description: "Bad request. Possible `error_code` attribute values:\n\n  * `invalid_query`\n"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '403':
          description: Access forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '500':
          description: 'Internal server error. Possible `error_code` attribute values:


            * `internal_server_error`

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '501':
          description: Default response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultResponse'
        '503':
          description: Under maintenance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
    post:
      tags:
      - orders
      summary: Add order
      operationId: addOrder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/order_yaml'
        description: A JSON object representing an order
      responses:
        '201':
          description: Order added
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/order_yaml'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '403':
          description: Access forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_yaml'
        '404':
          description: Default response.
          conte

# --- truncated at 32 KB (952 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/iit-kanpur/refs/heads/main/openapi/iit-kanpur-library-rest.yaml