Main Koha release repository https://koha-community.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

285 lines
7.4 KiB

---
/acquisitions/orders:
get:
x-mojo-to: Acquisitions::Orders#list
operationId: listOrders
tags:
- orders
summary: List orders
produces:
- application/json
parameters:
- name: biblio_id
in: query
description: Identifier for a linked bibliographic record
required: false
type: integer
- name: basket_id
in: query
description: Identifier for a linked acquisition basket
required: false
type: integer
- name: fund_id
in: query
description: Identifier for the fund the order goes against
required: false
type: integer
- name: status
in: query
description: Current status for the order. Can be 'new', 'ordered', 'partial',
'complete' or 'cancelled'
required: false
type: string
- name: only_active
in: query
description: If only active orders should be listed
required: false
type: boolean
- $ref: ../parameters.yaml#/match
- $ref: ../parameters.yaml#/order_by
- $ref: ../parameters.yaml#/page
- $ref: ../parameters.yaml#/per_page
- $ref: ../parameters.yaml#/q_param
- $ref: ../parameters.yaml#/q_body
- $ref: ../parameters.yaml#/q_header
responses:
"200":
description: A list of orders
schema:
type: array
items:
$ref: ../definitions.yaml#/order
"401":
description: Authentication required
schema:
$ref: ../definitions.yaml#/error
"403":
description: Access forbidden
schema:
$ref: ../definitions.yaml#/error
"404":
description: Order not found
schema:
$ref: ../definitions.yaml#/error
"500":
description: |
Internal server error. Possible `error_code` attribute values:
* `internal_server_error`
schema:
$ref: ../definitions.yaml#/error
"503":
description: Under maintenance
schema:
$ref: ../definitions.yaml#/error
x-koha-authorization:
permissions:
acquisition:
- order_manage
- order_manage_all
x-koha-embed:
- basket
- basket.basket_group
- basket.creator
- biblio
- biblio.active_orders+count
- biblio.holds+count
- biblio.items+count
- biblio.suggestions.suggester
- fund
- current_item_level_holds+count
- invoice
- items
- subscription
post:
x-mojo-to: Acquisitions::Orders#add
operationId: addOrder
tags:
- orders
summary: Add order
parameters:
- name: body
in: body
description: A JSON object representing an order
required: true
schema:
$ref: ../definitions.yaml#/order
produces:
- application/json
responses:
"201":
description: Order added
schema:
$ref: ../definitions.yaml#/order
"400":
description: Bad request
schema:
$ref: ../definitions.yaml#/error
"401":
description: Authentication required
schema:
$ref: ../definitions.yaml#/error
"403":
description: Access forbidden
schema:
$ref: ../definitions.yaml#/error
"409":
description: Conflict in creating the resource
schema:
$ref: ../definitions.yaml#/error
"500":
description: |
Internal server error. Possible `error_code` attribute values:
* `internal_server_error`
schema:
$ref: ../definitions.yaml#/error
"503":
description: Under maintenance
schema:
$ref: ../definitions.yaml#/error
x-koha-authorization:
permissions:
acquisition: order_manage
"/acquisitions/orders/{order_id}":
get:
x-mojo-to: Acquisitions::Orders#get
operationId: getOrder
tags:
- orders
summary: Get order
parameters:
- $ref: ../parameters.yaml#/order_id_pp
produces:
- application/json
responses:
"200":
description: An order
schema:
$ref: ../definitions.yaml#/order
"401":
description: Authentication required
schema:
$ref: ../definitions.yaml#/error
"403":
description: Access forbidden
schema:
$ref: ../definitions.yaml#/error
"404":
description: Order not found
schema:
$ref: ../definitions.yaml#/error
"500":
description: |
Internal server error. Possible `error_code` attribute values:
* `internal_server_error`
schema:
$ref: ../definitions.yaml#/error
"503":
description: Under maintenance
schema:
$ref: ../definitions.yaml#/error
x-koha-authorization:
permissions:
acquisition: order_manage
x-koha-embed:
- basket
- basket.basket_group
- basket.creator
- biblio
- biblio.active_orders+count
- biblio.holds+count
- biblio.items+count
- biblio.suggestions.suggester
- fund
- current_item_level_holds+count
- invoice
- items
- subscription
put:
x-mojo-to: Acquisitions::Orders#update
operationId: updateOrder
tags:
- orders
summary: Update order
parameters:
- $ref: ../parameters.yaml#/order_id_pp
- name: body
in: body
description: A JSON object representing an order
required: true
schema:
$ref: ../definitions.yaml#/order
produces:
- application/json
responses:
"200":
description: An order
schema:
$ref: ../definitions.yaml#/order
"401":
description: Authentication required
schema:
$ref: ../definitions.yaml#/error
"403":
description: Access forbidden
schema:
$ref: ../definitions.yaml#/error
"404":
description: Order not found
schema:
$ref: ../definitions.yaml#/error
"500":
description: |
Internal server error. Possible `error_code` attribute values:
* `internal_server_error`
schema:
$ref: ../definitions.yaml#/error
"503":
description: Under maintenance
schema:
$ref: ../definitions.yaml#/error
x-koha-authorization:
permissions:
acquisition: order_manage
delete:
x-mojo-to: Acquisitions::Orders#delete
operationId: deleteOrder
tags:
- orders
summary: Delete order
parameters:
- $ref: ../parameters.yaml#/order_id_pp
produces:
- application/json
responses:
"204":
description: Order deleted
"401":
description: Authentication required
schema:
$ref: ../definitions.yaml#/error
"403":
description: Access forbidden
schema:
$ref: ../definitions.yaml#/error
"404":
description: Order not found
schema:
$ref: ../definitions.yaml#/error
"500":
description: |
Internal server error. Possible `error_code` attribute values:
* `internal_server_error`
schema:
$ref: ../definitions.yaml#/error
"503":
description: Under maintenance
schema:
$ref: ../definitions.yaml#/error
x-koha-authorization:
permissions:
acquisition: order_manage