View | Details | Raw Unified | Return to bug 30385
Collapse All | Expand All

(-)a/api/v1/swagger/definitions/account_line.yaml (-50 / +48 lines)
Lines 1-96 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  account_line_id:
4
  description:
5
    type: integer
5
    description: Account line description
6
    description: Internal account line identifier
7
  checkout_id:
8
    type:
6
    type:
9
      - integer
7
      - string
10
      - "null"
8
      - "null"
11
    description: Internal identifier for the checkout the account line is related to
9
  account_line_id:
12
  patron_id:
10
    description: Internal account line identifier
13
    type: integer
11
    type: integer
14
    description: Internal identifier for the patron the account line belongs to
12
  account_type:
15
  item_id:
13
    description: Account line type
16
    type:
14
    type:
17
      - integer
15
      - string
18
      - "null"
16
      - "null"
19
    description: Internal identifier for the item the account line is related to
20
  date:
21
    type: string
22
    format: date-time
23
    description: Date the account line was created
24
  amount:
17
  amount:
25
    type: number
26
    description: Account line amount
18
    description: Account line amount
27
  description:
19
    type: number
20
  amount_outstanding:
21
    description: Outstanding amount
22
    type: number
23
  cash_register_id:
24
    description: Internal identifier for the cash register used for the payment (if any)
28
    type:
25
    type:
29
      - string
26
      - integer
30
      - "null"
27
      - "null"
31
    description: Account line description
28
  checkout_id:
32
  account_type:
29
    description: Internal identifier for the checkout the account line is related to
33
    type:
30
    type:
34
      - string
31
      - integer
35
      - "null"
32
      - "null"
36
    description: Account line type
33
  credit_type:
37
  debit_type:
34
    description: Account line credit type
38
    type:
35
    type:
39
      - string
36
      - string
40
      - "null"
37
      - "null"
38
  date:
39
    description: Date the account line was created
40
    type: string
41
    format: date-time
42
  debit_type:
41
    description: Account line debit type
43
    description: Account line debit type
42
  credit_type:
43
    type:
44
    type:
44
      - string
45
      - string
45
      - "null"
46
      - "null"
46
    description: Account line credit type
47
  interface:
47
  payment_type:
48
    description: 'Interface in which the account line was generated (values can be: api, cron, commandline, intranet, opac and sip)'
48
    type:
49
    type:
49
      - string
50
      - string
50
      - "null"
51
      - "null"
51
    description: Payment type
52
  amount_outstanding:
53
    type: number
54
    description: Outstanding amount
55
  last_increment:
56
    type:
57
      - number
58
      - "null"
59
    description: The amount the line was increased last time
60
  timestamp:
61
    type: string
62
    format: date-time
63
    description: Timestamp for the latest line update
64
  internal_note:
52
  internal_note:
53
    description: Internal note
65
    type:
54
    type:
66
      - string
55
      - string
67
      - "null"
56
      - "null"
68
    description: Internal note
57
  item_id:
69
  user_id:
58
    description: Internal identifier for the item the account line is related to
70
    type:
59
    type:
71
      - integer
60
      - integer
72
      - "null"
61
      - "null"
73
    description: Internal patron identifier for the staff member that introduced the
62
  last_increment:
74
      account line
63
    description: The amount the line was increased last time
64
    type:
65
      - number
66
      - "null"
75
  library_id:
67
  library_id:
68
    description: Internal identifier for the library in which the transaction took place
76
    type:
69
    type:
77
      - string
70
      - string
78
      - "null"
71
      - "null"
79
    description: Internal identifier for the library in which the transaction took place
72
  patron_id:
80
  interface:
73
    description: Internal identifier for the patron the account line belongs to
74
    type: integer
75
  payment_type:
76
    description: Payment type
81
    type:
77
    type:
82
      - string
78
      - string
83
      - "null"
79
      - "null"
84
    description: "Interface in which the account line was generated (values can be: api,
85
      cron, commandline, intranet, opac and sip)"
86
  status:
80
  status:
81
    description: The credit/debit status
87
    type:
82
    type:
88
      - string
83
      - string
89
      - "null"
84
      - "null"
90
    description: The credit/debit status
85
  timestamp:
91
  cash_register_id:
86
    description: Timestamp for the latest line update
87
    type: string
88
    format: date-time
89
  user_id:
90
    description: Internal patron identifier for the staff member that introduced the account line
92
    type:
91
    type:
93
      - integer
92
      - integer
94
      - "null"
93
      - "null"
95
    description: Internal identifier for the cash register used for the payment (if any)
96
additionalProperties: false
94
additionalProperties: false
(-)a/api/v1/swagger/definitions/advancededitormacro.yaml (-4 / +4 lines)
Lines 2-18 Link Here
2
type: object
2
type: object
3
properties:
3
properties:
4
  macro_id:
4
  macro_id:
5
    type: integer
6
    description: Internal advanced editor macro identifier
5
    description: Internal advanced editor macro identifier
6
    type: integer
7
    readOnly: true
7
    readOnly: true
8
  name:
9
    description: macro name
10
    type: string
11
  macro_text:
8
  macro_text:
12
    description: macro text
9
    description: macro text
13
    type:
10
    type:
14
      - string
11
      - string
15
      - "null"
12
      - "null"
13
  name:
14
    description: macro name
15
    type: string
16
  patron_id:
16
  patron_id:
17
    description: borrower number
17
    description: borrower number
18
    type:
18
    type:
(-)a/api/v1/swagger/definitions/allows_renewal.yaml (-8 / +8 lines)
Lines 2-21 Link Here
2
type: object
2
type: object
3
properties:
3
properties:
4
  allows_renewal:
4
  allows_renewal:
5
    description: 'Renewability status; true = renewable, false = not renewable'
5
    type: boolean
6
    type: boolean
6
    description: Renewability status; true = renewable, false = not renewable
7
  max_renewals:
8
    type: integer
9
    description: Maximum number of possible renewals
10
  current_renewals:
7
  current_renewals:
11
    type: integer
12
    description: Current used renewals
8
    description: Current used renewals
13
  unseen_renewals:
14
    type: integer
9
    type: integer
15
    description: Number of consecutive times the item was renewed without being seen
16
  error:
10
  error:
11
    description: Description on false allows_renewal.
17
    type:
12
    type:
18
      - string
13
      - string
19
      - "null"
14
      - "null"
20
    description: Description on false allows_renewal.
15
  max_renewals:
16
    description: Maximum number of possible renewals
17
    type: integer
18
  unseen_renewals:
19
    description: Number of consecutive times the item was renewed without being seen
20
    type: integer
21
additionalProperties: false
21
additionalProperties: false
(-)a/api/v1/swagger/definitions/basket.yaml (-41 / +40 lines)
Lines 1-74 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  basket_id:
4
  authorised_by:
5
    type: integer
5
    description: Internal patron identifier of the basket creator
6
    description: Internal identifier for the basket
7
  name:
8
    type: string
9
    description: Basket name
10
  internal_note:
11
    type:
6
    type:
12
      - string
7
      - integer
13
      - "null"
8
      - "null"
14
    description: Internal note
9
  basket_group_id:
15
  vendor_note:
10
    description: links this basket to its group (aqbasketgroups.id)
16
    type:
11
    type:
17
      - string
12
      - integer
18
      - "null"
13
      - "null"
19
    description: Vendor note
14
  basket_id:
20
  contract_id:
15
    description: Internal identifier for the basket
21
    type: integer
16
    type: integer
22
    description: Internal identifier of the linked contract
17
  billing_library:
23
  creation_date:
18
    description: basket billing place
24
    type:
19
    type:
25
      - string
20
      - string
26
      - "null"
21
      - "null"
27
    format: date
28
    description: The date the basket was created
29
  close_date:
22
  close_date:
23
    description: The date the basket was closed
30
    type:
24
    type:
31
      - string
25
      - string
32
      - "null"
26
      - "null"
33
    format: date
27
    format: date
34
    description: The date the basket was closed
28
  contract_id:
35
  vendor_id:
29
    description: Internal identifier of the linked contract
36
    type: integer
30
    type: integer
37
    description: Internal identifier for the vendor
31
  create_items:
38
  authorised_by:
32
    description: "When items should be created for orders in this basket (Options: 'ordering', 'receiving', 'cataloguing'. Null means system wide config)"
39
    type:
33
    type: string
40
      - integer
34
    enum:
41
      - "null"
35
      - ordering
42
    description: Internal patron identifier of the basket creator
36
      - receiving
43
  basket_group_id:
37
      - cataloguing
38
  creation_date:
39
    description: The date the basket was created
44
    type:
40
    type:
45
      - integer
41
      - string
46
      - "null"
42
      - "null"
47
    description: links this basket to its group (aqbasketgroups.id)
43
    format: date
48
  delivery_library:
44
  delivery_library:
45
    description: basket delivery place
49
    type:
46
    type:
50
      - string
47
      - string
51
      - "null"
48
      - "null"
52
    description: basket delivery place
49
  internal_note:
53
  billing_library:
50
    description: Internal note
54
    type:
51
    type:
55
      - string
52
      - string
56
      - "null"
53
      - "null"
57
    description: basket billing place
58
  library_id:
54
  library_id:
55
    description: Library the basket belongs to
59
    type:
56
    type:
60
      - integer
57
      - integer
61
      - "null"
58
      - "null"
62
    description: Library the basket belongs to
59
  name:
60
    description: Basket name
61
    type: string
63
  standing:
62
  standing:
64
    type: boolean
65
    description: If the orders in this basket are standing
63
    description: If the orders in this basket are standing
66
  create_items:
64
    type: boolean
67
    type: string
65
  vendor_id:
68
    enum:
66
    description: Internal identifier for the vendor
69
      - ordering
67
    type: integer
70
      - receiving
68
  vendor_note:
71
      - cataloguing
69
    description: Vendor note
72
    description: "When items should be created for orders in this basket (Options:
70
    type:
73
      'ordering', 'receiving', 'cataloguing'. Null means system wide config)"
71
      - string
72
      - "null"
74
additionalProperties: false
73
additionalProperties: false
(-)a/api/v1/swagger/definitions/cashup.yaml (-14 / +14 lines)
Lines 1-28 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  cashup_id:
4
  summary:
5
    type: integer
5
    description: A summary of the cashup action
6
    description: Internal cashup identifier
6
    type: object
7
  amount:
8
    description: Account line amount
9
    type: number
7
  cash_register_id:
10
  cash_register_id:
8
    type: integer
9
    description: Internal identifier for the register the cashup belongs to
11
    description: Internal identifier for the register the cashup belongs to
10
  manager_id:
11
    type: integer
12
    type: integer
12
    description: Internal identifier for the manager the cashup was performed by
13
  cashup_id:
14
    description: Internal cashup identifier
15
    type: integer
13
  manager:
16
  manager:
17
    description: The object representing the manager the cashup was performed by
14
    type:
18
    type:
15
      - object
19
      - object
16
      - "null"
20
      - "null"
17
    description: The object representing the manager the cashup was performed by
21
  manager_id:
18
  amount:
22
    description: Internal identifier for the manager the cashup was performed by
19
    type: number
23
    type: integer
20
    description: Account line amount
21
  timestamp:
24
  timestamp:
25
    description: Timestamp for the latest line update
22
    type: string
26
    type: string
23
    format: date-time
27
    format: date-time
24
    description: Timestamp for the latest line update
25
  summary:
26
    type: object
27
    description: A summary of the cashup action
28
additionalProperties: false
28
additionalProperties: false
(-)a/api/v1/swagger/definitions/checkout.yaml (-55 / +55 lines)
Lines 1-103 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  auto_renew:
5
    description: Auto renewal
6
    type: boolean
7
  auto_renew_error:
8
    description: Auto renewal error
9
    type:
10
      - string
11
      - "null"
12
  checkin_date:
13
    description: Date the item was returned
14
    type:
15
      - string
16
      - "null"
17
    format: date-time
18
  checkout_date:
19
    description: Date the item was issued
20
    type: string
21
    format: date-time
4
  checkout_id:
22
  checkout_id:
5
    type: integer
6
    description: internally assigned checkout identifier
23
    description: internally assigned checkout identifier
7
  patron_id:
8
    type: integer
9
    description: Internal patron identifier
10
  item_id:
11
    type: integer
24
    type: integer
12
    description: internal identifier of checked out item
13
  due_date:
25
  due_date:
26
    description: Due date
14
    type: string
27
    type: string
15
    format: date-time
28
    format: date-time
16
    description: Due date
29
  issuer:
17
  library_id:
30
    description: The object representing the checkout issuer
18
    type:
31
    type:
19
      - string
32
      - object
20
      - "null"
33
      - "null"
21
    description: code of the library the item was checked out
22
  issuer_id:
34
  issuer_id:
35
    description: internally assigned for the user that processed the checkout
23
    type:
36
    type:
24
      - integer
37
      - integer
25
      - "null"
38
      - "null"
26
    description: internally assigned for the user that processed the checkout
39
  item:
27
  checkin_date:
40
    description: The object representing the checked out item
28
    type:
41
    type:
29
      - string
42
      - object
30
      - "null"
43
      - "null"
31
    format: date-time
44
  item_id:
32
    description: Date the item was returned
45
    description: internal identifier of checked out item
46
    type: integer
33
  last_renewed_date:
47
  last_renewed_date:
48
    description: Date the item was last renewed
34
    type:
49
    type:
35
      - string
50
      - string
36
      - "null"
51
      - "null"
37
    format: date-time
52
    format: date-time
38
    description: Date the item was last renewed
53
  library:
39
  renewals:
54
    description: The object representing the checkout library
40
    type:
41
      - integer
42
      - "null"
43
    description: Number of renewals
44
  unseen_renewals:
45
    type:
55
    type:
46
      - integer
56
      - object
47
      - "null"
57
      - "null"
48
    description: Number of consecutive unseen renewals
58
  library_id:
49
  auto_renew:
59
    description: code of the library the item was checked out
50
    type: boolean
51
    description: Auto renewal
52
  auto_renew_error:
53
    type:
60
    type:
54
      - string
61
      - string
55
      - "null"
62
      - "null"
56
    description: Auto renewal error
57
  timestamp:
58
    type: string
59
    description: Last update time
60
  checkout_date:
61
    type: string
62
    format: date-time
63
    description: Date the item was issued
64
  onsite_checkout:
65
    type: boolean
66
    description: On site checkout
67
  note:
63
  note:
64
    description: Issue note text
68
    type:
65
    type:
69
      - string
66
      - string
70
      - "null"
67
      - "null"
71
    description: Issue note text
72
  note_date:
68
  note_date:
69
    description: Datetime of the issue note
73
    type:
70
    type:
74
      - string
71
      - string
75
      - "null"
72
      - "null"
76
    format: date
73
    format: date
77
    description: Datetime of the issue note
78
  note_seen:
74
  note_seen:
79
    type:
80
      - boolean
81
      - "null"
82
    description: has the note been seen already
75
    description: has the note been seen already
83
  issuer:
84
    type:
76
    type:
85
      - object
77
      - boolean
86
      - "null"
78
      - "null"
87
    description: The object representing the checkout issuer
79
  onsite_checkout:
88
  item:
80
    description: On site checkout
81
    type: boolean
82
  patron:
83
    description: The object representing the checkout patron
89
    type:
84
    type:
90
      - object
85
      - object
91
      - "null"
86
      - "null"
92
    description: The object representing the checked out item
87
  patron_id:
93
  library:
88
    description: Internal patron identifier
89
    type: integer
90
  renewals:
91
    description: Number of renewals
94
    type:
92
    type:
95
      - object
93
      - integer
96
      - "null"
94
      - "null"
97
    description: The object representing the checkout library
95
  timestamp:
98
  patron:
96
    description: Last update time
97
    type: string
98
  unseen_renewals:
99
    description: Number of consecutive unseen renewals
99
    type:
100
    type:
100
      - object
101
      - integer
101
      - "null"
102
      - "null"
102
    description: The object representing the checkout patron
103
additionalProperties: false
103
additionalProperties: false
(-)a/api/v1/swagger/definitions/checkouts.yaml (-2 / +2 lines)
Lines 1-5 Link Here
1
---
1
---
2
type: array
2
type: array
3
items:
4
  $ref: "checkout.yaml"
5
additionalProperties: false
3
additionalProperties: false
4
items:
5
  $ref: checkout.yaml
(-)a/api/v1/swagger/definitions/city.yaml (-8 / +8 lines)
Lines 2-25 Link Here
2
type: object
2
type: object
3
properties:
3
properties:
4
  city_id:
4
  city_id:
5
    type: integer
6
    description: internally assigned city identifier
5
    description: internally assigned city identifier
6
    type: integer
7
    readOnly: true
7
    readOnly: true
8
  name:
8
  country:
9
    description: city name
9
    description: city country
10
    type: string
11
  state:
12
    description: city state
13
    type:
10
    type:
14
      - string
11
      - string
15
      - "null"
12
      - "null"
13
  name:
14
    description: city name
15
    type: string
16
  postal_code:
16
  postal_code:
17
    description: city postal code
17
    description: city postal code
18
    type:
18
    type:
19
      - string
19
      - string
20
      - "null"
20
      - "null"
21
  country:
21
  state:
22
    description: city country
22
    description: city state
23
    type:
23
    type:
24
      - string
24
      - string
25
      - "null"
25
      - "null"
(-)a/api/v1/swagger/definitions/club_hold.yaml (-9 / +9 lines)
Lines 1-22 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  club_hold_id:
4
  biblio_id:
5
    description: Internal biblio identifier
5
    type: integer
6
    type: integer
7
  club_hold_id:
6
    description: Internal club hold identifier
8
    description: Internal club hold identifier
7
  club_id:
8
    type: integer
9
    type: integer
10
  club_id:
9
    description: Internal club identifier
11
    description: Internal club identifier
10
  biblio_id:
11
    type: integer
12
    type: integer
12
    description: Internal biblio identifier
13
  date_created:
14
    description: Date and time the hold was created
15
    type: string
16
    format: date-time
13
  item_id:
17
  item_id:
18
    description: Internal item identifier
14
    type:
19
    type:
15
      - string
20
      - string
16
      - "null"
21
      - "null"
17
    description: Internal item identifier
18
  date_created:
19
    type: string
20
    format: date-time
21
    description: Date and time the hold was created
22
additionalProperties: false
22
additionalProperties: false
(-)a/api/v1/swagger/definitions/club_hold_patron_hold.yaml (-13 / +13 lines)
Lines 1-29 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  club_hold_patron_hold_id:
5
    type: integer
6
    description: Internal club hold to patron hold identifier
7
  club_hold_id:
4
  club_hold_id:
8
    type: integer
9
    description: Internal club hold identifier
5
    description: Internal club hold identifier
10
  hold_id:
11
    type:
12
      - integer
13
      - "null"
14
    description: Internal hold identifier
15
  patron_id:
16
    type: integer
6
    type: integer
17
    description: Internal patron identifier
7
  club_hold_patron_hold_id:
8
    description: Internal club hold to patron hold identifier
9
    type: integer
18
  error_code:
10
  error_code:
11
    description: Code returned by CanItemBeReserved
19
    type:
12
    type:
20
      - string
13
      - string
21
      - "null"
14
      - "null"
22
    format: date
15
    format: date
23
    description: Code returned by CanItemBeReserved
24
  error_message:
16
  error_message:
17
    description: Generic error message
25
    type:
18
    type:
26
      - string
19
      - string
27
      - "null"
20
      - "null"
28
    description: Generic error message
21
  hold_id:
22
    description: Internal hold identifier
23
    type:
24
      - integer
25
      - "null"
26
  patron_id:
27
    description: Internal patron identifier
28
    type: integer
29
additionalProperties: false
29
additionalProperties: false
(-)a/api/v1/swagger/definitions/club_hold_patron_holds.yaml (-2 / +2 lines)
Lines 1-5 Link Here
1
---
1
---
2
type: array
2
type: array
3
items:
4
  $ref: "club_hold_patron_hold.yaml"
5
additionalProperties: false
3
additionalProperties: false
4
items:
5
  $ref: club_hold_patron_hold.yaml
(-)a/api/v1/swagger/definitions/club_holds.yaml (-2 / +2 lines)
Lines 1-5 Link Here
1
---
1
---
2
type: array
2
type: array
3
items:
4
  $ref: "club_hold.yaml"
5
additionalProperties: false
3
additionalProperties: false
4
items:
5
  $ref: club_hold.yaml
(-)a/api/v1/swagger/definitions/fund.yaml (-42 / +41 lines)
Lines 1-81 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  fund_id:
4
  budget_id:
5
    type: integer
5
    description: Internal identifier for the budget
6
    description: internally assigned fund identifier
7
    readOnly: true
8
  code:
9
    type:
6
    type:
10
      - string
7
      - number
11
      - "null"
8
      - "null"
9
  code:
12
    description: Code assigned to the fund by the user
10
    description: Code assigned to the fund by the user
13
  name:
14
    type:
15
      - string
16
      - "null"
17
    description: Name assigned to the fund by the user
18
  library_id:
19
    type:
11
    type:
20
      - string
12
      - string
21
      - "null"
13
      - "null"
22
    description: Internal identifier for the library that this fund belongs to
14
  fund_access:
23
  total_amount:
15
    description: 'Level of permission for this fund (1: owner, 2: owner, users and library, 3: owner and users)'
24
    type:
16
    type:
25
      - number
17
      - number
26
      - "null"
18
      - "null"
27
    description: Total amount for this fund
19
  fund_id:
28
  warn_at_percentage:
20
    description: internally assigned fund identifier
21
    type: integer
22
    readOnly: true
23
  fund_owner_id:
24
    description: Internal identifier for the fund owner
29
    type:
25
    type:
30
      - number
26
      - number
31
      - "null"
27
      - "null"
32
    description: Warning at percentage
28
  library_id:
33
  warn_at_amount:
29
    description: Internal identifier for the library that this fund belongs to
34
    type:
30
    type:
35
      - number
31
      - string
36
      - "null"
32
      - "null"
37
    description: Warning at amount
33
  name:
38
  notes:
34
    description: Name assigned to the fund by the user
39
    type:
35
    type:
40
      - string
36
      - string
41
      - "null"
37
      - "null"
38
  notes:
42
    description: Notes related to this fund
39
    description: Notes related to this fund
43
  budget_id:
44
    type:
45
      - number
46
      - "null"
47
    description: Internal identifier for the budget
48
  timestamp:
49
    type:
40
    type:
50
      - string
41
      - string
51
    format: date-time
52
    description: Timestamp
53
  fund_owner_id:
54
    type:
55
      - number
56
      - "null"
57
    description: Internal identifier for the fund owner
58
  fund_access:
59
    type:
60
      - number
61
      - "null"
42
      - "null"
62
    description: "Level of permission for this fund (1: owner, 2: owner, users and library,
63
      3: owner and users)"
64
  parent_fund_id:
43
  parent_fund_id:
44
    description: Internal identifier for parent fund
65
    type:
45
    type:
66
      - integer
46
      - integer
67
      - "null"
47
      - "null"
68
    description: Internal identifier for parent fund
69
  statistic1_auth_value_category:
48
  statistic1_auth_value_category:
49
    description: Statistical category for this fund
70
    type:
50
    type:
71
      - string
51
      - string
72
      - "null"
52
      - "null"
73
    description: Statistical category for this fund
74
  statistic2_auth_value_category:
53
  statistic2_auth_value_category:
54
    description: Second statistical category for this fund
75
    type:
55
    type:
76
      - string
56
      - string
77
      - "null"
57
      - "null"
78
    description: Second statistical category for this fund
58
  timestamp:
59
    description: Timestamp
60
    type:
61
      - string
62
    format: date-time
63
  total_amount:
64
    description: Total amount for this fund
65
    type:
66
      - number
67
      - "null"
68
  warn_at_amount:
69
    description: Warning at amount
70
    type:
71
      - number
72
      - "null"
73
  warn_at_percentage:
74
    description: Warning at percentage
75
    type:
76
      - number
77
      - "null"
79
additionalProperties: false
78
additionalProperties: false
80
required:
79
required:
81
  - name
80
  - name
(-)a/api/v1/swagger/definitions/hold.yaml (-52 / +50 lines)
Lines 1-101 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  hold_id:
4
  biblio_id:
5
    type: integer
5
    description: Internal biblio identifier
6
    description: Internal hold identifier
7
  patron_id:
8
    type: integer
6
    type: integer
9
    description: Internal patron identifier
7
  cancellation_date:
10
  hold_date:
8
    description: The date the hold was cancelled
11
    type:
9
    type:
12
      - string
10
      - string
13
      - "null"
11
      - "null"
14
    format: date
12
    format: date
15
    description: The date the hold was placed
13
  cancellation_reason:
16
  biblio_id:
14
    description: The reason the hold was cancelled
17
    type: integer
18
    description: Internal biblio identifier
19
  pickup_library_id:
20
    type:
15
    type:
21
      - string
16
      - string
22
      - "null"
17
      - "null"
23
    description: Internal library identifier for the pickup library
24
  desk_id:
18
  desk_id:
19
    description: The id of the desk
25
    type:
20
    type:
26
      - integer
21
      - integer
27
      - "null"
22
      - "null"
28
    description: The id of the desk
23
  expiration_date:
29
  cancellation_date:
24
    description: The date the hold expires
30
    type:
25
    type:
31
      - string
26
      - string
32
      - "null"
27
      - "null"
33
    format: date
28
    format: date
34
    description: The date the hold was cancelled
29
  hold_date:
35
  cancellation_reason:
30
    description: The date the hold was placed
36
    type:
31
    type:
37
      - string
32
      - string
38
      - "null"
33
      - "null"
39
    description: The reason the hold was cancelled
34
    format: date
40
  notes:
35
  hold_id:
36
    description: Internal hold identifier
37
    type: integer
38
  item_id:
39
    description: Internal item identifier
41
    type:
40
    type:
42
      - string
41
      - string
43
      - "null"
42
      - "null"
44
    description: Notes related to this hold
43
  item_level:
45
  priority:
44
    description: If the hold is placed at item level
45
    type: boolean
46
  item_type:
47
    description: 'If record level hold, the optional itemtype of the item the patron is requesting'
46
    type:
48
    type:
47
      - integer
49
      - string
48
      - "null"
50
      - "null"
49
    description: Where in the queue the patron sits
51
  lowest_priority:
50
  status:
52
    description: Controls if the hold is given the lowest priority on the queue
53
    type: boolean
54
  non_priority:
55
    description: Set this hold as non priority
56
    type: boolean
57
  notes:
58
    description: Notes related to this hold
51
    type:
59
    type:
52
      - string
60
      - string
53
      - "null"
61
      - "null"
54
    description: A one letter code defining what the status of the hold is after it has
62
  patron_id:
55
      been confirmed
63
    description: Internal patron identifier
56
  timestamp:
64
    type: integer
57
    type: string
65
  pickup_library_id:
58
    format: date-time
66
    description: Internal library identifier for the pickup library
59
    description: Timestamp for the latest hold update
60
  item_id:
61
    type:
67
    type:
62
      - string
68
      - string
63
      - "null"
69
      - "null"
64
    description: Internal item identifier
70
  priority:
65
  waiting_date:
71
    description: Where in the queue the patron sits
66
    type:
72
    type:
67
      - string
73
      - integer
68
      - "null"
74
      - "null"
69
    format: date
75
  status:
70
    description: The date the item was marked as waiting for the patron at the library
76
    description: A one letter code defining what the status of the hold is after it has been confirmed
71
  expiration_date:
72
    type:
77
    type:
73
      - string
78
      - string
74
      - "null"
79
      - "null"
75
    format: date
76
    description: The date the hold expires
77
  lowest_priority:
78
    type: boolean
79
    description: Controls if the hold is given the lowest priority on the queue
80
  suspended:
80
  suspended:
81
    type: boolean
82
    description: Controls if the hold is suspended
81
    description: Controls if the hold is suspended
82
    type: boolean
83
  suspended_until:
83
  suspended_until:
84
    description: Date until which the hold has been suspended
84
    type:
85
    type:
85
      - string
86
      - string
86
      - "null"
87
      - "null"
87
    format: date-time
88
    format: date-time
88
    description: Date until which the hold has been suspended
89
  timestamp:
89
  non_priority:
90
    description: Timestamp for the latest hold update
90
    description: Set this hold as non priority
91
    type: string
91
    type: boolean
92
    format: date-time
92
  item_type:
93
  waiting_date:
94
    description: The date the item was marked as waiting for the patron at the library
93
    type:
95
    type:
94
      - string
96
      - string
95
      - "null"
97
      - "null"
96
    description: If record level hold, the optional itemtype of the item the patron is
98
    format: date
97
      requesting
98
  item_level:
99
    type: boolean
100
    description: If the hold is placed at item level
101
additionalProperties: false
99
additionalProperties: false
(-)a/api/v1/swagger/definitions/holds.yaml (-2 / +2 lines)
Lines 1-5 Link Here
1
---
1
---
2
type: array
2
type: array
3
items:
4
  $ref: "hold.yaml"
5
additionalProperties: false
3
additionalProperties: false
4
items:
5
  $ref: hold.yaml
(-)a/api/v1/swagger/definitions/ill_backend.yaml (-4 / +4 lines)
Lines 1-10 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  ill_backend_id:
5
    type: string
6
    description: Internal ILL backend identifier
7
  capabilities:
4
  capabilities:
8
    type: object
9
    description: List of capabilities
5
    description: List of capabilities
6
    type: object
7
  ill_backend_id:
8
    description: Internal ILL backend identifier
9
    type: string
10
additionalProperties: false
10
additionalProperties: false
(-)a/api/v1/swagger/definitions/ill_backends.yaml (-2 / +2 lines)
Lines 1-5 Link Here
1
---
1
---
2
type: array
2
type: array
3
items:
4
  $ref: "ill_backend.yaml"
5
additionalProperties: false
3
additionalProperties: false
4
items:
5
  $ref: ill_backend.yaml
(-)a/api/v1/swagger/definitions/import_batch_profile.yaml (-29 / +29 lines)
Lines 1-34 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  profile_id:
4
  comments:
5
    type: integer
5
    description: any comments added when the file was uploaded
6
    description: Internal profile identifier
7
  name:
8
    description: name of this profile
9
    type: string
10
  matcher_id:
11
    description: the id of the match rule used (matchpoints.matcher_id)
12
    type:
6
    type:
13
      - integer
7
      - string
14
      - "null"
8
      - "null"
15
  template_id:
9
  encoding:
16
    description: the id of the marc modification template
10
    description: file encoding
17
    type:
11
    type:
18
      - integer
12
      - string
19
      - "null"
13
      - "null"
20
  overlay_action:
14
  format:
21
    description: how to handle duplicate records
15
    description: marc format
22
    type:
16
    type:
23
      - string
17
      - string
24
      - "null"
18
      - "null"
19
  item_action:
20
    description: what to do with item records
21
    type:
22
      - string
23
      - "null"
24
  matcher_id:
25
    description: the id of the match rule used (matchpoints.matcher_id)
26
    type:
27
      - integer
28
      - "null"
29
  name:
30
    description: name of this profile
31
    type: string
25
  nomatch_action:
32
  nomatch_action:
26
    description: how to handle records where no match is found
33
    description: how to handle records where no match is found
27
    type:
34
    type:
28
      - string
35
      - string
29
      - "null"
36
      - "null"
30
  item_action:
37
  overlay_action:
31
    description: what to do with item records
38
    description: how to handle duplicate records
32
    type:
39
    type:
33
      - string
40
      - string
34
      - "null"
41
      - "null"
Lines 37-60 properties: Link Here
37
    type:
44
    type:
38
      - boolean
45
      - boolean
39
      - "null"
46
      - "null"
47
  profile_id:
48
    description: Internal profile identifier
49
    type: integer
40
  record_type:
50
  record_type:
41
    description: type of record in the batch
51
    description: type of record in the batch
42
    type:
52
    type:
43
      - string
53
      - string
44
      - "null"
54
      - "null"
45
  encoding:
55
  template_id:
46
    description: file encoding
56
    description: the id of the marc modification template
47
    type:
48
      - string
49
      - "null"
50
  format:
51
    description: marc format
52
    type:
53
      - string
54
      - "null"
55
  comments:
56
    description: any comments added when the file was uploaded
57
    type:
57
    type:
58
      - string
58
      - integer
59
      - "null"
59
      - "null"
60
additionalProperties: false
60
additionalProperties: false
(-)a/api/v1/swagger/definitions/import_batch_profiles.yaml (-2 / +2 lines)
Lines 1-5 Link Here
1
---
1
---
2
type: array
2
type: array
3
items:
4
  $ref: "import_batch_profile.yaml"
5
additionalProperties: false
3
additionalProperties: false
4
items:
5
  $ref: import_batch_profile.yaml
(-)a/api/v1/swagger/definitions/invoice.yaml (-22 / +22 lines)
Lines 1-42 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  invoice_id:
4
  close_date:
5
    type: integer
5
    description: Invoice close date (only when the invoice is closed)
6
    description: Internal identifier for the incoide. Generated on POST
7
  invoice_number:
8
    type: string
6
    type: string
9
    description: Invoice number assigned by the vendor
10
  vendor_id:
11
    type: integer
12
    description: Internal identifier for the vendor
13
  shipping_date:
14
    type:
15
      - string
16
      - "null"
17
    format: date
7
    format: date
18
    description: Date of shipping
8
  closed:
9
    description: If the invoice is closed
10
    type: boolean
19
  invoice_date:
11
  invoice_date:
12
    description: Date of billing
20
    type:
13
    type:
21
      - string
14
      - string
22
      - "null"
15
      - "null"
23
    format: date
16
    format: date
24
    description: Date of billing
17
  invoice_id:
25
  closed:
18
    description: Internal identifier for the incoide. Generated on POST
26
    type: boolean
19
    type: integer
27
    description: If the invoice is closed
20
  invoice_number:
28
  close_date:
21
    description: Invoice number assigned by the vendor
29
    type: string
22
    type: string
30
    format: date
31
    description: Invoice close date (only when the invoice is closed)
32
  shipping_cost:
23
  shipping_cost:
24
    description: Shipping cost
33
    type:
25
    type:
34
      - integer
26
      - integer
35
      - "null"
27
      - "null"
36
    description: Shipping cost
37
  shipping_cost_budget_id:
28
  shipping_cost_budget_id:
29
    description: Shipping cost linking to budget
38
    type:
30
    type:
39
      - integer
31
      - integer
40
      - "null"
32
      - "null"
41
    description: Shipping cost linking to budget
33
  shipping_date:
34
    description: Date of shipping
35
    type:
36
      - string
37
      - "null"
38
    format: date
39
  vendor_id:
40
    description: Internal identifier for the vendor
41
    type: integer
42
additionalProperties: false
42
additionalProperties: false
(-)a/api/v1/swagger/definitions/item.yaml (-110 / +107 lines)
Lines 1-216 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  item_id:
5
    type: integer
6
    description: Internal item identifier
7
  biblio_id:
8
    type: integer
9
    description: Internal identifier for the parent bibliographic record
10
  external_id:
11
    type:
12
      - string
13
      - "null"
14
    description: The item's barcode
15
  acquisition_date:
4
  acquisition_date:
5
    description: The date the item was acquired
16
    type:
6
    type:
17
      - string
7
      - string
18
      - "null"
8
      - "null"
19
    format: date
9
    format: date
20
    description: The date the item was acquired
21
  acquisition_source:
10
  acquisition_source:
22
    type:
23
      - string
24
      - "null"
25
    description: Information about the acquisition source (it is not really a vendor id)
11
    description: Information about the acquisition source (it is not really a vendor id)
26
  home_library_id:
27
    type:
12
    type:
28
      - string
13
      - string
29
      - "null"
14
      - "null"
30
    description: Internal library id for the library the item belongs to
15
  biblio_id:
31
  purchase_price:
16
    description: Internal identifier for the parent bibliographic record
17
    type: integer
18
  call_number_sort:
19
    description: '?'
32
    type:
20
    type:
33
      - number
21
      - string
34
      - "null"
22
      - "null"
35
    description: Purchase price
23
  call_number_source:
36
  replacement_price:
24
    description: Classification source used on this item
37
    type:
25
    type:
38
      - number
26
      - string
39
      - "null"
27
      - "null"
40
    description: Cost the library charges to replace the item (e.g. if lost)
28
  callnumber:
41
  replacement_price_date:
29
    description: Call number for this item
42
    type:
30
    type:
43
      - string
31
      - string
44
      - "null"
32
      - "null"
45
    format: date
33
  checked_out_date:
46
    description: The date the replacement price is effective from
34
    description: 'Defines if item is checked out (NULL for not checked out, and checkout date for checked out)'
47
  last_checkout_date:
48
    type:
35
    type:
49
      - string
36
      - string
50
      - "null"
37
      - "null"
51
    format: date
38
    format: date
52
    description: The date the item was last checked out
39
  checkouts_count:
53
  last_seen_date:
40
    description: Number of times this item has been checked out/issued
54
    type:
41
    type:
55
      - string
42
      - integer
56
      - "null"
43
      - "null"
57
    format: date
44
  coded_location_qualifier:
58
    description: The date the item barcode was last scanned
45
    description: Coded location qualifier
59
  not_for_loan_status:
60
    type: integer
61
    description: Authorized value defining why this item is not for loan
62
  damaged_status:
63
    type: integer
64
    description: Authorized value defining this item as damaged
65
  damaged_date:
66
    type:
46
    type:
67
      - string
47
      - string
68
      - "null"
48
      - "null"
69
    description: The date and time an item was last marked as damaged, NULL if not damaged
49
  collection_code:
70
  lost_status:
50
    description: Authorized value for the collection code associated with this item
71
    type: integer
72
    description: Authorized value defining this item as lost
73
  lost_date:
74
    type:
51
    type:
75
      - string
52
      - string
76
      - "null"
53
      - "null"
77
    format: date-time
54
  copy_number:
78
    description: The date and time an item was last marked as lost, NULL if not lost
55
    description: Copy number
79
  withdrawn:
80
    type: integer
81
    description: Authorized value defining this item as withdrawn
82
  withdrawn_date:
83
    type:
56
    type:
84
      - string
57
      - string
85
      - "null"
58
      - "null"
86
    format: date-time
59
  damaged_date:
87
    description: The date and time an item was last marked as withdrawn, NULL if not
60
    description: 'The date and time an item was last marked as damaged, NULL if not damaged'
88
      withdrawn
89
  callnumber:
90
    type:
61
    type:
91
      - string
62
      - string
92
      - "null"
63
      - "null"
93
    description: Call number for this item
64
  damaged_status:
94
  coded_location_qualifier:
65
    description: Authorized value defining this item as damaged
66
    type: integer
67
  exclude_from_local_holds_priority:
68
    description: Exclude this item from local holds priority.
69
    type: boolean
70
  extended_subfields:
71
    description: Additional 952 subfields in XML format
95
    type:
72
    type:
96
      - string
73
      - string
97
      - "null"
74
      - "null"
98
    description: Coded location qualifier
75
  external_id:
99
  checkouts_count:
76
    description: The item's barcode
100
    type:
77
    type:
101
      - integer
78
      - string
102
      - "null"
79
      - "null"
103
    description: Number of times this item has been checked out/issued
80
  holding_library_id:
104
  renewals_count:
81
    description: Library that is currently in possession item
105
    type:
82
    type:
106
      - integer
83
      - string
107
      - "null"
84
      - "null"
108
    description: Number of times this item has been renewed
109
  holds_count:
85
  holds_count:
110
    type:
111
      - integer
112
      - "null"
113
    description: Number of times this item has been placed on hold/reserved
86
    description: Number of times this item has been placed on hold/reserved
114
  restricted_status:
115
    type:
87
    type:
116
      - integer
88
      - integer
117
      - "null"
89
      - "null"
118
    description: Authorized value defining use restrictions for this item
90
  home_library_id:
119
  public_notes:
91
    description: Internal library id for the library the item belongs to
120
    type:
92
    type:
121
      - string
93
      - string
122
      - "null"
94
      - "null"
123
    description: Public notes on this item
124
  internal_notes:
95
  internal_notes:
125
    type:
126
      - string
127
      - "null"
128
    description: Non-public notes on this item
96
    description: Non-public notes on this item
129
  holding_library_id:
130
    type:
97
    type:
131
      - string
98
      - string
132
      - "null"
99
      - "null"
133
    description: Library that is currently in possession item
100
  inventory_number:
134
  timestamp:
101
    description: Inventory number
135
    type: string
136
    format: date-time
137
    description: Date and time this item was last altered
138
  location:
139
    type:
102
    type:
140
      - string
103
      - string
141
      - "null"
104
      - "null"
142
    description: Authorized value for the shelving location for this item
105
  item_id:
143
  permanent_location:
106
    description: Internal item identifier
107
    type: integer
108
  item_type_id:
109
    description: Itemtype defining the type for this item
144
    type:
110
    type:
145
      - string
111
      - string
146
      - "null"
112
      - "null"
147
    description: Linked to the CART and PROC temporary locations feature, stores the
113
  last_checkout_date:
148
      permanent shelving location
114
    description: The date the item was last checked out
149
  checked_out_date:
150
    type:
115
    type:
151
      - string
116
      - string
152
      - "null"
117
      - "null"
153
    format: date
118
    format: date
154
    description: Defines if item is checked out (NULL for not checked out, and checkout
119
  last_seen_date:
155
      date for checked out)
120
    description: The date the item barcode was last scanned
156
  call_number_source:
157
    type:
121
    type:
158
      - string
122
      - string
159
      - "null"
123
      - "null"
160
    description: Classification source used on this item
124
    format: date
161
  call_number_sort:
125
  location:
126
    description: Authorized value for the shelving location for this item
162
    type:
127
    type:
163
      - string
128
      - string
164
      - "null"
129
      - "null"
165
    description: "?"
130
  lost_date:
166
  collection_code:
131
    description: 'The date and time an item was last marked as lost, NULL if not lost'
167
    type:
132
    type:
168
      - string
133
      - string
169
      - "null"
134
      - "null"
170
    description: Authorized value for the collection code associated with this item
135
    format: date-time
136
  lost_status:
137
    description: Authorized value defining this item as lost
138
    type: integer
171
  materials_notes:
139
  materials_notes:
140
    description: Materials specified
172
    type:
141
    type:
173
      - string
142
      - string
174
      - "null"
143
      - "null"
175
    description: Materials specified
144
  new_status:
176
  uri:
145
    description: "'new' value, whatever free-text information."
177
    type:
146
    type:
178
      - string
147
      - string
179
      - "null"
148
      - "null"
180
    description: URL for the item
149
  not_for_loan_status:
181
  item_type_id:
150
    description: Authorized value defining why this item is not for loan
151
    type: integer
152
  permanent_location:
153
    description: 'Linked to the CART and PROC temporary locations feature, stores the permanent shelving location'
182
    type:
154
    type:
183
      - string
155
      - string
184
      - "null"
156
      - "null"
185
    description: Itemtype defining the type for this item
157
  public_notes:
186
  extended_subfields:
158
    description: Public notes on this item
187
    type:
159
    type:
188
      - string
160
      - string
189
      - "null"
161
      - "null"
190
    description: Additional 952 subfields in XML format
162
  purchase_price:
191
  serial_issue_number:
163
    description: Purchase price
164
    type:
165
      - number
166
      - "null"
167
  renewals_count:
168
    description: Number of times this item has been renewed
169
    type:
170
      - integer
171
      - "null"
172
  replacement_price:
173
    description: Cost the library charges to replace the item (e.g. if lost)
174
    type:
175
      - number
176
      - "null"
177
  replacement_price_date:
178
    description: The date the replacement price is effective from
192
    type:
179
    type:
193
      - string
180
      - string
194
      - "null"
181
      - "null"
182
    format: date
183
  restricted_status:
184
    description: Authorized value defining use restrictions for this item
185
    type:
186
      - integer
187
      - "null"
188
  serial_issue_number:
195
    description: serial enumeration/chronology for the item
189
    description: serial enumeration/chronology for the item
196
  copy_number:
197
    type:
190
    type:
198
      - string
191
      - string
199
      - "null"
192
      - "null"
200
    description: Copy number
193
  timestamp:
201
  inventory_number:
194
    description: Date and time this item was last altered
195
    type: string
196
    format: date-time
197
  uri:
198
    description: URL for the item
202
    type:
199
    type:
203
      - string
200
      - string
204
      - "null"
201
      - "null"
205
    description: Inventory number
202
  withdrawn:
206
  new_status:
203
    description: Authorized value defining this item as withdrawn
204
    type: integer
205
  withdrawn_date:
206
    description: 'The date and time an item was last marked as withdrawn, NULL if not withdrawn'
207
    type:
207
    type:
208
      - string
208
      - string
209
      - "null"
209
      - "null"
210
    description: "'new' value, whatever free-text information."
210
    format: date-time
211
  exclude_from_local_holds_priority:
212
    type: boolean
213
    description: Exclude this item from local holds priority.
214
additionalProperties: false
211
additionalProperties: false
215
required:
212
required:
216
  - item_id
213
  - item_id
(-)a/api/v1/swagger/definitions/library.yaml (-55 / +53 lines)
Lines 1-125 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  library_id:
5
    type: string
6
    description: internally assigned library identifier
7
    maxLength: 10
8
    minLength: 1
9
  name:
10
    type: string
11
    description: Printable name of library
12
  address1:
4
  address1:
13
    type:
14
      - string
15
      - "null"
16
    description: the first address line of the library
5
    description: the first address line of the library
17
  address2:
18
    type:
6
    type:
19
      - string
7
      - string
20
      - "null"
8
      - "null"
9
  address2:
21
    description: the second address line of the library
10
    description: the second address line of the library
22
  address3:
23
    type:
11
    type:
24
      - string
12
      - string
25
      - "null"
13
      - "null"
14
  address3:
26
    description: the third address line of the library
15
    description: the third address line of the library
27
  postal_code:
28
    type:
16
    type:
29
      - string
17
      - string
30
      - "null"
18
      - "null"
31
    description: the postal code of the library
32
  city:
19
  city:
33
    type:
34
      - string
35
      - "null"
36
    description: the city or province of the library
20
    description: the city or province of the library
37
  state:
38
    type:
21
    type:
39
      - string
22
      - string
40
      - "null"
23
      - "null"
41
    description: the reqional state of the library
42
  country:
24
  country:
25
    description: the county of the library
43
    type:
26
    type:
44
      - string
27
      - string
45
      - "null"
28
      - "null"
46
    description: the county of the library
29
  email:
47
  phone:
30
    description: the primary email address of the library
48
    type:
31
    type:
49
      - string
32
      - string
50
      - "null"
33
      - "null"
51
    description: the primary phone of the library
52
  fax:
34
  fax:
35
    description: the fax number of the library
53
    type:
36
    type:
54
      - string
37
      - string
55
      - "null"
38
      - "null"
56
    description: the fax number of the library
39
  geolocation:
57
  email:
40
    description: geolocation of your library
58
    type:
41
    type:
59
      - string
42
      - string
60
      - "null"
43
      - "null"
61
    description: the primary email address of the library
62
  illemail:
44
  illemail:
45
    description: the ILL staff email address of the library
63
    type:
46
    type:
64
      - string
47
      - string
65
      - "null"
48
      - "null"
66
    description: the ILL staff email address of the library
49
  ip:
67
  reply_to_email:
50
    description: the IP address for your library or branch
68
    type:
51
    type:
69
      - string
52
      - string
70
      - "null"
53
      - "null"
71
    description: the email to be used as a Reply-To
54
  library_id:
72
  return_path_email:
55
    description: internally assigned library identifier
56
    type: string
57
    maxLength: 10
58
    minLength: 1
59
  marc_org_code:
60
    description: 'MARC Organization Code, see http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults to syspref MARCOrgCode'
73
    type:
61
    type:
74
      - string
62
      - string
75
      - "null"
63
      - "null"
76
    description: the email to be used as Return-Path
64
  name:
77
  url:
65
    description: Printable name of library
66
    type: string
67
  needs_override:
68
    description: If the library needs an override to act as pickup location for a hold
69
    type: boolean
70
  notes:
71
    description: notes related to your library or branch
78
    type:
72
    type:
79
      - string
73
      - string
80
      - "null"
74
      - "null"
81
    description: the URL for your library or branch's website
75
  opac_info:
82
  ip:
76
    description: HTML that displays in OPAC
83
    type:
77
    type:
84
      - string
78
      - string
85
      - "null"
79
      - "null"
86
    description: the IP address for your library or branch
80
  phone:
87
  notes:
81
    description: the primary phone of the library
88
    type:
82
    type:
89
      - string
83
      - string
90
      - "null"
84
      - "null"
91
    description: notes related to your library or branch
85
  pickup_location:
92
  opac_info:
86
    description: If the library can act as a pickup location
87
    type: boolean
88
  postal_code:
89
    description: the postal code of the library
93
    type:
90
    type:
94
      - string
91
      - string
95
      - "null"
92
      - "null"
96
    description: HTML that displays in OPAC
93
  public:
97
  geolocation:
94
    description: If the library is visible to the public
95
    type: boolean
96
  reply_to_email:
97
    description: the email to be used as a Reply-To
98
    type:
98
    type:
99
      - string
99
      - string
100
      - "null"
100
      - "null"
101
    description: geolocation of your library
101
  return_path_email:
102
  marc_org_code:
102
    description: the email to be used as Return-Path
103
    type:
103
    type:
104
      - string
104
      - string
105
      - "null"
105
      - "null"
106
    description: MARC Organization Code, see
107
      http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults
108
      to syspref MARCOrgCode
109
  pickup_location:
110
    type: boolean
111
    description: If the library can act as a pickup location
112
  public:
113
    type: boolean
114
    description: If the library is visible to the public
115
  smtp_server:
106
  smtp_server:
107
    description: The library effective SMTP server
116
    type:
108
    type:
117
      - object
109
      - object
118
      - "null"
110
      - "null"
119
    description: The library effective SMTP server
111
  state:
120
  needs_override:
112
    description: the reqional state of the library
121
    type: boolean
113
    type:
122
    description: If the library needs an override to act as pickup location for a hold
114
      - string
115
      - "null"
116
  url:
117
    description: the URL for your library or branch's website
118
    type:
119
      - string
120
      - "null"
123
additionalProperties: false
121
additionalProperties: false
124
required:
122
required:
125
  - library_id
123
  - library_id
(-)a/api/v1/swagger/definitions/order.yaml (-128 / +128 lines)
Lines 1-210 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  order_id:
4
  basket:
5
    type: integer
6
    description: Internally assigned order identifier
7
  biblio_id:
8
    type:
5
    type:
9
      - integer
6
      - object
10
      - "null"
7
      - "null"
11
    description: Identifier for the linked bibliographic record
8
  basket_id:
12
  created_by:
9
    description: Basket this order is linked to
13
    type:
10
    type:
14
      - integer
11
      - integer
15
      - "null"
12
      - "null"
16
    description: Interal patron identifier of the order line creator
13
  biblio:
17
  entry_date:
18
    type:
14
    type:
19
      - string
15
      - object
20
      - "null"
16
      - "null"
21
    format: date
17
  biblio_id:
22
    description: Date the bib was added to the basket
18
    description: Identifier for the linked bibliographic record
23
  quantity:
24
    type:
19
    type:
25
      - integer
20
      - integer
26
      - "null"
21
      - "null"
27
    description: Ordered quantity
22
  cancellation_date:
28
  currency:
23
    description: Date the line item was deleted
29
    type:
24
    type:
30
      - string
25
      - string
31
      - "null"
26
      - "null"
32
    description: Currency used for the purchase
27
    format: date
33
  list_price:
28
  cancellation_reason:
29
    description: Reason of cancellation
34
    type:
30
    type:
35
      - number
31
      - string
36
      - "null"
32
      - "null"
37
    description: Vendor price for the line item
33
  claims_count:
38
  replacement_price:
34
    description: Generated claim letters count
35
    type: integer
36
  created_by:
37
    description: Interal patron identifier of the order line creator
39
    type:
38
    type:
40
      - number
39
      - integer
41
      - "null"
40
      - "null"
42
    description: Replacement cost for this item
41
  currency:
43
  date_received:
42
    description: Currency used for the purchase
44
    type:
43
    type:
45
      - string
44
      - string
46
      - "null"
45
      - "null"
47
    format: date
46
  current_item_level_holds_count:
47
    description: Current holds count for associated items
48
    type: integer
49
  date_received:
48
    description: Date the order was received
50
    description: Date the order was received
49
  invoice_id:
50
    type:
51
    type:
51
      - integer
52
      - string
52
      - "null"
53
      - "null"
53
    description: Id of the order invoice
54
    format: date
54
  shipping_cost:
55
  discount_rate:
56
    description: Discount rate
55
    type:
57
    type:
56
      - number
58
      - number
57
      - "null"
59
      - "null"
58
    description: Shipping cost
60
  ecost:
59
  unit_price:
61
    description: Effective cost
60
    type:
62
    type:
61
      - number
63
      - number
62
      - "null"
64
      - "null"
63
    description: The actual cost entered when receiving this line item
65
  ecost_tax_excluded:
64
  unit_price_tax_excluded:
66
    description: Effective cost (tax excluded)
65
    type:
67
    type:
66
      - number
68
      - number
67
      - "null"
69
      - "null"
68
    description: Unit price excluding tax (on receiving)
70
  ecost_tax_included:
69
  unit_price_tax_included:
71
    description: Effective cost (tax included)
70
    type:
72
    type:
71
      - number
73
      - number
72
      - "null"
74
      - "null"
73
    description: Unit price including tax (on receiving)
75
  entry_date:
74
  quantity_received:
76
    description: Date the bib was added to the basket
75
    type: integer
76
    description: Quantity received so far
77
  cancellation_date:
78
    type:
77
    type:
79
      - string
78
      - string
80
      - "null"
79
      - "null"
81
    format: date
80
    format: date
82
    description: Date the line item was deleted
81
  fund:
83
  cancellation_reason:
84
    type:
82
    type:
85
      - string
83
      - object
86
      - "null"
84
      - "null"
87
    description: Reason of cancellation
85
  fund_id:
86
    description: Internal identifier for the fund this order goes against
87
    type: integer
88
  internal_note:
88
  internal_note:
89
    description: 'Notes related to this order line, made for staff'
89
    type:
90
    type:
90
      - string
91
      - string
91
      - "null"
92
      - "null"
92
    description: Notes related to this order line, made for staff
93
  invoice:
93
  vendor_note:
94
    type:
94
    type:
95
      - string
95
      - object
96
      - "null"
96
      - "null"
97
    description: Notes related to this order line, made for vendor
97
  invoice_id:
98
  basket_id:
98
    description: Id of the order invoice
99
    type:
99
    type:
100
      - integer
100
      - integer
101
      - "null"
101
      - "null"
102
    description: Basket this order is linked to
102
  items:
103
  timestamp:
103
    type: array
104
    type: string
104
  last_claim_date:
105
    format: date-time
105
    description: Last date a claim letter was generated
106
    description: Date and time this order line was last modified
107
  rrp:
108
    type:
109
      - number
110
      - "null"
111
    description: Retail cost for this item
112
  rrp_tax_excluded:
113
    type:
114
      - number
115
      - "null"
116
    description: Replacement cost for this item (tax excluded)
117
  rrp_tax_included:
118
    type:
106
    type:
119
      - number
107
      - string
120
      - "null"
108
      - "null"
121
    description: Replacement cost for this item (tax included)
109
    format: date
122
  ecost:
110
  list_price:
111
    description: Vendor price for the line item
123
    type:
112
    type:
124
      - number
113
      - number
125
      - "null"
114
      - "null"
126
    description: Effective cost
115
  order_id:
127
  ecost_tax_excluded:
116
    description: Internally assigned order identifier
117
    type: integer
118
  parent_order_id:
119
    description: Order ID of parent order line if exists
128
    type:
120
    type:
129
      - number
121
      - integer
130
      - "null"
122
      - "null"
131
    description: Effective cost (tax excluded)
123
  quantity:
132
  ecost_tax_included:
124
    description: Ordered quantity
133
    type:
125
    type:
134
      - number
126
      - integer
135
      - "null"
127
      - "null"
136
    description: Effective cost (tax included)
128
  quantity_received:
137
  tax_rate_on_ordering:
129
    description: Quantity received so far
130
    type: integer
131
  replacement_price:
132
    description: Replacement cost for this item
138
    type:
133
    type:
139
      - number
134
      - number
140
      - "null"
135
      - "null"
141
    description: Tax rate on ordering (%)
136
  rrp:
142
  tax_rate_on_receiving:
137
    description: Retail cost for this item
143
    type:
138
    type:
144
      - number
139
      - number
145
      - "null"
140
      - "null"
146
    description: Tax rate on receiving (%)
141
  rrp_tax_excluded:
147
  tax_value_on_ordering:
142
    description: Replacement cost for this item (tax excluded)
148
    type:
143
    type:
149
      - number
144
      - number
150
      - "null"
145
      - "null"
151
    description: Tax value on ordering
146
  rrp_tax_included:
152
  tax_value_on_receiving:
147
    description: Replacement cost for this item (tax included)
153
    type:
148
    type:
154
      - number
149
      - number
155
      - "null"
150
      - "null"
156
    description: Tax value on receiving
151
  shipping_cost:
157
  discount_rate:
152
    description: Shipping cost
158
    type:
153
    type:
159
      - number
154
      - number
160
      - "null"
155
      - "null"
161
    description: Discount rate
162
  fund_id:
163
    type: integer
164
    description: Internal identifier for the fund this order goes against
165
  statistics_1:
156
  statistics_1:
166
    type:
167
      - string
168
      - "null"
169
    description: Statistical field
157
    description: Statistical field
170
  statistics_2:
171
    type:
158
    type:
172
      - string
159
      - string
173
      - "null"
160
      - "null"
174
    description: Statistical field (2)
175
  statistics_1_authcat:
161
  statistics_1_authcat:
162
    description: Statistical category for this order
176
    type:
163
    type:
177
      - string
164
      - string
178
      - "null"
165
      - "null"
179
    description: Statistical category for this order
166
  statistics_2:
180
  statistics_2_authcat:
167
    description: Statistical field (2)
181
    type:
168
    type:
182
      - string
169
      - string
183
      - "null"
170
      - "null"
171
  statistics_2_authcat:
184
    description: Statistical category for this order (2)
172
    description: Statistical category for this order (2)
185
  uncertain_price:
186
    type: boolean
187
    description: If this price was uncertain
188
  claims_count:
189
    type: integer
190
    description: Generated claim letters count
191
  last_claim_date:
192
    type:
173
    type:
193
      - string
174
      - string
194
      - "null"
175
      - "null"
195
    format: date
196
    description: Last date a claim letter was generated
197
  subscription_id:
198
    type:
199
      - integer
200
      - "null"
201
    description: Subscription ID linking the order to a subscription
202
  parent_order_id:
203
    type:
204
      - integer
205
      - "null"
206
    description: Order ID of parent order line if exists
207
  status:
176
  status:
177
    description: The current order status
208
    type: string
178
    type: string
209
    enum:
179
    enum:
210
      - new
180
      - new
Lines 212-241 properties: Link Here
212
      - partial
182
      - partial
213
      - complete
183
      - complete
214
      - cancelled
184
      - cancelled
215
    description: The current order status
185
  subscription:
216
  basket:
217
    type:
186
    type:
218
      - object
187
      - object
219
      - "null"
188
      - "null"
220
  biblio:
189
  subscription_id:
190
    description: Subscription ID linking the order to a subscription
221
    type:
191
    type:
222
      - object
192
      - integer
223
      - "null"
193
      - "null"
224
  current_item_level_holds_count:
194
  tax_rate_on_ordering:
225
    type: integer
195
    description: Tax rate on ordering (%)
226
    description: Current holds count for associated items
227
  fund:
228
    type:
196
    type:
229
      - object
197
      - number
230
      - "null"
198
      - "null"
231
  invoice:
199
  tax_rate_on_receiving:
200
    description: Tax rate on receiving (%)
232
    type:
201
    type:
233
      - object
202
      - number
234
      - "null"
203
      - "null"
235
  items:
204
  tax_value_on_ordering:
236
    type: array
205
    description: Tax value on ordering
237
  subscription:
238
    type:
206
    type:
239
      - object
207
      - number
208
      - "null"
209
  tax_value_on_receiving:
210
    description: Tax value on receiving
211
    type:
212
      - number
213
      - "null"
214
  timestamp:
215
    description: Date and time this order line was last modified
216
    type: string
217
    format: date-time
218
  uncertain_price:
219
    description: If this price was uncertain
220
    type: boolean
221
  unit_price:
222
    description: The actual cost entered when receiving this line item
223
    type:
224
      - number
225
      - "null"
226
  unit_price_tax_excluded:
227
    description: Unit price excluding tax (on receiving)
228
    type:
229
      - number
230
      - "null"
231
  unit_price_tax_included:
232
    description: Unit price including tax (on receiving)
233
    type:
234
      - number
235
      - "null"
236
  vendor_note:
237
    description: 'Notes related to this order line, made for vendor'
238
    type:
239
      - string
240
      - "null"
240
      - "null"
241
additionalProperties: false
241
additionalProperties: false
(-)a/api/v1/swagger/definitions/patron.yaml (-184 / +180 lines)
Lines 1-364 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  patron_id:
4
  account_balance:
5
    type: integer
5
    description: Balance of the patron's account
6
    description: Internal patron identifier
7
  cardnumber:
8
    type:
6
    type:
9
      - string
7
      - number
10
      - "null"
8
      - "null"
11
    description: library assigned user identifier
9
  address:
12
  surname:
10
    description: first address line of patron's primary address
13
    type:
11
    type:
14
      - string
12
      - string
15
      - "null"
13
      - "null"
16
    description: patron's last name
14
  address2:
17
  firstname:
15
    description: second address line of patron's primary address
18
    type:
16
    type:
19
      - string
17
      - string
20
      - "null"
18
      - "null"
21
    description: patron's first name
19
  altaddress_address:
22
  title:
20
    description: first address line of patron's alternate address
23
    type:
21
    type:
24
      - string
22
      - string
25
      - "null"
23
      - "null"
26
    description: patron's title
24
  altaddress_address2:
27
  other_name:
25
    description: second address line of patron's alternate address
28
    type:
26
    type:
29
      - string
27
      - string
30
      - "null"
28
      - "null"
31
    description: any other names associated with the patron
29
  altaddress_city:
32
  initials:
30
    description: city or town of patron's alternate address
33
    type:
31
    type:
34
      - string
32
      - string
35
      - "null"
33
      - "null"
36
    description: initials of the patron
34
  altaddress_country:
37
  street_number:
35
    description: country of patron's alternate address
38
    type:
36
    type:
39
      - string
37
      - string
40
      - "null"
38
      - "null"
41
    description: street number of patron's primary address
39
  altaddress_email:
42
  street_type:
40
    description: email address for patron's alternate address
43
    type:
41
    type:
44
      - string
42
      - string
45
      - "null"
43
      - "null"
46
    description: street type of patron's primary address
44
  altaddress_notes:
47
  address:
45
    description: a note related to patron's alternate address
48
    type:
46
    type:
49
      - string
47
      - string
50
      - "null"
48
      - "null"
51
    description: first address line of patron's primary address
49
  altaddress_phone:
52
  address2:
50
    description: phone number for patron's alternate address
53
    type:
51
    type:
54
      - string
52
      - string
55
      - "null"
53
      - "null"
56
    description: second address line of patron's primary address
54
  altaddress_postal_code:
57
  city:
55
    description: zip or postal code of patron's alternate address
58
    type:
56
    type:
59
      - string
57
      - string
60
      - "null"
58
      - "null"
61
    description: city or town of patron's primary address
59
  altaddress_state:
62
  state:
60
    description: state or province of patron's alternate address
63
    type:
61
    type:
64
      - string
62
      - string
65
      - "null"
63
      - "null"
66
    description: state or province of patron's primary address
64
  altaddress_street_number:
67
  postal_code:
65
    description: street number of patron's alternate address
68
    type:
66
    type:
69
      - string
67
      - string
70
      - "null"
68
      - "null"
71
    description: zip or postal code of patron's primary address
69
  altaddress_street_type:
72
  country:
70
    description: street type of patron's alternate address
73
    type:
71
    type:
74
      - string
72
      - string
75
      - "null"
73
      - "null"
76
    description: country of patron's primary address
74
  altcontact_address:
77
  email:
75
    description: the first address line for the alternate contact for the patron
78
    type:
76
    type:
79
      - string
77
      - string
80
      - "null"
78
      - "null"
81
    description: primary email address for patron's primary address
79
  altcontact_address2:
82
  phone:
80
    description: the second address line for the alternate contact for the patron
83
    type:
81
    type:
84
      - string
82
      - string
85
      - "null"
83
      - "null"
86
    description: primary phone number for patron's primary address
84
  altcontact_city:
87
  mobile:
85
    description: the city for the alternate contact for the patron
88
    type:
86
    type:
89
      - string
87
      - string
90
      - "null"
88
      - "null"
91
    description: the other phone number for patron's primary address
89
  altcontact_country:
92
  fax:
90
    description: the country for the alternate contact for the patron
93
    type:
91
    type:
94
      - string
92
      - string
95
      - "null"
93
      - "null"
96
    description: fax number for patron's primary address
94
  altcontact_firstname:
97
  secondary_email:
95
    description: first name of alternate contact for the patron
98
    type:
96
    type:
99
      - string
97
      - string
100
      - "null"
98
      - "null"
101
    description: secondary email address for patron's primary address
99
  altcontact_phone:
102
  secondary_phone:
100
    description: the phone number for the alternate contact for the patron
103
    type:
101
    type:
104
      - string
102
      - string
105
      - "null"
103
      - "null"
106
    description: secondary phone number for patron's primary address
104
  altcontact_postal_code:
107
  altaddress_street_number:
105
    description: the zipcode for the alternate contact for the patron
108
    type:
106
    type:
109
      - string
107
      - string
110
      - "null"
108
      - "null"
111
    description: street number of patron's alternate address
109
  altcontact_state:
112
  altaddress_street_type:
110
    description: the state for the alternate contact for the patron
113
    type:
111
    type:
114
      - string
112
      - string
115
      - "null"
113
      - "null"
116
    description: street type of patron's alternate address
114
  altcontact_surname:
117
  altaddress_address:
115
    description: surname or last name of the alternate contact for the patron
118
    type:
116
    type:
119
      - string
117
      - string
120
      - "null"
118
      - "null"
121
    description: first address line of patron's alternate address
119
  anonymized:
122
  altaddress_address2:
120
    description: If the patron has been anonymized
121
    type: boolean
122
    readOnly: true
123
  autorenew_checkouts:
124
    description: indicate whether auto-renewal is allowed for patron
125
    type: boolean
126
  cardnumber:
127
    description: library assigned user identifier
123
    type:
128
    type:
124
      - string
129
      - string
125
      - "null"
130
      - "null"
126
    description: second address line of patron's alternate address
131
  category_id:
127
  altaddress_city:
132
    description: Internal identifier for the patron's category
133
    type: string
134
  check_previous_checkout:
135
    description: "produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'"
136
    type: string
137
  checkouts_count:
138
    description: Number of checkouts
128
    type:
139
    type:
129
      - string
140
      - integer
130
      - "null"
141
      - "null"
131
    description: city or town of patron's alternate address
142
  city:
132
  altaddress_state:
143
    description: city or town of patron's primary address
133
    type:
144
    type:
134
      - string
145
      - string
135
      - "null"
146
      - "null"
136
    description: state or province of patron's alternate address
147
  country:
137
  altaddress_postal_code:
148
    description: country of patron's primary address
138
    type:
149
    type:
139
      - string
150
      - string
140
      - "null"
151
      - "null"
141
    description: zip or postal code of patron's alternate address
152
  date_enrolled:
142
  altaddress_country:
153
    description: date the patron was added to Koha
143
    type:
154
    type:
144
      - string
155
      - string
145
      - "null"
156
      - "null"
146
    description: country of patron's alternate address
157
    format: date
147
  altaddress_email:
158
  date_of_birth:
159
    description: patron's date of birth
148
    type:
160
    type:
149
      - string
161
      - string
150
      - "null"
162
      - "null"
151
    description: email address for patron's alternate address
163
    format: date
152
  altaddress_phone:
164
  date_renewed:
165
    description: date the patron's card was last renewed
153
    type:
166
    type:
154
      - string
167
      - string
155
      - "null"
168
      - "null"
156
    description: phone number for patron's alternate address
169
    format: date
157
  date_of_birth:
170
  email:
171
    description: primary email address for patron's primary address
158
    type:
172
    type:
159
      - string
173
      - string
160
      - "null"
174
      - "null"
161
    format: date
175
  expiry_date:
162
    description: patron's date of birth
176
    description: date the patron's card is set to expire
163
  library_id:
164
    type: string
165
    description: Internal identifier for the patron's home library
166
  category_id:
167
    type: string
168
    description: Internal identifier for the patron's category
169
  date_enrolled:
170
    type:
177
    type:
171
      - string
178
      - string
172
      - "null"
179
      - "null"
173
    format: date
180
    format: date
174
    description: date the patron was added to Koha
181
  extended_attributes:
175
  expiry_date:
182
    description: patron's extended attributes
183
    type: array
184
    items:
185
      $ref: patron_extended_attribute.yaml
186
  fax:
187
    description: fax number for patron's primary address
176
    type:
188
    type:
177
      - string
189
      - string
178
      - "null"
190
      - "null"
179
    format: date
191
  firstname:
180
    description: date the patron's card is set to expire
192
    description: patron's first name
181
  date_renewed:
182
    type:
193
    type:
183
      - string
194
      - string
184
      - "null"
195
      - "null"
185
    format: date
196
  gender:
186
    description: date the patron's card was last renewed
197
    description: patron's gender
187
  incorrect_address:
188
    type:
198
    type:
189
      - boolean
199
      - string
190
      - "null"
200
      - "null"
201
  incorrect_address:
191
    description: set to 1 if library marked this patron as having an unconfirmed address
202
    description: set to 1 if library marked this patron as having an unconfirmed address
192
  patron_card_lost:
193
    type:
203
    type:
194
      - boolean
204
      - boolean
195
      - "null"
205
      - "null"
196
    description: set to 1 if library marked this patron as having lost his card
206
  initials:
197
  restricted:
207
    description: initials of the patron
198
    type: boolean
199
    readOnly: true
200
    description: If any restriction applies to the patron
201
  staff_notes:
202
    type:
208
    type:
203
      - string
209
      - string
204
      - "null"
210
      - "null"
205
    description: a note on the patron's account
211
  lang:
206
  relationship_type:
212
    description: lang to use to send notices to this patron
213
    type: string
214
  last_seen:
215
    description: last time a patron has been seen (connected at the OPAC or staff interface)
207
    type:
216
    type:
208
      - string
217
      - string
209
      - "null"
218
      - "null"
210
    description: used for children to include the relationship to their guarantor
219
    format: date-time
211
  gender:
220
  library_id:
221
    description: Internal identifier for the patron's home library
222
    type: string
223
  login_attempts:
224
    description: number of failed login attemps
212
    type:
225
    type:
213
      - string
226
      - integer
214
      - "null"
227
      - "null"
215
    description: patron's gender
228
  mobile:
216
  userid:
229
    description: the other phone number for patron's primary address
217
    type:
230
    type:
218
      - string
231
      - string
219
      - "null"
232
      - "null"
220
    description: patron's login
221
  opac_notes:
233
  opac_notes:
234
    description: a note on the patron's account visible in OPAC and staff interface
222
    type:
235
    type:
223
      - string
236
      - string
224
      - "null"
237
      - "null"
225
    description: a note on the patron's account visible in OPAC and staff interface
238
  other_name:
226
  altaddress_notes:
239
    description: any other names associated with the patron
227
    type:
240
    type:
228
      - string
241
      - string
229
      - "null"
242
      - "null"
230
    description: a note related to patron's alternate address
243
  overdrive_auth_token:
231
  statistics_1:
244
    description: persist OverDrive auth token
232
    type:
245
    type:
233
      - string
246
      - string
234
      - "null"
247
      - "null"
235
    description: a field that can be used for any information unique to the library
248
  overdues_count:
236
  statistics_2:
249
    description: Number of overdued checkouts
237
    type:
250
    type:
238
      - string
251
      - integer
239
      - "null"
252
      - "null"
240
    description: a field that can be used for any information unique to the library
253
  patron_card_lost:
241
  autorenew_checkouts:
254
    description: set to 1 if library marked this patron as having lost his card
242
    type: boolean
243
    description: indicate whether auto-renewal is allowed for patron
244
  altcontact_firstname:
245
    type:
255
    type:
246
      - string
256
      - boolean
247
      - "null"
257
      - "null"
248
    description: first name of alternate contact for the patron
258
  patron_id:
249
  altcontact_surname:
259
    description: Internal patron identifier
260
    type: integer
261
  phone:
262
    description: primary phone number for patron's primary address
250
    type:
263
    type:
251
      - string
264
      - string
252
      - "null"
265
      - "null"
253
    description: surname or last name of the alternate contact for the patron
266
  postal_code:
254
  altcontact_address:
267
    description: zip or postal code of patron's primary address
255
    type:
268
    type:
256
      - string
269
      - string
257
      - "null"
270
      - "null"
258
    description: the first address line for the alternate contact for the patron
271
  privacy:
259
  altcontact_address2:
272
    description: patron's privacy settings related to their checkout history
273
    type: integer
274
  privacy_guarantor_checkouts:
275
    description: controls if relatives can see this patron's checkouts
276
    type: integer
277
  privacy_guarantor_fines:
278
    description: controls if relatives can see this patron's fines
279
    type: boolean
280
  relationship_type:
281
    description: used for children to include the relationship to their guarantor
260
    type:
282
    type:
261
      - string
283
      - string
262
      - "null"
284
      - "null"
263
    description: the second address line for the alternate contact for the patron
285
  restricted:
264
  altcontact_city:
286
    description: If any restriction applies to the patron
287
    type: boolean
288
    readOnly: true
289
  secondary_email:
290
    description: secondary email address for patron's primary address
265
    type:
291
    type:
266
      - string
292
      - string
267
      - "null"
293
      - "null"
268
    description: the city for the alternate contact for the patron
294
  secondary_phone:
269
  altcontact_state:
295
    description: secondary phone number for patron's primary address
270
    type:
296
    type:
271
      - string
297
      - string
272
      - "null"
298
      - "null"
273
    description: the state for the alternate contact for the patron
299
  sms_number:
274
  altcontact_postal_code:
300
    description: the mobile phone number where the patron would like to receive notices (if SMS turned on)
275
    type:
301
    type:
276
      - string
302
      - string
277
      - "null"
303
      - "null"
278
    description: the zipcode for the alternate contact for the patron
304
  sms_provider_id:
279
  altcontact_country:
305
    description: the provider of the mobile phone number defined in smsalertnumber
280
    type:
306
    type:
281
      - string
307
      - integer
282
      - "null"
308
      - "null"
283
    description: the country for the alternate contact for the patron
309
  staff_notes:
284
  altcontact_phone:
310
    description: a note on the patron's account
285
    type:
311
    type:
286
      - string
312
      - string
287
      - "null"
313
      - "null"
288
    description: the phone number for the alternate contact for the patron
314
  state:
289
  sms_number:
315
    description: state or province of patron's primary address
290
    type:
316
    type:
291
      - string
317
      - string
292
      - "null"
318
      - "null"
293
    description: the mobile phone number where the patron would like to receive notices (if
319
  statistics_1:
294
      SMS turned on)
320
    description: a field that can be used for any information unique to the library
295
  sms_provider_id:
296
    type:
321
    type:
297
      - integer
322
      - string
298
      - "null"
323
      - "null"
299
    description: the provider of the mobile phone number defined in smsalertnumber
324
  statistics_2:
300
  privacy:
325
    description: a field that can be used for any information unique to the library
301
    type: integer
302
    description: patron's privacy settings related to their checkout history
303
  privacy_guarantor_checkouts:
304
    type: integer
305
    description: controls if relatives can see this patron's checkouts
306
  privacy_guarantor_fines:
307
    type: boolean
308
    description: controls if relatives can see this patron's fines
309
  check_previous_checkout:
310
    type: string
311
    description: produce a warning for this patron if this item has previously been checked
312
      out to this patron if 'yes', not if 'no', defer to category setting if
313
      'inherit'
314
  updated_on:
315
    type: string
316
    format: date-time
317
    description: time of last change could be useful for synchronization with external
318
      systems (among others)
319
  last_seen:
320
    type:
326
    type:
321
      - string
327
      - string
322
      - "null"
328
      - "null"
323
    format: date-time
329
  street_number:
324
    description: last time a patron has been seen (connected at the OPAC or staff interface)
330
    description: street number of patron's primary address
325
  lang:
326
    type: string
327
    description: lang to use to send notices to this patron
328
  login_attempts:
329
    type:
331
    type:
330
      - integer
332
      - string
331
      - "null"
333
      - "null"
332
    description: number of failed login attemps
334
  street_type:
333
  overdrive_auth_token:
335
    description: street type of patron's primary address
334
    type:
336
    type:
335
      - string
337
      - string
336
      - "null"
338
      - "null"
337
    description: persist OverDrive auth token
339
  surname:
338
  anonymized:
340
    description: patron's last name
339
    type: boolean
340
    readOnly: true
341
    description: If the patron has been anonymized
342
  extended_attributes:
343
    type: array
344
    description: patron's extended attributes
345
    items:
346
      $ref: "patron_extended_attribute.yaml"
347
  checkouts_count:
348
    type:
341
    type:
349
      - integer
342
      - string
350
      - "null"
343
      - "null"
351
    description: Number of checkouts
344
  title:
352
  overdues_count:
345
    description: patron's title
353
    type:
346
    type:
354
      - integer
347
      - string
355
      - "null"
348
      - "null"
356
    description: Number of overdued checkouts
349
  updated_on:
357
  account_balance:
350
    description: time of last change could be useful for synchronization with external systems (among others)
351
    type: string
352
    format: date-time
353
  userid:
354
    description: patron's login
358
    type:
355
    type:
359
      - number
356
      - string
360
      - "null"
357
      - "null"
361
    description: Balance of the patron's account
362
additionalProperties: false
358
additionalProperties: false
363
required:
359
required:
364
  - surname
360
  - surname
(-)a/api/v1/swagger/definitions/patron_account_credit.yaml (-20 / +20 lines)
Lines 1-36 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  credit_type:
4
  description:
5
    description: Description
5
    type: string
6
    type: string
6
    description: Type of credit ('CREDIT', 'FORGIVEN', 'LOST_FOUND', 'PAYMENT', 'WRITEOFF' )
7
  amount:
8
    type: number
9
    minimum: 0
10
    description: Credit amount
11
  library_id:
12
    type:
13
      - string
14
      - "null"
15
    description: Internal identifier for the library in which the transaction took place
16
  account_lines_ids:
7
  account_lines_ids:
8
    description: List of account line ids the credit goes against (optional)
17
    type: array
9
    type: array
18
    items:
10
    items:
19
      type: integer
11
      type: integer
20
    description: List of account line ids the credit goes against (optional)
12
  amount:
21
  payment_type:
13
    description: Credit amount
14
    type: number
15
    minimum: 0
16
  credit_type:
17
    description: "Type of credit ('CREDIT', 'FORGIVEN', 'LOST_FOUND', 'PAYMENT', 'WRITEOFF' )"
22
    type: string
18
    type: string
23
    description: Payment type (only applies when credit_type=payment)
24
  date:
19
  date:
25
    type: string
26
    format: date
27
    description: Date the credit was recorded (optional)
20
    description: Date the credit was recorded (optional)
28
  description:
29
    type: string
21
    type: string
30
    description: Description
22
    format: date
23
  library_id:
24
    description: Internal identifier for the library in which the transaction took place
25
    type:
26
      - string
27
      - "null"
31
  note:
28
  note:
32
    type: string
33
    description: Internal note
29
    description: Internal note
30
    type: string
31
  payment_type:
32
    description: Payment type (only applies when credit_type=payment)
33
    type: string
34
additionalProperties: false
34
required:
35
required:
35
  - amount
36
  - amount
36
additionalProperties: false
(-)a/api/v1/swagger/definitions/patron_balance.yaml (-7 / +7 lines)
Lines 2-26 Link Here
2
type: object
2
type: object
3
properties:
3
properties:
4
  balance:
4
  balance:
5
    type: number
6
    description: Signed decimal number
5
    description: Signed decimal number
6
    type: number
7
  outstanding_credits:
7
  outstanding_credits:
8
    properties:
8
    properties:
9
      total:
10
        type: number
11
      lines:
9
      lines:
12
        type: array
10
        type: array
13
        items:
11
        items:
14
          $ref: "account_line.yaml"
12
          $ref: account_line.yaml
13
      total:
14
        type: number
15
  outstanding_debits:
15
  outstanding_debits:
16
    type: object
16
    type: object
17
    properties:
17
    properties:
18
      total:
19
        type: number
20
      lines:
18
      lines:
21
        type: array
19
        type: array
22
        items:
20
        items:
23
          $ref: "account_line.yaml"
21
          $ref: account_line.yaml
22
      total:
23
        type: number
24
additionalProperties: false
24
additionalProperties: false
25
required:
25
required:
26
  - balance
26
  - balance
(-)a/api/v1/swagger/definitions/patron_extended_attribute.yaml (-3 / +3 lines)
Lines 1-12 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  extended_attribute_id:
5
    description: Internal ID for the extended attribute
6
    type: integer
7
  type:
4
  type:
8
    description: Extended attribute type
5
    description: Extended attribute type
9
    type: string
6
    type: string
7
  extended_attribute_id:
8
    description: Internal ID for the extended attribute
9
    type: integer
10
  value:
10
  value:
11
    description: Extended attribute value
11
    description: Extended attribute value
12
    type:
12
    type:
(-)a/api/v1/swagger/definitions/quote.yaml (-6 / +6 lines)
Lines 1-9 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  displayed_on:
5
    description: Last display date
6
    type:
7
      - string
8
      - "null"
4
  quote_id:
9
  quote_id:
5
    type: integer
6
    description: internally assigned quote identifier
10
    description: internally assigned quote identifier
11
    type: integer
7
  source:
12
  source:
8
    description: source of the quote
13
    description: source of the quote
9
    type: string
14
    type: string
Lines 12-22 properties: Link Here
12
    type:
17
    type:
13
      - string
18
      - string
14
      - "null"
19
      - "null"
15
  displayed_on:
16
    description: Last display date
17
    type:
18
      - string
19
      - "null"
20
additionalProperties: false
20
additionalProperties: false
21
required:
21
required:
22
  - quote_id
22
  - quote_id
(-)a/api/v1/swagger/definitions/return_claim.yaml (-31 / +31 lines)
Lines 2-68 Link Here
2
type: object
2
type: object
3
properties:
3
properties:
4
  claim_id:
4
  claim_id:
5
    type:
6
      - integer
7
    description: internally assigned return claim identifier
5
    description: internally assigned return claim identifier
8
  item_id:
9
    type:
10
      - integer
11
    description: internal identifier of the claimed item
12
  issue_id:
13
    type:
6
    type:
14
      - integer
7
      - integer
15
      - "null"
8
  created_by:
16
    description: internal identifier of the claimed checkout if still checked out
9
    description: patron id of librarian who made the claim
17
  old_issue_id:
18
    type:
10
    type:
19
      - integer
11
      - integer
20
      - "null"
12
      - "null"
21
    description: internal identifier of the claimed checkout if not longer checked out
22
  patron_id:
23
    type: integer
24
    description: Internal patron identifier
25
  notes:
26
    type:
27
      - string
28
      - "null"
29
    description: notes about this claim
30
  created_on:
13
  created_on:
14
    description: date of claim creation
31
    type:
15
    type:
32
      - string
16
      - string
33
      - "null"
17
      - "null"
34
    format: date-time
18
    format: date-time
35
    description: date of claim creation
19
  issue_id:
36
  created_by:
20
    description: internal identifier of the claimed checkout if still checked out
37
    type:
21
    type:
38
      - integer
22
      - integer
39
      - "null"
23
      - "null"
40
    description: patron id of librarian who made the claim
24
  item_id:
41
  updated_on:
25
    description: internal identifier of the claimed item
26
    type:
27
      - integer
28
  notes:
29
    description: notes about this claim
42
    type:
30
    type:
43
      - string
31
      - string
44
      - "null"
32
      - "null"
45
    format: date-time
33
  old_issue_id:
46
    description: date the claim was last updated
34
    description: internal identifier of the claimed checkout if not longer checked out
47
  updated_by:
48
    type:
35
    type:
49
      - integer
36
      - integer
50
      - "null"
37
      - "null"
51
    description: patron id of librarian who last updated the claim
38
  patron_id:
39
    description: Internal patron identifier
40
    type: integer
52
  resolution:
41
  resolution:
42
    description: code of resolution type for this claim
53
    type:
43
    type:
54
      - string
44
      - string
55
      - "null"
45
      - "null"
56
    description: code of resolution type for this claim
46
  resolved_by:
47
    description: patron id of librarian who resolved this claim
48
    type:
49
      - integer
50
      - "null"
57
  resolved_on:
51
  resolved_on:
52
    description: date the claim was resolved
58
    type:
53
    type:
59
      - string
54
      - string
60
      - "null"
55
      - "null"
61
    format: date-time
56
    format: date-time
62
    description: date the claim was resolved
57
  updated_by:
63
  resolved_by:
58
    description: patron id of librarian who last updated the claim
64
    type:
59
    type:
65
      - integer
60
      - integer
66
      - "null"
61
      - "null"
67
    description: patron id of librarian who resolved this claim
62
  updated_on:
63
    description: date the claim was last updated
64
    type:
65
      - string
66
      - "null"
67
    format: date-time
68
additionalProperties: false
68
additionalProperties: false
(-)a/api/v1/swagger/definitions/smtp_server.yaml (-19 / +19 lines)
Lines 1-42 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  smtp_server_id:
4
  debug:
5
    type: integer
5
    description: If the SMTP connection is set to debug mode
6
    description: Internal SMTP server identifier
6
    type: boolean
7
    readOnly: true
7
  host:
8
  name:
8
    description: SMTP host name
9
    type: string
9
    type: string
10
  name:
10
    description: Name of the SMTP server
11
    description: Name of the SMTP server
11
  host:
12
    type: string
12
    type: string
13
    description: SMTP host name
13
  password:
14
    description: The password to use for authentication (optional)
15
    type:
16
      - string
17
      - "null"
14
  port:
18
  port:
15
    type: integer
16
    description: TCP port number
19
    description: TCP port number
17
  timeout:
18
    type: integer
20
    type: integer
19
    description: Maximum time in seconds to wait for server
21
  smtp_server_id:
22
    description: Internal SMTP server identifier
23
    type: integer
24
    readOnly: true
20
  ssl_mode:
25
  ssl_mode:
26
    description: If SSL/TLS will be used
21
    type: string
27
    type: string
22
    enum:
28
    enum:
23
      - disabled
29
      - disabled
24
      - ssl
30
      - ssl
25
      - starttls
31
      - starttls
26
    description: If SSL/TLS will be used
32
  timeout:
33
    description: Maximum time in seconds to wait for server
34
    type: integer
27
  user_name:
35
  user_name:
28
    type:
29
      - string
30
      - "null"
31
    description: The user name to use for authentication (optional)
36
    description: The user name to use for authentication (optional)
32
  password:
33
    type:
37
    type:
34
      - string
38
      - string
35
      - "null"
39
      - "null"
36
    description: The password to use for authentication (optional)
37
  debug:
38
    type: boolean
39
    description: If the SMTP connection is set to debug mode
40
additionalProperties: false
40
additionalProperties: false
41
required:
41
required:
42
  - name
42
  - name
(-)a/api/v1/swagger/definitions/suggestion.yaml (-98 / +93 lines)
Lines 1-185 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  suggestion_id:
4
  accepted_by:
5
    type: integer
5
    description: 'patron_id for the librarian who accepted the suggestion, foreign key linking to the borrowers table'
6
    readOnly: true
7
    description: unique identifier assigned automatically by Koha
8
  suggested_by:
9
    type:
10
      - integer
11
      - "null"
12
    description: patron_id for the person making the suggestion, foreign key linking to the
13
      borrowers table
14
  suggestion_date:
15
    type: string
16
    format: date
17
    description: the suggestion was submitted
18
  managed_by:
19
    type:
6
    type:
20
      - integer
7
      - integer
21
      - "null"
8
      - "null"
22
    description: patron_id for the librarian managing the suggestion, foreign key linking
9
  accepted_date:
23
      to the borrowers table
10
    description: date the suggestion was marked as accepted
24
  managed_date:
25
    type:
11
    type:
26
      - string
12
      - string
27
      - "null"
13
      - "null"
28
    format: date
14
    format: date
29
    description: date the suggestion was updated
15
  archived:
30
  accepted_by:
16
    description: archived (processed) suggestion
31
    type:
17
    type:
32
      - integer
18
      - boolean
33
      - "null"
19
      - "null"
34
    description: patron_id for the librarian who accepted the suggestion, foreign key
20
  author:
35
      linking to the borrowers table
21
    description: author of the suggested item
36
  accepted_date:
37
    type:
22
    type:
38
      - string
23
      - string
39
      - "null"
24
      - "null"
40
    format: date
25
  biblio_id:
41
    description: date the suggestion was marked as accepted
26
    description: foreign key linking the suggestion to the biblio table after the suggestion has been ordered
42
  rejected_by:
43
    type:
27
    type:
44
      - integer
28
      - integer
45
      - "null"
29
      - "null"
46
    description: patron_id for the librarian who rejected the suggestion, foreign key
30
  budget_id:
47
      linking to the borrowers table
31
    description: foreign key linking the suggested budget to the aqbudgets table
48
  rejected_date:
32
    type:
33
      - integer
34
      - "null"
35
  collection_title:
36
    description: collection name for the suggested item
49
    type:
37
    type:
50
      - string
38
      - string
51
      - "null"
39
      - "null"
52
    format: date
40
  copyright_date:
53
    description: date the suggestion was marked as rejected
41
    description: copyright date of the suggested item
54
  last_status_change_by:
55
    type:
42
    type:
56
      - integer
43
      - integer
57
      - "null"
44
      - "null"
58
    description: patron the suggestion was last modified by
45
  currency:
59
  last_status_change_date:
46
    description: suggested currency for the suggested price
60
    type:
47
    type:
61
      - string
48
      - string
62
      - "null"
49
      - "null"
63
    format: date
50
  isbn:
64
    description: date the suggestion was last modified
51
    description: isbn of the suggested item
65
  status:
66
    type: string
67
    description: Suggestion status
68
    enum:
69
      - ASKED
70
      - CHECKED
71
      - ACCEPTED
72
      - REJECTED
73
  note:
74
    type:
52
    type:
75
      - string
53
      - string
76
      - "null"
54
      - "null"
77
    description: note entered on the suggestion
55
  item_price:
78
  author:
56
    description: suggested price
79
    type:
57
    type:
80
      - string
58
      - number
81
      - "null"
59
      - "null"
82
    description: author of the suggested item
60
  item_type:
83
  title:
61
    description: suggested item type
84
    type:
62
    type:
85
      - string
63
      - string
86
      - "null"
64
      - "null"
87
    description: title of the suggested item
65
  last_status_change_by:
88
  copyright_date:
66
    description: patron the suggestion was last modified by
89
    type:
67
    type:
90
      - integer
68
      - integer
91
      - "null"
69
      - "null"
92
    description: copyright date of the suggested item
70
  last_status_change_date:
93
  publisher_code:
71
    description: date the suggestion was last modified
94
    type:
72
    type:
95
      - string
73
      - string
96
      - "null"
74
      - "null"
97
    description: publisher of the suggested item
75
    format: date
98
  timestamp:
76
  library_id:
77
    description: foreign key linking the suggested branch to the branches table
99
    type:
78
    type:
100
      - string
79
      - string
101
      - "null"
80
      - "null"
102
    format: date-time
81
  managed_by:
103
    description: timestamp of date created
82
    description: 'patron_id for the librarian managing the suggestion, foreign key linking to the borrowers table'
104
  volume_desc:
105
    type:
83
    type:
106
      - string
84
      - integer
107
      - "null"
85
      - "null"
108
    description: volume description
86
  managed_date:
109
  publication_year:
87
    description: date the suggestion was updated
110
    type:
88
    type:
111
      - string
89
      - string
112
      - "null"
90
      - "null"
113
    description: year of publication
91
    format: date
114
  publication_place:
92
  note:
93
    description: note entered on the suggestion
115
    type:
94
    type:
116
      - string
95
      - string
117
      - "null"
96
      - "null"
118
    description: publication place of the suggested item
97
  patron_reason:
119
  isbn:
98
    description: reason for making the suggestion
120
    type:
99
    type:
121
      - string
100
      - string
122
      - "null"
101
      - "null"
123
    description: isbn of the suggested item
102
  publication_place:
124
  biblio_id:
103
    description: publication place of the suggested item
125
    type:
104
    type:
126
      - integer
105
      - string
127
      - "null"
106
      - "null"
128
    description: foreign key linking the suggestion to the biblio table after the
107
  publication_year:
129
      suggestion has been ordered
108
    description: year of publication
130
  reason:
131
    type:
109
    type:
132
      - string
110
      - string
133
      - "null"
111
      - "null"
134
    description: reason for accepting or rejecting the suggestion
112
  publisher_code:
135
  patron_reason:
113
    description: publisher of the suggested item
136
    type:
114
    type:
137
      - string
115
      - string
138
      - "null"
116
      - "null"
139
    description: reason for making the suggestion
117
  quantity:
140
  budget_id:
118
    description: suggested quantity to be purchased
141
    type:
119
    type:
142
      - integer
120
      - string
143
      - "null"
121
      - "null"
144
    description: foreign key linking the suggested budget to the aqbudgets table
122
  reason:
145
  library_id:
123
    description: reason for accepting or rejecting the suggestion
146
    type:
124
    type:
147
      - string
125
      - string
148
      - "null"
126
      - "null"
149
    description: foreign key linking the suggested branch to the branches table
127
  rejected_by:
150
  collection_title:
128
    description: 'patron_id for the librarian who rejected the suggestion, foreign key linking to the borrowers table'
151
    type:
129
    type:
152
      - string
130
      - integer
153
      - "null"
131
      - "null"
154
    description: collection name for the suggested item
132
  rejected_date:
155
  item_type:
133
    description: date the suggestion was marked as rejected
156
    type:
134
    type:
157
      - string
135
      - string
158
      - "null"
136
      - "null"
159
    description: suggested item type
137
    format: date
160
  quantity:
138
  status:
139
    description: Suggestion status
140
    type: string
141
    enum:
142
      - ASKED
143
      - CHECKED
144
      - ACCEPTED
145
      - REJECTED
146
  suggested_by:
147
    description: 'patron_id for the person making the suggestion, foreign key linking to the borrowers table'
161
    type:
148
    type:
162
      - string
149
      - integer
163
      - "null"
150
      - "null"
164
    description: suggested quantity to be purchased
151
  suggestion_date:
165
  currency:
152
    description: the suggestion was submitted
153
    type: string
154
    format: date
155
  suggestion_id:
156
    description: unique identifier assigned automatically by Koha
157
    type: integer
158
    readOnly: true
159
  timestamp:
160
    description: timestamp of date created
166
    type:
161
    type:
167
      - string
162
      - string
168
      - "null"
163
      - "null"
169
    description: suggested currency for the suggested price
164
    format: date-time
170
  item_price:
165
  title:
166
    description: title of the suggested item
171
    type:
167
    type:
172
      - number
168
      - string
173
      - "null"
169
      - "null"
174
    description: suggested price
175
  total_price:
170
  total_price:
171
    description: suggested total cost (price*quantity updated for currency)
176
    type:
172
    type:
177
      - string
173
      - string
178
      - "null"
174
      - "null"
179
    description: suggested total cost (price*quantity updated for currency)
175
  volume_desc:
180
  archived:
176
    description: volume description
181
    type:
177
    type:
182
      - boolean
178
      - string
183
      - "null"
179
      - "null"
184
    description: archived (processed) suggestion
185
additionalProperties: false
180
additionalProperties: false
(-)a/api/v1/swagger/definitions/transfer_limit.yaml (-12 / +12 lines)
Lines 1-25 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  limit_id:
4
  collection_code:
5
    type: integer
5
    description: Authorized value for the collection code associated with this limit
6
    description: Internal transfer limit identifier
7
  to_library_id:
8
    type: string
9
    description: Internal library id for which library the item is going to
10
  from_library_id:
11
    type: string
12
    description: Internal library id for which library the item is coming from
13
  item_type:
14
    type:
6
    type:
15
      - string
7
      - string
16
      - "null"
8
      - "null"
9
  from_library_id:
10
    description: Internal library id for which library the item is coming from
11
    type: string
12
  item_type:
17
    description: Itemtype defining the type for this limi
13
    description: Itemtype defining the type for this limi
18
  collection_code:
19
    type:
14
    type:
20
      - string
15
      - string
21
      - "null"
16
      - "null"
22
    description: Authorized value for the collection code associated with this limit
17
  limit_id:
18
    description: Internal transfer limit identifier
19
    type: integer
20
  to_library_id:
21
    description: Internal library id for which library the item is going to
22
    type: string
23
additionalProperties: false
23
additionalProperties: false
24
required:
24
required:
25
  - to_library_id
25
  - to_library_id
(-)a/api/v1/swagger/definitions/vendor.yaml (-48 / +48 lines)
Lines 1-109 Link Here
1
---
1
---
2
type: object
2
type: object
3
properties:
3
properties:
4
  id:
4
  accountnumber:
5
    type: integer
5
    description: Vendor account number
6
    description: internally assigned vendor identifier
7
    readOnly: true
8
  name:
9
    type:
6
    type:
10
      - string
7
      - string
11
    description: Vendor name
8
      - "null"
12
  address1:
9
  active:
10
    description: Is this vendor active
13
    type:
11
    type:
14
      - string
12
      - boolean
15
      - "null"
13
      - "null"
14
  address1:
16
    description: Vendor physical address (line 1)
15
    description: Vendor physical address (line 1)
17
  address2:
18
    type:
16
    type:
19
      - string
17
      - string
20
      - "null"
18
      - "null"
19
  address2:
21
    description: Vendor physical address (line 2)
20
    description: Vendor physical address (line 2)
22
  address3:
23
    type:
21
    type:
24
      - string
22
      - string
25
      - "null"
23
      - "null"
24
  address3:
26
    description: Vendor physical address (line 3)
25
    description: Vendor physical address (line 3)
27
  address4:
28
    type:
26
    type:
29
      - string
27
      - string
30
      - "null"
28
      - "null"
29
  address4:
31
    description: Vendor physical address (line 4)
30
    description: Vendor physical address (line 4)
32
  phone:
33
    type:
31
    type:
34
      - string
32
      - string
35
      - "null"
33
      - "null"
36
    description: Vendor phone number
34
  deliverytime:
37
  fax:
35
    description: Expected delivery time (in days)
38
    type:
36
    type:
39
      - string
37
      - integer
40
      - "null"
38
      - "null"
41
    description: Vendor fax number
39
  discount:
42
  accountnumber:
40
    description: Default discount rate for items ordered from this vendor
43
    type:
41
    type:
44
      - string
42
      - number
45
      - "null"
43
      - "null"
46
    description: Vendor account number
44
  fax:
47
  notes:
45
    description: Vendor fax number
48
    type:
46
    type:
49
      - string
47
      - string
50
      - "null"
48
      - "null"
51
    description: Vendor notes
49
  gst:
52
  postal:
50
    description: Is the library taxed when buying from this vendor
53
    type:
51
    type:
54
      - string
52
      - boolean
55
      - "null"
53
      - "null"
56
    description: Vendor postal address
54
  id:
57
  url:
55
    description: internally assigned vendor identifier
56
    type: integer
57
    readOnly: true
58
  invoice_currency:
59
    description: Invoice prices currency
58
    type:
60
    type:
59
      - string
61
      - string
60
      - "null"
62
      - "null"
61
    description: Vendor web address
63
  invoice_includes_gst:
62
  active:
64
    description: Invoice prices include taxes
63
    type:
65
    type:
64
      - boolean
66
      - boolean
65
      - "null"
67
      - "null"
66
    description: Is this vendor active
67
  list_currency:
68
  list_currency:
68
    type:
69
      - string
70
      - "null"
71
    description: List prices currency
69
    description: List prices currency
72
  invoice_currency:
73
    type:
70
    type:
74
      - string
71
      - string
75
      - "null"
72
      - "null"
76
    description: Invoice prices currency
73
  list_includes_gst:
77
  gst:
74
    description: List prices include taxes
78
    type:
75
    type:
79
      - boolean
76
      - boolean
80
      - "null"
77
      - "null"
81
    description: Is the library taxed when buying from this vendor
78
  name:
82
  list_includes_gst:
79
    description: Vendor name
83
    type:
80
    type:
84
      - boolean
81
      - string
82
  notes:
83
    description: Vendor notes
84
    type:
85
      - string
85
      - "null"
86
      - "null"
86
    description: List prices include taxes
87
  phone:
87
  invoice_includes_gst:
88
    description: Vendor phone number
88
    type:
89
    type:
89
      - boolean
90
      - string
90
      - "null"
91
      - "null"
91
    description: Invoice prices include taxes
92
  postal:
92
  tax_rate:
93
    description: Vendor postal address
93
    type:
94
    type:
94
      - number
95
      - string
95
      - "null"
96
      - "null"
97
  tax_rate:
96
    description: Default tax rate for items ordered from this vendor
98
    description: Default tax rate for items ordered from this vendor
97
  discount:
98
    type:
99
    type:
99
      - number
100
      - number
100
      - "null"
101
      - "null"
101
    description: Default discount rate for items ordered from this vendor
102
  url:
102
  deliverytime:
103
    description: Vendor web address
103
    type:
104
    type:
104
      - integer
105
      - string
105
      - "null"
106
      - "null"
106
    description: Expected delivery time (in days)
107
additionalProperties: false
107
additionalProperties: false
108
required:
108
required:
109
  - name
109
  - name
(-)a/api/v1/swagger/paths/acquisitions_baskets.yaml (-19 / +19 lines)
Lines 3-46 Link Here
3
  get:
3
  get:
4
    x-mojo-to: Acquisitions::Baskets#list_managers
4
    x-mojo-to: Acquisitions::Baskets#list_managers
5
    operationId: listBasketsManagers
5
    operationId: listBasketsManagers
6
    description: This resource returns a list of patron allowed to be a manager for baskets
7
    summary: List possibe managers for baskets
8
    tags:
6
    tags:
9
      - baskets
7
      - baskets
10
    parameters:
8
    summary: List possibe managers for baskets
11
      - $ref: "../swagger.yaml#/parameters/match"
12
      - $ref: "../swagger.yaml#/parameters/order_by"
13
      - $ref: "../swagger.yaml#/parameters/page"
14
      - $ref: "../swagger.yaml#/parameters/per_page"
15
      - $ref: "../swagger.yaml#/parameters/q_param"
16
      - $ref: "../swagger.yaml#/parameters/q_body"
17
      - $ref: "../swagger.yaml#/parameters/q_header"
18
    produces:
9
    produces:
19
      - application/json
10
      - application/json
11
    parameters:
12
      - $ref: ../swagger.yaml#/parameters/match
13
      - $ref: ../swagger.yaml#/parameters/order_by
14
      - $ref: ../swagger.yaml#/parameters/page
15
      - $ref: ../swagger.yaml#/parameters/per_page
16
      - $ref: ../swagger.yaml#/parameters/q_param
17
      - $ref: ../swagger.yaml#/parameters/q_body
18
      - $ref: ../swagger.yaml#/parameters/q_header
20
    responses:
19
    responses:
21
      "200":
20
      200:
22
        description: A list of orders' managers
21
        description: A list of orders' managers
23
        schema:
22
        schema:
24
          type: array
23
          type: array
25
          items:
24
          items:
26
            $ref: "../swagger.yaml#/definitions/patron"
25
            $ref: ../swagger.yaml#/definitions/patron
27
      "403":
26
      403:
28
        description: Access forbidden
27
        description: Access forbidden
29
        schema:
28
        schema:
30
          $ref: "../swagger.yaml#/definitions/error"
29
          $ref: ../swagger.yaml#/definitions/error
31
      "500":
30
      500:
32
        description: |
31
        description: |
33
          Internal server error. Possible `error_code` attribute values:
32
          Internal server error. Possible `error_code` attribute values:
34
33
          
35
          * `internal_server_error`
34
          * `internal_server_error`
36
        schema:
35
        schema:
37
          $ref: "../swagger.yaml#/definitions/error"
36
          $ref: ../swagger.yaml#/definitions/error
38
      "503":
37
      503:
39
        description: Under maintenance
38
        description: Under maintenance
40
        schema:
39
        schema:
41
          $ref: "../swagger.yaml#/definitions/error"
40
          $ref: ../swagger.yaml#/definitions/error
42
    x-koha-authorization:
41
    x-koha-authorization:
43
      permissions:
42
      permissions:
44
        acquisition: order_manage
43
        acquisition: order_manage
44
    description: This resource returns a list of patron allowed to be a manager for baskets
45
    x-koha-embed:
45
    x-koha-embed:
46
      - extended_attributes
46
      - extended_attributes
(-)a/api/v1/swagger/paths/acquisitions_funds.yaml (-63 / +63 lines)
Lines 9-62 Link Here
9
    produces:
9
    produces:
10
      - application/json
10
      - application/json
11
    parameters:
11
    parameters:
12
      - name: name
12
      - description: Case insensitive search on fund name
13
        in: query
13
        in: query
14
        description: Case insensitive search on fund name
14
        name: name
15
        required: false
15
        required: false
16
        type: string
16
        type: string
17
      - name: fund_owner_id
17
      - description: Display only the funds that belongs to the given patron ID
18
        in: query
18
        in: query
19
        description: Display only the funds that belongs to the given patron ID
19
        name: fund_owner_id
20
        required: false
20
        required: false
21
        type: integer
21
        type: integer
22
      - $ref: "../swagger.yaml#/parameters/match"
22
      - $ref: ../swagger.yaml#/parameters/match
23
      - $ref: "../swagger.yaml#/parameters/order_by"
23
      - $ref: ../swagger.yaml#/parameters/order_by
24
      - $ref: "../swagger.yaml#/parameters/page"
24
      - $ref: ../swagger.yaml#/parameters/page
25
      - $ref: "../swagger.yaml#/parameters/per_page"
25
      - $ref: ../swagger.yaml#/parameters/per_page
26
      - $ref: "../swagger.yaml#/parameters/q_param"
26
      - $ref: ../swagger.yaml#/parameters/q_param
27
      - $ref: "../swagger.yaml#/parameters/q_body"
27
      - $ref: ../swagger.yaml#/parameters/q_body
28
      - $ref: "../swagger.yaml#/parameters/q_header"
28
      - $ref: ../swagger.yaml#/parameters/q_header
29
      - $ref: "../swagger.yaml#/parameters/request_id_header"
29
      - $ref: ../swagger.yaml#/parameters/request_id_header
30
    responses:
30
    responses:
31
      "200":
31
      200:
32
        description: A list of funds
32
        description: A list of funds
33
        schema:
33
        schema:
34
          type: array
34
          type: array
35
          items:
35
          items:
36
            $ref: "../swagger.yaml#/definitions/fund"
36
            $ref: ../swagger.yaml#/definitions/fund
37
      "401":
37
      401:
38
        description: Authentication required
38
        description: Authentication required
39
        schema:
39
        schema:
40
          $ref: "../swagger.yaml#/definitions/error"
40
          $ref: ../swagger.yaml#/definitions/error
41
      "403":
41
      403:
42
        description: Access forbidden
42
        description: Access forbidden
43
        schema:
43
        schema:
44
          $ref: "../swagger.yaml#/definitions/error"
44
          $ref: ../swagger.yaml#/definitions/error
45
      "404":
45
      404:
46
        description: Fund not found
46
        description: Fund not found
47
        schema:
47
        schema:
48
          $ref: "../swagger.yaml#/definitions/error"
48
          $ref: ../swagger.yaml#/definitions/error
49
      "500":
49
      500:
50
        description: |
50
        description: |
51
          Internal server error. Possible `error_code` attribute values:
51
          Internal server error. Possible `error_code` attribute values:
52
52
          
53
          * `internal_server_error`
53
          * `internal_server_error`
54
        schema:
54
        schema:
55
          $ref: "../swagger.yaml#/definitions/error"
55
          $ref: ../swagger.yaml#/definitions/error
56
      "503":
56
      503:
57
        description: Under maintenance
57
        description: Under maintenance
58
        schema:
58
        schema:
59
          $ref: "../swagger.yaml#/definitions/error"
59
          $ref: ../swagger.yaml#/definitions/error
60
    x-koha-authorization:
60
    x-koha-authorization:
61
      permissions:
61
      permissions:
62
        acquisition: budget_manage_all
62
        acquisition: budget_manage_all
Lines 64-152 Link Here
64
  get:
64
  get:
65
    x-mojo-to: Acquisitions::Funds#list_owners
65
    x-mojo-to: Acquisitions::Funds#list_owners
66
    operationId: listFundsOwners
66
    operationId: listFundsOwners
67
    description: This resource returns a list of patron allowed to be owner of funds
68
    summary: List possibe owners for funds
69
    tags:
67
    tags:
70
      - funds
68
      - funds
71
    parameters:
69
    summary: List possibe owners for funds
72
      - $ref: "../swagger.yaml#/parameters/match"
73
      - $ref: "../swagger.yaml#/parameters/order_by"
74
      - $ref: "../swagger.yaml#/parameters/page"
75
      - $ref: "../swagger.yaml#/parameters/per_page"
76
      - $ref: "../swagger.yaml#/parameters/q_param"
77
      - $ref: "../swagger.yaml#/parameters/q_body"
78
      - $ref: "../swagger.yaml#/parameters/q_header"
79
    produces:
70
    produces:
80
      - application/json
71
      - application/json
72
    parameters:
73
      - $ref: ../swagger.yaml#/parameters/match
74
      - $ref: ../swagger.yaml#/parameters/order_by
75
      - $ref: ../swagger.yaml#/parameters/page
76
      - $ref: ../swagger.yaml#/parameters/per_page
77
      - $ref: ../swagger.yaml#/parameters/q_param
78
      - $ref: ../swagger.yaml#/parameters/q_body
79
      - $ref: ../swagger.yaml#/parameters/q_header
81
    responses:
80
    responses:
82
      "200":
81
      200:
83
        description: A list of funds' owners
82
        description: A list of funds' owners
84
        schema:
83
        schema:
85
          type: array
84
          type: array
86
          items:
85
          items:
87
            $ref: "../swagger.yaml#/definitions/patron"
86
            $ref: ../swagger.yaml#/definitions/patron
88
      "403":
87
      403:
89
        description: Access forbidden
88
        description: Access forbidden
90
        schema:
89
        schema:
91
          $ref: "../swagger.yaml#/definitions/error"
90
          $ref: ../swagger.yaml#/definitions/error
92
      "500":
91
      500:
93
        description: |
92
        description: |
94
          Internal server error. Possible `error_code` attribute values:
93
          Internal server error. Possible `error_code` attribute values:
95
94
          
96
          * `internal_server_error`
95
          * `internal_server_error`
97
        schema:
96
        schema:
98
          $ref: "../swagger.yaml#/definitions/error"
97
          $ref: ../swagger.yaml#/definitions/error
99
      "503":
98
      503:
100
        description: Under maintenance
99
        description: Under maintenance
101
        schema:
100
        schema:
102
          $ref: "../swagger.yaml#/definitions/error"
101
          $ref: ../swagger.yaml#/definitions/error
103
    x-koha-authorization:
102
    x-koha-authorization:
104
      permissions:
103
      permissions:
105
        acquisition: budget_modify
104
        acquisition: budget_modify
105
    description: This resource returns a list of patron allowed to be owner of funds
106
    x-koha-embed:
106
    x-koha-embed:
107
      - extended_attributes
107
      - extended_attributes
108
/acquisitions/funds/users:
108
/acquisitions/funds/users:
109
  get:
109
  get:
110
    x-mojo-to: Acquisitions::Funds#list_users
110
    x-mojo-to: Acquisitions::Funds#list_users
111
    operationId: listFundsUsers
111
    operationId: listFundsUsers
112
    description: This resource returns a list of patron allowed to be owner of funds
113
    summary: List possibe users for funds
114
    tags:
112
    tags:
115
      - funds
113
      - funds
116
    parameters:
114
    summary: List possibe users for funds
117
      - $ref: "../swagger.yaml#/parameters/match"
118
      - $ref: "../swagger.yaml#/parameters/order_by"
119
      - $ref: "../swagger.yaml#/parameters/page"
120
      - $ref: "../swagger.yaml#/parameters/per_page"
121
      - $ref: "../swagger.yaml#/parameters/q_param"
122
      - $ref: "../swagger.yaml#/parameters/q_body"
123
      - $ref: "../swagger.yaml#/parameters/q_header"
124
    produces:
115
    produces:
125
      - application/json
116
      - application/json
117
    parameters:
118
      - $ref: ../swagger.yaml#/parameters/match
119
      - $ref: ../swagger.yaml#/parameters/order_by
120
      - $ref: ../swagger.yaml#/parameters/page
121
      - $ref: ../swagger.yaml#/parameters/per_page
122
      - $ref: ../swagger.yaml#/parameters/q_param
123
      - $ref: ../swagger.yaml#/parameters/q_body
124
      - $ref: ../swagger.yaml#/parameters/q_header
126
    responses:
125
    responses:
127
      "200":
126
      200:
128
        description: A list of funds' users
127
        description: A list of funds' users
129
        schema:
128
        schema:
130
          type: array
129
          type: array
131
          items:
130
          items:
132
            $ref: "../swagger.yaml#/definitions/patron"
131
            $ref: ../swagger.yaml#/definitions/patron
133
      "403":
132
      403:
134
        description: Access forbidden
133
        description: Access forbidden
135
        schema:
134
        schema:
136
          $ref: "../swagger.yaml#/definitions/error"
135
          $ref: ../swagger.yaml#/definitions/error
137
      "500":
136
      500:
138
        description: |
137
        description: |
139
          Internal server error. Possible `error_code` attribute values:
138
          Internal server error. Possible `error_code` attribute values:
140
139
          
141
          * `internal_server_error`
140
          * `internal_server_error`
142
        schema:
141
        schema:
143
          $ref: "../swagger.yaml#/definitions/error"
142
          $ref: ../swagger.yaml#/definitions/error
144
      "503":
143
      503:
145
        description: Under maintenance
144
        description: Under maintenance
146
        schema:
145
        schema:
147
          $ref: "../swagger.yaml#/definitions/error"
146
          $ref: ../swagger.yaml#/definitions/error
148
    x-koha-authorization:
147
    x-koha-authorization:
149
      permissions:
148
      permissions:
150
        acquisition: budget_modify
149
        acquisition: budget_modify
150
    description: This resource returns a list of patron allowed to be owner of funds
151
    x-koha-embed:
151
    x-koha-embed:
152
      - extended_attributes
152
      - extended_attributes
(-)a/api/v1/swagger/paths/acquisitions_orders.yaml (-139 / +138 lines)
Lines 9-55 Link Here
9
    produces:
9
    produces:
10
      - application/json
10
      - application/json
11
    parameters:
11
    parameters:
12
      - name: biblio_id
12
      - description: Identifier for a linked bibliographic record
13
        in: query
13
        in: query
14
        description: Identifier for a linked bibliographic record
14
        name: biblio_id
15
        required: false
15
        required: false
16
        type: integer
16
        type: integer
17
      - name: basket_id
17
      - description: Identifier for a linked acquisition basket
18
        in: query
18
        in: query
19
        description: Identifier for a linked acquisition basket
19
        name: basket_id
20
        required: false
20
        required: false
21
        type: integer
21
        type: integer
22
      - name: fund_id
22
      - description: Identifier for the fund the order goes against
23
        in: query
23
        in: query
24
        description: Identifier for the fund the order goes against
24
        name: fund_id
25
        required: false
25
        required: false
26
        type: integer
26
        type: integer
27
      - name: status
27
      - description: "Current status for the order. Can be 'new', 'ordered', 'partial', 'complete' or 'cancelled'"
28
        in: query
28
        in: query
29
        description: Current status for the order. Can be 'new', 'ordered', 'partial',
29
        name: status
30
          'complete' or 'cancelled'
31
        required: false
30
        required: false
32
        type: string
31
        type: string
33
      - name: only_active
32
      - description: If only active orders should be listed
34
        in: query
33
        in: query
35
        description: If only active orders should be listed
34
        name: only_active
36
        required: false
35
        required: false
37
        type: boolean
36
        type: boolean
38
      - $ref: "../swagger.yaml#/parameters/match"
37
      - $ref: ../swagger.yaml#/parameters/match
39
      - $ref: "../swagger.yaml#/parameters/order_by"
38
      - $ref: ../swagger.yaml#/parameters/order_by
40
      - $ref: "../swagger.yaml#/parameters/page"
39
      - $ref: ../swagger.yaml#/parameters/page
41
      - $ref: "../swagger.yaml#/parameters/per_page"
40
      - $ref: ../swagger.yaml#/parameters/per_page
42
      - $ref: "../swagger.yaml#/parameters/q_param"
41
      - $ref: ../swagger.yaml#/parameters/q_param
43
      - $ref: "../swagger.yaml#/parameters/q_body"
42
      - $ref: ../swagger.yaml#/parameters/q_body
44
      - $ref: "../swagger.yaml#/parameters/q_header"
43
      - $ref: ../swagger.yaml#/parameters/q_header
45
      - $ref: "../swagger.yaml#/parameters/request_id_header"
44
      - $ref: ../swagger.yaml#/parameters/request_id_header
46
      - name: x-koha-embed
45
      - collectionFormat: csv
47
        in: header
48
        required: false
49
        description: Embed list sent as a request header
46
        description: Embed list sent as a request header
50
        type: array
47
        in: header
51
        items:
48
        items:
52
          type: string
53
          enum:
49
          enum:
54
            - basket
50
            - basket
55
            - basket.basket_group
51
            - basket.basket_group
Lines 64-100 Link Here
64
            - invoice
60
            - invoice
65
            - items
61
            - items
66
            - subscription
62
            - subscription
67
        collectionFormat: csv
63
          type: string
64
        name: x-koha-embed
65
        required: false
66
        type: array
68
    responses:
67
    responses:
69
      "200":
68
      200:
70
        description: A list of orders
69
        description: A list of orders
71
        schema:
70
        schema:
72
          type: array
71
          type: array
73
          items:
72
          items:
74
            $ref: "../swagger.yaml#/definitions/order"
73
            $ref: ../swagger.yaml#/definitions/order
75
      "401":
74
      401:
76
        description: Authentication required
75
        description: Authentication required
77
        schema:
76
        schema:
78
          $ref: "../swagger.yaml#/definitions/error"
77
          $ref: ../swagger.yaml#/definitions/error
79
      "403":
78
      403:
80
        description: Access forbidden
79
        description: Access forbidden
81
        schema:
80
        schema:
82
          $ref: "../swagger.yaml#/definitions/error"
81
          $ref: ../swagger.yaml#/definitions/error
83
      "404":
82
      404:
84
        description: Order not found
83
        description: Order not found
85
        schema:
84
        schema:
86
          $ref: "../swagger.yaml#/definitions/error"
85
          $ref: ../swagger.yaml#/definitions/error
87
      "500":
86
      500:
88
        description: |
87
        description: |
89
          Internal server error. Possible `error_code` attribute values:
88
          Internal server error. Possible `error_code` attribute values:
90
89
          
91
          * `internal_server_error`
90
          * `internal_server_error`
92
        schema:
91
        schema:
93
          $ref: "../swagger.yaml#/definitions/error"
92
          $ref: ../swagger.yaml#/definitions/error
94
      "503":
93
      503:
95
        description: Under maintenance
94
        description: Under maintenance
96
        schema:
95
        schema:
97
          $ref: "../swagger.yaml#/definitions/error"
96
          $ref: ../swagger.yaml#/definitions/error
98
    x-koha-authorization:
97
    x-koha-authorization:
99
      permissions:
98
      permissions:
100
        acquisition:
99
        acquisition:
Lines 120-185 Link Here
120
    tags:
119
    tags:
121
      - orders
120
      - orders
122
    summary: Add order
121
    summary: Add order
122
    produces:
123
      - application/json
123
    parameters:
124
    parameters:
124
      - name: body
125
      - description: A JSON object representing an order
125
        in: body
126
        in: body
126
        description: A JSON object representing an order
127
        name: body
127
        required: true
128
        required: true
128
        schema:
129
        schema:
129
          $ref: "../swagger.yaml#/definitions/order"
130
          $ref: ../swagger.yaml#/definitions/order
130
    produces:
131
      - application/json
132
    responses:
131
    responses:
133
      "201":
132
      201:
134
        description: Order added
133
        description: Order added
135
        schema:
134
        schema:
136
          $ref: "../swagger.yaml#/definitions/order"
135
          $ref: ../swagger.yaml#/definitions/order
137
      "400":
136
      400:
138
        description: Bad request
137
        description: Bad request
139
        schema:
138
        schema:
140
          $ref: "../swagger.yaml#/definitions/error"
139
          $ref: ../swagger.yaml#/definitions/error
141
      "401":
140
      401:
142
        description: Authentication required
141
        description: Authentication required
143
        schema:
142
        schema:
144
          $ref: "../swagger.yaml#/definitions/error"
143
          $ref: ../swagger.yaml#/definitions/error
145
      "403":
144
      403:
146
        description: Access forbidden
145
        description: Access forbidden
147
        schema:
146
        schema:
148
          $ref: "../swagger.yaml#/definitions/error"
147
          $ref: ../swagger.yaml#/definitions/error
149
      "409":
148
      409:
150
        description: Conflict in creating the resource
149
        description: Conflict in creating the resource
151
        schema:
150
        schema:
152
          $ref: "../swagger.yaml#/definitions/error"
151
          $ref: ../swagger.yaml#/definitions/error
153
      "500":
152
      500:
153
        description: |
154
          Internal server error. Possible `error_code` attribute values:
155
          
156
          * `internal_server_error`
157
        schema:
158
          $ref: ../swagger.yaml#/definitions/error
159
      503:
160
        description: Under maintenance
161
        schema:
162
          $ref: ../swagger.yaml#/definitions/error
163
    x-koha-authorization:
164
      permissions:
165
        acquisition: order_manage
166
'/acquisitions/orders/{order_id}':
167
  delete:
168
    x-mojo-to: Acquisitions::Orders#delete
169
    operationId: deleteOrder
170
    tags:
171
      - orders
172
    summary: Delete order
173
    produces:
174
      - application/json
175
    parameters:
176
      - $ref: ../swagger.yaml#/parameters/order_id_pp
177
    responses:
178
      204:
179
        description: Order deleted
180
      401:
181
        description: Authentication required
182
        schema:
183
          $ref: ../swagger.yaml#/definitions/error
184
      403:
185
        description: Access forbidden
186
        schema:
187
          $ref: ../swagger.yaml#/definitions/error
188
      404:
189
        description: Order not found
190
        schema:
191
          $ref: ../swagger.yaml#/definitions/error
192
      500:
154
        description: |
193
        description: |
155
          Internal server error. Possible `error_code` attribute values:
194
          Internal server error. Possible `error_code` attribute values:
156
195
          
157
          * `internal_server_error`
196
          * `internal_server_error`
158
        schema:
197
        schema:
159
          $ref: "../swagger.yaml#/definitions/error"
198
          $ref: ../swagger.yaml#/definitions/error
160
      "503":
199
      503:
161
        description: Under maintenance
200
        description: Under maintenance
162
        schema:
201
        schema:
163
          $ref: "../swagger.yaml#/definitions/error"
202
          $ref: ../swagger.yaml#/definitions/error
164
    x-koha-authorization:
203
    x-koha-authorization:
165
      permissions:
204
      permissions:
166
        acquisition: order_manage
205
        acquisition: order_manage
167
"/acquisitions/orders/{order_id}":
168
  get:
206
  get:
169
    x-mojo-to: Acquisitions::Orders#get
207
    x-mojo-to: Acquisitions::Orders#get
170
    operationId: getOrder
208
    operationId: getOrder
171
    tags:
209
    tags:
172
      - orders
210
      - orders
173
    summary: Get order
211
    summary: Get order
212
    produces:
213
      - application/json
174
    parameters:
214
    parameters:
175
      - $ref: "../swagger.yaml#/parameters/order_id_pp"
215
      - $ref: ../swagger.yaml#/parameters/order_id_pp
176
      - name: x-koha-embed
216
      - collectionFormat: csv
177
        in: header
178
        required: false
179
        description: Embed list sent as a request header
217
        description: Embed list sent as a request header
180
        type: array
218
        in: header
181
        items:
219
        items:
182
          type: string
183
          enum:
220
          enum:
184
            - basket
221
            - basket
185
            - basket.basket_group
222
            - basket.basket_group
Lines 194-230 Link Here
194
            - invoice
231
            - invoice
195
            - items
232
            - items
196
            - subscription
233
            - subscription
197
        collectionFormat: csv
234
          type: string
198
    produces:
235
        name: x-koha-embed
199
      - application/json
236
        required: false
237
        type: array
200
    responses:
238
    responses:
201
      "200":
239
      200:
202
        description: An order
240
        description: An order
203
        schema:
241
        schema:
204
          $ref: "../swagger.yaml#/definitions/order"
242
          $ref: ../swagger.yaml#/definitions/order
205
      "401":
243
      401:
206
        description: Authentication required
244
        description: Authentication required
207
        schema:
245
        schema:
208
          $ref: "../swagger.yaml#/definitions/error"
246
          $ref: ../swagger.yaml#/definitions/error
209
      "403":
247
      403:
210
        description: Access forbidden
248
        description: Access forbidden
211
        schema:
249
        schema:
212
          $ref: "../swagger.yaml#/definitions/error"
250
          $ref: ../swagger.yaml#/definitions/error
213
      "404":
251
      404:
214
        description: Order not found
252
        description: Order not found
215
        schema:
253
        schema:
216
          $ref: "../swagger.yaml#/definitions/error"
254
          $ref: ../swagger.yaml#/definitions/error
217
      "500":
255
      500:
218
        description: |
256
        description: |
219
          Internal server error. Possible `error_code` attribute values:
257
          Internal server error. Possible `error_code` attribute values:
220
258
          
221
          * `internal_server_error`
259
          * `internal_server_error`
222
        schema:
260
        schema:
223
          $ref: "../swagger.yaml#/definitions/error"
261
          $ref: ../swagger.yaml#/definitions/error
224
      "503":
262
      503:
225
        description: Under maintenance
263
        description: Under maintenance
226
        schema:
264
        schema:
227
          $ref: "../swagger.yaml#/definitions/error"
265
          $ref: ../swagger.yaml#/definitions/error
228
    x-koha-authorization:
266
    x-koha-authorization:
229
      permissions:
267
      permissions:
230
        acquisition: order_manage
268
        acquisition: order_manage
Lines 248-330 Link Here
248
    tags:
286
    tags:
249
      - orders
287
      - orders
250
    summary: Update order
288
    summary: Update order
289
    produces:
290
      - application/json
251
    parameters:
291
    parameters:
252
      - $ref: "../swagger.yaml#/parameters/order_id_pp"
292
      - $ref: ../swagger.yaml#/parameters/order_id_pp
253
      - name: body
293
      - description: A JSON object representing an order
254
        in: body
294
        in: body
255
        description: A JSON object representing an order
295
        name: body
256
        required: true
296
        required: true
257
        schema:
297
        schema:
258
          $ref: "../swagger.yaml#/definitions/order"
298
          $ref: ../swagger.yaml#/definitions/order
259
    produces:
260
      - application/json
261
    responses:
299
    responses:
262
      "200":
300
      200:
263
        description: An order
301
        description: An order
264
        schema:
302
        schema:
265
          $ref: "../swagger.yaml#/definitions/order"
303
          $ref: ../swagger.yaml#/definitions/order
266
      "401":
304
      401:
267
        description: Authentication required
268
        schema:
269
          $ref: "../swagger.yaml#/definitions/error"
270
      "403":
271
        description: Access forbidden
272
        schema:
273
          $ref: "../swagger.yaml#/definitions/error"
274
      "404":
275
        description: Order not found
276
        schema:
277
          $ref: "../swagger.yaml#/definitions/error"
278
      "500":
279
        description: |
280
          Internal server error. Possible `error_code` attribute values:
281
282
          * `internal_server_error`
283
        schema:
284
          $ref: "../swagger.yaml#/definitions/error"
285
      "503":
286
        description: Under maintenance
287
        schema:
288
          $ref: "../swagger.yaml#/definitions/error"
289
    x-koha-authorization:
290
      permissions:
291
        acquisition: order_manage
292
  delete:
293
    x-mojo-to: Acquisitions::Orders#delete
294
    operationId: deleteOrder
295
    tags:
296
      - orders
297
    summary: Delete order
298
    parameters:
299
      - $ref: "../swagger.yaml#/parameters/order_id_pp"
300
    produces:
301
      - application/json
302
    responses:
303
      "204":
304
        description: Order deleted
305
      "401":
306
        description: Authentication required
305
        description: Authentication required
307
        schema:
306
        schema:
308
          $ref: "../swagger.yaml#/definitions/error"
307
          $ref: ../swagger.yaml#/definitions/error
309
      "403":
308
      403:
310
        description: Access forbidden
309
        description: Access forbidden
311
        schema:
310
        schema:
312
          $ref: "../swagger.yaml#/definitions/error"
311
          $ref: ../swagger.yaml#/definitions/error
313
      "404":
312
      404:
314
        description: Order not found
313
        description: Order not found
315
        schema:
314
        schema:
316
          $ref: "../swagger.yaml#/definitions/error"
315
          $ref: ../swagger.yaml#/definitions/error
317
      "500":
316
      500:
318
        description: |
317
        description: |
319
          Internal server error. Possible `error_code` attribute values:
318
          Internal server error. Possible `error_code` attribute values:
320
319
          
321
          * `internal_server_error`
320
          * `internal_server_error`
322
        schema:
321
        schema:
323
          $ref: "../swagger.yaml#/definitions/error"
322
          $ref: ../swagger.yaml#/definitions/error
324
      "503":
323
      503:
325
        description: Under maintenance
324
        description: Under maintenance
326
        schema:
325
        schema:
327
          $ref: "../swagger.yaml#/definitions/error"
326
          $ref: ../swagger.yaml#/definitions/error
328
    x-koha-authorization:
327
    x-koha-authorization:
329
      permissions:
328
      permissions:
330
        acquisition: order_manage
329
        acquisition: order_manage
(-)a/api/v1/swagger/paths/acquisitions_vendors.yaml (-109 / +109 lines)
Lines 9-62 Link Here
9
    produces:
9
    produces:
10
      - application/json
10
      - application/json
11
    parameters:
11
    parameters:
12
      - name: name
12
      - description: Case insensitive search on vendor name
13
        in: query
13
        in: query
14
        description: Case insensitive search on vendor name
14
        name: name
15
        required: false
15
        required: false
16
        type: string
16
        type: string
17
      - name: accountnumber
17
      - description: Case insensitive search on vendor's account number
18
        in: query
18
        in: query
19
        description: Case insensitive search on vendor's account number
19
        name: accountnumber
20
        required: false
20
        required: false
21
        type: string
21
        type: string
22
      - $ref: "../swagger.yaml#/parameters/match"
22
      - $ref: ../swagger.yaml#/parameters/match
23
      - $ref: "../swagger.yaml#/parameters/order_by"
23
      - $ref: ../swagger.yaml#/parameters/order_by
24
      - $ref: "../swagger.yaml#/parameters/page"
24
      - $ref: ../swagger.yaml#/parameters/page
25
      - $ref: "../swagger.yaml#/parameters/per_page"
25
      - $ref: ../swagger.yaml#/parameters/per_page
26
      - $ref: "../swagger.yaml#/parameters/q_param"
26
      - $ref: ../swagger.yaml#/parameters/q_param
27
      - $ref: "../swagger.yaml#/parameters/q_body"
27
      - $ref: ../swagger.yaml#/parameters/q_body
28
      - $ref: "../swagger.yaml#/parameters/q_header"
28
      - $ref: ../swagger.yaml#/parameters/q_header
29
      - $ref: "../swagger.yaml#/parameters/request_id_header"
29
      - $ref: ../swagger.yaml#/parameters/request_id_header
30
    responses:
30
    responses:
31
      "200":
31
      200:
32
        description: A list of vendors
32
        description: A list of vendors
33
        schema:
33
        schema:
34
          type: array
34
          type: array
35
          items:
35
          items:
36
            $ref: "../swagger.yaml#/definitions/vendor"
36
            $ref: ../swagger.yaml#/definitions/vendor
37
      "401":
37
      401:
38
        description: Authentication required
38
        description: Authentication required
39
        schema:
39
        schema:
40
          $ref: "../swagger.yaml#/definitions/error"
40
          $ref: ../swagger.yaml#/definitions/error
41
      "403":
41
      403:
42
        description: Access forbidden
42
        description: Access forbidden
43
        schema:
43
        schema:
44
          $ref: "../swagger.yaml#/definitions/error"
44
          $ref: ../swagger.yaml#/definitions/error
45
      "404":
45
      404:
46
        description: Vendor not found
46
        description: Vendor not found
47
        schema:
47
        schema:
48
          $ref: "../swagger.yaml#/definitions/error"
48
          $ref: ../swagger.yaml#/definitions/error
49
      "500":
49
      500:
50
        description: |
50
        description: |
51
          Internal server error. Possible `error_code` attribute values:
51
          Internal server error. Possible `error_code` attribute values:
52
52
          
53
          * `internal_server_error`
53
          * `internal_server_error`
54
        schema:
54
        schema:
55
          $ref: "../swagger.yaml#/definitions/error"
55
          $ref: ../swagger.yaml#/definitions/error
56
      "503":
56
      503:
57
        description: Under maintenance
57
        description: Under maintenance
58
        schema:
58
        schema:
59
          $ref: "../swagger.yaml#/definitions/error"
59
          $ref: ../swagger.yaml#/definitions/error
60
    x-koha-authorization:
60
    x-koha-authorization:
61
      permissions:
61
      permissions:
62
        acquisition: vendors_manage
62
        acquisition: vendors_manage
Lines 66-236 Link Here
66
    tags:
66
    tags:
67
      - vendors
67
      - vendors
68
    summary: Add vendor
68
    summary: Add vendor
69
    produces:
70
      - application/json
69
    parameters:
71
    parameters:
70
      - name: body
72
      - description: A JSON object representing a vendor
71
        in: body
73
        in: body
72
        description: A JSON object representing a vendor
74
        name: body
73
        required: true
75
        required: true
74
        schema:
76
        schema:
75
          $ref: "../swagger.yaml#/definitions/vendor"
77
          $ref: ../swagger.yaml#/definitions/vendor
76
    produces:
77
      - application/json
78
    responses:
78
    responses:
79
      "201":
79
      201:
80
        description: Vendor added
80
        description: Vendor added
81
        schema:
81
        schema:
82
          $ref: "../swagger.yaml#/definitions/vendor"
82
          $ref: ../swagger.yaml#/definitions/vendor
83
      "401":
83
      401:
84
        description: Authentication required
84
        description: Authentication required
85
        schema:
85
        schema:
86
          $ref: "../swagger.yaml#/definitions/error"
86
          $ref: ../swagger.yaml#/definitions/error
87
      "403":
87
      403:
88
        description: Access forbidden
88
        description: Access forbidden
89
        schema:
89
        schema:
90
          $ref: "../swagger.yaml#/definitions/error"
90
          $ref: ../swagger.yaml#/definitions/error
91
      "404":
91
      404:
92
        description: Vendor not found
92
        description: Vendor not found
93
        schema:
93
        schema:
94
          $ref: "../swagger.yaml#/definitions/error"
94
          $ref: ../swagger.yaml#/definitions/error
95
      "500":
95
      500:
96
        description: |
96
        description: |
97
          Internal server error. Possible `error_code` attribute values:
97
          Internal server error. Possible `error_code` attribute values:
98
98
          
99
          * `internal_server_error`
99
          * `internal_server_error`
100
        schema:
100
        schema:
101
          $ref: "../swagger.yaml#/definitions/error"
101
          $ref: ../swagger.yaml#/definitions/error
102
      "503":
102
      503:
103
        description: Under maintenance
103
        description: Under maintenance
104
        schema:
104
        schema:
105
          $ref: "../swagger.yaml#/definitions/error"
105
          $ref: ../swagger.yaml#/definitions/error
106
    x-koha-authorization:
106
    x-koha-authorization:
107
      permissions:
107
      permissions:
108
        acquisition: vendors_manage
108
        acquisition: vendors_manage
109
"/acquisitions/vendors/{vendor_id}":
109
'/acquisitions/vendors/{vendor_id}':
110
  get:
110
  delete:
111
    x-mojo-to: Acquisitions::Vendors#get
111
    x-mojo-to: Acquisitions::Vendors#delete
112
    operationId: getVendor
112
    operationId: deleteVendor
113
    tags:
113
    tags:
114
      - vendors
114
      - vendors
115
    summary: Get vendor
115
    summary: Delete vendor
116
    parameters:
117
      - $ref: "../swagger.yaml#/parameters/vendor_id_pp"
118
    produces:
116
    produces:
119
      - application/json
117
      - application/json
118
    parameters:
119
      - $ref: ../swagger.yaml#/parameters/vendor_id_pp
120
    responses:
120
    responses:
121
      "200":
121
      204:
122
        description: A vendor
122
        description: Vendor deleted
123
        schema:
123
      401:
124
          $ref: "../swagger.yaml#/definitions/vendor"
125
      "401":
126
        description: Authentication required
124
        description: Authentication required
127
        schema:
125
        schema:
128
          $ref: "../swagger.yaml#/definitions/error"
126
          $ref: ../swagger.yaml#/definitions/error
129
      "403":
127
      403:
130
        description: Access forbidden
128
        description: Access forbidden
131
        schema:
129
        schema:
132
          $ref: "../swagger.yaml#/definitions/error"
130
          $ref: ../swagger.yaml#/definitions/error
133
      "404":
131
      404:
134
        description: Vendor not found
132
        description: Vendor not found
135
        schema:
133
        schema:
136
          $ref: "../swagger.yaml#/definitions/error"
134
          $ref: ../swagger.yaml#/definitions/error
137
      "500":
135
      500:
138
        description: |
136
        description: |
139
          Internal server error. Possible `error_code` attribute values:
137
          Internal server error. Possible `error_code` attribute values:
140
138
          
141
          * `internal_server_error`
139
          * `internal_server_error`
142
        schema:
140
        schema:
143
          $ref: "../swagger.yaml#/definitions/error"
141
          $ref: ../swagger.yaml#/definitions/error
144
      "503":
142
      503:
145
        description: Under maintenance
143
        description: Under maintenance
146
        schema:
144
        schema:
147
          $ref: "../swagger.yaml#/definitions/error"
145
          $ref: ../swagger.yaml#/definitions/error
148
    x-koha-authorization:
146
    x-koha-authorization:
149
      permissions:
147
      permissions:
150
        acquisition: vendors_manage
148
        acquisition: vendors_manage
151
  put:
149
  get:
152
    x-mojo-to: Acquisitions::Vendors#update
150
    x-mojo-to: Acquisitions::Vendors#get
153
    operationId: updateVendor
151
    operationId: getVendor
154
    tags:
152
    tags:
155
      - vendors
153
      - vendors
156
    summary: Update vendor
154
    summary: Get vendor
157
    parameters:
158
      - $ref: "../swagger.yaml#/parameters/vendor_id_pp"
159
      - name: body
160
        in: body
161
        description: A JSON object representing a vendor
162
        required: true
163
        schema:
164
          $ref: "../swagger.yaml#/definitions/vendor"
165
    produces:
155
    produces:
166
      - application/json
156
      - application/json
157
    parameters:
158
      - $ref: ../swagger.yaml#/parameters/vendor_id_pp
167
    responses:
159
    responses:
168
      "200":
160
      200:
169
        description: A vendor
161
        description: A vendor
170
        schema:
162
        schema:
171
          $ref: "../swagger.yaml#/definitions/vendor"
163
          $ref: ../swagger.yaml#/definitions/vendor
172
      "401":
164
      401:
173
        description: Authentication required
165
        description: Authentication required
174
        schema:
166
        schema:
175
          $ref: "../swagger.yaml#/definitions/error"
167
          $ref: ../swagger.yaml#/definitions/error
176
      "403":
168
      403:
177
        description: Access forbidden
169
        description: Access forbidden
178
        schema:
170
        schema:
179
          $ref: "../swagger.yaml#/definitions/error"
171
          $ref: ../swagger.yaml#/definitions/error
180
      "404":
172
      404:
181
        description: Vendor not found
173
        description: Vendor not found
182
        schema:
174
        schema:
183
          $ref: "../swagger.yaml#/definitions/error"
175
          $ref: ../swagger.yaml#/definitions/error
184
      "500":
176
      500:
185
        description: |
177
        description: |
186
          Internal server error. Possible `error_code` attribute values:
178
          Internal server error. Possible `error_code` attribute values:
187
179
          
188
          * `internal_server_error`
180
          * `internal_server_error`
189
        schema:
181
        schema:
190
          $ref: "../swagger.yaml#/definitions/error"
182
          $ref: ../swagger.yaml#/definitions/error
191
      "503":
183
      503:
192
        description: Under maintenance
184
        description: Under maintenance
193
        schema:
185
        schema:
194
          $ref: "../swagger.yaml#/definitions/error"
186
          $ref: ../swagger.yaml#/definitions/error
195
    x-koha-authorization:
187
    x-koha-authorization:
196
      permissions:
188
      permissions:
197
        acquisition: vendors_manage
189
        acquisition: vendors_manage
198
  delete:
190
  put:
199
    x-mojo-to: Acquisitions::Vendors#delete
191
    x-mojo-to: Acquisitions::Vendors#update
200
    operationId: deleteVendor
192
    operationId: updateVendor
201
    tags:
193
    tags:
202
      - vendors
194
      - vendors
203
    summary: Delete vendor
195
    summary: Update vendor
204
    parameters:
205
      - $ref: "../swagger.yaml#/parameters/vendor_id_pp"
206
    produces:
196
    produces:
207
      - application/json
197
      - application/json
198
    parameters:
199
      - $ref: ../swagger.yaml#/parameters/vendor_id_pp
200
      - description: A JSON object representing a vendor
201
        in: body
202
        name: body
203
        required: true
204
        schema:
205
          $ref: ../swagger.yaml#/definitions/vendor
208
    responses:
206
    responses:
209
      "204":
207
      200:
210
        description: Vendor deleted
208
        description: A vendor
211
      "401":
209
        schema:
210
          $ref: ../swagger.yaml#/definitions/vendor
211
      401:
212
        description: Authentication required
212
        description: Authentication required
213
        schema:
213
        schema:
214
          $ref: "../swagger.yaml#/definitions/error"
214
          $ref: ../swagger.yaml#/definitions/error
215
      "403":
215
      403:
216
        description: Access forbidden
216
        description: Access forbidden
217
        schema:
217
        schema:
218
          $ref: "../swagger.yaml#/definitions/error"
218
          $ref: ../swagger.yaml#/definitions/error
219
      "404":
219
      404:
220
        description: Vendor not found
220
        description: Vendor not found
221
        schema:
221
        schema:
222
          $ref: "../swagger.yaml#/definitions/error"
222
          $ref: ../swagger.yaml#/definitions/error
223
      "500":
223
      500:
224
        description: |
224
        description: |
225
          Internal server error. Possible `error_code` attribute values:
225
          Internal server error. Possible `error_code` attribute values:
226
226
          
227
          * `internal_server_error`
227
          * `internal_server_error`
228
        schema:
228
        schema:
229
          $ref: "../swagger.yaml#/definitions/error"
229
          $ref: ../swagger.yaml#/definitions/error
230
      "503":
230
      503:
231
        description: Under maintenance
231
        description: Under maintenance
232
        schema:
232
        schema:
233
          $ref: "../swagger.yaml#/definitions/error"
233
          $ref: ../swagger.yaml#/definitions/error
234
    x-koha-authorization:
234
    x-koha-authorization:
235
      permissions:
235
      permissions:
236
        acquisition: vendors_manage
236
        acquisition: vendors_manage
(-)a/api/v1/swagger/paths/advancededitormacros.yaml (-186 / +186 lines)
Lines 9-64 Link Here
9
    produces:
9
    produces:
10
      - application/json
10
      - application/json
11
    parameters:
11
    parameters:
12
      - name: name
12
      - description: Case insensative search on macro name
13
        in: query
13
        in: query
14
        description: Case insensative search on macro name
14
        name: name
15
        required: false
15
        required: false
16
        type: string
16
        type: string
17
      - name: macro_text
17
      - description: Case insensative search on macro text
18
        in: query
18
        in: query
19
        description: Case insensative search on macro text
19
        name: macro_text
20
        required: false
20
        required: false
21
        type: string
21
        type: string
22
      - name: patron_id
22
      - description: Search on internal patron_id
23
        in: query
23
        in: query
24
        description: Search on internal patron_id
24
        name: patron_id
25
        required: false
25
        required: false
26
        type: string
26
        type: string
27
      - name: shared
27
      - description: Search on shared macros
28
        in: query
28
        in: query
29
        description: Search on shared macros
29
        name: shared
30
        required: false
30
        required: false
31
        type: string
31
        type: string
32
      - $ref: "../swagger.yaml#/parameters/match"
32
      - $ref: ../swagger.yaml#/parameters/match
33
      - $ref: "../swagger.yaml#/parameters/order_by"
33
      - $ref: ../swagger.yaml#/parameters/order_by
34
      - $ref: "../swagger.yaml#/parameters/page"
34
      - $ref: ../swagger.yaml#/parameters/page
35
      - $ref: "../swagger.yaml#/parameters/per_page"
35
      - $ref: ../swagger.yaml#/parameters/per_page
36
      - $ref: "../swagger.yaml#/parameters/q_param"
36
      - $ref: ../swagger.yaml#/parameters/q_param
37
      - $ref: "../swagger.yaml#/parameters/q_body"
37
      - $ref: ../swagger.yaml#/parameters/q_body
38
      - $ref: "../swagger.yaml#/parameters/q_header"
38
      - $ref: ../swagger.yaml#/parameters/q_header
39
      - $ref: "../swagger.yaml#/parameters/request_id_header"
39
      - $ref: ../swagger.yaml#/parameters/request_id_header
40
    responses:
40
    responses:
41
      "200":
41
      200:
42
        description: A list of macros
42
        description: A list of macros
43
        schema:
43
        schema:
44
          type: array
44
          type: array
45
          items:
45
          items:
46
            $ref: "../swagger.yaml#/definitions/advancededitormacro"
46
            $ref: ../swagger.yaml#/definitions/advancededitormacro
47
      "403":
47
      403:
48
        description: Access forbidden
48
        description: Access forbidden
49
        schema:
49
        schema:
50
          $ref: "../swagger.yaml#/definitions/error"
50
          $ref: ../swagger.yaml#/definitions/error
51
      "500":
51
      500:
52
        description: |
52
        description: |
53
          Internal server error. Possible `error_code` attribute values:
53
          Internal server error. Possible `error_code` attribute values:
54
54
          
55
          * `internal_server_error`
55
          * `internal_server_error`
56
        schema:
56
        schema:
57
          $ref: "../swagger.yaml#/definitions/error"
57
          $ref: ../swagger.yaml#/definitions/error
58
      "503":
58
      503:
59
        description: Under maintenance
59
        description: Under maintenance
60
        schema:
60
        schema:
61
          $ref: "../swagger.yaml#/definitions/error"
61
          $ref: ../swagger.yaml#/definitions/error
62
    x-koha-authorization:
62
    x-koha-authorization:
63
      permissions:
63
      permissions:
64
        editcatalogue: advanced_editor
64
        editcatalogue: advanced_editor
Lines 68-103 Link Here
68
    tags:
68
    tags:
69
      - macros
69
      - macros
70
    summary: Add advanced editor macros
70
    summary: Add advanced editor macros
71
    produces:
72
      - application/json
71
    parameters:
73
    parameters:
72
      - name: body
74
      - description: A JSON object containing informations about the new macro
73
        in: body
75
        in: body
74
        description: A JSON object containing informations about the new macro
76
        name: body
75
        required: true
77
        required: true
76
        schema:
78
        schema:
77
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
79
          $ref: ../swagger.yaml#/definitions/advancededitormacro
78
    produces:
79
      - application/json
80
    responses:
80
    responses:
81
      "201":
81
      201:
82
        description: Macro added
82
        description: Macro added
83
        schema:
83
        schema:
84
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
84
          $ref: ../swagger.yaml#/definitions/advancededitormacro
85
      "401":
85
      401:
86
        description: Authentication required
86
        description: Authentication required
87
        schema:
87
        schema:
88
          $ref: "../swagger.yaml#/definitions/error"
88
          $ref: ../swagger.yaml#/definitions/error
89
      "403":
89
      403:
90
        description: Access forbidden
90
        description: Access forbidden
91
        schema:
91
        schema:
92
          $ref: "../swagger.yaml#/definitions/error"
92
          $ref: ../swagger.yaml#/definitions/error
93
      "500":
93
      500:
94
        description: Internal error
94
        description: Internal error
95
        schema:
95
        schema:
96
          $ref: "../swagger.yaml#/definitions/error"
96
          $ref: ../swagger.yaml#/definitions/error
97
      "503":
97
      503:
98
        description: Under maintenance
98
        description: Under maintenance
99
        schema:
99
        schema:
100
          $ref: "../swagger.yaml#/definitions/error"
100
          $ref: ../swagger.yaml#/definitions/error
101
    x-koha-authorization:
101
    x-koha-authorization:
102
      permissions:
102
      permissions:
103
        editcatalogue: advanced_editor
103
        editcatalogue: advanced_editor
Lines 108-383 Link Here
108
    tags:
108
    tags:
109
      - macros
109
      - macros
110
    summary: Add shared advanced editor macros
110
    summary: Add shared advanced editor macros
111
    produces:
112
      - application/json
111
    parameters:
113
    parameters:
112
      - name: body
114
      - description: A JSON object containing informations about the new macro
113
        in: body
115
        in: body
114
        description: A JSON object containing informations about the new macro
116
        name: body
115
        required: true
117
        required: true
116
        schema:
118
        schema:
117
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
119
          $ref: ../swagger.yaml#/definitions/advancededitormacro
118
    produces:
119
      - application/json
120
    responses:
120
    responses:
121
      "201":
121
      201:
122
        description: Macro added
122
        description: Macro added
123
        schema:
123
        schema:
124
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
124
          $ref: ../swagger.yaml#/definitions/advancededitormacro
125
      "401":
125
      401:
126
        description: Authentication required
126
        description: Authentication required
127
        schema:
127
        schema:
128
          $ref: "../swagger.yaml#/definitions/error"
128
          $ref: ../swagger.yaml#/definitions/error
129
      "403":
129
      403:
130
        description: Access forbidden
130
        description: Access forbidden
131
        schema:
131
        schema:
132
          $ref: "../swagger.yaml#/definitions/error"
132
          $ref: ../swagger.yaml#/definitions/error
133
      "500":
133
      500:
134
        description: Internal error
134
        description: Internal error
135
        schema:
135
        schema:
136
          $ref: "../swagger.yaml#/definitions/error"
136
          $ref: ../swagger.yaml#/definitions/error
137
      "503":
137
      503:
138
        description: Under maintenance
138
        description: Under maintenance
139
        schema:
139
        schema:
140
          $ref: "../swagger.yaml#/definitions/error"
140
          $ref: ../swagger.yaml#/definitions/error
141
    x-koha-authorization:
141
    x-koha-authorization:
142
      permissions:
142
      permissions:
143
        editcatalogue:
143
        editcatalogue:
144
          advanced_editor: 1
144
          advanced_editor: 1
145
          create_shared_macros: 1
145
          create_shared_macros: 1
146
"/advanced_editor/macros/{advancededitormacro_id}":
146
'/advanced_editor/macros/shared/{advancededitormacro_id}':
147
  get:
147
  delete:
148
    x-mojo-to: AdvancedEditorMacro#get
148
    x-mojo-to: AdvancedEditorMacro#delete_shared
149
    operationId: getAdvancedEditorMacro
149
    operationId: deletesharedAdvancedEditorMacro
150
    tags:
150
    tags:
151
      - macros
151
      - macros
152
    summary: Get advanced editor macro
152
    summary: Delete shared advanced editor macro
153
    produces:
154
      - application/json
153
    parameters:
155
    parameters:
154
      - $ref: "../swagger.yaml#/parameters/advancededitormacro_id_pp"
156
      - $ref: ../swagger.yaml#/parameters/advancededitormacro_id_pp
157
    responses:
158
      204:
159
        description: Advanced editor macro deleted
160
        schema:
161
          type: string
162
      401:
163
        description: Authentication required
164
        schema:
165
          $ref: ../swagger.yaml#/definitions/error
166
      403:
167
        description: Access forbidden
168
        schema:
169
          $ref: ../swagger.yaml#/definitions/error
170
      404:
171
        description: Macro not found
172
        schema:
173
          $ref: ../swagger.yaml#/definitions/error
174
      500:
175
        description: Internal error
176
        schema:
177
          $ref: ../swagger.yaml#/definitions/error
178
      503:
179
        description: Under maintenance
180
        schema:
181
          $ref: ../swagger.yaml#/definitions/error
182
    x-koha-authorization:
183
      permissions:
184
        editcatalogue:
185
          advanced_editor: 1
186
          delete_shared_macros: 1
187
  get:
188
    x-mojo-to: AdvancedEditorMacro#get_shared
189
    operationId: getsharedAdvancedEditorMacro
190
    tags:
191
      - macros
192
    summary: Get shared advanced editor macro
155
    produces:
193
    produces:
156
      - application/json
194
      - application/json
195
    parameters:
196
      - $ref: ../swagger.yaml#/parameters/advancededitormacro_id_pp
157
    responses:
197
    responses:
158
      "200":
198
      200:
159
        description: A macro
199
        description: A macro
160
        schema:
200
        schema:
161
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
201
          $ref: ../swagger.yaml#/definitions/advancededitormacro
162
      "403":
202
      403:
163
        description: Access forbidden
203
        description: Access forbidden
164
        schema:
204
        schema:
165
          $ref: "../swagger.yaml#/definitions/error"
205
          $ref: ../swagger.yaml#/definitions/error
166
      "404":
206
      404:
167
        description: AdvancedEditorMacro not found
207
        description: AdvancedEditorMacro not found
168
        schema:
208
        schema:
169
          $ref: "../swagger.yaml#/definitions/error"
209
          $ref: ../swagger.yaml#/definitions/error
170
      "500":
210
      500:
171
        description: Internal error
211
        description: Internal error
172
        schema:
212
        schema:
173
          $ref: "../swagger.yaml#/definitions/error"
213
          $ref: ../swagger.yaml#/definitions/error
174
      "503":
214
      503:
175
        description: Under maintenance
215
        description: Under maintenance
176
        schema:
216
        schema:
177
          $ref: "../swagger.yaml#/definitions/error"
217
          $ref: ../swagger.yaml#/definitions/error
178
    x-koha-authorization:
218
    x-koha-authorization:
179
      permissions:
219
      permissions:
180
        editcatalogue: advanced_editor
220
        editcatalogue: advanced_editor
181
  put:
221
  put:
182
    x-mojo-to: AdvancedEditorMacro#update
222
    x-mojo-to: AdvancedEditorMacro#update_shared
183
    operationId: updateAdvancedEditorMacro
223
    operationId: updatesharedAdvancedEditorMacro
184
    tags:
224
    tags:
185
      - macros
225
      - macros
186
    summary: Update advanced editor macro
226
    summary: Update shared advanced editor macro
227
    produces:
228
      - application/json
187
    parameters:
229
    parameters:
188
      - $ref: "../swagger.yaml#/parameters/advancededitormacro_id_pp"
230
      - $ref: ../swagger.yaml#/parameters/advancededitormacro_id_pp
189
      - name: body
231
      - description: An advanced editor macro object
190
        in: body
232
        in: body
191
        description: An advanced editor macro object
233
        name: body
192
        required: true
234
        required: true
193
        schema:
235
        schema:
194
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
236
          $ref: ../swagger.yaml#/definitions/advancededitormacro
195
    produces:
196
      - application/json
197
    responses:
237
    responses:
198
      "200":
238
      200:
199
        description: An advanced editor macro
239
        description: An advanced editor macro
200
        schema:
240
        schema:
201
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
241
          $ref: ../swagger.yaml#/definitions/advancededitormacro
202
      "401":
242
      401:
203
        description: Authentication required
243
        description: Authentication required
204
        schema:
244
        schema:
205
          $ref: "../swagger.yaml#/definitions/error"
245
          $ref: ../swagger.yaml#/definitions/error
206
      "403":
246
      403:
207
        description: Access forbidden
247
        description: Access forbidden
208
        schema:
248
        schema:
209
          $ref: "../swagger.yaml#/definitions/error"
249
          $ref: ../swagger.yaml#/definitions/error
210
      "404":
250
      404:
211
        description: Macro not found
251
        description: Macro not found
212
        schema:
252
        schema:
213
          $ref: "../swagger.yaml#/definitions/error"
253
          $ref: ../swagger.yaml#/definitions/error
214
      "500":
254
      500:
215
        description: Internal error
255
        description: Internal error
216
        schema:
256
        schema:
217
          $ref: "../swagger.yaml#/definitions/error"
257
          $ref: ../swagger.yaml#/definitions/error
218
      "503":
258
      503:
219
        description: Under maintenance
259
        description: Under maintenance
220
        schema:
260
        schema:
221
          $ref: "../swagger.yaml#/definitions/error"
261
          $ref: ../swagger.yaml#/definitions/error
222
    x-koha-authorization:
262
    x-koha-authorization:
223
      permissions:
263
      permissions:
224
        editcatalogue: advanced_editor
264
        editcatalogue:
265
          advanced_editor: 1
266
          create_shared_macros: 1
267
'/advanced_editor/macros/{advancededitormacro_id}':
225
  delete:
268
  delete:
226
    x-mojo-to: AdvancedEditorMacro#delete
269
    x-mojo-to: AdvancedEditorMacro#delete
227
    operationId: deleteAdvancedEditorMacro
270
    operationId: deleteAdvancedEditorMacro
228
    tags:
271
    tags:
229
      - macros
272
      - macros
230
    summary: Delete advanced editor macro
273
    summary: Delete advanced editor macro
231
    parameters:
232
      - $ref: "../swagger.yaml#/parameters/advancededitormacro_id_pp"
233
    produces:
274
    produces:
234
      - application/json
275
      - application/json
276
    parameters:
277
      - $ref: ../swagger.yaml#/parameters/advancededitormacro_id_pp
235
    responses:
278
    responses:
236
      "204":
279
      204:
237
        description: Advanced editor macro deleted
280
        description: Advanced editor macro deleted
238
        schema:
281
        schema:
239
          type: string
282
          type: string
240
      "401":
283
      401:
241
        description: Authentication required
284
        description: Authentication required
242
        schema:
285
        schema:
243
          $ref: "../swagger.yaml#/definitions/error"
286
          $ref: ../swagger.yaml#/definitions/error
244
      "403":
287
      403:
245
        description: Access forbidden
288
        description: Access forbidden
246
        schema:
289
        schema:
247
          $ref: "../swagger.yaml#/definitions/error"
290
          $ref: ../swagger.yaml#/definitions/error
248
      "404":
291
      404:
249
        description: Macro not found
292
        description: Macro not found
250
        schema:
293
        schema:
251
          $ref: "../swagger.yaml#/definitions/error"
294
          $ref: ../swagger.yaml#/definitions/error
252
      "500":
295
      500:
253
        description: Internal error
296
        description: Internal error
254
        schema:
297
        schema:
255
          $ref: "../swagger.yaml#/definitions/error"
298
          $ref: ../swagger.yaml#/definitions/error
256
      "503":
299
      503:
257
        description: Under maintenance
300
        description: Under maintenance
258
        schema:
301
        schema:
259
          $ref: "../swagger.yaml#/definitions/error"
302
          $ref: ../swagger.yaml#/definitions/error
260
    x-koha-authorization:
303
    x-koha-authorization:
261
      permissions:
304
      permissions:
262
        editcatalogue: advanced_editor
305
        editcatalogue: advanced_editor
263
"/advanced_editor/macros/shared/{advancededitormacro_id}":
264
  get:
306
  get:
265
    x-mojo-to: AdvancedEditorMacro#get_shared
307
    x-mojo-to: AdvancedEditorMacro#get
266
    operationId: getsharedAdvancedEditorMacro
308
    operationId: getAdvancedEditorMacro
267
    tags:
309
    tags:
268
      - macros
310
      - macros
269
    summary: Get shared advanced editor macro
311
    summary: Get advanced editor macro
270
    parameters:
271
      - $ref: "../swagger.yaml#/parameters/advancededitormacro_id_pp"
272
    produces:
312
    produces:
273
      - application/json
313
      - application/json
314
    parameters:
315
      - $ref: ../swagger.yaml#/parameters/advancededitormacro_id_pp
274
    responses:
316
    responses:
275
      "200":
317
      200:
276
        description: A macro
318
        description: A macro
277
        schema:
319
        schema:
278
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
320
          $ref: ../swagger.yaml#/definitions/advancededitormacro
279
      "403":
321
      403:
280
        description: Access forbidden
322
        description: Access forbidden
281
        schema:
323
        schema:
282
          $ref: "../swagger.yaml#/definitions/error"
324
          $ref: ../swagger.yaml#/definitions/error
283
      "404":
325
      404:
284
        description: AdvancedEditorMacro not found
326
        description: AdvancedEditorMacro not found
285
        schema:
327
        schema:
286
          $ref: "../swagger.yaml#/definitions/error"
328
          $ref: ../swagger.yaml#/definitions/error
287
      "500":
329
      500:
288
        description: Internal error
330
        description: Internal error
289
        schema:
331
        schema:
290
          $ref: "../swagger.yaml#/definitions/error"
332
          $ref: ../swagger.yaml#/definitions/error
291
      "503":
333
      503:
292
        description: Under maintenance
334
        description: Under maintenance
293
        schema:
335
        schema:
294
          $ref: "../swagger.yaml#/definitions/error"
336
          $ref: ../swagger.yaml#/definitions/error
295
    x-koha-authorization:
337
    x-koha-authorization:
296
      permissions:
338
      permissions:
297
        editcatalogue: advanced_editor
339
        editcatalogue: advanced_editor
298
  put:
340
  put:
299
    x-mojo-to: AdvancedEditorMacro#update_shared
341
    x-mojo-to: AdvancedEditorMacro#update
300
    operationId: updatesharedAdvancedEditorMacro
342
    operationId: updateAdvancedEditorMacro
301
    tags:
343
    tags:
302
      - macros
344
      - macros
303
    summary: Update shared advanced editor macro
345
    summary: Update advanced editor macro
346
    produces:
347
      - application/json
304
    parameters:
348
    parameters:
305
      - $ref: "../swagger.yaml#/parameters/advancededitormacro_id_pp"
349
      - $ref: ../swagger.yaml#/parameters/advancededitormacro_id_pp
306
      - name: body
350
      - description: An advanced editor macro object
307
        in: body
351
        in: body
308
        description: An advanced editor macro object
352
        name: body
309
        required: true
353
        required: true
310
        schema:
354
        schema:
311
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
355
          $ref: ../swagger.yaml#/definitions/advancededitormacro
312
    produces:
313
      - application/json
314
    responses:
356
    responses:
315
      "200":
357
      200:
316
        description: An advanced editor macro
358
        description: An advanced editor macro
317
        schema:
359
        schema:
318
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
360
          $ref: ../swagger.yaml#/definitions/advancededitormacro
319
      "401":
361
      401:
320
        description: Authentication required
362
        description: Authentication required
321
        schema:
363
        schema:
322
          $ref: "../swagger.yaml#/definitions/error"
364
          $ref: ../swagger.yaml#/definitions/error
323
      "403":
365
      403:
324
        description: Access forbidden
366
        description: Access forbidden
325
        schema:
367
        schema:
326
          $ref: "../swagger.yaml#/definitions/error"
368
          $ref: ../swagger.yaml#/definitions/error
327
      "404":
369
      404:
328
        description: Macro not found
370
        description: Macro not found
329
        schema:
371
        schema:
330
          $ref: "../swagger.yaml#/definitions/error"
372
          $ref: ../swagger.yaml#/definitions/error
331
      "500":
373
      500:
332
        description: Internal error
374
        description: Internal error
333
        schema:
375
        schema:
334
          $ref: "../swagger.yaml#/definitions/error"
376
          $ref: ../swagger.yaml#/definitions/error
335
      "503":
377
      503:
336
        description: Under maintenance
378
        description: Under maintenance
337
        schema:
379
        schema:
338
          $ref: "../swagger.yaml#/definitions/error"
380
          $ref: ../swagger.yaml#/definitions/error
339
    x-koha-authorization:
381
    x-koha-authorization:
340
      permissions:
382
      permissions:
341
        editcatalogue:
383
        editcatalogue: advanced_editor
342
          advanced_editor: 1
343
          create_shared_macros: 1
344
  delete:
345
    x-mojo-to: AdvancedEditorMacro#delete_shared
346
    operationId: deletesharedAdvancedEditorMacro
347
    tags:
348
      - macros
349
    summary: Delete shared advanced editor macro
350
    parameters:
351
      - $ref: "../swagger.yaml#/parameters/advancededitormacro_id_pp"
352
    produces:
353
      - application/json
354
    responses:
355
      "204":
356
        description: Advanced editor macro deleted
357
        schema:
358
          type: string
359
      "401":
360
        description: Authentication required
361
        schema:
362
          $ref: "../swagger.yaml#/definitions/error"
363
      "403":
364
        description: Access forbidden
365
        schema:
366
          $ref: "../swagger.yaml#/definitions/error"
367
      "404":
368
        description: Macro not found
369
        schema:
370
          $ref: "../swagger.yaml#/definitions/error"
371
      "500":
372
        description: Internal error
373
        schema:
374
          $ref: "../swagger.yaml#/definitions/error"
375
      "503":
376
        description: Under maintenance
377
        schema:
378
          $ref: "../swagger.yaml#/definitions/error"
379
    x-koha-authorization:
380
      permissions:
381
        editcatalogue:
382
          advanced_editor: 1
383
          delete_shared_macros: 1
(-)a/api/v1/swagger/paths/article_requests.yaml (-47 / +47 lines)
Lines 1-117 Link Here
1
---
1
---
2
"/article_requests/{article_request_id}":
2
'/article_requests/{article_request_id}':
3
  delete:
3
  delete:
4
    x-mojo-to: ArticleRequests#cancel
4
    x-mojo-to: ArticleRequests#cancel
5
    operationId: cancelArticleRequest
5
    operationId: cancelArticleRequest
6
    tags:
6
    tags:
7
      - article_requests
7
      - article_requests
8
    summary: Cancel article requests
8
    summary: Cancel article requests
9
    produces:
10
      - application/json
9
    parameters:
11
    parameters:
10
      - name: article_request_id
12
      - description: Article request identifier
11
        in: path
13
        in: path
12
        description: Article request identifier
14
        name: article_request_id
13
        required: true
15
        required: true
14
        type: integer
16
        type: integer
15
      - name: cancellation_reason
17
      - description: Article request cancellation reason
16
        in: query
18
        in: query
17
        description: Article request cancellation reason
19
        name: cancellation_reason
18
        required: false
20
        required: false
19
        type: string
21
        type: string
20
      - name: notes
22
      - description: Article request custom cancellation reason
21
        in: query
23
        in: query
22
        description: Article request custom cancellation reason
24
        name: notes
23
        required: false
25
        required: false
24
        type: string
26
        type: string
25
    produces:
26
      - application/json
27
    responses:
27
    responses:
28
      "204":
28
      204:
29
        description: Article request canceled
29
        description: Article request canceled
30
      "400":
30
      400:
31
        description: Bad request
31
        description: Bad request
32
        schema:
32
        schema:
33
          $ref: "../swagger.yaml#/definitions/error"
33
          $ref: ../swagger.yaml#/definitions/error
34
      "401":
34
      401:
35
        description: Authentication required
35
        description: Authentication required
36
        schema:
36
        schema:
37
          $ref: "../swagger.yaml#/definitions/error"
37
          $ref: ../swagger.yaml#/definitions/error
38
      "403":
38
      403:
39
        description: Access forbidden
39
        description: Access forbidden
40
        schema:
40
        schema:
41
          $ref: "../swagger.yaml#/definitions/error"
41
          $ref: ../swagger.yaml#/definitions/error
42
      "404":
42
      404:
43
        description: Patron not found
43
        description: Patron not found
44
        schema:
44
        schema:
45
          $ref: "../swagger.yaml#/definitions/error"
45
          $ref: ../swagger.yaml#/definitions/error
46
      "500":
46
      500:
47
        description: |
47
        description: |
48
          Internal server error. Possible `error_code` attribute values:
48
          Internal server error. Possible `error_code` attribute values:
49
49
          
50
          * `internal_server_error`
50
          * `internal_server_error`
51
        schema:
51
        schema:
52
          $ref: "../swagger.yaml#/definitions/error"
52
          $ref: ../swagger.yaml#/definitions/error
53
      "503":
53
      503:
54
        description: Under maintenance
54
        description: Under maintenance
55
        schema:
55
        schema:
56
          $ref: "../swagger.yaml#/definitions/error"
56
          $ref: ../swagger.yaml#/definitions/error
57
    x-koha-authorization:
57
    x-koha-authorization:
58
      permissions:
58
      permissions:
59
        circulate: circulate_remaining_permissions
59
        circulate: circulate_remaining_permissions
60
"/public/patrons/{patron_id}/article_requests/{article_request_id}":
60
'/public/patrons/{patron_id}/article_requests/{article_request_id}':
61
  delete:
61
  delete:
62
    x-mojo-to: ArticleRequests#patron_cancel
62
    x-mojo-to: ArticleRequests#patron_cancel
63
    operationId: publicCancelPatronArticleRequest
63
    operationId: publicCancelPatronArticleRequest
64
    tags:
64
    tags:
65
      - article_requests
65
      - article_requests
66
    summary: Cancel patron's article requests
66
    summary: Cancel patron's article requests
67
    produces:
68
      - application/json
67
    parameters:
69
    parameters:
68
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
70
      - $ref: ../swagger.yaml#/parameters/patron_id_pp
69
      - name: article_request_id
71
      - description: Article request identifier
70
        in: path
72
        in: path
71
        description: Article request identifier
73
        name: article_request_id
72
        required: true
74
        required: true
73
        type: integer
75
        type: integer
74
      - name: cancellation_reason
76
      - description: Article request cancellation reason
75
        in: query
77
        in: query
76
        description: Article request cancellation reason
78
        name: cancellation_reason
77
        required: false
79
        required: false
78
        type: string
80
        type: string
79
      - name: notes
81
      - description: Article request custom cancellation reason
80
        in: query
82
        in: query
81
        description: Article request custom cancellation reason
83
        name: notes
82
        required: false
84
        required: false
83
        type: string
85
        type: string
84
    produces:
85
      - application/json
86
    responses:
86
    responses:
87
      "204":
87
      204:
88
        description: Patron's article request canceled
88
        description: Patron's article request canceled
89
      "400":
89
      400:
90
        description: Bad request
90
        description: Bad request
91
        schema:
91
        schema:
92
          $ref: "../swagger.yaml#/definitions/error"
92
          $ref: ../swagger.yaml#/definitions/error
93
      "401":
93
      401:
94
        description: Authentication required
94
        description: Authentication required
95
        schema:
95
        schema:
96
          $ref: "../swagger.yaml#/definitions/error"
96
          $ref: ../swagger.yaml#/definitions/error
97
      "403":
97
      403:
98
        description: Access forbidden
98
        description: Access forbidden
99
        schema:
99
        schema:
100
          $ref: "../swagger.yaml#/definitions/error"
100
          $ref: ../swagger.yaml#/definitions/error
101
      "404":
101
      404:
102
        description: Patron not found
102
        description: Patron not found
103
        schema:
103
        schema:
104
          $ref: "../swagger.yaml#/definitions/error"
104
          $ref: ../swagger.yaml#/definitions/error
105
      "500":
105
      500:
106
        description: |
106
        description: |
107
          Internal server error. Possible `error_code` attribute values:
107
          Internal server error. Possible `error_code` attribute values:
108
108
          
109
          * `internal_server_error`
109
          * `internal_server_error`
110
        schema:
110
        schema:
111
          $ref: "../swagger.yaml#/definitions/error"
111
          $ref: ../swagger.yaml#/definitions/error
112
      "503":
112
      503:
113
        description: Under maintenance
113
        description: Under maintenance
114
        schema:
114
        schema:
115
          $ref: "../swagger.yaml#/definitions/error"
115
          $ref: ../swagger.yaml#/definitions/error
116
    x-koha-authorization:
116
    x-koha-authorization:
117
      allow-owner: true
117
      allow-owner: true
(-)a/api/v1/swagger/paths/biblios.yaml (-194 / +193 lines)
Lines 1-158 Link Here
1
---
1
---
2
"/biblios/{biblio_id}":
2
'/biblios/{biblio_id}':
3
  get:
3
  delete:
4
    x-mojo-to: Biblios#get
4
    x-mojo-to: Biblios#delete
5
    operationId: getBiblio
5
    operationId: deleteBiblio
6
    tags:
6
    tags:
7
      - biblios
7
      - biblios
8
    summary: Get biblio
8
    summary: Delete biblio
9
    parameters:
10
      - $ref: "../swagger.yaml#/parameters/biblio_id_pp"
11
    produces:
9
    produces:
12
      - application/json
10
      - application/json
13
      - application/marcxml+xml
11
    parameters:
14
      - application/marc-in-json
12
      - $ref: ../swagger.yaml#/parameters/biblio_id_pp
15
      - application/marc
16
      - text/plain
17
    responses:
13
    responses:
18
      "200":
14
      204:
19
        description: A biblio
15
        description: Biblio deleted
20
      "401":
16
        schema:
17
          type: string
18
      401:
21
        description: Authentication required
19
        description: Authentication required
22
        schema:
20
        schema:
23
          $ref: "../swagger.yaml#/definitions/error"
21
          $ref: ../swagger.yaml#/definitions/error
24
      "403":
22
      403:
25
        description: Access forbidden
23
        description: Access forbidden
26
        schema:
24
        schema:
27
          $ref: "../swagger.yaml#/definitions/error"
25
          $ref: ../swagger.yaml#/definitions/error
28
      "404":
26
      404:
29
        description: Biblio not found
27
        description: Biblio not found
30
        schema:
28
        schema:
31
          $ref: "../swagger.yaml#/definitions/error"
29
          $ref: ../swagger.yaml#/definitions/error
32
      "406":
30
      409:
33
        description: Not acceptable
31
        description: Unable to perform action on biblio
34
        schema:
32
        schema:
35
          type: array
33
          $ref: ../swagger.yaml#/definitions/error
36
          description: Accepted content-types
34
      500:
37
          items:
35
        description: Internal error
38
            type: string
39
      "500":
40
        description: |
41
          Internal server error. Possible `error_code` attribute values:
42
43
          * `internal_server_error`
44
        schema:
36
        schema:
45
          $ref: "../swagger.yaml#/definitions/error"
37
          $ref: ../swagger.yaml#/definitions/error
46
      "503":
38
      503:
47
        description: Under maintenance
39
        description: Under maintenance
48
        schema:
40
        schema:
49
          $ref: "../swagger.yaml#/definitions/error"
41
          $ref: ../swagger.yaml#/definitions/error
50
    x-koha-authorization:
42
    x-koha-authorization:
51
      permissions:
43
      permissions:
52
        catalogue: "1"
44
        editcatalogue: edit_catalogue
53
  delete:
45
  get:
54
    x-mojo-to: Biblios#delete
46
    x-mojo-to: Biblios#get
55
    operationId: deleteBiblio
47
    operationId: getBiblio
56
    tags:
48
    tags:
57
      - biblios
49
      - biblios
58
    summary: Delete biblio
50
    summary: Get biblio
59
    parameters:
60
      - $ref: "../swagger.yaml#/parameters/biblio_id_pp"
61
    produces:
51
    produces:
62
      - application/json
52
      - application/json
53
      - application/marcxml+xml
54
      - application/marc-in-json
55
      - application/marc
56
      - text/plain
57
    parameters:
58
      - $ref: ../swagger.yaml#/parameters/biblio_id_pp
63
    responses:
59
    responses:
64
      "204":
60
      200:
65
        description: Biblio deleted
61
        description: A biblio
66
        schema:
62
      401:
67
          type: string
68
      "401":
69
        description: Authentication required
63
        description: Authentication required
70
        schema:
64
        schema:
71
          $ref: "../swagger.yaml#/definitions/error"
65
          $ref: ../swagger.yaml#/definitions/error
72
      "403":
66
      403:
73
        description: Access forbidden
67
        description: Access forbidden
74
        schema:
68
        schema:
75
          $ref: "../swagger.yaml#/definitions/error"
69
          $ref: ../swagger.yaml#/definitions/error
76
      "404":
70
      404:
77
        description: Biblio not found
71
        description: Biblio not found
78
        schema:
72
        schema:
79
          $ref: "../swagger.yaml#/definitions/error"
73
          $ref: ../swagger.yaml#/definitions/error
80
      "409":
74
      406:
81
        description: Unable to perform action on biblio
75
        description: Not acceptable
82
        schema:
76
        schema:
83
          $ref: "../swagger.yaml#/definitions/error"
77
          description: Accepted content-types
84
      "500":
78
          type: array
85
        description: Internal error
79
          items:
80
            type: string
81
      500:
82
        description: |
83
          Internal server error. Possible `error_code` attribute values:
84
          
85
          * `internal_server_error`
86
        schema:
86
        schema:
87
          $ref: "../swagger.yaml#/definitions/error"
87
          $ref: ../swagger.yaml#/definitions/error
88
      "503":
88
      503:
89
        description: Under maintenance
89
        description: Under maintenance
90
        schema:
90
        schema:
91
          $ref: "../swagger.yaml#/definitions/error"
91
          $ref: ../swagger.yaml#/definitions/error
92
    x-koha-authorization:
92
    x-koha-authorization:
93
      permissions:
93
      permissions:
94
        editcatalogue: edit_catalogue
94
        catalogue: 1
95
"/biblios/{biblio_id}/checkouts":
95
'/biblios/{biblio_id}/checkouts':
96
  get:
96
  get:
97
    x-mojo-to: Biblios#get_checkouts
97
    x-mojo-to: Biblios#get_checkouts
98
    operationId: listBiblioCheckouts
98
    operationId: listBiblioCheckouts
99
    tags:
99
    tags:
100
      - checkouts
100
      - checkouts
101
    summary: List checkouts for a biblio
101
    summary: List checkouts for a biblio
102
    produces:
103
      - application/json
102
    parameters:
104
    parameters:
103
      - $ref: "../swagger.yaml#/parameters/biblio_id_pp"
105
      - $ref: ../swagger.yaml#/parameters/biblio_id_pp
104
      - $ref: "../swagger.yaml#/parameters/page"
106
      - $ref: ../swagger.yaml#/parameters/page
105
      - $ref: "../swagger.yaml#/parameters/per_page"
107
      - $ref: ../swagger.yaml#/parameters/per_page
106
      - $ref: "../swagger.yaml#/parameters/match"
108
      - $ref: ../swagger.yaml#/parameters/match
107
      - $ref: "../swagger.yaml#/parameters/order_by"
109
      - $ref: ../swagger.yaml#/parameters/order_by
108
      - $ref: "../swagger.yaml#/parameters/q_param"
110
      - $ref: ../swagger.yaml#/parameters/q_param
109
      - $ref: "../swagger.yaml#/parameters/q_body"
111
      - $ref: ../swagger.yaml#/parameters/q_body
110
      - $ref: "../swagger.yaml#/parameters/q_header"
112
      - $ref: ../swagger.yaml#/parameters/q_header
111
      - $ref: "../swagger.yaml#/parameters/request_id_header"
113
      - $ref: ../swagger.yaml#/parameters/request_id_header
112
      - name: x-koha-embed
114
      - collectionFormat: csv
113
        in: header
114
        required: false
115
        description: Embed list sent as a request header
115
        description: Embed list sent as a request header
116
        type: array
116
        in: header
117
        items:
117
        items:
118
          type: string
119
          enum:
118
          enum:
120
            - issuer
119
            - issuer
121
            - item
120
            - item
122
            - patron
121
            - patron
123
            - library
122
            - library
124
        collectionFormat: csv
123
          type: string
125
      - name: checked_in
124
        name: x-koha-embed
125
        required: false
126
        type: array
127
      - description: 'By default, current checkouts are returned, when this is true then checked in checkouts are returned as result.'
126
        in: query
128
        in: query
127
        description: By default, current checkouts are returned, when this is true then
129
        name: checked_in
128
          checked in checkouts are returned as result.
129
        type: boolean
130
        type: boolean
130
    produces:
131
      - application/json
132
    responses:
131
    responses:
133
      "200":
132
      200:
134
        description: A list of checkouts
133
        description: A list of checkouts
135
        schema:
134
        schema:
136
          $ref: "../swagger.yaml#/definitions/checkouts"
135
          $ref: ../swagger.yaml#/definitions/checkouts
137
      "403":
136
      403:
138
        description: Access forbidden
137
        description: Access forbidden
139
        schema:
138
        schema:
140
          $ref: "../swagger.yaml#/definitions/error"
139
          $ref: ../swagger.yaml#/definitions/error
141
      "404":
140
      404:
142
        description: Biblio not found
141
        description: Biblio not found
143
        schema:
142
        schema:
144
          $ref: "../swagger.yaml#/definitions/error"
143
          $ref: ../swagger.yaml#/definitions/error
145
      "500":
144
      500:
146
        description: |
145
        description: |
147
          Internal server error. Possible `error_code` attribute values:
146
          Internal server error. Possible `error_code` attribute values:
148
147
          
149
          * `internal_server_error`
148
          * `internal_server_error`
150
        schema:
149
        schema:
151
          $ref: "../swagger.yaml#/definitions/error"
150
          $ref: ../swagger.yaml#/definitions/error
152
      "503":
151
      503:
153
        description: Under maintenance
152
        description: Under maintenance
154
        schema:
153
        schema:
155
          $ref: "../swagger.yaml#/definitions/error"
154
          $ref: ../swagger.yaml#/definitions/error
156
    x-koha-authorization:
155
    x-koha-authorization:
157
      permissions:
156
      permissions:
158
        circulate: circulate_remaining_permissions
157
        circulate: circulate_remaining_permissions
Lines 161-390 Link Here
161
      - item
160
      - item
162
      - patron
161
      - patron
163
      - library
162
      - library
164
"/biblios/{biblio_id}/items":
163
'/biblios/{biblio_id}/items':
165
  get:
164
  get:
166
    x-mojo-to: Biblios#get_items
165
    x-mojo-to: Biblios#get_items
167
    operationId: getBiblioItems
166
    operationId: getBiblioItems
168
    tags:
167
    tags:
169
      - biblios
168
      - biblios
170
    summary: Get items for a biblio
169
    summary: Get items for a biblio
171
    parameters:
172
      - $ref: "../swagger.yaml#/parameters/biblio_id_pp"
173
      - $ref: "../swagger.yaml#/parameters/match"
174
      - $ref: "../swagger.yaml#/parameters/order_by"
175
      - $ref: "../swagger.yaml#/parameters/page"
176
      - $ref: "../swagger.yaml#/parameters/per_page"
177
      - $ref: "../swagger.yaml#/parameters/q_param"
178
      - $ref: "../swagger.yaml#/parameters/q_body"
179
      - $ref: "../swagger.yaml#/parameters/q_header"
180
      - $ref: "../swagger.yaml#/parameters/request_id_header"
181
    consumes:
182
      - application/json
183
    produces:
170
    produces:
184
      - application/json
171
      - application/json
172
    parameters:
173
      - $ref: ../swagger.yaml#/parameters/biblio_id_pp
174
      - $ref: ../swagger.yaml#/parameters/match
175
      - $ref: ../swagger.yaml#/parameters/order_by
176
      - $ref: ../swagger.yaml#/parameters/page
177
      - $ref: ../swagger.yaml#/parameters/per_page
178
      - $ref: ../swagger.yaml#/parameters/q_param
179
      - $ref: ../swagger.yaml#/parameters/q_body
180
      - $ref: ../swagger.yaml#/parameters/q_header
181
      - $ref: ../swagger.yaml#/parameters/request_id_header
185
    responses:
182
    responses:
186
      "200":
183
      200:
187
        description: A list of the items attached to the record
184
        description: A list of the items attached to the record
188
        schema:
185
        schema:
189
          type: array
186
          type: array
190
          items:
187
          items:
191
            $ref: "../swagger.yaml#/definitions/item"
188
            $ref: ../swagger.yaml#/definitions/item
192
      "401":
189
      401:
193
        description: Authentication required
190
        description: Authentication required
194
        schema:
191
        schema:
195
          $ref: "../swagger.yaml#/definitions/error"
192
          $ref: ../swagger.yaml#/definitions/error
196
      "403":
193
      403:
197
        description: Access forbidden
194
        description: Access forbidden
198
        schema:
195
        schema:
199
          $ref: "../swagger.yaml#/definitions/error"
196
          $ref: ../swagger.yaml#/definitions/error
200
      "404":
197
      404:
201
        description: Biblio not found
198
        description: Biblio not found
202
        schema:
199
        schema:
203
          $ref: "../swagger.yaml#/definitions/error"
200
          $ref: ../swagger.yaml#/definitions/error
204
      "406":
201
      406:
205
        description: Not acceptable
202
        description: Not acceptable
206
        schema:
203
        schema:
207
          type: array
208
          description: Accepted content-types
204
          description: Accepted content-types
205
          type: array
209
          items:
206
          items:
210
            type: string
207
            type: string
211
      "500":
208
      500:
212
        description: |
209
        description: |
213
          Internal server error. Possible `error_code` attribute values:
210
          Internal server error. Possible `error_code` attribute values:
214
211
          
215
          * `internal_server_error`
212
          * `internal_server_error`
216
        schema:
213
        schema:
217
          $ref: "../swagger.yaml#/definitions/error"
214
          $ref: ../swagger.yaml#/definitions/error
218
      "503":
215
      503:
219
        description: Under maintenance
216
        description: Under maintenance
220
        schema:
217
        schema:
221
          $ref: "../swagger.yaml#/definitions/error"
218
          $ref: ../swagger.yaml#/definitions/error
222
    x-koha-authorization:
219
    x-koha-authorization:
223
      permissions:
220
      permissions:
224
        catalogue: "1"
221
        catalogue: 1
225
"/biblios/{biblio_id}/pickup_locations":
222
    consumes:
223
      - application/json
224
'/biblios/{biblio_id}/pickup_locations':
226
  get:
225
  get:
227
    x-mojo-to: Biblios#pickup_locations
226
    x-mojo-to: Biblios#pickup_locations
228
    operationId: getBiblioPickupLocations
227
    operationId: getBiblioPickupLocations
229
    tags:
228
    tags:
230
      - biblios
229
      - biblios
231
    summary: Get valid pickup locations for a biblio
230
    summary: Get valid pickup locations for a biblio
231
    produces:
232
      - application/json
232
    parameters:
233
    parameters:
233
      - $ref: "../swagger.yaml#/parameters/biblio_id_pp"
234
      - $ref: ../swagger.yaml#/parameters/biblio_id_pp
234
      - name: patron_id
235
      - description: Internal patron identifier
235
        in: query
236
        in: query
236
        description: Internal patron identifier
237
        name: patron_id
237
        required: true
238
        required: true
238
        type: integer
239
        type: integer
239
      - $ref: "../swagger.yaml#/parameters/match"
240
      - $ref: ../swagger.yaml#/parameters/match
240
      - $ref: "../swagger.yaml#/parameters/order_by"
241
      - $ref: ../swagger.yaml#/parameters/order_by
241
      - $ref: "../swagger.yaml#/parameters/page"
242
      - $ref: ../swagger.yaml#/parameters/page
242
      - $ref: "../swagger.yaml#/parameters/per_page"
243
      - $ref: ../swagger.yaml#/parameters/per_page
243
      - $ref: "../swagger.yaml#/parameters/q_param"
244
      - $ref: ../swagger.yaml#/parameters/q_param
244
      - $ref: "../swagger.yaml#/parameters/q_body"
245
      - $ref: ../swagger.yaml#/parameters/q_body
245
      - $ref: "../swagger.yaml#/parameters/q_header"
246
      - $ref: ../swagger.yaml#/parameters/q_header
246
    consumes:
247
      - application/json
248
    produces:
249
      - application/json
250
    responses:
247
    responses:
251
      "200":
248
      200:
252
        description: Biblio pickup locations
249
        description: Biblio pickup locations
253
        schema:
250
        schema:
254
          type: array
251
          type: array
255
          items:
252
          items:
256
            $ref: "../swagger.yaml#/definitions/library"
253
            $ref: ../swagger.yaml#/definitions/library
257
      "400":
254
      400:
258
        description: Missing or wrong parameters
255
        description: Missing or wrong parameters
259
        schema:
256
        schema:
260
          $ref: "../swagger.yaml#/definitions/error"
257
          $ref: ../swagger.yaml#/definitions/error
261
      "401":
258
      401:
262
        description: Authentication required
259
        description: Authentication required
263
        schema:
260
        schema:
264
          $ref: "../swagger.yaml#/definitions/error"
261
          $ref: ../swagger.yaml#/definitions/error
265
      "403":
262
      403:
266
        description: Access forbidden
263
        description: Access forbidden
267
        schema:
264
        schema:
268
          $ref: "../swagger.yaml#/definitions/error"
265
          $ref: ../swagger.yaml#/definitions/error
269
      "404":
266
      404:
270
        description: Biblio not found
267
        description: Biblio not found
271
        schema:
268
        schema:
272
          $ref: "../swagger.yaml#/definitions/error"
269
          $ref: ../swagger.yaml#/definitions/error
273
      "500":
270
      500:
274
        description: |
271
        description: |
275
          Internal server error. Possible `error_code` attribute values:
272
          Internal server error. Possible `error_code` attribute values:
276
273
          
277
          * `internal_server_error`
274
          * `internal_server_error`
278
        schema:
275
        schema:
279
          $ref: "../swagger.yaml#/definitions/error"
276
          $ref: ../swagger.yaml#/definitions/error
280
      "503":
277
      503:
281
        description: Under maintenance
278
        description: Under maintenance
282
        schema:
279
        schema:
283
          $ref: "../swagger.yaml#/definitions/error"
280
          $ref: ../swagger.yaml#/definitions/error
284
    x-koha-authorization:
281
    x-koha-authorization:
285
      permissions:
282
      permissions:
286
        reserveforothers: place_holds
283
        reserveforothers: place_holds
287
"/public/biblios/{biblio_id}":
284
    consumes:
285
      - application/json
286
'/public/biblios/{biblio_id}':
288
  get:
287
  get:
289
    x-mojo-to: Biblios#get_public
288
    x-mojo-to: Biblios#get_public
290
    operationId: getBiblioPublic
289
    operationId: getBiblioPublic
291
    tags:
290
    tags:
292
      - biblios
291
      - biblios
293
    summary: Get biblio (public)
292
    summary: Get biblio (public)
294
    parameters:
295
      - $ref: "../swagger.yaml#/parameters/biblio_id_pp"
296
    produces:
293
    produces:
297
      - application/marcxml+xml
294
      - application/marcxml+xml
298
      - application/marc-in-json
295
      - application/marc-in-json
299
      - application/marc
296
      - application/marc
300
      - text/plain
297
      - text/plain
298
    parameters:
299
      - $ref: ../swagger.yaml#/parameters/biblio_id_pp
301
    responses:
300
    responses:
302
      "200":
301
      200:
303
        description: A biblio
302
        description: A biblio
304
      "401":
303
      401:
305
        description: Authentication required
304
        description: Authentication required
306
        schema:
305
        schema:
307
          $ref: "../swagger.yaml#/definitions/error"
306
          $ref: ../swagger.yaml#/definitions/error
308
      "403":
307
      403:
309
        description: Access forbidden
308
        description: Access forbidden
310
        schema:
309
        schema:
311
          $ref: "../swagger.yaml#/definitions/error"
310
          $ref: ../swagger.yaml#/definitions/error
312
      "404":
311
      404:
313
        description: Biblio not found
312
        description: Biblio not found
314
        schema:
313
        schema:
315
          $ref: "../swagger.yaml#/definitions/error"
314
          $ref: ../swagger.yaml#/definitions/error
316
      "406":
315
      406:
317
        description: Not acceptable
316
        description: Not acceptable
318
        schema:
317
        schema:
319
          type: array
320
          description: Accepted content-types
318
          description: Accepted content-types
319
          type: array
321
          items:
320
          items:
322
            type: string
321
            type: string
323
      "500":
322
      500:
324
        description: |
323
        description: |
325
          Internal server error. Possible `error_code` attribute values:
324
          Internal server error. Possible `error_code` attribute values:
326
325
          
327
          * `internal_server_error`
326
          * `internal_server_error`
328
        schema:
327
        schema:
329
          $ref: "../swagger.yaml#/definitions/error"
328
          $ref: ../swagger.yaml#/definitions/error
330
      "503":
329
      503:
331
        description: Under maintenance
330
        description: Under maintenance
332
        schema:
331
        schema:
333
          $ref: "../swagger.yaml#/definitions/error"
332
          $ref: ../swagger.yaml#/definitions/error
334
"/public/biblios/{biblio_id}/items":
333
'/public/biblios/{biblio_id}/items':
335
  get:
334
  get:
336
    x-mojo-to: Biblios#get_items_public
335
    x-mojo-to: Biblios#get_items_public
337
    operationId: getBiblioItemsPublic
336
    operationId: getBiblioItemsPublic
338
    tags:
337
    tags:
339
      - biblios
338
      - biblios
340
      - items
339
      - items
341
    parameters:
342
      - $ref: "../swagger.yaml#/parameters/biblio_id_pp"
343
      - $ref: "../swagger.yaml#/parameters/match"
344
      - $ref: "../swagger.yaml#/parameters/order_by"
345
      - $ref: "../swagger.yaml#/parameters/page"
346
      - $ref: "../swagger.yaml#/parameters/per_page"
347
      - $ref: "../swagger.yaml#/parameters/q_param"
348
      - $ref: "../swagger.yaml#/parameters/q_body"
349
      - $ref: "../swagger.yaml#/parameters/q_header"
350
    consumes:
351
      - application/json
352
    produces:
340
    produces:
353
      - application/json
341
      - application/json
342
    parameters:
343
      - $ref: ../swagger.yaml#/parameters/biblio_id_pp
344
      - $ref: ../swagger.yaml#/parameters/match
345
      - $ref: ../swagger.yaml#/parameters/order_by
346
      - $ref: ../swagger.yaml#/parameters/page
347
      - $ref: ../swagger.yaml#/parameters/per_page
348
      - $ref: ../swagger.yaml#/parameters/q_param
349
      - $ref: ../swagger.yaml#/parameters/q_body
350
      - $ref: ../swagger.yaml#/parameters/q_header
354
    responses:
351
    responses:
355
      "200":
352
      200:
356
        description: A list of the items attached to the record
353
        description: A list of the items attached to the record
357
        schema:
354
        schema:
358
          type: array
355
          type: array
359
          items:
356
          items:
360
            $ref: "../swagger.yaml#/definitions/item"
357
            $ref: ../swagger.yaml#/definitions/item
361
      "401":
358
      401:
362
        description: Authentication required
359
        description: Authentication required
363
        schema:
360
        schema:
364
          $ref: "../swagger.yaml#/definitions/error"
361
          $ref: ../swagger.yaml#/definitions/error
365
      "403":
362
      403:
366
        description: Access forbidden
363
        description: Access forbidden
367
        schema:
364
        schema:
368
          $ref: "../swagger.yaml#/definitions/error"
365
          $ref: ../swagger.yaml#/definitions/error
369
      "404":
366
      404:
370
        description: Biblio not found
367
        description: Biblio not found
371
        schema:
368
        schema:
372
          $ref: "../swagger.yaml#/definitions/error"
369
          $ref: ../swagger.yaml#/definitions/error
373
      "406":
370
      406:
374
        description: Not acceptable
371
        description: Not acceptable
375
        schema:
372
        schema:
376
          type: array
377
          description: Accepted content-types
373
          description: Accepted content-types
374
          type: array
378
          items:
375
          items:
379
            type: string
376
            type: string
380
      "500":
377
      500:
381
        description: |
378
        description: |
382
          Internal server error. Possible `error_code` attribute values:
379
          Internal server error. Possible `error_code` attribute values:
383
380
          
384
          * `internal_server_error`
381
          * `internal_server_error`
385
        schema:
382
        schema:
386
          $ref: "../swagger.yaml#/definitions/error"
383
          $ref: ../swagger.yaml#/definitions/error
387
      "503":
384
      503:
388
        description: Under maintenance
385
        description: Under maintenance
389
        schema:
386
        schema:
390
          $ref: "../swagger.yaml#/definitions/error"
387
          $ref: ../swagger.yaml#/definitions/error
388
    consumes:
389
      - application/json
(-)a/api/v1/swagger/paths/cash_registers.yaml (-48 / +48 lines)
Lines 1-5 Link Here
1
---
1
---
2
"/cash_registers/{cash_register_id}/cashups":
2
'/cash_registers/{cash_register_id}/cashups':
3
  get:
3
  get:
4
    x-mojo-to: CashRegisters::Cashups#list
4
    x-mojo-to: CashRegisters::Cashups#list
5
    operationId: listCashups
5
    operationId: listCashups
Lines 9-109 Link Here
9
    produces:
9
    produces:
10
      - application/json
10
      - application/json
11
    parameters:
11
    parameters:
12
      - $ref: "../swagger.yaml#/parameters/cash_register_id_pp"
12
      - $ref: ../swagger.yaml#/parameters/cash_register_id_pp
13
      - $ref: "../swagger.yaml#/parameters/match"
13
      - $ref: ../swagger.yaml#/parameters/match
14
      - $ref: "../swagger.yaml#/parameters/order_by"
14
      - $ref: ../swagger.yaml#/parameters/order_by
15
      - $ref: "../swagger.yaml#/parameters/page"
15
      - $ref: ../swagger.yaml#/parameters/page
16
      - $ref: "../swagger.yaml#/parameters/per_page"
16
      - $ref: ../swagger.yaml#/parameters/per_page
17
      - $ref: "../swagger.yaml#/parameters/q_param"
17
      - $ref: ../swagger.yaml#/parameters/q_param
18
      - $ref: "../swagger.yaml#/parameters/q_body"
18
      - $ref: ../swagger.yaml#/parameters/q_body
19
      - $ref: "../swagger.yaml#/parameters/q_header"
19
      - $ref: ../swagger.yaml#/parameters/q_header
20
      - $ref: "../swagger.yaml#/parameters/request_id_header"
20
      - $ref: ../swagger.yaml#/parameters/request_id_header
21
      - name: x-koha-embed
21
      - collectionFormat: csv
22
        in: header
23
        required: false
24
        description: Embed list sent as a request header
22
        description: Embed list sent as a request header
25
        type: array
23
        in: header
26
        items:
24
        items:
27
          type: string
28
          enum:
25
          enum:
29
            - manager
26
            - manager
30
        collectionFormat: csv
27
          type: string
28
        name: x-koha-embed
29
        required: false
30
        type: array
31
    responses:
31
    responses:
32
      "200":
32
      200:
33
        description: Cashups performed on this register
33
        description: Cashups performed on this register
34
        schema:
34
        schema:
35
          type: array
35
          type: array
36
          items:
36
          items:
37
            $ref: "../swagger.yaml#/definitions/cashup"
37
            $ref: ../swagger.yaml#/definitions/cashup
38
      "403":
38
      403:
39
        description: Access forbidden
39
        description: Access forbidden
40
        schema:
40
        schema:
41
          $ref: "../swagger.yaml#/definitions/error"
41
          $ref: ../swagger.yaml#/definitions/error
42
      "404":
42
      404:
43
        description: Register not found
43
        description: Register not found
44
        schema:
44
        schema:
45
          $ref: "../swagger.yaml#/definitions/error"
45
          $ref: ../swagger.yaml#/definitions/error
46
      "500":
46
      500:
47
        description: |
47
        description: |
48
          Internal server error. Possible `error_code` attribute values:
48
          Internal server error. Possible `error_code` attribute values:
49
49
          
50
          * `internal_server_error`
50
          * `internal_server_error`
51
        schema:
51
        schema:
52
          $ref: "../swagger.yaml#/definitions/error"
52
          $ref: ../swagger.yaml#/definitions/error
53
      "503":
53
      503:
54
        description: Under maintenance
54
        description: Under maintenance
55
        schema:
55
        schema:
56
          $ref: "../swagger.yaml#/definitions/error"
56
          $ref: ../swagger.yaml#/definitions/error
57
    x-koha-authorization:
57
    x-koha-authorization:
58
      permissions:
58
      permissions:
59
        cash_management: cashup
59
        cash_management: cashup
60
    x-koha-embed:
60
    x-koha-embed:
61
      - manager
61
      - manager
62
"/cashups/{cashup_id}":
62
'/cashups/{cashup_id}':
63
  get:
63
  get:
64
    x-mojo-to: CashRegisters::Cashups#get
64
    x-mojo-to: CashRegisters::Cashups#get
65
    operationId: getCashup
65
    operationId: getCashup
66
    tags:
66
    tags:
67
      - cashups
67
      - cashups
68
    summary: Get cashup
68
    summary: Get cashup
69
    produces:
70
      - application/json
69
    parameters:
71
    parameters:
70
      - $ref: "../swagger.yaml#/parameters/cashup_id_pp"
72
      - $ref: ../swagger.yaml#/parameters/cashup_id_pp
71
      - name: x-koha-embed
73
      - collectionFormat: csv
72
        in: header
73
        required: false
74
        description: Embed list sent as a request header
74
        description: Embed list sent as a request header
75
        type: array
75
        in: header
76
        items:
76
        items:
77
          type: string
78
          enum:
77
          enum:
79
            - summary
78
            - summary
80
        collectionFormat: csv
79
          type: string
81
    produces:
80
        name: x-koha-embed
82
      - application/json
81
        required: false
82
        type: array
83
    responses:
83
    responses:
84
      "200":
84
      200:
85
        description: A cashup
85
        description: A cashup
86
        schema:
86
        schema:
87
          $ref: "../swagger.yaml#/definitions/cashup"
87
          $ref: ../swagger.yaml#/definitions/cashup
88
      "403":
88
      403:
89
        description: Access forbidden
89
        description: Access forbidden
90
        schema:
90
        schema:
91
          $ref: "../swagger.yaml#/definitions/error"
91
          $ref: ../swagger.yaml#/definitions/error
92
      "404":
92
      404:
93
        description: Patron not found
93
        description: Patron not found
94
        schema:
94
        schema:
95
          $ref: "../swagger.yaml#/definitions/error"
95
          $ref: ../swagger.yaml#/definitions/error
96
      "500":
96
      500:
97
        description: |
97
        description: |
98
          Internal server error. Possible `error_code` attribute values:
98
          Internal server error. Possible `error_code` attribute values:
99
99
          
100
          * `internal_server_error`
100
          * `internal_server_error`
101
        schema:
101
        schema:
102
          $ref: "../swagger.yaml#/definitions/error"
102
          $ref: ../swagger.yaml#/definitions/error
103
      "503":
103
      503:
104
        description: Under maintenance
104
        description: Under maintenance
105
        schema:
105
        schema:
106
          $ref: "../swagger.yaml#/definitions/error"
106
          $ref: ../swagger.yaml#/definitions/error
107
    x-koha-authorization:
107
    x-koha-authorization:
108
      permissions:
108
      permissions:
109
        cash_management: cashup
109
        cash_management: cashup
(-)a/api/v1/swagger/paths/checkouts.yaml (-93 / +92 lines)
Lines 6-191 Link Here
6
    tags:
6
    tags:
7
      - checkouts
7
      - checkouts
8
    summary: List checkouts
8
    summary: List checkouts
9
    produces:
10
      - application/json
9
    parameters:
11
    parameters:
10
      - $ref: "../swagger.yaml#/parameters/patron_id_qp"
12
      - $ref: ../swagger.yaml#/parameters/patron_id_qp
11
      - $ref: "../swagger.yaml#/parameters/page"
13
      - $ref: ../swagger.yaml#/parameters/page
12
      - $ref: "../swagger.yaml#/parameters/per_page"
14
      - $ref: ../swagger.yaml#/parameters/per_page
13
      - $ref: "../swagger.yaml#/parameters/match"
15
      - $ref: ../swagger.yaml#/parameters/match
14
      - $ref: "../swagger.yaml#/parameters/order_by"
16
      - $ref: ../swagger.yaml#/parameters/order_by
15
      - $ref: "../swagger.yaml#/parameters/q_param"
17
      - $ref: ../swagger.yaml#/parameters/q_param
16
      - $ref: "../swagger.yaml#/parameters/q_body"
18
      - $ref: ../swagger.yaml#/parameters/q_body
17
      - $ref: "../swagger.yaml#/parameters/q_header"
19
      - $ref: ../swagger.yaml#/parameters/q_header
18
      - $ref: "../swagger.yaml#/parameters/request_id_header"
20
      - $ref: ../swagger.yaml#/parameters/request_id_header
19
      - name: checked_in
21
      - description: 'By default, current checkouts are returned, when this is true then checked in checkouts are returned as result.'
20
        in: query
22
        in: query
21
        description: By default, current checkouts are returned, when this is true then
23
        name: checked_in
22
          checked in checkouts are returned as result.
23
        type: boolean
24
        type: boolean
24
      - name: x-koha-embed
25
      - collectionFormat: csv
25
        in: header
26
        required: false
27
        description: Embed list sent as a request header
26
        description: Embed list sent as a request header
28
        type: array
27
        in: header
29
        items:
28
        items:
30
          type: string
31
          enum:
29
          enum:
32
            - issuer
30
            - issuer
33
        collectionFormat: csv
31
          type: string
34
    produces:
32
        name: x-koha-embed
35
      - application/json
33
        required: false
34
        type: array
36
    responses:
35
    responses:
37
      "200":
36
      200:
38
        description: A list of checkouts
37
        description: A list of checkouts
39
        schema:
38
        schema:
40
          $ref: "../swagger.yaml#/definitions/checkouts"
39
          $ref: ../swagger.yaml#/definitions/checkouts
41
      "403":
40
      403:
42
        description: Access forbidden
41
        description: Access forbidden
43
        schema:
42
        schema:
44
          $ref: "../swagger.yaml#/definitions/error"
43
          $ref: ../swagger.yaml#/definitions/error
45
      "404":
44
      404:
46
        description: Patron not found
45
        description: Patron not found
47
        schema:
46
        schema:
48
          $ref: "../swagger.yaml#/definitions/error"
47
          $ref: ../swagger.yaml#/definitions/error
49
      "500":
48
      500:
50
        description: |
49
        description: |
51
          Internal server error. Possible `error_code` attribute values:
50
          Internal server error. Possible `error_code` attribute values:
52
51
          
53
          * `internal_server_error`
52
          * `internal_server_error`
54
        schema:
53
        schema:
55
          $ref: "../swagger.yaml#/definitions/error"
54
          $ref: ../swagger.yaml#/definitions/error
56
      "503":
55
      503:
57
        description: Under maintenance
56
        description: Under maintenance
58
        schema:
57
        schema:
59
          $ref: "../swagger.yaml#/definitions/error"
58
          $ref: ../swagger.yaml#/definitions/error
60
    x-koha-authorization:
59
    x-koha-authorization:
61
      permissions:
60
      permissions:
62
        circulate: circulate_remaining_permissions
61
        circulate: circulate_remaining_permissions
63
    x-koha-embed:
62
    x-koha-embed:
64
      - issuer
63
      - issuer
65
"/checkouts/{checkout_id}":
64
'/checkouts/{checkout_id}':
66
  get:
65
  get:
67
    x-mojo-to: Checkouts#get
66
    x-mojo-to: Checkouts#get
68
    operationId: getCheckout
67
    operationId: getCheckout
69
    tags:
68
    tags:
70
      - checkouts
69
      - checkouts
71
    summary: Get checkout
70
    summary: Get checkout
71
    produces:
72
      - application/json
72
    parameters:
73
    parameters:
73
      - $ref: "../swagger.yaml#/parameters/checkout_id_pp"
74
      - $ref: ../swagger.yaml#/parameters/checkout_id_pp
74
      - name: x-koha-embed
75
      - collectionFormat: csv
75
        in: header
76
        required: false
77
        description: Embed list sent as a request header
76
        description: Embed list sent as a request header
78
        type: array
77
        in: header
79
        items:
78
        items:
80
          type: string
81
          enum:
79
          enum:
82
            - issuer
80
            - issuer
83
        collectionFormat: csv
81
          type: string
84
    produces:
82
        name: x-koha-embed
85
      - application/json
83
        required: false
84
        type: array
86
    responses:
85
    responses:
87
      "200":
86
      200:
88
        description: Updated borrower's checkout
87
        description: Updated borrower's checkout
89
        schema:
88
        schema:
90
          $ref: "../swagger.yaml#/definitions/checkout"
89
          $ref: ../swagger.yaml#/definitions/checkout
91
      "403":
90
      403:
92
        description: Access forbidden
91
        description: Access forbidden
93
        schema:
92
        schema:
94
          $ref: "../swagger.yaml#/definitions/error"
93
          $ref: ../swagger.yaml#/definitions/error
95
      "404":
94
      404:
96
        description: Checkout not found
95
        description: Checkout not found
97
        schema:
96
        schema:
98
          $ref: "../swagger.yaml#/definitions/error"
97
          $ref: ../swagger.yaml#/definitions/error
99
      "500":
98
      500:
100
        description: |
99
        description: |
101
          Internal server error. Possible `error_code` attribute values:
100
          Internal server error. Possible `error_code` attribute values:
102
101
          
103
          * `internal_server_error`
102
          * `internal_server_error`
104
        schema:
103
        schema:
105
          $ref: "../swagger.yaml#/definitions/error"
104
          $ref: ../swagger.yaml#/definitions/error
106
      "503":
105
      503:
107
        description: Under maintenance
106
        description: Under maintenance
108
        schema:
107
        schema:
109
          $ref: "../swagger.yaml#/definitions/error"
108
          $ref: ../swagger.yaml#/definitions/error
110
    x-koha-authorization:
109
    x-koha-authorization:
111
      permissions:
110
      permissions:
112
        circulate: circulate_remaining_permissions
111
        circulate: circulate_remaining_permissions
113
    x-koha-embed:
112
    x-koha-embed:
114
      - issuer
113
      - issuer
115
"/checkouts/{checkout_id}/renewal":
114
'/checkouts/{checkout_id}/allows_renewal':
116
  post:
115
  get:
117
    x-mojo-to: Checkouts#renew
116
    x-mojo-to: Checkouts#allows_renewal
118
    operationId: renewCheckout
117
    operationId: allows_renewalCheckout
119
    tags:
118
    tags:
120
      - checkouts
119
      - checkouts
121
    summary: Renew a checkout
120
    summary: Get renewability for a checkout
122
    parameters:
123
      - $ref: "../swagger.yaml#/parameters/checkout_id_pp"
124
      - $ref: "../swagger.yaml#/parameters/seen_pp"
125
    produces:
121
    produces:
126
      - application/json
122
      - application/json
123
    parameters:
124
      - $ref: ../swagger.yaml#/parameters/checkout_id_pp
127
    responses:
125
    responses:
128
      "201":
126
      200:
129
        description: Updated borrower's checkout
127
        description: Checkout renewability information
130
        schema:
128
        schema:
131
          $ref: "../swagger.yaml#/definitions/checkout"
129
          $ref: ../swagger.yaml#/definitions/allows_renewal
132
      "403":
130
      403:
133
        description: Cannot renew checkout
131
        description: Forbidden
134
        schema:
132
        schema:
135
          $ref: "../swagger.yaml#/definitions/error"
133
          $ref: ../swagger.yaml#/definitions/error
136
      "404":
134
      404:
137
        description: Checkout not found
135
        description: Checkout not found
138
        schema:
136
        schema:
139
          $ref: "../swagger.yaml#/definitions/error"
137
          $ref: ../swagger.yaml#/definitions/error
140
      "500":
138
      500:
141
        description: |
139
        description: |
142
          Internal server error. Possible `error_code` attribute values:
140
          Internal server error. Possible `error_code` attribute values:
143
141
          
144
          * `internal_server_error`
142
          * `internal_server_error`
145
        schema:
143
        schema:
146
          $ref: "../swagger.yaml#/definitions/error"
144
          $ref: ../swagger.yaml#/definitions/error
147
      "503":
145
      503:
148
        description: Under maintenance
146
        description: Under maintenance
149
        schema:
147
        schema:
150
          $ref: "../swagger.yaml#/definitions/error"
148
          $ref: ../swagger.yaml#/definitions/error
151
    x-koha-authorization:
149
    x-koha-authorization:
152
      permissions:
150
      permissions:
153
        circulate: circulate_remaining_permissions
151
        circulate: circulate_remaining_permissions
154
"/checkouts/{checkout_id}/allows_renewal":
152
'/checkouts/{checkout_id}/renewal':
155
  get:
153
  post:
156
    x-mojo-to: Checkouts#allows_renewal
154
    x-mojo-to: Checkouts#renew
157
    operationId: allows_renewalCheckout
155
    operationId: renewCheckout
158
    tags:
156
    tags:
159
      - checkouts
157
      - checkouts
160
    summary: Get renewability for a checkout
158
    summary: Renew a checkout
161
    parameters:
162
      - $ref: "../swagger.yaml#/parameters/checkout_id_pp"
163
    produces:
159
    produces:
164
      - application/json
160
      - application/json
161
    parameters:
162
      - $ref: ../swagger.yaml#/parameters/checkout_id_pp
163
      - $ref: ../swagger.yaml#/parameters/seen_pp
165
    responses:
164
    responses:
166
      "200":
165
      201:
167
        description: Checkout renewability information
166
        description: Updated borrower's checkout
168
        schema:
167
        schema:
169
          $ref: "../swagger.yaml#/definitions/allows_renewal"
168
          $ref: ../swagger.yaml#/definitions/checkout
170
      "403":
169
      403:
171
        description: Forbidden
170
        description: Cannot renew checkout
172
        schema:
171
        schema:
173
          $ref: "../swagger.yaml#/definitions/error"
172
          $ref: ../swagger.yaml#/definitions/error
174
      "404":
173
      404:
175
        description: Checkout not found
174
        description: Checkout not found
176
        schema:
175
        schema:
177
          $ref: "../swagger.yaml#/definitions/error"
176
          $ref: ../swagger.yaml#/definitions/error
178
      "500":
177
      500:
179
        description: |
178
        description: |
180
          Internal server error. Possible `error_code` attribute values:
179
          Internal server error. Possible `error_code` attribute values:
181
180
          
182
          * `internal_server_error`
181
          * `internal_server_error`
183
        schema:
182
        schema:
184
          $ref: "../swagger.yaml#/definitions/error"
183
          $ref: ../swagger.yaml#/definitions/error
185
      "503":
184
      503:
186
        description: Under maintenance
185
        description: Under maintenance
187
        schema:
186
        schema:
188
          $ref: "../swagger.yaml#/definitions/error"
187
          $ref: ../swagger.yaml#/definitions/error
189
    x-koha-authorization:
188
    x-koha-authorization:
190
      permissions:
189
      permissions:
191
        circulate: circulate_remaining_permissions
190
        circulate: circulate_remaining_permissions
(-)a/api/v1/swagger/paths/circulation-rules.yaml (-9 / +9 lines)
Lines 9-32 Link Here
9
    produces:
9
    produces:
10
      - application/json
10
      - application/json
11
    responses:
11
    responses:
12
      "200":
12
      200:
13
        description: A map of rule kind information
13
        description: A map of rule kind information
14
        schema:
14
        schema:
15
          type: object
15
          type: object
16
          additionalProperties:
16
          additionalProperties:
17
            $ref: "../swagger.yaml#/definitions/circ-rule-kind"
17
            $ref: ../swagger.yaml#/definitions/circ-rule-kind
18
      "403":
18
      403:
19
        description: Access forbidden
19
        description: Access forbidden
20
        schema:
20
        schema:
21
          $ref: "../swagger.yaml#/definitions/error"
21
          $ref: ../swagger.yaml#/definitions/error
22
      "500":
22
      500:
23
        description: |
23
        description: |
24
          Internal server error. Possible `error_code` attribute values:
24
          Internal server error. Possible `error_code` attribute values:
25
25
          
26
          * `internal_server_error`
26
          * `internal_server_error`
27
        schema:
27
        schema:
28
          $ref: "../swagger.yaml#/definitions/error"
28
          $ref: ../swagger.yaml#/definitions/error
29
      "503":
29
      503:
30
        description: Under maintenance
30
        description: Under maintenance
31
        schema:
31
        schema:
32
          $ref: "../swagger.yaml#/definitions/error"
32
          $ref: ../swagger.yaml#/definitions/error
(-)a/api/v1/swagger/paths/cities.yaml (-109 / +109 lines)
Lines 9-220 Link Here
9
    produces:
9
    produces:
10
      - application/json
10
      - application/json
11
    parameters:
11
    parameters:
12
      - name: name
12
      - description: Case insensative search on city name
13
        in: query
13
        in: query
14
        description: Case insensative search on city name
14
        name: name
15
        required: false
15
        required: false
16
        type: string
16
        type: string
17
      - name: state
17
      - description: Case insensative search on city state
18
        in: query
18
        in: query
19
        description: Case insensative search on city state
19
        name: state
20
        required: false
20
        required: false
21
        type: string
21
        type: string
22
      - name: country
22
      - description: Case insensative search on city country
23
        in: query
23
        in: query
24
        description: Case insensative search on city country
24
        name: country
25
        required: false
25
        required: false
26
        type: string
26
        type: string
27
      - name: postal_code
27
      - description: Case Insensative search on city postal code
28
        in: query
28
        in: query
29
        description: Case Insensative search on city postal code
29
        name: postal_code
30
        required: false
30
        required: false
31
        type: string
31
        type: string
32
      - $ref: "../swagger.yaml#/parameters/match"
32
      - $ref: ../swagger.yaml#/parameters/match
33
      - $ref: "../swagger.yaml#/parameters/order_by"
33
      - $ref: ../swagger.yaml#/parameters/order_by
34
      - $ref: "../swagger.yaml#/parameters/page"
34
      - $ref: ../swagger.yaml#/parameters/page
35
      - $ref: "../swagger.yaml#/parameters/per_page"
35
      - $ref: ../swagger.yaml#/parameters/per_page
36
      - $ref: "../swagger.yaml#/parameters/q_param"
36
      - $ref: ../swagger.yaml#/parameters/q_param
37
      - $ref: "../swagger.yaml#/parameters/q_body"
37
      - $ref: ../swagger.yaml#/parameters/q_body
38
      - $ref: "../swagger.yaml#/parameters/q_header"
38
      - $ref: ../swagger.yaml#/parameters/q_header
39
      - $ref: "../swagger.yaml#/parameters/request_id_header"
39
      - $ref: ../swagger.yaml#/parameters/request_id_header
40
    responses:
40
    responses:
41
      "200":
41
      200:
42
        description: A list of cities
42
        description: A list of cities
43
        schema:
43
        schema:
44
          type: array
44
          type: array
45
          items:
45
          items:
46
            $ref: "../swagger.yaml#/definitions/city"
46
            $ref: ../swagger.yaml#/definitions/city
47
      "403":
47
      403:
48
        description: Access forbidden
48
        description: Access forbidden
49
        schema:
49
        schema:
50
          $ref: "../swagger.yaml#/definitions/error"
50
          $ref: ../swagger.yaml#/definitions/error
51
      "500":
51
      500:
52
        description: |
52
        description: |
53
          Internal server error. Possible `error_code` attribute values:
53
          Internal server error. Possible `error_code` attribute values:
54
54
          
55
          * `internal_server_error`
55
          * `internal_server_error`
56
        schema:
56
        schema:
57
          $ref: "../swagger.yaml#/definitions/error"
57
          $ref: ../swagger.yaml#/definitions/error
58
      "503":
58
      503:
59
        description: Under maintenance
59
        description: Under maintenance
60
        schema:
60
        schema:
61
          $ref: "../swagger.yaml#/definitions/error"
61
          $ref: ../swagger.yaml#/definitions/error
62
    x-koha-authorization:
62
    x-koha-authorization:
63
      permissions:
63
      permissions:
64
        catalogue: "1"
64
        catalogue: 1
65
  post:
65
  post:
66
    x-mojo-to: Cities#add
66
    x-mojo-to: Cities#add
67
    operationId: addCity
67
    operationId: addCity
68
    tags:
68
    tags:
69
      - cities
69
      - cities
70
    summary: Add city
70
    summary: Add city
71
    produces:
72
      - application/json
71
    parameters:
73
    parameters:
72
      - name: body
74
      - description: A JSON object containing informations about the new hold
73
        in: body
75
        in: body
74
        description: A JSON object containing informations about the new hold
76
        name: body
75
        required: true
77
        required: true
76
        schema:
78
        schema:
77
          $ref: "../swagger.yaml#/definitions/city"
79
          $ref: ../swagger.yaml#/definitions/city
78
    produces:
79
      - application/json
80
    responses:
80
    responses:
81
      "201":
81
      201:
82
        description: City added
82
        description: City added
83
        schema:
83
        schema:
84
          $ref: "../swagger.yaml#/definitions/city"
84
          $ref: ../swagger.yaml#/definitions/city
85
      "401":
85
      401:
86
        description: Authentication required
86
        description: Authentication required
87
        schema:
87
        schema:
88
          $ref: "../swagger.yaml#/definitions/error"
88
          $ref: ../swagger.yaml#/definitions/error
89
      "403":
89
      403:
90
        description: Access forbidden
90
        description: Access forbidden
91
        schema:
91
        schema:
92
          $ref: "../swagger.yaml#/definitions/error"
92
          $ref: ../swagger.yaml#/definitions/error
93
      "500":
93
      500:
94
        description: |
94
        description: |
95
          Internal server error. Possible `error_code` attribute values:
95
          Internal server error. Possible `error_code` attribute values:
96
96
          
97
          * `internal_server_error`
97
          * `internal_server_error`
98
        schema:
98
        schema:
99
          $ref: "../swagger.yaml#/definitions/error"
99
          $ref: ../swagger.yaml#/definitions/error
100
      "503":
100
      503:
101
        description: Under maintenance
101
        description: Under maintenance
102
        schema:
102
        schema:
103
          $ref: "../swagger.yaml#/definitions/error"
103
          $ref: ../swagger.yaml#/definitions/error
104
    x-koha-authorization:
105
      permissions:
106
        parameters: manage_cities
107
'/cities/{city_id}':
108
  delete:
109
    x-mojo-to: Cities#delete
110
    operationId: deleteCity
111
    tags:
112
      - cities
113
    summary: Delete city
114
    produces:
115
      - application/json
116
    parameters:
117
      - $ref: ../swagger.yaml#/parameters/city_id_pp
118
    responses:
119
      204:
120
        description: City deleted
121
      401:
122
        description: Authentication required
123
        schema:
124
          $ref: ../swagger.yaml#/definitions/error
125
      403:
126
        description: Access forbidden
127
        schema:
128
          $ref: ../swagger.yaml#/definitions/error
129
      404:
130
        description: City not found
131
        schema:
132
          $ref: ../swagger.yaml#/definitions/error
133
      500:
134
        description: Internal error
135
        schema:
136
          $ref: ../swagger.yaml#/definitions/error
137
      503:
138
        description: Under maintenance
139
        schema:
140
          $ref: ../swagger.yaml#/definitions/error
104
    x-koha-authorization:
141
    x-koha-authorization:
105
      permissions:
142
      permissions:
106
        parameters: manage_cities
143
        parameters: manage_cities
107
"/cities/{city_id}":
108
  get:
144
  get:
109
    x-mojo-to: Cities#get
145
    x-mojo-to: Cities#get
110
    operationId: getCity
146
    operationId: getCity
111
    tags:
147
    tags:
112
      - cities
148
      - cities
113
    summary: Get city
149
    summary: Get city
114
    parameters:
115
      - $ref: "../swagger.yaml#/parameters/city_id_pp"
116
    produces:
150
    produces:
117
      - application/json
151
      - application/json
152
    parameters:
153
      - $ref: ../swagger.yaml#/parameters/city_id_pp
118
    responses:
154
    responses:
119
      "200":
155
      200:
120
        description: A city
156
        description: A city
121
        schema:
157
        schema:
122
          $ref: "../swagger.yaml#/definitions/city"
158
          $ref: ../swagger.yaml#/definitions/city
123
      "404":
159
      404:
124
        description: City not found
160
        description: City not found
125
        schema:
161
        schema:
126
          $ref: "../swagger.yaml#/definitions/error"
162
          $ref: ../swagger.yaml#/definitions/error
127
      "500":
163
      500:
128
        description: |
164
        description: |
129
          Internal server error. Possible `error_code` attribute values:
165
          Internal server error. Possible `error_code` attribute values:
130
166
          
131
          * `internal_server_error`
167
          * `internal_server_error`
132
        schema:
168
        schema:
133
          $ref: "../swagger.yaml#/definitions/error"
169
          $ref: ../swagger.yaml#/definitions/error
134
      "503":
170
      503:
135
        description: Under maintenance
171
        description: Under maintenance
136
        schema:
172
        schema:
137
          $ref: "../swagger.yaml#/definitions/error"
173
          $ref: ../swagger.yaml#/definitions/error
138
    x-koha-authorization:
174
    x-koha-authorization:
139
      permissions:
175
      permissions:
140
        catalogue: "1"
176
        catalogue: 1
141
  put:
177
  put:
142
    x-mojo-to: Cities#update
178
    x-mojo-to: Cities#update
143
    operationId: updateCity
179
    operationId: updateCity
144
    tags:
180
    tags:
145
      - cities
181
      - cities
146
    summary: Update city
182
    summary: Update city
183
    produces:
184
      - application/json
147
    parameters:
185
    parameters:
148
      - $ref: "../swagger.yaml#/parameters/city_id_pp"
186
      - $ref: ../swagger.yaml#/parameters/city_id_pp
149
      - name: body
187
      - description: A city object
150
        in: body
188
        in: body
151
        description: A city object
189
        name: body
152
        required: true
190
        required: true
153
        schema:
191
        schema:
154
          $ref: "../swagger.yaml#/definitions/city"
192
          $ref: ../swagger.yaml#/definitions/city
155
    produces:
156
      - application/json
157
    responses:
193
    responses:
158
      "200":
194
      200:
159
        description: A city
195
        description: A city
160
        schema:
196
        schema:
161
          $ref: "../swagger.yaml#/definitions/city"
197
          $ref: ../swagger.yaml#/definitions/city
162
      "401":
198
      401:
163
        description: Authentication required
164
        schema:
165
          $ref: "../swagger.yaml#/definitions/error"
166
      "403":
167
        description: Access forbidden
168
        schema:
169
          $ref: "../swagger.yaml#/definitions/error"
170
      "404":
171
        description: City not found
172
        schema:
173
          $ref: "../swagger.yaml#/definitions/error"
174
      "500":
175
        description: Internal error
176
        schema:
177
          $ref: "../swagger.yaml#/definitions/error"
178
      "503":
179
        description: Under maintenance
180
        schema:
181
          $ref: "../swagger.yaml#/definitions/error"
182
    x-koha-authorization:
183
      permissions:
184
        parameters: manage_cities
185
  delete:
186
    x-mojo-to: Cities#delete
187
    operationId: deleteCity
188
    tags:
189
      - cities
190
    summary: Delete city
191
    parameters:
192
      - $ref: "../swagger.yaml#/parameters/city_id_pp"
193
    produces:
194
      - application/json
195
    responses:
196
      "204":
197
        description: City deleted
198
      "401":
199
        description: Authentication required
199
        description: Authentication required
200
        schema:
200
        schema:
201
          $ref: "../swagger.yaml#/definitions/error"
201
          $ref: ../swagger.yaml#/definitions/error
202
      "403":
202
      403:
203
        description: Access forbidden
203
        description: Access forbidden
204
        schema:
204
        schema:
205
          $ref: "../swagger.yaml#/definitions/error"
205
          $ref: ../swagger.yaml#/definitions/error
206
      "404":
206
      404:
207
        description: City not found
207
        description: City not found
208
        schema:
208
        schema:
209
          $ref: "../swagger.yaml#/definitions/error"
209
          $ref: ../swagger.yaml#/definitions/error
210
      "500":
210
      500:
211
        description: Internal error
211
        description: Internal error
212
        schema:
212
        schema:
213
          $ref: "../swagger.yaml#/definitions/error"
213
          $ref: ../swagger.yaml#/definitions/error
214
      "503":
214
      503:
215
        description: Under maintenance
215
        description: Under maintenance
216
        schema:
216
        schema:
217
          $ref: "../swagger.yaml#/definitions/error"
217
          $ref: ../swagger.yaml#/definitions/error
218
    x-koha-authorization:
218
    x-koha-authorization:
219
      permissions:
219
      permissions:
220
        parameters: manage_cities
220
        parameters: manage_cities
(-)a/api/v1/swagger/paths/clubs.yaml (-43 / +42 lines)
Lines 1-96 Link Here
1
---
1
---
2
"/clubs/{club_id}/holds":
2
'/clubs/{club_id}/holds':
3
  post:
3
  post:
4
    x-mojo-to: Clubs::Holds#add
4
    x-mojo-to: Clubs::Holds#add
5
    operationId: addClubHold
5
    operationId: addClubHold
6
    tags:
6
    tags:
7
      - clubs
7
      - clubs
8
    summary: Add a club hold
8
    summary: Add a club hold
9
    produces:
10
      - application/json
9
    parameters:
11
    parameters:
10
      - $ref: "../swagger.yaml#/parameters/club_id_pp"
12
      - $ref: ../swagger.yaml#/parameters/club_id_pp
11
      - name: body
13
      - description: A JSON object containing informations about the new hold
12
        in: body
14
        in: body
13
        description: A JSON object containing informations about the new hold
15
        name: body
14
        required: true
16
        required: true
15
        schema:
17
        schema:
16
          type: object
18
          additionalProperties: false
17
          properties:
19
          properties:
18
            biblio_id:
20
            biblio_id:
19
              description: Internal biblio identifier
21
              description: Internal biblio identifier
20
              type:
22
              type:
21
                - integer
23
                - integer
22
                - "null"
24
                - "null"
25
            default_patron_home:
26
              description: "For each patron, set pickup location to patron's home library if possible"
27
              type: integer
28
            expiration_date:
29
              description: Hold end date
30
              format: date
31
              type:
32
                - string
33
                - "null"
23
            item_id:
34
            item_id:
24
              description: Internal item identifier
35
              description: Internal item identifier
25
              type:
36
              type:
26
                - integer
37
                - integer
27
                - "null"
38
                - "null"
28
            pickup_library_id:
39
            item_type:
29
              description: Internal library identifier for the pickup library
40
              description: Limit hold on one itemtype (ignored for item-level holds)
30
              type: string
31
            expiration_date:
32
              description: Hold end date
33
              type:
41
              type:
34
                - string
42
                - string
35
                - "null"
43
                - "null"
36
              format: date
37
            notes:
44
            notes:
38
              description: Notes related to this hold
45
              description: Notes related to this hold
39
              type:
46
              type:
40
                - string
47
                - string
41
                - "null"
48
                - "null"
42
            item_type:
49
            pickup_library_id:
43
              description: Limit hold on one itemtype (ignored for item-level holds)
50
              description: Internal library identifier for the pickup library
44
              type:
51
              type: string
45
                - string
46
                - "null"
47
            default_patron_home:
48
              description: For each patron, set pickup location to patron's home library if
49
                possible
50
              type: integer
51
          required:
52
          required:
52
            - pickup_library_id
53
            - pickup_library_id
53
          additionalProperties: false
54
          type: object
54
    consumes:
55
      - application/json
56
    produces:
57
      - application/json
58
    responses:
55
    responses:
59
      "201":
56
      201:
60
        description: Created club hold
57
        description: Created club hold
61
        schema:
58
        schema:
62
          $ref: "../definitions/club_hold.yaml"
59
          $ref: ../definitions/club_hold.yaml
63
      "400":
60
      400:
64
        description: Missing or wrong parameters
61
        description: Missing or wrong parameters
65
        schema:
62
        schema:
66
          $ref: "../swagger.yaml#/definitions/error"
63
          $ref: ../swagger.yaml#/definitions/error
67
      "401":
64
      401:
68
        description: Authentication required
65
        description: Authentication required
69
        schema:
66
        schema:
70
          $ref: "../swagger.yaml#/definitions/error"
67
          $ref: ../swagger.yaml#/definitions/error
71
      "403":
68
      403:
72
        description: Hold not allowed
69
        description: Hold not allowed
73
        schema:
70
        schema:
74
          $ref: "../swagger.yaml#/definitions/error"
71
          $ref: ../swagger.yaml#/definitions/error
75
      "404":
72
      404:
76
        description: Club not found
73
        description: Club not found
77
        schema:
74
        schema:
78
          $ref: "../swagger.yaml#/definitions/error"
75
          $ref: ../swagger.yaml#/definitions/error
79
      "409":
76
      409:
80
        description: Hold not allowed
77
        description: Hold not allowed
81
        schema:
78
        schema:
82
          $ref: "../swagger.yaml#/definitions/error"
79
          $ref: ../swagger.yaml#/definitions/error
83
      "500":
80
      500:
84
        description: |
81
        description: |
85
          Internal server error. Possible `error_code` attribute values:
82
          Internal server error. Possible `error_code` attribute values:
86
83
          
87
          * `internal_server_error`
84
          * `internal_server_error`
88
        schema:
85
        schema:
89
          $ref: "../swagger.yaml#/definitions/error"
86
          $ref: ../swagger.yaml#/definitions/error
90
      "503":
87
      503:
91
        description: Under maintenance
88
        description: Under maintenance
92
        schema:
89
        schema:
93
          $ref: "../swagger.yaml#/definitions/error"
90
          $ref: ../swagger.yaml#/definitions/error
94
    x-koha-authorization:
91
    x-koha-authorization:
95
      permissions:
92
      permissions:
96
        reserveforothers: "1"
93
        reserveforothers: 1
94
    consumes:
95
      - application/json
(-)a/api/v1/swagger/paths/config_smtp_servers.yaml (-104 / +104 lines)
Lines 9-44 Link Here
9
    produces:
9
    produces:
10
      - application/json
10
      - application/json
11
    parameters:
11
    parameters:
12
      - $ref: "../swagger.yaml#/parameters/match"
12
      - $ref: ../swagger.yaml#/parameters/match
13
      - $ref: "../swagger.yaml#/parameters/order_by"
13
      - $ref: ../swagger.yaml#/parameters/order_by
14
      - $ref: "../swagger.yaml#/parameters/page"
14
      - $ref: ../swagger.yaml#/parameters/page
15
      - $ref: "../swagger.yaml#/parameters/per_page"
15
      - $ref: ../swagger.yaml#/parameters/per_page
16
      - $ref: "../swagger.yaml#/parameters/q_param"
16
      - $ref: ../swagger.yaml#/parameters/q_param
17
      - $ref: "../swagger.yaml#/parameters/q_body"
17
      - $ref: ../swagger.yaml#/parameters/q_body
18
      - $ref: "../swagger.yaml#/parameters/q_header"
18
      - $ref: ../swagger.yaml#/parameters/q_header
19
      - $ref: "../swagger.yaml#/parameters/request_id_header"
19
      - $ref: ../swagger.yaml#/parameters/request_id_header
20
    responses:
20
    responses:
21
      "200":
21
      200:
22
        description: A list of SMTP servers
22
        description: A list of SMTP servers
23
        schema:
23
        schema:
24
          type: array
24
          type: array
25
          items:
25
          items:
26
            $ref: "../swagger.yaml#/definitions/smtp_server"
26
            $ref: ../swagger.yaml#/definitions/smtp_server
27
      "403":
27
      403:
28
        description: Access forbidden
28
        description: Access forbidden
29
        schema:
29
        schema:
30
          $ref: "../swagger.yaml#/definitions/error"
30
          $ref: ../swagger.yaml#/definitions/error
31
      "500":
31
      500:
32
        description: |
32
        description: |
33
          Internal server error. Possible `error_code` attribute values:
33
          Internal server error. Possible `error_code` attribute values:
34
34
          
35
          * `internal_server_error`
35
          * `internal_server_error`
36
        schema:
36
        schema:
37
          $ref: "../swagger.yaml#/definitions/error"
37
          $ref: ../swagger.yaml#/definitions/error
38
      "503":
38
      503:
39
        description: Under maintenance
39
        description: Under maintenance
40
        schema:
40
        schema:
41
          $ref: "../swagger.yaml#/definitions/error"
41
          $ref: ../swagger.yaml#/definitions/error
42
    x-koha-authorization:
42
    x-koha-authorization:
43
      permissions:
43
      permissions:
44
        parameters: manage_smtp_servers
44
        parameters: manage_smtp_servers
Lines 48-214 Link Here
48
    tags:
48
    tags:
49
      - smtp_servers
49
      - smtp_servers
50
    summary: Add SMTP server
50
    summary: Add SMTP server
51
    produces:
52
      - application/json
51
    parameters:
53
    parameters:
52
      - name: body
54
      - description: A JSON object representing a new SMTP server configuration
53
        in: body
55
        in: body
54
        description: A JSON object representing a new SMTP server configuration
56
        name: body
55
        required: true
57
        required: true
56
        schema:
58
        schema:
57
          $ref: "../swagger.yaml#/definitions/smtp_server"
59
          $ref: ../swagger.yaml#/definitions/smtp_server
58
    produces:
59
      - application/json
60
    responses:
60
    responses:
61
      "201":
61
      201:
62
        description: An SMTP server object
62
        description: An SMTP server object
63
        schema:
63
        schema:
64
          $ref: "../swagger.yaml#/definitions/smtp_server"
64
          $ref: ../swagger.yaml#/definitions/smtp_server
65
      "401":
65
      401:
66
        description: Authentication required
66
        description: Authentication required
67
        schema:
67
        schema:
68
          $ref: "../swagger.yaml#/definitions/error"
68
          $ref: ../swagger.yaml#/definitions/error
69
      "403":
69
      403:
70
        description: Access forbidden
70
        description: Access forbidden
71
        schema:
71
        schema:
72
          $ref: "../swagger.yaml#/definitions/error"
72
          $ref: ../swagger.yaml#/definitions/error
73
      "409":
73
      409:
74
        description: Conflict in creating resource
74
        description: Conflict in creating resource
75
        schema:
75
        schema:
76
          $ref: "../swagger.yaml#/definitions/error"
76
          $ref: ../swagger.yaml#/definitions/error
77
      "500":
77
      500:
78
        description: |
78
        description: |
79
          Internal server error. Possible `error_code` attribute values:
79
          Internal server error. Possible `error_code` attribute values:
80
80
          
81
          * `internal_server_error`
81
          * `internal_server_error`
82
        schema:
82
        schema:
83
          $ref: "../swagger.yaml#/definitions/error"
83
          $ref: ../swagger.yaml#/definitions/error
84
      "503":
84
      503:
85
        description: Under maintenance
85
        description: Under maintenance
86
        schema:
86
        schema:
87
          $ref: "../swagger.yaml#/definitions/error"
87
          $ref: ../swagger.yaml#/definitions/error
88
    x-koha-authorization:
88
    x-koha-authorization:
89
      permissions:
89
      permissions:
90
        parameters: manage_smtp_servers
90
        parameters: manage_smtp_servers
91
"/config/smtp_servers/{smtp_server_id}":
91
'/config/smtp_servers/{smtp_server_id}':
92
  get:
92
  delete:
93
    x-mojo-to: Config::SMTP::Servers#get
93
    x-mojo-to: Config::SMTP::Servers#delete
94
    operationId: getSMTPServer
94
    operationId: deleteSMTPServer
95
    tags:
95
    tags:
96
      - smtp_servers
96
      - smtp_servers
97
    summary: Get SMTP server
97
    summary: Delete SMTP server
98
    parameters:
99
      - $ref: "../swagger.yaml#/parameters/smtp_server_id_pp"
100
    produces:
98
    produces:
101
      - application/json
99
      - application/json
100
    parameters:
101
      - $ref: ../swagger.yaml#/parameters/smtp_server_id_pp
102
    responses:
102
    responses:
103
      "200":
103
      204:
104
        description: An SMTP server object
104
        description: SMTP server deleted
105
      401:
106
        description: Authentication required
105
        schema:
107
        schema:
106
          $ref: "../swagger.yaml#/definitions/smtp_server"
108
          $ref: ../swagger.yaml#/definitions/error
107
      "404":
109
      403:
108
        description: Object not found
110
        description: Access forbidden
109
        schema:
111
        schema:
110
          $ref: "../swagger.yaml#/definitions/error"
112
          $ref: ../swagger.yaml#/definitions/error
111
      "409":
113
      404:
112
        description: Conflict updating resource
114
        description: Object not found
113
        schema:
115
        schema:
114
          $ref: "../swagger.yaml#/definitions/error"
116
          $ref: ../swagger.yaml#/definitions/error
115
      "500":
117
      500:
116
        description: |
118
        description: |
117
          Internal server error. Possible `error_code` attribute values:
119
          Internal server error. Possible `error_code` attribute values:
118
120
          
119
          * `internal_server_error`
121
          * `internal_server_error`
120
        schema:
122
        schema:
121
          $ref: "../swagger.yaml#/definitions/error"
123
          $ref: ../swagger.yaml#/definitions/error
122
      "503":
124
      503:
123
        description: Under maintenance
125
        description: Under maintenance
124
        schema:
126
        schema:
125
          $ref: "../swagger.yaml#/definitions/error"
127
          $ref: ../swagger.yaml#/definitions/error
126
    x-koha-authorization:
128
    x-koha-authorization:
127
      permissions:
129
      permissions:
128
        parameters: manage_smtp_servers
130
        parameters: manage_smtp_servers
129
  put:
131
  get:
130
    x-mojo-to: Config::SMTP::Servers#update
132
    x-mojo-to: Config::SMTP::Servers#get
131
    operationId: updateSMTPServer
133
    operationId: getSMTPServer
132
    tags:
134
    tags:
133
      - smtp_servers
135
      - smtp_servers
134
    summary: Update SMTP server
136
    summary: Get SMTP server
135
    parameters:
136
      - $ref: "../swagger.yaml#/parameters/smtp_server_id_pp"
137
      - name: body
138
        in: body
139
        description: An SMTP server object
140
        required: true
141
        schema:
142
          $ref: "../swagger.yaml#/definitions/smtp_server"
143
    produces:
137
    produces:
144
      - application/json
138
      - application/json
139
    parameters:
140
      - $ref: ../swagger.yaml#/parameters/smtp_server_id_pp
145
    responses:
141
    responses:
146
      "200":
142
      200:
147
        description: An SMTP server object
143
        description: An SMTP server object
148
        schema:
144
        schema:
149
          $ref: "../swagger.yaml#/definitions/smtp_server"
145
          $ref: ../swagger.yaml#/definitions/smtp_server
150
      "401":
146
      404:
151
        description: Authentication required
152
        schema:
153
          $ref: "../swagger.yaml#/definitions/error"
154
      "403":
155
        description: Access forbidden
156
        schema:
157
          $ref: "../swagger.yaml#/definitions/error"
158
      "404":
159
        description: Object not found
147
        description: Object not found
160
        schema:
148
        schema:
161
          $ref: "../swagger.yaml#/definitions/error"
149
          $ref: ../swagger.yaml#/definitions/error
162
      "500":
150
      409:
151
        description: Conflict updating resource
152
        schema:
153
          $ref: ../swagger.yaml#/definitions/error
154
      500:
163
        description: |
155
        description: |
164
          Internal server error. Possible `error_code` attribute values:
156
          Internal server error. Possible `error_code` attribute values:
165
157
          
166
          * `internal_server_error`
158
          * `internal_server_error`
167
        schema:
159
        schema:
168
          $ref: "../swagger.yaml#/definitions/error"
160
          $ref: ../swagger.yaml#/definitions/error
169
      "503":
161
      503:
170
        description: Under maintenance
162
        description: Under maintenance
171
        schema:
163
        schema:
172
          $ref: "../swagger.yaml#/definitions/error"
164
          $ref: ../swagger.yaml#/definitions/error
173
    x-koha-authorization:
165
    x-koha-authorization:
174
      permissions:
166
      permissions:
175
        parameters: manage_smtp_servers
167
        parameters: manage_smtp_servers
176
  delete:
168
  put:
177
    x-mojo-to: Config::SMTP::Servers#delete
169
    x-mojo-to: Config::SMTP::Servers#update
178
    operationId: deleteSMTPServer
170
    operationId: updateSMTPServer
179
    tags:
171
    tags:
180
      - smtp_servers
172
      - smtp_servers
181
    summary: Delete SMTP server
173
    summary: Update SMTP server
182
    parameters:
183
      - $ref: "../swagger.yaml#/parameters/smtp_server_id_pp"
184
    produces:
174
    produces:
185
      - application/json
175
      - application/json
176
    parameters:
177
      - $ref: ../swagger.yaml#/parameters/smtp_server_id_pp
178
      - description: An SMTP server object
179
        in: body
180
        name: body
181
        required: true
182
        schema:
183
          $ref: ../swagger.yaml#/definitions/smtp_server
186
    responses:
184
    responses:
187
      "204":
185
      200:
188
        description: SMTP server deleted
186
        description: An SMTP server object
189
      "401":
187
        schema:
188
          $ref: ../swagger.yaml#/definitions/smtp_server
189
      401:
190
        description: Authentication required
190
        description: Authentication required
191
        schema:
191
        schema:
192
          $ref: "../swagger.yaml#/definitions/error"
192
          $ref: ../swagger.yaml#/definitions/error
193
      "403":
193
      403:
194
        description: Access forbidden
194
        description: Access forbidden
195
        schema:
195
        schema:
196
          $ref: "../swagger.yaml#/definitions/error"
196
          $ref: ../swagger.yaml#/definitions/error
197
      "404":
197
      404:
198
        description: Object not found
198
        description: Object not found
199
        schema:
199
        schema:
200
          $ref: "../swagger.yaml#/definitions/error"
200
          $ref: ../swagger.yaml#/definitions/error
201
      "500":
201
      500:
202
        description: |
202
        description: |
203
          Internal server error. Possible `error_code` attribute values:
203
          Internal server error. Possible `error_code` attribute values:
204
204
          
205
          * `internal_server_error`
205
          * `internal_server_error`
206
        schema:
206
        schema:
207
          $ref: "../swagger.yaml#/definitions/error"
207
          $ref: ../swagger.yaml#/definitions/error
208
      "503":
208
      503:
209
        description: Under maintenance
209
        description: Under maintenance
210
        schema:
210
        schema:
211
          $ref: "../swagger.yaml#/definitions/error"
211
          $ref: ../swagger.yaml#/definitions/error
212
    x-koha-authorization:
212
    x-koha-authorization:
213
      permissions:
213
      permissions:
214
        parameters: manage_smtp_servers
214
        parameters: manage_smtp_servers
(-)a/api/v1/swagger/paths/holds.yaml (-386 / +385 lines)
Lines 6-120 Link Here
6
    tags:
6
    tags:
7
      - holds
7
      - holds
8
    summary: List holds
8
    summary: List holds
9
    produces:
10
      - application/json
9
    parameters:
11
    parameters:
10
      - name: hold_id
12
      - description: Internal hold identifier
11
        in: query
13
        in: query
12
        description: Internal hold identifier
14
        name: hold_id
13
        type: integer
15
        type: integer
14
      - name: patron_id
16
      - description: Internal patron identifier
15
        in: query
17
        in: query
16
        description: Internal patron identifier
18
        name: patron_id
17
        type: integer
19
        type: integer
18
      - name: hold_date
20
      - description: Hold
21
        format: date
19
        in: query
22
        in: query
20
        description: Hold
23
        name: hold_date
21
        type: string
24
        type: string
22
        format: date
25
      - description: Internal biblio identifier
23
      - name: biblio_id
24
        in: query
26
        in: query
25
        description: Internal biblio identifier
27
        name: biblio_id
26
        type: integer
28
        type: integer
27
      - name: pickup_library_id
29
      - description: Internal library identifier for the pickup library
28
        in: query
30
        in: query
29
        description: Internal library identifier for the pickup library
31
        name: pickup_library_id
30
        type: string
32
        type: string
31
      - name: cancellation_date
33
      - description: The date the hold was cancelled
34
        format: date
32
        in: query
35
        in: query
33
        description: The date the hold was cancelled
36
        name: cancellation_date
34
        type: string
37
        type: string
35
        format: date
38
      - description: Notes related to this hold
36
      - name: notes
37
        in: query
39
        in: query
38
        description: Notes related to this hold
40
        name: notes
39
        type: string
41
        type: string
40
      - name: priority
42
      - description: Where in the queue the patron sits
41
        in: query
43
        in: query
42
        description: Where in the queue the patron sits
44
        name: priority
43
        type: integer
45
        type: integer
44
      - name: status
46
      - description: Found status
45
        in: query
47
        in: query
46
        description: Found status
48
        name: status
47
        type: string
49
        type: string
48
      - name: timestamp
50
      - description: Time of latest update
49
        in: query
51
        in: query
50
        description: Time of latest update
52
        name: timestamp
51
        type: string
53
        type: string
52
      - name: item_id
54
      - description: Internal item identifier
53
        in: query
55
        in: query
54
        description: Internal item identifier
56
        name: item_id
55
        type: integer
57
        type: integer
56
      - name: waiting_date
58
      - description: Date the item was marked as waiting for the patron
57
        in: query
59
        in: query
58
        description: Date the item was marked as waiting for the patron
60
        name: waiting_date
59
        type: string
61
        type: string
60
      - name: expiration_date
62
      - description: Date the hold expires
61
        in: query
63
        in: query
62
        description: Date the hold expires
64
        name: expiration_date
63
        type: string
65
        type: string
64
      - name: lowest_priority
66
      - description: Lowest priority
65
        in: query
67
        in: query
66
        description: Lowest priority
68
        name: lowest_priority
67
        type: boolean
69
        type: boolean
68
      - name: suspended
70
      - description: Suspended
69
        in: query
71
        in: query
70
        description: Suspended
72
        name: suspended
71
        type: boolean
73
        type: boolean
72
      - name: suspended_until
74
      - description: Suspended until
73
        in: query
75
        in: query
74
        description: Suspended until
76
        name: suspended_until
75
        type: string
77
        type: string
76
      - name: non_priority
78
      - description: Non priority hold
77
        in: query
79
        in: query
78
        description: Non priority hold
80
        name: non_priority
79
        type: boolean
81
        type: boolean
80
      - $ref: "../swagger.yaml#/parameters/match"
82
      - $ref: ../swagger.yaml#/parameters/match
81
      - $ref: "../swagger.yaml#/parameters/order_by"
83
      - $ref: ../swagger.yaml#/parameters/order_by
82
      - $ref: "../swagger.yaml#/parameters/page"
84
      - $ref: ../swagger.yaml#/parameters/page
83
      - $ref: "../swagger.yaml#/parameters/per_page"
85
      - $ref: ../swagger.yaml#/parameters/per_page
84
      - $ref: "../swagger.yaml#/parameters/q_param"
86
      - $ref: ../swagger.yaml#/parameters/q_param
85
      - $ref: "../swagger.yaml#/parameters/q_body"
87
      - $ref: ../swagger.yaml#/parameters/q_body
86
      - $ref: "../swagger.yaml#/parameters/q_header"
88
      - $ref: ../swagger.yaml#/parameters/q_header
87
      - $ref: "../swagger.yaml#/parameters/request_id_header"
89
      - $ref: ../swagger.yaml#/parameters/request_id_header
88
    produces:
89
      - application/json
90
    responses:
90
    responses:
91
      "200":
91
      200:
92
        description: A list of holds
92
        description: A list of holds
93
        schema:
93
        schema:
94
          $ref: "../swagger.yaml#/definitions/holds"
94
          $ref: ../swagger.yaml#/definitions/holds
95
      "401":
95
      401:
96
        description: Authentication required
96
        description: Authentication required
97
        schema:
97
        schema:
98
          $ref: "../swagger.yaml#/definitions/error"
98
          $ref: ../swagger.yaml#/definitions/error
99
      "403":
99
      403:
100
        description: Hold not allowed
100
        description: Hold not allowed
101
        schema:
101
        schema:
102
          $ref: "../swagger.yaml#/definitions/error"
102
          $ref: ../swagger.yaml#/definitions/error
103
      "404":
103
      404:
104
        description: Borrower not found
104
        description: Borrower not found
105
        schema:
105
        schema:
106
          $ref: "../swagger.yaml#/definitions/error"
106
          $ref: ../swagger.yaml#/definitions/error
107
      "500":
107
      500:
108
        description: |
108
        description: |
109
          Internal server error. Possible `error_code` attribute values:
109
          Internal server error. Possible `error_code` attribute values:
110
110
          
111
          * `internal_server_error`
111
          * `internal_server_error`
112
        schema:
112
        schema:
113
          $ref: "../swagger.yaml#/definitions/error"
113
          $ref: ../swagger.yaml#/definitions/error
114
      "503":
114
      503:
115
        description: Under maintenance
115
        description: Under maintenance
116
        schema:
116
        schema:
117
          $ref: "../swagger.yaml#/definitions/error"
117
          $ref: ../swagger.yaml#/definitions/error
118
    x-koha-authorization:
118
    x-koha-authorization:
119
      permissions:
119
      permissions:
120
        borrowers: edit_borrowers
120
        borrowers: edit_borrowers
Lines 124-170 Link Here
124
    tags:
124
    tags:
125
      - holds
125
      - holds
126
    summary: Place hold
126
    summary: Place hold
127
    produces:
128
      - application/json
127
    parameters:
129
    parameters:
128
      - name: body
130
      - description: A JSON object containing informations about the new hold
129
        in: body
131
        in: body
130
        description: A JSON object containing informations about the new hold
132
        name: body
131
        required: true
133
        required: true
132
        schema:
134
        schema:
133
          type: object
135
          additionalProperties: false
134
          properties:
136
          properties:
135
            patron_id:
136
              description: Internal patron identifier
137
              type: integer
138
            biblio_id:
137
            biblio_id:
139
              description: Internal biblio identifier
138
              description: Internal biblio identifier
140
              type:
139
              type:
141
                - integer
140
                - integer
142
                - "null"
141
                - "null"
142
            expiration_date:
143
              description: Hold end date
144
              format: date
145
              type:
146
                - string
147
                - "null"
143
            hold_date:
148
            hold_date:
144
              description: The date the hold was placed
149
              description: The date the hold was placed
150
              format: date
145
              type:
151
              type:
146
                - string
152
                - string
147
                - "null"
153
                - "null"
148
              format: date
149
            item_id:
154
            item_id:
150
              description: Internal item identifier
155
              description: Internal item identifier
151
              type:
156
              type:
152
                - integer
157
                - integer
153
                - "null"
158
                - "null"
154
            pickup_library_id:
155
              description: Internal library identifier for the pickup library
156
              type: string
157
            expiration_date:
158
              description: Hold end date
159
              type:
160
                - string
161
                - "null"
162
              format: date
163
            notes:
164
              description: Notes related to this hold
165
              type:
166
                - string
167
                - "null"
168
            item_type:
159
            item_type:
169
              description: Limit hold on one itemtype (ignored for item-level holds)
160
              description: Limit hold on one itemtype (ignored for item-level holds)
170
              type:
161
              type:
Lines 175-679 Link Here
175
              type:
166
              type:
176
                - boolean
167
                - boolean
177
                - "null"
168
                - "null"
169
            notes:
170
              description: Notes related to this hold
171
              type:
172
                - string
173
                - "null"
174
            patron_id:
175
              description: Internal patron identifier
176
              type: integer
177
            pickup_library_id:
178
              description: Internal library identifier for the pickup library
179
              type: string
178
          required:
180
          required:
179
            - patron_id
181
            - patron_id
180
            - pickup_library_id
182
            - pickup_library_id
181
          additionalProperties: false
183
          type: object
182
      - name: x-koha-override
184
      - description: 'Comma-separated list of overrides (valid values: any)'
183
        description: "Comma-separated list of overrides (valid values: any)"
184
        in: header
185
        in: header
185
        type: string
186
        name: x-koha-override
186
        required: false
187
        required: false
187
    consumes:
188
        type: string
188
      - application/json
189
    produces:
190
      - application/json
191
    responses:
189
    responses:
192
      "201":
190
      201:
193
        description: Created hold
191
        description: Created hold
194
        schema:
192
        schema:
195
          $ref: "../swagger.yaml#/definitions/hold"
193
          $ref: ../swagger.yaml#/definitions/hold
196
      "400":
194
      400:
197
        description: Missing or wrong parameters
195
        description: Missing or wrong parameters
198
        schema:
196
        schema:
199
          $ref: "../swagger.yaml#/definitions/error"
197
          $ref: ../swagger.yaml#/definitions/error
200
      "401":
198
      401:
201
        description: Authentication required
199
        description: Authentication required
202
        schema:
200
        schema:
203
          $ref: "../swagger.yaml#/definitions/error"
201
          $ref: ../swagger.yaml#/definitions/error
204
      "403":
202
      403:
205
        description: Hold not allowed
203
        description: Hold not allowed
206
        schema:
204
        schema:
207
          $ref: "../swagger.yaml#/definitions/error"
205
          $ref: ../swagger.yaml#/definitions/error
208
      "404":
206
      404:
209
        description: Borrower not found
207
        description: Borrower not found
210
        schema:
208
        schema:
211
          $ref: "../swagger.yaml#/definitions/error"
209
          $ref: ../swagger.yaml#/definitions/error
212
      "500":
210
      500:
213
        description: |
211
        description: |
214
          Internal server error. Possible `error_code` attribute values:
212
          Internal server error. Possible `error_code` attribute values:
215
213
          
216
          * `internal_server_error`
214
          * `internal_server_error`
217
        schema:
215
        schema:
218
          $ref: "../swagger.yaml#/definitions/error"
216
          $ref: ../swagger.yaml#/definitions/error
219
      "503":
217
      503:
220
        description: Under maintenance
218
        description: Under maintenance
221
        schema:
219
        schema:
222
          $ref: "../swagger.yaml#/definitions/error"
220
          $ref: ../swagger.yaml#/definitions/error
223
    x-koha-authorization:
221
    x-koha-authorization:
224
      permissions:
222
      permissions:
225
        reserveforothers: "1"
223
        reserveforothers: 1
226
"/holds/{hold_id}":
224
    consumes:
225
      - application/json
226
'/holds/{hold_id}':
227
  delete:
228
    x-mojo-to: Holds#delete
229
    operationId: deleteHold
230
    tags:
231
      - holds
232
    summary: Cancel hold
233
    produces:
234
      - application/json
235
    parameters:
236
      - $ref: ../swagger.yaml#/parameters/hold_id_pp
237
    responses:
238
      204:
239
        description: Hold deleted
240
      401:
241
        description: Authentication required
242
        schema:
243
          $ref: ../swagger.yaml#/definitions/error
244
      403:
245
        description: Hold not allowed
246
        schema:
247
          $ref: ../swagger.yaml#/definitions/error
248
      404:
249
        description: Hold not found
250
        schema:
251
          $ref: ../swagger.yaml#/definitions/error
252
      500:
253
        description: |
254
          Internal server error. Possible `error_code` attribute values:
255
          
256
          * `internal_server_error`
257
        schema:
258
          $ref: ../swagger.yaml#/definitions/error
259
      503:
260
        description: Under maintenance
261
        schema:
262
          $ref: ../swagger.yaml#/definitions/error
263
    x-koha-authorization:
264
      permissions:
265
        reserveforothers: 1
227
  patch:
266
  patch:
228
    x-mojo-to: Holds#edit
267
    x-mojo-to: Holds#edit
229
    operationId: editHold
268
    operationId: editHold
230
    tags:
269
    tags:
231
      - holds
270
      - holds
232
    summary: Update hold
271
    summary: Update hold
272
    produces:
273
      - application/json
233
    parameters:
274
    parameters:
234
      - $ref: "../swagger.yaml#/parameters/hold_id_pp"
275
      - $ref: ../swagger.yaml#/parameters/hold_id_pp
235
      - name: body
276
      - description: A JSON object containing fields to modify
236
        in: body
277
        in: body
237
        description: A JSON object containing fields to modify
278
        name: body
238
        required: true
279
        required: true
239
        schema:
280
        schema:
240
          type: object
281
          additionalProperties: false
241
          properties:
282
          properties:
242
            priority:
243
              description: Position in waiting queue
244
              type: integer
245
              minimum: 1
246
            pickup_library_id:
283
            pickup_library_id:
247
              description: Internal library identifier for the pickup library
284
              description: Internal library identifier for the pickup library
248
              type: string
285
              type: string
286
            priority:
287
              description: Position in waiting queue
288
              minimum: 1
289
              type: integer
249
            suspended_until:
290
            suspended_until:
250
              description: Date until which the hold has been suspended
291
              description: Date until which the hold has been suspended
251
              type: string
252
              format: date-time
292
              format: date-time
253
          additionalProperties: false
293
              type: string
254
    consumes:
294
          type: object
255
      - application/json
256
    produces:
257
      - application/json
258
    responses:
295
    responses:
259
      "200":
296
      200:
260
        description: Updated hold
297
        description: Updated hold
261
        schema:
298
        schema:
262
          $ref: "../swagger.yaml#/definitions/hold"
299
          $ref: ../swagger.yaml#/definitions/hold
263
      "400":
300
      400:
264
        description: Missing or wrong parameters
301
        description: Missing or wrong parameters
265
        schema:
302
        schema:
266
          $ref: "../swagger.yaml#/definitions/error"
303
          $ref: ../swagger.yaml#/definitions/error
267
      "401":
304
      401:
268
        description: Authentication required
305
        description: Authentication required
269
        schema:
306
        schema:
270
          $ref: "../swagger.yaml#/definitions/error"
307
          $ref: ../swagger.yaml#/definitions/error
271
      "403":
308
      403:
272
        description: Hold not allowed
309
        description: Hold not allowed
273
        schema:
310
        schema:
274
          $ref: "../swagger.yaml#/definitions/error"
311
          $ref: ../swagger.yaml#/definitions/error
275
      "404":
312
      404:
276
        description: Hold not found
313
        description: Hold not found
277
        schema:
314
        schema:
278
          $ref: "../swagger.yaml#/definitions/error"
315
          $ref: ../swagger.yaml#/definitions/error
279
      "500":
316
      500:
280
        description: |
317
        description: |
281
          Internal server error. Possible `error_code` attribute values:
318
          Internal server error. Possible `error_code` attribute values:
282
319
          
283
          * `internal_server_error`
320
          * `internal_server_error`
284
        schema:
321
        schema:
285
          $ref: "../swagger.yaml#/definitions/error"
322
          $ref: ../swagger.yaml#/definitions/error
286
      "503":
323
      503:
287
        description: Under maintenance
324
        description: Under maintenance
288
        schema:
325
        schema:
289
          $ref: "../swagger.yaml#/definitions/error"
326
          $ref: ../swagger.yaml#/definitions/error
290
    x-koha-authorization:
327
    x-koha-authorization:
291
      permissions:
328
      permissions:
292
        reserveforothers: "1"
329
        reserveforothers: 1
330
    consumes:
331
      - application/json
293
  put:
332
  put:
294
    x-mojo-to: Holds#edit
333
    x-mojo-to: Holds#edit
295
    operationId: overwriteHold
334
    operationId: overwriteHold
296
    tags:
335
    tags:
297
      - holds
336
      - holds
298
    summary: Update hold
337
    summary: Update hold
299
    description: This route is being deprecated and will be removed in future releases.
338
    produces:
300
      Please migrate your project to use PATCH /holds/{hold_id} instead.
339
      - application/json
301
    parameters:
340
    parameters:
302
      - $ref: "../swagger.yaml#/parameters/hold_id_pp"
341
      - $ref: ../swagger.yaml#/parameters/hold_id_pp
303
      - name: body
342
      - description: A JSON object containing fields to modify
304
        in: body
343
        in: body
305
        description: A JSON object containing fields to modify
344
        name: body
306
        required: true
345
        required: true
307
        schema:
346
        schema:
308
          type: object
347
          additionalProperties: false
309
          properties:
348
          properties:
310
            priority:
311
              description: Position in waiting queue
312
              type: integer
313
              minimum: 1
314
            pickup_library_id:
349
            pickup_library_id:
315
              description: Internal library identifier for the pickup library
350
              description: Internal library identifier for the pickup library
316
              type: string
351
              type: string
352
            priority:
353
              description: Position in waiting queue
354
              minimum: 1
355
              type: integer
317
            suspended_until:
356
            suspended_until:
318
              description: Date until which the hold has been suspended
357
              description: Date until which the hold has been suspended
319
              type: string
320
              format: date-time
358
              format: date-time
321
          additionalProperties: false
359
              type: string
322
    consumes:
360
          type: object
323
      - application/json
324
    produces:
325
      - application/json
326
    responses:
361
    responses:
327
      "200":
362
      200:
328
        description: Updated hold
363
        description: Updated hold
329
        schema:
364
        schema:
330
          $ref: "../swagger.yaml#/definitions/hold"
365
          $ref: ../swagger.yaml#/definitions/hold
331
      "400":
366
      400:
332
        description: Missing or wrong parameters
367
        description: Missing or wrong parameters
333
        schema:
368
        schema:
334
          $ref: "../swagger.yaml#/definitions/error"
369
          $ref: ../swagger.yaml#/definitions/error
335
      "401":
370
      401:
336
        description: Authentication required
371
        description: Authentication required
337
        schema:
372
        schema:
338
          $ref: "../swagger.yaml#/definitions/error"
373
          $ref: ../swagger.yaml#/definitions/error
339
      "403":
374
      403:
340
        description: Hold not allowed
375
        description: Hold not allowed
341
        schema:
376
        schema:
342
          $ref: "../swagger.yaml#/definitions/error"
377
          $ref: ../swagger.yaml#/definitions/error
343
      "404":
378
      404:
344
        description: Hold not found
379
        description: Hold not found
345
        schema:
380
        schema:
346
          $ref: "../swagger.yaml#/definitions/error"
381
          $ref: ../swagger.yaml#/definitions/error
347
      "500":
382
      500:
348
        description: |
383
        description: |
349
          Internal server error. Possible `error_code` attribute values:
384
          Internal server error. Possible `error_code` attribute values:
350
385
          
351
          * `internal_server_error`
386
          * `internal_server_error`
352
        schema:
387
        schema:
353
          $ref: "../swagger.yaml#/definitions/error"
388
          $ref: ../swagger.yaml#/definitions/error
354
      "503":
389
      503:
355
        description: Under maintenance
390
        description: Under maintenance
356
        schema:
391
        schema:
357
          $ref: "../swagger.yaml#/definitions/error"
392
          $ref: ../swagger.yaml#/definitions/error
358
    x-koha-authorization:
393
    x-koha-authorization:
359
      permissions:
394
      permissions:
360
        reserveforothers: "1"
395
        reserveforothers: 1
361
  delete:
396
    description: 'This route is being deprecated and will be removed in future releases. Please migrate your project to use PATCH /holds/{hold_id} instead.'
362
    x-mojo-to: Holds#delete
397
    consumes:
363
    operationId: deleteHold
398
      - application/json
399
'/holds/{hold_id}/pickup_location':
400
  put:
401
    x-mojo-to: Holds#update_pickup_location
402
    operationId: updateHoldPickupLocation
364
    tags:
403
    tags:
365
      - holds
404
      - holds
366
    summary: Cancel hold
405
    summary: Update pickup location for the hold
367
    parameters:
368
      - $ref: "../swagger.yaml#/parameters/hold_id_pp"
369
    produces:
406
    produces:
370
      - application/json
407
      - application/json
408
    parameters:
409
      - $ref: ../swagger.yaml#/parameters/hold_id_pp
410
      - description: Pickup location
411
        in: body
412
        name: body
413
        required: true
414
        schema:
415
          additionalProperties: false
416
          properties:
417
            pickup_library_id:
418
              description: Internal identifier for the pickup library
419
              type: string
420
          type: object
371
    responses:
421
    responses:
372
      "204":
422
      200:
373
        description: Hold deleted
423
        description: The new pickup location value for the hold
374
      "401":
424
        schema:
425
          type: object
426
          properties:
427
            pickup_library_id:
428
              description: Internal identifier for the pickup library
429
              type: string
430
          additionalProperties: false
431
      400:
432
        description: Missing or wrong parameters
433
        schema:
434
          $ref: ../swagger.yaml#/definitions/error
435
      401:
375
        description: Authentication required
436
        description: Authentication required
376
        schema:
437
        schema:
377
          $ref: "../swagger.yaml#/definitions/error"
438
          $ref: ../swagger.yaml#/definitions/error
378
      "403":
439
      403:
379
        description: Hold not allowed
440
        description: Access forbidden
380
        schema:
441
        schema:
381
          $ref: "../swagger.yaml#/definitions/error"
442
          $ref: ../swagger.yaml#/definitions/error
382
      "404":
443
      404:
383
        description: Hold not found
444
        description: Hold not found
384
        schema:
445
        schema:
385
          $ref: "../swagger.yaml#/definitions/error"
446
          $ref: ../swagger.yaml#/definitions/error
386
      "500":
447
      409:
387
        description: |
448
        description: Unable to perform action on hold
388
          Internal server error. Possible `error_code` attribute values:
449
        schema:
389
450
          $ref: ../swagger.yaml#/definitions/error
390
          * `internal_server_error`
451
      500:
452
        description: Internal error
391
        schema:
453
        schema:
392
          $ref: "../swagger.yaml#/definitions/error"
454
          $ref: ../swagger.yaml#/definitions/error
393
      "503":
455
      503:
394
        description: Under maintenance
456
        description: Under maintenance
395
        schema:
457
        schema:
396
          $ref: "../swagger.yaml#/definitions/error"
458
          $ref: ../swagger.yaml#/definitions/error
397
    x-koha-authorization:
459
    x-koha-authorization:
398
      permissions:
460
      permissions:
399
        reserveforothers: "1"
461
        reserveforothers: place_holds
400
"/holds/{hold_id}/priority":
462
    description: Set a new pickup location for the hold
401
  put:
463
'/holds/{hold_id}/pickup_locations':
402
    x-mojo-to: Holds#update_priority
464
  get:
403
    operationId: updateHoldPriority
465
    x-mojo-to: Holds#pickup_locations
466
    operationId: getHoldPickupLocations
404
    tags:
467
    tags:
405
      - holds
468
      - holds
406
    summary: Update priority for the hold
469
    summary: Get valid pickup locations for hold
407
    parameters:
408
      - $ref: "../swagger.yaml#/parameters/hold_id_pp"
409
      - name: body
410
        in: body
411
        description: An integer representing the new priority to be set for the hold
412
        required: true
413
        schema:
414
          type: integer
415
    produces:
470
    produces:
416
      - application/json
471
      - application/json
472
    parameters:
473
      - description: 'Comma-separated list of overrides (valid values: any)'
474
        in: header
475
        name: x-koha-override
476
        required: false
477
        type: string
478
      - $ref: ../swagger.yaml#/parameters/hold_id_pp
479
      - $ref: ../swagger.yaml#/parameters/match
480
      - $ref: ../swagger.yaml#/parameters/order_by
481
      - $ref: ../swagger.yaml#/parameters/page
482
      - $ref: ../swagger.yaml#/parameters/per_page
483
      - $ref: ../swagger.yaml#/parameters/q_param
484
      - $ref: ../swagger.yaml#/parameters/q_body
485
      - $ref: ../swagger.yaml#/parameters/q_header
486
      - $ref: ../swagger.yaml#/parameters/request_id_header
417
    responses:
487
    responses:
418
      "200":
488
      200:
419
        description: The new priority value for the hold
489
        description: Hold pickup location
420
        schema:
490
        schema:
421
          type: integer
491
          type: array
422
      "401":
492
          items:
423
        description: Authentication required
493
            $ref: ../swagger.yaml#/definitions/library
494
      400:
495
        description: Missing or wrong parameters
424
        schema:
496
        schema:
425
          $ref: "../swagger.yaml#/definitions/error"
497
          $ref: ../swagger.yaml#/definitions/error
426
      "403":
498
      401:
427
        description: Access forbidden
499
        description: Authentication required
428
        schema:
500
        schema:
429
          $ref: "../swagger.yaml#/definitions/error"
501
          $ref: ../swagger.yaml#/definitions/error
430
      "404":
502
      403:
431
        description: Biblio not found
503
        description: Hold pickup location list not allowed
432
        schema:
504
        schema:
433
          $ref: "../swagger.yaml#/definitions/error"
505
          $ref: ../swagger.yaml#/definitions/error
434
      "409":
506
      404:
435
        description: Unable to perform action on biblio
507
        description: Hold not found
436
        schema:
508
        schema:
437
          $ref: "../swagger.yaml#/definitions/error"
509
          $ref: ../swagger.yaml#/definitions/error
438
      "500":
510
      500:
439
        description: |
511
        description: |
440
          Internal server error. Possible `error_code` attribute values:
512
          Internal server error. Possible `error_code` attribute values:
441
513
          
442
          * `internal_server_error`
514
          * `internal_server_error`
443
        schema:
515
        schema:
444
          $ref: "../swagger.yaml#/definitions/error"
516
          $ref: ../swagger.yaml#/definitions/error
445
      "503":
517
      503:
446
        description: Under maintenance
518
        description: Under maintenance
447
        schema:
519
        schema:
448
          $ref: "../swagger.yaml#/definitions/error"
520
          $ref: ../swagger.yaml#/definitions/error
449
    x-koha-authorization:
521
    x-koha-authorization:
450
      permissions:
522
      permissions:
451
        reserveforothers: modify_holds_priority
523
        reserveforothers: place_holds
452
"/holds/{hold_id}/suspension":
524
'/holds/{hold_id}/priority':
453
  post:
525
  put:
454
    x-mojo-to: Holds#suspend
526
    x-mojo-to: Holds#update_priority
455
    operationId: suspendHold
527
    operationId: updateHoldPriority
456
    tags:
528
    tags:
457
      - holds
529
      - holds
458
    summary: Suspend the hold
530
    summary: Update priority for the hold
531
    produces:
532
      - application/json
459
    parameters:
533
    parameters:
460
      - $ref: "../swagger.yaml#/parameters/hold_id_pp"
534
      - $ref: ../swagger.yaml#/parameters/hold_id_pp
461
      - name: body
535
      - description: An integer representing the new priority to be set for the hold
462
        in: body
536
        in: body
463
        description: A JSON object containing fields to modify
537
        name: body
464
        required: false
538
        required: true
465
        schema:
539
        schema:
466
          type: object
540
          type: integer
467
          properties:
468
            end_date:
469
              description: Date the hold suspension expires
470
              type: string
471
              format: date
472
          additionalProperties: false
473
    consumes:
474
      - application/json
475
    produces:
476
      - application/json
477
    responses:
541
    responses:
478
      "201":
542
      200:
479
        description: Hold suspended
543
        description: The new priority value for the hold
480
      "400":
481
        description: Missing or wrong parameters
482
        schema:
544
        schema:
483
          $ref: "../swagger.yaml#/definitions/error"
545
          type: integer
484
      "401":
546
      401:
485
        description: Authentication required
547
        description: Authentication required
486
        schema:
548
        schema:
487
          $ref: "../swagger.yaml#/definitions/error"
549
          $ref: ../swagger.yaml#/definitions/error
488
      "403":
550
      403:
489
        description: Hold not allowed
551
        description: Access forbidden
490
        schema:
552
        schema:
491
          $ref: "../swagger.yaml#/definitions/error"
553
          $ref: ../swagger.yaml#/definitions/error
492
      "404":
554
      404:
493
        description: Hold not found
555
        description: Biblio not found
494
        schema:
556
        schema:
495
          $ref: "../swagger.yaml#/definitions/error"
557
          $ref: ../swagger.yaml#/definitions/error
496
      "500":
558
      409:
559
        description: Unable to perform action on biblio
560
        schema:
561
          $ref: ../swagger.yaml#/definitions/error
562
      500:
497
        description: |
563
        description: |
498
          Internal server error. Possible `error_code` attribute values:
564
          Internal server error. Possible `error_code` attribute values:
499
565
          
500
          * `internal_server_error`
566
          * `internal_server_error`
501
        schema:
567
        schema:
502
          $ref: "../swagger.yaml#/definitions/error"
568
          $ref: ../swagger.yaml#/definitions/error
503
      "503":
569
      503:
504
        description: Under maintenance
570
        description: Under maintenance
505
        schema:
571
        schema:
506
          $ref: "../swagger.yaml#/definitions/error"
572
          $ref: ../swagger.yaml#/definitions/error
507
    x-koha-authorization:
573
    x-koha-authorization:
508
      permissions:
574
      permissions:
509
        reserveforothers: "1"
575
        reserveforothers: modify_holds_priority
576
'/holds/{hold_id}/suspension':
510
  delete:
577
  delete:
511
    x-mojo-to: Holds#resume
578
    x-mojo-to: Holds#resume
512
    operationId: resumeHold
579
    operationId: resumeHold
513
    tags:
580
    tags:
514
      - holds
581
      - holds
515
    summary: Resume hold
582
    summary: Resume hold
516
    parameters:
517
      - $ref: "../swagger.yaml#/parameters/hold_id_pp"
518
    consumes:
519
      - application/json
520
    produces:
583
    produces:
521
      - application/json
584
      - application/json
585
    parameters:
586
      - $ref: ../swagger.yaml#/parameters/hold_id_pp
522
    responses:
587
    responses:
523
      "204":
588
      204:
524
        description: Hold resumed
589
        description: Hold resumed
525
      "400":
590
      400:
526
        description: Missing or wrong parameters
591
        description: Missing or wrong parameters
527
        schema:
592
        schema:
528
          $ref: "../swagger.yaml#/definitions/error"
593
          $ref: ../swagger.yaml#/definitions/error
529
      "401":
594
      401:
530
        description: Authentication required
595
        description: Authentication required
531
        schema:
596
        schema:
532
          $ref: "../swagger.yaml#/definitions/error"
597
          $ref: ../swagger.yaml#/definitions/error
533
      "403":
598
      403:
534
        description: Hold not allowed
599
        description: Hold not allowed
535
        schema:
600
        schema:
536
          $ref: "../swagger.yaml#/definitions/error"
601
          $ref: ../swagger.yaml#/definitions/error
537
      "404":
602
      404:
538
        description: Hold not found
603
        description: Hold not found
539
        schema:
604
        schema:
540
          $ref: "../swagger.yaml#/definitions/error"
605
          $ref: ../swagger.yaml#/definitions/error
541
      "500":
606
      500:
542
        description: |
607
        description: |
543
          Internal server error. Possible `error_code` attribute values:
608
          Internal server error. Possible `error_code` attribute values:
544
609
          
545
          * `internal_server_error`
610
          * `internal_server_error`
546
        schema:
611
        schema:
547
          $ref: "../swagger.yaml#/definitions/error"
612
          $ref: ../swagger.yaml#/definitions/error
548
      "503":
613
      503:
549
        description: Under maintenance
614
        description: Under maintenance
550
        schema:
615
        schema:
551
          $ref: "../swagger.yaml#/definitions/error"
616
          $ref: ../swagger.yaml#/definitions/error
552
    x-koha-authorization:
617
    x-koha-authorization:
553
      permissions:
618
      permissions:
554
        reserveforothers: "1"
619
        reserveforothers: 1
555
"/holds/{hold_id}/pickup_locations":
620
    consumes:
556
  get:
621
      - application/json
557
    x-mojo-to: Holds#pickup_locations
622
  post:
558
    operationId: getHoldPickupLocations
623
    x-mojo-to: Holds#suspend
624
    operationId: suspendHold
559
    tags:
625
    tags:
560
      - holds
626
      - holds
561
    summary: Get valid pickup locations for hold
627
    summary: Suspend the hold
562
    parameters:
563
      - name: x-koha-override
564
        description: "Comma-separated list of overrides (valid values: any)"
565
        in: header
566
        type: string
567
        required: false
568
      - $ref: "../swagger.yaml#/parameters/hold_id_pp"
569
      - $ref: "../swagger.yaml#/parameters/match"
570
      - $ref: "../swagger.yaml#/parameters/order_by"
571
      - $ref: "../swagger.yaml#/parameters/page"
572
      - $ref: "../swagger.yaml#/parameters/per_page"
573
      - $ref: "../swagger.yaml#/parameters/q_param"
574
      - $ref: "../swagger.yaml#/parameters/q_body"
575
      - $ref: "../swagger.yaml#/parameters/q_header"
576
      - $ref: "../swagger.yaml#/parameters/request_id_header"
577
    produces:
628
    produces:
578
      - application/json
629
      - application/json
579
    responses:
580
      "200":
581
        description: Hold pickup location
582
        schema:
583
          type: array
584
          items:
585
            $ref: "../swagger.yaml#/definitions/library"
586
      "400":
587
        description: Missing or wrong parameters
588
        schema:
589
          $ref: "../swagger.yaml#/definitions/error"
590
      "401":
591
        description: Authentication required
592
        schema:
593
          $ref: "../swagger.yaml#/definitions/error"
594
      "403":
595
        description: Hold pickup location list not allowed
596
        schema:
597
          $ref: "../swagger.yaml#/definitions/error"
598
      "404":
599
        description: Hold not found
600
        schema:
601
          $ref: "../swagger.yaml#/definitions/error"
602
      "500":
603
        description: |
604
          Internal server error. Possible `error_code` attribute values:
605
606
          * `internal_server_error`
607
        schema:
608
          $ref: "../swagger.yaml#/definitions/error"
609
      "503":
610
        description: Under maintenance
611
        schema:
612
          $ref: "../swagger.yaml#/definitions/error"
613
    x-koha-authorization:
614
      permissions:
615
        reserveforothers: place_holds
616
"/holds/{hold_id}/pickup_location":
617
  put:
618
    x-mojo-to: Holds#update_pickup_location
619
    operationId: updateHoldPickupLocation
620
    tags:
621
      - holds
622
    summary: Update pickup location for the hold
623
    description: Set a new pickup location for the hold
624
    parameters:
630
    parameters:
625
      - $ref: "../swagger.yaml#/parameters/hold_id_pp"
631
      - $ref: ../swagger.yaml#/parameters/hold_id_pp
626
      - name: body
632
      - description: A JSON object containing fields to modify
627
        in: body
633
        in: body
628
        description: Pickup location
634
        name: body
629
        required: true
635
        required: false
630
        schema:
636
        schema:
631
          type: object
632
          properties:
633
            pickup_library_id:
634
              type: string
635
              description: Internal identifier for the pickup library
636
          additionalProperties: false
637
          additionalProperties: false
637
    produces:
638
      - application/json
639
    responses:
640
      "200":
641
        description: The new pickup location value for the hold
642
        schema:
643
          type: object
644
          properties:
638
          properties:
645
            pickup_library_id:
639
            end_date:
640
              description: Date the hold suspension expires
641
              format: date
646
              type: string
642
              type: string
647
              description: Internal identifier for the pickup library
643
          type: object
648
          additionalProperties: false
644
    responses:
649
      "400":
645
      201:
646
        description: Hold suspended
647
      400:
650
        description: Missing or wrong parameters
648
        description: Missing or wrong parameters
651
        schema:
649
        schema:
652
          $ref: "../swagger.yaml#/definitions/error"
650
          $ref: ../swagger.yaml#/definitions/error
653
      "401":
651
      401:
654
        description: Authentication required
652
        description: Authentication required
655
        schema:
653
        schema:
656
          $ref: "../swagger.yaml#/definitions/error"
654
          $ref: ../swagger.yaml#/definitions/error
657
      "403":
655
      403:
658
        description: Access forbidden
656
        description: Hold not allowed
659
        schema:
657
        schema:
660
          $ref: "../swagger.yaml#/definitions/error"
658
          $ref: ../swagger.yaml#/definitions/error
661
      "404":
659
      404:
662
        description: Hold not found
660
        description: Hold not found
663
        schema:
661
        schema:
664
          $ref: "../swagger.yaml#/definitions/error"
662
          $ref: ../swagger.yaml#/definitions/error
665
      "409":
663
      500:
666
        description: Unable to perform action on hold
664
        description: |
667
        schema:
665
          Internal server error. Possible `error_code` attribute values:
668
          $ref: "../swagger.yaml#/definitions/error"
666
          
669
      "500":
667
          * `internal_server_error`
670
        description: Internal error
671
        schema:
668
        schema:
672
          $ref: "../swagger.yaml#/definitions/error"
669
          $ref: ../swagger.yaml#/definitions/error
673
      "503":
670
      503:
674
        description: Under maintenance
671
        description: Under maintenance
675
        schema:
672
        schema:
676
          $ref: "../swagger.yaml#/definitions/error"
673
          $ref: ../swagger.yaml#/definitions/error
677
    x-koha-authorization:
674
    x-koha-authorization:
678
      permissions:
675
      permissions:
679
        reserveforothers: place_holds
676
        reserveforothers: 1
677
    consumes:
678
      - application/json
(-)a/api/v1/swagger/paths/ill_backends.yaml (-34 / +34 lines)
Lines 6-88 Link Here
6
    tags:
6
    tags:
7
      - illbackends
7
      - illbackends
8
    summary: List ILL backends
8
    summary: List ILL backends
9
    parameters: []
10
    produces:
9
    produces:
11
      - application/json
10
      - application/json
11
    parameters: []
12
    responses:
12
    responses:
13
      "200":
13
      200:
14
        description: A list of ILL backends
14
        description: A list of ILL backends
15
        schema:
15
        schema:
16
          $ref: "../swagger.yaml#/definitions/ill_backends"
16
          $ref: ../swagger.yaml#/definitions/ill_backends
17
      "401":
17
      401:
18
        description: Authentication required
18
        description: Authentication required
19
        schema:
19
        schema:
20
          $ref: "../swagger.yaml#/definitions/error"
20
          $ref: ../swagger.yaml#/definitions/error
21
      "403":
21
      403:
22
        description: Access forbidden
22
        description: Access forbidden
23
        schema:
23
        schema:
24
          $ref: "../swagger.yaml#/definitions/error"
24
          $ref: ../swagger.yaml#/definitions/error
25
      "404":
25
      404:
26
        description: ILL backends not found
26
        description: ILL backends not found
27
        schema:
27
        schema:
28
          $ref: "../swagger.yaml#/definitions/error"
28
          $ref: ../swagger.yaml#/definitions/error
29
      "500":
29
      500:
30
        description: |
30
        description: |
31
          Internal server error. Possible `error_code` attribute values:
31
          Internal server error. Possible `error_code` attribute values:
32
32
          
33
          * `internal_server_error`
33
          * `internal_server_error`
34
        schema:
34
        schema:
35
          $ref: "../swagger.yaml#/definitions/error"
35
          $ref: ../swagger.yaml#/definitions/error
36
      "503":
36
      503:
37
        description: Under maintenance
37
        description: Under maintenance
38
        schema:
38
        schema:
39
          $ref: "../swagger.yaml#/definitions/error"
39
          $ref: ../swagger.yaml#/definitions/error
40
    x-koha-authorization:
40
    x-koha-authorization:
41
      permissions:
41
      permissions:
42
        ill: "1"
42
        ill: 1
43
"/ill_backends/{ill_backend_id}":
43
'/ill_backends/{ill_backend_id}':
44
  get:
44
  get:
45
    x-mojo-to: Illbackends#get
45
    x-mojo-to: Illbackends#get
46
    operationId: getIllbackends
46
    operationId: getIllbackends
47
    tags:
47
    tags:
48
      - illbackends
48
      - illbackends
49
    summary: Get ILL backend
49
    summary: Get ILL backend
50
    produces:
51
      - application/json
50
    parameters:
52
    parameters:
51
      - name: ill_backend_id
53
      - description: ILL backend id/name
52
        in: path
54
        in: path
53
        description: ILL backend id/name
55
        name: ill_backend_id
54
        required: true
56
        required: true
55
        type: string
57
        type: string
56
    produces:
57
      - application/json
58
    responses:
58
    responses:
59
      "200":
59
      200:
60
        description: An ILL backends
60
        description: An ILL backends
61
        schema:
61
        schema:
62
          $ref: "../swagger.yaml#/definitions/ill_backend"
62
          $ref: ../swagger.yaml#/definitions/ill_backend
63
      "401":
63
      401:
64
        description: Authentication required
64
        description: Authentication required
65
        schema:
65
        schema:
66
          $ref: "../swagger.yaml#/definitions/error"
66
          $ref: ../swagger.yaml#/definitions/error
67
      "403":
67
      403:
68
        description: Access forbidden
68
        description: Access forbidden
69
        schema:
69
        schema:
70
          $ref: "../swagger.yaml#/definitions/error"
70
          $ref: ../swagger.yaml#/definitions/error
71
      "404":
71
      404:
72
        description: ILL backends not found
72
        description: ILL backends not found
73
        schema:
73
        schema:
74
          $ref: "../swagger.yaml#/definitions/error"
74
          $ref: ../swagger.yaml#/definitions/error
75
      "500":
75
      500:
76
        description: |
76
        description: |
77
          Internal server error. Possible `error_code` attribute values:
77
          Internal server error. Possible `error_code` attribute values:
78
78
          
79
          * `internal_server_error`
79
          * `internal_server_error`
80
        schema:
80
        schema:
81
          $ref: "../swagger.yaml#/definitions/error"
81
          $ref: ../swagger.yaml#/definitions/error
82
      "503":
82
      503:
83
        description: Under maintenance
83
        description: Under maintenance
84
        schema:
84
        schema:
85
          $ref: "../swagger.yaml#/definitions/error"
85
          $ref: ../swagger.yaml#/definitions/error
86
    x-koha-authorization:
86
    x-koha-authorization:
87
      permissions:
87
      permissions:
88
        ill: "1"
88
        ill: 1
(-)a/api/v1/swagger/paths/illrequests.yaml (-51 / +51 lines)
Lines 6-20 Link Here
6
    tags:
6
    tags:
7
      - illrequests
7
      - illrequests
8
    summary: List ILL requests
8
    summary: List ILL requests
9
    produces:
10
      - application/json
9
    parameters:
11
    parameters:
10
      - name: embed
12
      - collectionFormat: csv
11
        in: query
12
        description: Additional objects that should be embedded in the response
13
        description: Additional objects that should be embedded in the response
13
        required: false
14
        in: query
14
        type: array
15
        collectionFormat: csv
16
        items:
15
        items:
17
          type: string
18
          enum:
16
          enum:
19
            - patron
17
            - patron
20
            - library
18
            - library
Lines 23-131 Link Here
23
            - requested_partners
21
            - requested_partners
24
            - comments
22
            - comments
25
            - status_alias
23
            - status_alias
26
      - name: backend
24
          type: string
25
        name: embed
26
        required: false
27
        type: array
28
      - description: The name of a ILL backend
27
        in: query
29
        in: query
28
        description: The name of a ILL backend
30
        name: backend
29
        required: false
31
        required: false
30
        type: string
32
        type: string
31
      - name: orderid
33
      - description: The order ID of a request
32
        in: query
34
        in: query
33
        description: The order ID of a request
35
        name: orderid
34
        required: false
36
        required: false
35
        type: string
37
        type: string
36
      - name: biblionumber
38
      - description: Internal biblio identifier
37
        in: query
39
        in: query
38
        description: Internal biblio identifier
40
        name: biblionumber
39
        required: false
41
        required: false
40
        type: integer
42
        type: integer
41
      - name: borrowernumber
43
      - description: Internal patron identifier
42
        in: query
44
        in: query
43
        description: Internal patron identifier
45
        name: borrowernumber
44
        required: false
46
        required: false
45
        type: integer
47
        type: integer
46
      - name: completed
48
      - description: The date the request was considered completed
47
        in: query
49
        in: query
48
        description: The date the request was considered completed
50
        name: completed
49
        required: false
51
        required: false
50
        type: string
52
        type: string
51
      - name: completed_formatted
53
      - description: The date the request was considered complete formatted
52
        in: query
54
        in: query
53
        description: The date the request was considered complete formatted
55
        name: completed_formatted
54
        required: false
56
        required: false
55
        type: string
57
        type: string
56
      - name: status
58
      - description: A full status string e.g. REQREV
57
        in: query
59
        in: query
58
        description: A full status string e.g. REQREV
60
        name: status
59
        required: false
61
        required: false
60
        type: string
62
        type: string
61
      - name: cost
63
      - description: The quoted cost of the request
62
        in: query
64
        in: query
63
        description: The quoted cost of the request
65
        name: cost
64
        required: false
66
        required: false
65
        type: number
67
        type: number
66
      - name: price_paid
68
      - description: The final cost of the request
67
        in: query
69
        in: query
68
        description: The final cost of the request
70
        name: price_paid
69
        required: false
71
        required: false
70
        type: number
72
        type: number
71
      - name: medium
73
      - description: The medium of the requested item
72
        in: query
74
        in: query
73
        description: The medium of the requested item
75
        name: medium
74
        required: false
76
        required: false
75
        type: string
77
        type: string
76
      - name: updated
78
      - description: The last updated date of the request
77
        in: query
79
        in: query
78
        description: The last updated date of the request
80
        name: updated
79
        required: false
81
        required: false
80
        type: string
82
        type: string
81
      - name: updated_formatted
83
      - description: The last updated date of the request formatted
82
        in: query
84
        in: query
83
        description: The last updated date of the request formatted
85
        name: updated_formatted
84
        required: false
86
        required: false
85
        type: string
87
        type: string
86
      - name: placed
88
      - description: The date the request was placed
87
        in: query
89
        in: query
88
        description: The date the request was placed
90
        name: placed
89
        required: false
91
        required: false
90
        type: string
92
        type: string
91
      - name: placed_formatted
93
      - description: The date the request was placed formatted
92
        in: query
94
        in: query
93
        description: The date the request was placed formatted
95
        name: placed_formatted
94
        required: false
96
        required: false
95
        type: string
97
        type: string
96
      - name: branchcode
98
      - description: Library ID
97
        in: query
99
        in: query
98
        description: Library ID
100
        name: branchcode
99
        required: false
101
        required: false
100
        type: string
102
        type: string
101
    produces:
102
      - application/json
103
    responses:
103
    responses:
104
      "200":
104
      200:
105
        description: A list of ILL requests
105
        description: A list of ILL requests
106
      "401":
106
      401:
107
        description: Authentication required
107
        description: Authentication required
108
        schema:
108
        schema:
109
          $ref: "../swagger.yaml#/definitions/error"
109
          $ref: ../swagger.yaml#/definitions/error
110
      "403":
110
      403:
111
        description: Access forbidden
111
        description: Access forbidden
112
        schema:
112
        schema:
113
          $ref: "../swagger.yaml#/definitions/error"
113
          $ref: ../swagger.yaml#/definitions/error
114
      "404":
114
      404:
115
        description: ILL requests not found
115
        description: ILL requests not found
116
        schema:
116
        schema:
117
          $ref: "../swagger.yaml#/definitions/error"
117
          $ref: ../swagger.yaml#/definitions/error
118
      "500":
118
      500:
119
        description: |
119
        description: |
120
          Internal server error. Possible `error_code` attribute values:
120
          Internal server error. Possible `error_code` attribute values:
121
121
          
122
          * `internal_server_error`
122
          * `internal_server_error`
123
        schema:
123
        schema:
124
          $ref: "../swagger.yaml#/definitions/error"
124
          $ref: ../swagger.yaml#/definitions/error
125
      "503":
125
      503:
126
        description: Under maintenance
126
        description: Under maintenance
127
        schema:
127
        schema:
128
          $ref: "../swagger.yaml#/definitions/error"
128
          $ref: ../swagger.yaml#/definitions/error
129
    x-koha-authorization:
129
    x-koha-authorization:
130
      permissions:
130
      permissions:
131
        ill: "1"
131
        ill: 1
(-)a/api/v1/swagger/paths/import_batch_profiles.yaml (-163 / +163 lines)
Lines 6-95 Link Here
6
    tags:
6
    tags:
7
      - batch_import_profiles
7
      - batch_import_profiles
8
    summary: List batch import profiles
8
    summary: List batch import profiles
9
    produces:
10
      - application/json
9
    parameters:
11
    parameters:
10
      - name: name
12
      - description: Search on profile's name
11
        in: query
13
        in: query
12
        description: Search on profile's name
14
        name: name
13
        required: false
15
        required: false
14
        type: string
16
        type: string
15
      - $ref: "../swagger.yaml#/parameters/match"
17
      - $ref: ../swagger.yaml#/parameters/match
16
      - $ref: "../swagger.yaml#/parameters/order_by"
18
      - $ref: ../swagger.yaml#/parameters/order_by
17
      - $ref: "../swagger.yaml#/parameters/page"
19
      - $ref: ../swagger.yaml#/parameters/page
18
      - $ref: "../swagger.yaml#/parameters/per_page"
20
      - $ref: ../swagger.yaml#/parameters/per_page
19
      - $ref: "../swagger.yaml#/parameters/q_param"
21
      - $ref: ../swagger.yaml#/parameters/q_param
20
      - $ref: "../swagger.yaml#/parameters/q_body"
22
      - $ref: ../swagger.yaml#/parameters/q_body
21
      - $ref: "../swagger.yaml#/parameters/q_header"
23
      - $ref: ../swagger.yaml#/parameters/q_header
22
      - $ref: "../swagger.yaml#/parameters/request_id_header"
24
      - $ref: ../swagger.yaml#/parameters/request_id_header
23
    consumes:
24
      - application/json
25
    produces:
26
      - application/json
27
    responses:
25
    responses:
28
      "200":
26
      200:
29
        description: A list of import batch profiles
27
        description: A list of import batch profiles
30
        schema:
28
        schema:
31
          $ref: "../swagger.yaml#/definitions/import_batch_profiles"
29
          $ref: ../swagger.yaml#/definitions/import_batch_profiles
32
      "401":
30
      401:
33
        description: Authentication required
31
        description: Authentication required
34
        schema:
32
        schema:
35
          $ref: "../swagger.yaml#/definitions/error"
33
          $ref: ../swagger.yaml#/definitions/error
36
      "403":
34
      403:
37
        description: Access forbidden
35
        description: Access forbidden
38
        schema:
36
        schema:
39
          $ref: "../swagger.yaml#/definitions/error"
37
          $ref: ../swagger.yaml#/definitions/error
40
      "500":
38
      500:
41
        description: |
39
        description: |
42
          Internal server error. Possible `error_code` attribute values:
40
          Internal server error. Possible `error_code` attribute values:
43
41
          
44
          * `internal_server_error`
42
          * `internal_server_error`
45
        schema:
43
        schema:
46
          $ref: "../swagger.yaml#/definitions/error"
44
          $ref: ../swagger.yaml#/definitions/error
47
      "503":
45
      503:
48
        description: Under maintenance
46
        description: Under maintenance
49
        schema:
47
        schema:
50
          $ref: "../swagger.yaml#/definitions/error"
48
          $ref: ../swagger.yaml#/definitions/error
51
    x-koha-authorization:
49
    x-koha-authorization:
52
      permissions:
50
      permissions:
53
        tools: stage_marc_import
51
        tools: stage_marc_import
52
    consumes:
53
      - application/json
54
  post:
54
  post:
55
    x-mojo-to: ImportBatchProfiles#add
55
    x-mojo-to: ImportBatchProfiles#add
56
    operationId: addImportBatchProfiles
56
    operationId: addImportBatchProfiles
57
    tags:
57
    tags:
58
      - batch_import_profiles
58
      - batch_import_profiles
59
    summary: Add batch import profile
59
    summary: Add batch import profile
60
    produces:
61
      - application/json
60
    parameters:
62
    parameters:
61
      - name: body
63
      - description: A JSON object containing a import batch profile
62
        in: body
64
        in: body
63
        description: A JSON object containing a import batch profile
65
        name: body
64
        required: true
66
        required: true
65
        schema:
67
        schema:
66
          type: object
68
          additionalProperties: false
67
          properties:
69
          properties:
68
            name:
70
            comments:
69
              description: name of this profile
71
              description: any comments added when the file was uploaded
70
              type: string
71
            matcher_id:
72
              description: the id of the match rule used (matchpoints.matcher_id)
73
              type:
72
              type:
74
                - integer
73
                - string
75
                - "null"
74
                - "null"
76
            template_id:
75
            encoding:
77
              description: the id of the marc modification template
76
              description: file encoding
78
              type:
77
              type:
79
                - integer
78
                - string
80
                - "null"
79
                - "null"
81
            overlay_action:
80
            format:
82
              description: how to handle duplicate records
81
              description: marc format
82
              type:
83
                - string
84
                - "null"
85
            item_action:
86
              description: what to do with item records
83
              type:
87
              type:
84
                - string
88
                - string
85
                - "null"
89
                - "null"
90
            matcher_id:
91
              description: the id of the match rule used (matchpoints.matcher_id)
92
              type:
93
                - integer
94
                - "null"
95
            name:
96
              description: name of this profile
97
              type: string
86
            nomatch_action:
98
            nomatch_action:
87
              description: how to handle records where no match is found
99
              description: how to handle records where no match is found
88
              type:
100
              type:
89
                - string
101
                - string
90
                - "null"
102
                - "null"
91
            item_action:
103
            overlay_action:
92
              description: what to do with item records
104
              description: how to handle duplicate records
93
              type:
105
              type:
94
                - string
106
                - string
95
                - "null"
107
                - "null"
Lines 103-204 Link Here
103
              type:
115
              type:
104
                - string
116
                - string
105
                - "null"
117
                - "null"
106
            encoding:
118
            template_id:
107
              description: file encoding
119
              description: the id of the marc modification template
108
              type:
109
                - string
110
                - "null"
111
            format:
112
              description: marc format
113
              type:
114
                - string
115
                - "null"
116
            comments:
117
              description: any comments added when the file was uploaded
118
              type:
120
              type:
119
                - string
121
                - integer
120
                - "null"
122
                - "null"
121
          additionalProperties: false
123
          type: object
122
    consumes:
123
      - application/json
124
    produces:
125
      - application/json
126
    responses:
124
    responses:
127
      "201":
125
      201:
128
        description: Created Profile
126
        description: Created Profile
129
        schema:
127
        schema:
130
          $ref: "../swagger.yaml#/definitions/import_batch_profile"
128
          $ref: ../swagger.yaml#/definitions/import_batch_profile
131
      "400":
129
      400:
132
        description: Missing or wrong parameters
130
        description: Missing or wrong parameters
133
        schema:
131
        schema:
134
          $ref: "../swagger.yaml#/definitions/error"
132
          $ref: ../swagger.yaml#/definitions/error
135
      "401":
133
      401:
136
        description: Authentication required
134
        description: Authentication required
137
        schema:
135
        schema:
138
          $ref: "../swagger.yaml#/definitions/error"
136
          $ref: ../swagger.yaml#/definitions/error
139
      "403":
137
      403:
140
        description: Hold not allowed
138
        description: Hold not allowed
141
        schema:
139
        schema:
142
          $ref: "../swagger.yaml#/definitions/error"
140
          $ref: ../swagger.yaml#/definitions/error
143
      "404":
141
      404:
144
        description: Borrower not found
142
        description: Borrower not found
145
        schema:
143
        schema:
146
          $ref: "../swagger.yaml#/definitions/error"
144
          $ref: ../swagger.yaml#/definitions/error
147
      "500":
145
      500:
146
        description: |
147
          Internal server error. Possible `error_code` attribute values:
148
          
149
          * `internal_server_error`
150
        schema:
151
          $ref: ../swagger.yaml#/definitions/error
152
      503:
153
        description: Under maintenance
154
        schema:
155
          $ref: ../swagger.yaml#/definitions/error
156
    x-koha-authorization:
157
      permissions:
158
        tools: stage_marc_import
159
    consumes:
160
      - application/json
161
'/import_batch_profiles/{import_batch_profile_id}':
162
  delete:
163
    x-mojo-to: ImportBatchProfiles#delete
164
    operationId: deleteImportBatchProfiles
165
    tags:
166
      - batch_import_profiles
167
    summary: Delete batch import profile
168
    produces:
169
      - application/json
170
    parameters:
171
      - $ref: ../swagger.yaml#/parameters/import_batch_profile_id_pp
172
    responses:
173
      204:
174
        description: Profile deleted
175
      401:
176
        description: Authentication required
177
        schema:
178
          $ref: ../swagger.yaml#/definitions/error
179
      403:
180
        description: Hold not allowed
181
        schema:
182
          $ref: ../swagger.yaml#/definitions/error
183
      404:
184
        description: Hold not found
185
        schema:
186
          $ref: ../swagger.yaml#/definitions/error
187
      500:
148
        description: |
188
        description: |
149
          Internal server error. Possible `error_code` attribute values:
189
          Internal server error. Possible `error_code` attribute values:
150
190
          
151
          * `internal_server_error`
191
          * `internal_server_error`
152
        schema:
192
        schema:
153
          $ref: "../swagger.yaml#/definitions/error"
193
          $ref: ../swagger.yaml#/definitions/error
154
      "503":
194
      503:
155
        description: Under maintenance
195
        description: Under maintenance
156
        schema:
196
        schema:
157
          $ref: "../swagger.yaml#/definitions/error"
197
          $ref: ../swagger.yaml#/definitions/error
158
    x-koha-authorization:
198
    x-koha-authorization:
159
      permissions:
199
      permissions:
160
        tools: stage_marc_import
200
        tools: stage_marc_import
161
"/import_batch_profiles/{import_batch_profile_id}":
162
  put:
201
  put:
163
    x-mojo-to: ImportBatchProfiles#edit
202
    x-mojo-to: ImportBatchProfiles#edit
164
    operationId: editImportBatchProfiles
203
    operationId: editImportBatchProfiles
165
    tags:
204
    tags:
166
      - batch_import_profiles
205
      - batch_import_profiles
167
    summary: Update batch import profile
206
    summary: Update batch import profile
207
    produces:
208
      - application/json
168
    parameters:
209
    parameters:
169
      - $ref: "../swagger.yaml#/parameters/import_batch_profile_id_pp"
210
      - $ref: ../swagger.yaml#/parameters/import_batch_profile_id_pp
170
      - name: body
211
      - description: A JSON object containing a import batch profile
171
        in: body
212
        in: body
172
        description: A JSON object containing a import batch profile
213
        name: body
173
        required: true
214
        required: true
174
        schema:
215
        schema:
175
          type: object
216
          additionalProperties: false
176
          properties:
217
          properties:
177
            name:
218
            comments:
178
              description: name of this profile
219
              description: any comments added when the file was uploaded
179
              type: string
180
            matcher_id:
181
              description: the id of the match rule used (matchpoints.matcher_id)
182
              type:
220
              type:
183
                - integer
221
                - string
184
                - "null"
222
                - "null"
185
            template_id:
223
            encoding:
186
              description: the id of the marc modification template
224
              description: file encoding
187
              type:
225
              type:
188
                - integer
226
                - string
189
                - "null"
227
                - "null"
190
            overlay_action:
228
            format:
191
              description: how to handle duplicate records
229
              description: marc format
230
              type:
231
                - string
232
                - "null"
233
            item_action:
234
              description: what to do with item records
192
              type:
235
              type:
193
                - string
236
                - string
194
                - "null"
237
                - "null"
238
            matcher_id:
239
              description: the id of the match rule used (matchpoints.matcher_id)
240
              type:
241
                - integer
242
                - "null"
243
            name:
244
              description: name of this profile
245
              type: string
195
            nomatch_action:
246
            nomatch_action:
196
              description: how to handle records where no match is found
247
              description: how to handle records where no match is found
197
              type:
248
              type:
198
                - string
249
                - string
199
                - "null"
250
                - "null"
200
            item_action:
251
            overlay_action:
201
              description: what to do with item records
252
              description: how to handle duplicate records
202
              type:
253
              type:
203
                - string
254
                - string
204
                - "null"
255
                - "null"
Lines 212-308 Link Here
212
              type:
263
              type:
213
                - string
264
                - string
214
                - "null"
265
                - "null"
215
            encoding:
266
            template_id:
216
              description: file encoding
267
              description: the id of the marc modification template
217
              type:
218
                - string
219
                - "null"
220
            format:
221
              description: marc format
222
              type:
223
                - string
224
                - "null"
225
            comments:
226
              description: any comments added when the file was uploaded
227
              type:
268
              type:
228
                - string
269
                - integer
229
                - "null"
270
                - "null"
230
          additionalProperties: false
271
          type: object
231
    consumes:
232
      - application/json
233
    produces:
234
      - application/json
235
    responses:
272
    responses:
236
      "200":
273
      200:
237
        description: Updated profile
274
        description: Updated profile
238
        schema:
275
        schema:
239
          $ref: "../swagger.yaml#/definitions/import_batch_profile"
276
          $ref: ../swagger.yaml#/definitions/import_batch_profile
240
      "400":
277
      400:
241
        description: Missing or wrong parameters
278
        description: Missing or wrong parameters
242
        schema:
279
        schema:
243
          $ref: "../swagger.yaml#/definitions/error"
280
          $ref: ../swagger.yaml#/definitions/error
244
      "401":
281
      401:
245
        description: Authentication required
282
        description: Authentication required
246
        schema:
283
        schema:
247
          $ref: "../swagger.yaml#/definitions/error"
284
          $ref: ../swagger.yaml#/definitions/error
248
      "403":
285
      403:
249
        description: Hold not allowed
286
        description: Hold not allowed
250
        schema:
287
        schema:
251
          $ref: "../swagger.yaml#/definitions/error"
288
          $ref: ../swagger.yaml#/definitions/error
252
      "404":
289
      404:
253
        description: Borrower not found
290
        description: Borrower not found
254
        schema:
291
        schema:
255
          $ref: "../swagger.yaml#/definitions/error"
292
          $ref: ../swagger.yaml#/definitions/error
256
      "500":
293
      500:
257
        description: |
294
        description: |
258
          Internal server error. Possible `error_code` attribute values:
295
          Internal server error. Possible `error_code` attribute values:
259
296
          
260
          * `internal_server_error`
297
          * `internal_server_error`
261
        schema:
298
        schema:
262
          $ref: "../swagger.yaml#/definitions/error"
299
          $ref: ../swagger.yaml#/definitions/error
263
      "503":
300
      503:
264
        description: Under maintenance
301
        description: Under maintenance
265
        schema:
302
        schema:
266
          $ref: "../swagger.yaml#/definitions/error"
303
          $ref: ../swagger.yaml#/definitions/error
267
    x-koha-authorization:
304
    x-koha-authorization:
268
      permissions:
305
      permissions:
269
        tools: stage_marc_import
306
        tools: stage_marc_import
270
  delete:
307
    consumes:
271
    x-mojo-to: ImportBatchProfiles#delete
272
    operationId: deleteImportBatchProfiles
273
    tags:
274
      - batch_import_profiles
275
    summary: Delete batch import profile
276
    parameters:
277
      - $ref: "../swagger.yaml#/parameters/import_batch_profile_id_pp"
278
    produces:
279
      - application/json
308
      - application/json
280
    responses:
281
      "204":
282
        description: Profile deleted
283
      "401":
284
        description: Authentication required
285
        schema:
286
          $ref: "../swagger.yaml#/definitions/error"
287
      "403":
288
        description: Hold not allowed
289
        schema:
290
          $ref: "../swagger.yaml#/definitions/error"
291
      "404":
292
        description: Hold not found
293
        schema:
294
          $ref: "../swagger.yaml#/definitions/error"
295
      "500":
296
        description: |
297
          Internal server error. Possible `error_code` attribute values:
298
299
          * `internal_server_error`
300
        schema:
301
          $ref: "../swagger.yaml#/definitions/error"
302
      "503":
303
        description: Under maintenance
304
        schema:
305
          $ref: "../swagger.yaml#/definitions/error"
306
    x-koha-authorization:
307
      permissions:
308
        tools: stage_marc_import
(-)a/api/v1/swagger/paths/items.yaml (-75 / +75 lines)
Lines 6-158 Link Here
6
    tags:
6
    tags:
7
      - items
7
      - items
8
    summary: List items
8
    summary: List items
9
    produces:
10
      - application/json
9
    parameters:
11
    parameters:
10
      - name: external_id
12
      - description: Search on the item's barcode
11
        in: query
13
        in: query
12
        description: Search on the item's barcode
14
        name: external_id
13
        required: false
15
        required: false
14
        type: string
16
        type: string
15
      - $ref: "../swagger.yaml#/parameters/match"
17
      - $ref: ../swagger.yaml#/parameters/match
16
      - $ref: "../swagger.yaml#/parameters/order_by"
18
      - $ref: ../swagger.yaml#/parameters/order_by
17
      - $ref: "../swagger.yaml#/parameters/page"
19
      - $ref: ../swagger.yaml#/parameters/page
18
      - $ref: "../swagger.yaml#/parameters/per_page"
20
      - $ref: ../swagger.yaml#/parameters/per_page
19
      - $ref: "../swagger.yaml#/parameters/q_param"
21
      - $ref: ../swagger.yaml#/parameters/q_param
20
      - $ref: "../swagger.yaml#/parameters/q_body"
22
      - $ref: ../swagger.yaml#/parameters/q_body
21
      - $ref: "../swagger.yaml#/parameters/q_header"
23
      - $ref: ../swagger.yaml#/parameters/q_header
22
      - $ref: "../swagger.yaml#/parameters/request_id_header"
24
      - $ref: ../swagger.yaml#/parameters/request_id_header
23
    consumes:
24
      - application/json
25
    produces:
26
      - application/json
27
    responses:
25
    responses:
28
      "200":
26
      200:
29
        description: A list of item
27
        description: A list of item
30
        schema:
28
        schema:
31
          type: array
29
          type: array
32
          items:
30
          items:
33
            $ref: "../swagger.yaml#/definitions/item"
31
            $ref: ../swagger.yaml#/definitions/item
34
      "401":
32
      401:
35
        description: Authentication required
33
        description: Authentication required
36
        schema:
34
        schema:
37
          $ref: "../swagger.yaml#/definitions/error"
35
          $ref: ../swagger.yaml#/definitions/error
38
      "403":
36
      403:
39
        description: Access forbidden
37
        description: Access forbidden
40
        schema:
38
        schema:
41
          $ref: "../swagger.yaml#/definitions/error"
39
          $ref: ../swagger.yaml#/definitions/error
42
      "500":
40
      500:
43
        description: |
41
        description: |
44
          Internal server error. Possible `error_code` attribute values:
42
          Internal server error. Possible `error_code` attribute values:
45
43
          
46
          * `internal_server_error`
44
          * `internal_server_error`
47
        schema:
45
        schema:
48
          $ref: "../swagger.yaml#/definitions/error"
46
          $ref: ../swagger.yaml#/definitions/error
49
      "503":
47
      503:
50
        description: Under maintenance
48
        description: Under maintenance
51
        schema:
49
        schema:
52
          $ref: "../swagger.yaml#/definitions/error"
50
          $ref: ../swagger.yaml#/definitions/error
53
    x-koha-authorization:
51
    x-koha-authorization:
54
      permissions:
52
      permissions:
55
        catalogue: "1"
53
        catalogue: 1
56
"/items/{item_id}":
54
    consumes:
55
      - application/json
56
'/items/{item_id}':
57
  get:
57
  get:
58
    x-mojo-to: Items#get
58
    x-mojo-to: Items#get
59
    operationId: getItem
59
    operationId: getItem
60
    tags:
60
    tags:
61
      - items
61
      - items
62
    summary: Get item
62
    summary: Get item
63
    parameters:
64
      - $ref: "../swagger.yaml#/parameters/item_id_pp"
65
    consumes:
66
      - application/json
67
    produces:
63
    produces:
68
      - application/json
64
      - application/json
65
    parameters:
66
      - $ref: ../swagger.yaml#/parameters/item_id_pp
69
    responses:
67
    responses:
70
      "200":
68
      200:
71
        description: An item
69
        description: An item
72
        schema:
70
        schema:
73
          $ref: "../swagger.yaml#/definitions/item"
71
          $ref: ../swagger.yaml#/definitions/item
74
      "400":
72
      400:
75
        description: Missing or wrong parameters
73
        description: Missing or wrong parameters
76
        schema:
74
        schema:
77
          $ref: "../swagger.yaml#/definitions/error"
75
          $ref: ../swagger.yaml#/definitions/error
78
      "404":
76
      404:
79
        description: Item not found
77
        description: Item not found
80
        schema:
78
        schema:
81
          $ref: "../swagger.yaml#/definitions/error"
79
          $ref: ../swagger.yaml#/definitions/error
82
      "500":
80
      500:
83
        description: |
81
        description: |
84
          Internal server error. Possible `error_code` attribute values:
82
          Internal server error. Possible `error_code` attribute values:
85
83
          
86
          * `internal_server_error`
84
          * `internal_server_error`
87
        schema:
85
        schema:
88
          $ref: "../swagger.yaml#/definitions/error"
86
          $ref: ../swagger.yaml#/definitions/error
89
      "503":
87
      503:
90
        description: Under maintenance
88
        description: Under maintenance
91
        schema:
89
        schema:
92
          $ref: "../swagger.yaml#/definitions/error"
90
          $ref: ../swagger.yaml#/definitions/error
93
    x-koha-authorization:
91
    x-koha-authorization:
94
      permissions:
92
      permissions:
95
        catalogue: "1"
93
        catalogue: 1
96
"/items/{item_id}/pickup_locations":
94
    consumes:
95
      - application/json
96
'/items/{item_id}/pickup_locations':
97
  get:
97
  get:
98
    x-mojo-to: Items#pickup_locations
98
    x-mojo-to: Items#pickup_locations
99
    operationId: getItemPickupLocations
99
    operationId: getItemPickupLocations
100
    summary: Get valid pickup locations for an item
101
    tags:
100
    tags:
102
      - items
101
      - items
102
    summary: Get valid pickup locations for an item
103
    produces:
104
      - application/json
103
    parameters:
105
    parameters:
104
      - $ref: "../swagger.yaml#/parameters/item_id_pp"
106
      - $ref: ../swagger.yaml#/parameters/item_id_pp
105
      - name: patron_id
107
      - description: Internal patron identifier
106
        in: query
108
        in: query
107
        description: Internal patron identifier
109
        name: patron_id
108
        required: true
110
        required: true
109
        type: integer
111
        type: integer
110
      - $ref: "../swagger.yaml#/parameters/match"
112
      - $ref: ../swagger.yaml#/parameters/match
111
      - $ref: "../swagger.yaml#/parameters/order_by"
113
      - $ref: ../swagger.yaml#/parameters/order_by
112
      - $ref: "../swagger.yaml#/parameters/page"
114
      - $ref: ../swagger.yaml#/parameters/page
113
      - $ref: "../swagger.yaml#/parameters/per_page"
115
      - $ref: ../swagger.yaml#/parameters/per_page
114
      - $ref: "../swagger.yaml#/parameters/q_param"
116
      - $ref: ../swagger.yaml#/parameters/q_param
115
      - $ref: "../swagger.yaml#/parameters/q_body"
117
      - $ref: ../swagger.yaml#/parameters/q_body
116
      - $ref: "../swagger.yaml#/parameters/q_header"
118
      - $ref: ../swagger.yaml#/parameters/q_header
117
      - $ref: "../swagger.yaml#/parameters/request_id_header"
119
      - $ref: ../swagger.yaml#/parameters/request_id_header
118
    consumes:
119
      - application/json
120
    produces:
121
      - application/json
122
    responses:
120
    responses:
123
      "200":
121
      200:
124
        description: Item pickup locations
122
        description: Item pickup locations
125
        schema:
123
        schema:
126
          type: array
124
          type: array
127
          items:
125
          items:
128
            $ref: "../swagger.yaml#/definitions/library"
126
            $ref: ../swagger.yaml#/definitions/library
129
      "400":
127
      400:
130
        description: Missing or wrong parameters
128
        description: Missing or wrong parameters
131
        schema:
129
        schema:
132
          $ref: "../swagger.yaml#/definitions/error"
130
          $ref: ../swagger.yaml#/definitions/error
133
      "401":
131
      401:
134
        description: Authentication required
132
        description: Authentication required
135
        schema:
133
        schema:
136
          $ref: "../swagger.yaml#/definitions/error"
134
          $ref: ../swagger.yaml#/definitions/error
137
      "403":
135
      403:
138
        description: Access forbidden
136
        description: Access forbidden
139
        schema:
137
        schema:
140
          $ref: "../swagger.yaml#/definitions/error"
138
          $ref: ../swagger.yaml#/definitions/error
141
      "404":
139
      404:
142
        description: Biblio not found
140
        description: Biblio not found
143
        schema:
141
        schema:
144
          $ref: "../swagger.yaml#/definitions/error"
142
          $ref: ../swagger.yaml#/definitions/error
145
      "500":
143
      500:
146
        description: |
144
        description: |
147
          Internal server error. Possible `error_code` attribute values:
145
          Internal server error. Possible `error_code` attribute values:
148
146
          
149
          * `internal_server_error`
147
          * `internal_server_error`
150
        schema:
148
        schema:
151
          $ref: "../swagger.yaml#/definitions/error"
149
          $ref: ../swagger.yaml#/definitions/error
152
      "503":
150
      503:
153
        description: Under maintenance
151
        description: Under maintenance
154
        schema:
152
        schema:
155
          $ref: "../swagger.yaml#/definitions/error"
153
          $ref: ../swagger.yaml#/definitions/error
156
    x-koha-authorization:
154
    x-koha-authorization:
157
      permissions:
155
      permissions:
158
        reserveforothers: place_holds
156
        reserveforothers: place_holds
157
    consumes:
158
      - application/json
(-)a/api/v1/swagger/paths/libraries.yaml (-189 / +189 lines)
Lines 6-138 Link Here
6
    tags:
6
    tags:
7
      - libraries
7
      - libraries
8
    summary: List libraries
8
    summary: List libraries
9
    produces:
10
      - application/json
9
    parameters:
11
    parameters:
10
      - name: name
12
      - description: Case insensitive 'starts-with' search on name
11
        in: query
13
        in: query
12
        description: Case insensitive 'starts-with' search on name
14
        name: name
13
        required: false
15
        required: false
14
        type: string
16
        type: string
15
      - name: address1
17
      - description: Case insensitive 'starts-with' search on address1
16
        in: query
18
        in: query
17
        description: Case insensitive 'starts-with' search on address1
19
        name: address1
18
        required: false
20
        required: false
19
        type: string
21
        type: string
20
      - name: address2
22
      - description: Case insensitive 'starts-with' search on address2
21
        in: query
23
        in: query
22
        description: Case insensitive 'starts-with' search on address2
24
        name: address2
23
        required: false
25
        required: false
24
        type: string
26
        type: string
25
      - name: address3
27
      - description: Case insensitive 'starts-with' search on address3
26
        in: query
28
        in: query
27
        description: Case insensitive 'starts-with' search on address3
29
        name: address3
28
        required: false
30
        required: false
29
        type: string
31
        type: string
30
      - name: postal_code
32
      - description: Case insensitive 'starts-with' search on postal code
31
        in: query
33
        in: query
32
        description: Case insensitive 'starts-with' search on postal code
34
        name: postal_code
33
        required: false
35
        required: false
34
        type: string
36
        type: string
35
      - name: city
37
      - description: Case insensitive 'starts-with' search on city
36
        in: query
38
        in: query
37
        description: Case insensitive 'starts-with' search on city
39
        name: city
38
        required: false
40
        required: false
39
        type: string
41
        type: string
40
      - name: state
42
      - description: Case insensitive 'starts-with' search on state
41
        in: query
43
        in: query
42
        description: Case insensitive 'starts-with' search on state
44
        name: state
43
        required: false
45
        required: false
44
        type: string
46
        type: string
45
      - name: country
47
      - description: Case insensitive 'starts_with' search on country
46
        in: query
48
        in: query
47
        description: Case insensitive 'starts_with' search on country
49
        name: country
48
        required: false
50
        required: false
49
        type: string
51
        type: string
50
      - name: phone
52
      - description: Case insensitive 'starts_with' search on phone number
51
        in: query
53
        in: query
52
        description: Case insensitive 'starts_with' search on phone number
54
        name: phone
53
        required: false
55
        required: false
54
        type: string
56
        type: string
55
      - name: fax
57
      - description: Case insensitive 'starts_with' search on fax number
56
        in: query
58
        in: query
57
        description: Case insensitive 'starts_with' search on fax number
59
        name: fax
58
        required: false
60
        required: false
59
        type: string
61
        type: string
60
      - name: email
62
      - description: Case insensitive 'starts_with' search on email address
61
        in: query
63
        in: query
62
        description: Case insensitive 'starts_with' search on email address
64
        name: email
63
        required: false
65
        required: false
64
        type: string
66
        type: string
65
      - name: reply_to_email
67
      - description: Case insensitive 'starts_with' search on Reply-To email address
66
        in: query
68
        in: query
67
        description: Case insensitive 'starts_with' search on Reply-To email address
69
        name: reply_to_email
68
        required: false
70
        required: false
69
        type: string
71
        type: string
70
      - name: return_path_email
72
      - description: Case insensitive 'starts_with' search on Return-Path email address
71
        in: query
73
        in: query
72
        description: Case insensitive 'starts_with' search on Return-Path email address
74
        name: return_path_email
73
        required: false
75
        required: false
74
        type: string
76
        type: string
75
      - name: url
77
      - description: Case insensitive 'starts_with' search on website URL
76
        in: query
78
        in: query
77
        description: Case insensitive 'starts_with' search on website URL
79
        name: url
78
        required: false
80
        required: false
79
        type: string
81
        type: string
80
      - name: ip
82
      - description: Case insensitive 'starts_with' search on IP address
81
        in: query
83
        in: query
82
        description: Case insensitive 'starts_with' search on IP address
84
        name: ip
83
        required: false
85
        required: false
84
        type: string
86
        type: string
85
      - name: notes
87
      - description: Case insensitive 'starts_with' search on notes
86
        in: query
88
        in: query
87
        description: Case insensitive 'starts_with' search on notes
89
        name: notes
88
        required: false
90
        required: false
89
        type: string
91
        type: string
90
      - name: opac_info
92
      - description: Case insensitive 'starts-with' search on OPAC info
91
        in: query
93
        in: query
92
        description: Case insensitive 'starts-with' search on OPAC info
94
        name: opac_info
93
        required: false
95
        required: false
94
        type: string
96
        type: string
95
      - $ref: "../swagger.yaml#/parameters/match"
97
      - $ref: ../swagger.yaml#/parameters/match
96
      - $ref: "../swagger.yaml#/parameters/order_by"
98
      - $ref: ../swagger.yaml#/parameters/order_by
97
      - $ref: "../swagger.yaml#/parameters/page"
99
      - $ref: ../swagger.yaml#/parameters/page
98
      - $ref: "../swagger.yaml#/parameters/per_page"
100
      - $ref: ../swagger.yaml#/parameters/per_page
99
      - $ref: "../swagger.yaml#/parameters/q_param"
101
      - $ref: ../swagger.yaml#/parameters/q_param
100
      - $ref: "../swagger.yaml#/parameters/q_body"
102
      - $ref: ../swagger.yaml#/parameters/q_body
101
      - $ref: "../swagger.yaml#/parameters/q_header"
103
      - $ref: ../swagger.yaml#/parameters/q_header
102
      - $ref: "../swagger.yaml#/parameters/request_id_header"
104
      - $ref: ../swagger.yaml#/parameters/request_id_header
103
      - name: x-koha-embed
105
      - collectionFormat: csv
104
        in: header
105
        required: false
106
        description: Embed list sent as a request header
106
        description: Embed list sent as a request header
107
        type: array
107
        in: header
108
        items:
108
        items:
109
          type: string
110
          enum:
109
          enum:
111
            - smtp_server
110
            - smtp_server
112
        collectionFormat: csv
111
          type: string
113
    produces:
112
        name: x-koha-embed
114
      - application/json
113
        required: false
114
        type: array
115
    responses:
115
    responses:
116
      "200":
116
      200:
117
        description: A list of libraries
117
        description: A list of libraries
118
        schema:
118
        schema:
119
          type: array
119
          type: array
120
          items:
120
          items:
121
            $ref: "../swagger.yaml#/definitions/library"
121
            $ref: ../swagger.yaml#/definitions/library
122
      "500":
122
      500:
123
        description: |
123
        description: |
124
          Internal server error. Possible `error_code` attribute values:
124
          Internal server error. Possible `error_code` attribute values:
125
125
          
126
          * `internal_server_error`
126
          * `internal_server_error`
127
        schema:
127
        schema:
128
          $ref: "../swagger.yaml#/definitions/error"
128
          $ref: ../swagger.yaml#/definitions/error
129
      "503":
129
      503:
130
        description: Under maintenance
130
        description: Under maintenance
131
        schema:
131
        schema:
132
          $ref: "../swagger.yaml#/definitions/error"
132
          $ref: ../swagger.yaml#/definitions/error
133
    x-koha-authorization:
133
    x-koha-authorization:
134
      permissions:
134
      permissions:
135
        catalogue: "1"
135
        catalogue: 1
136
    x-koha-embed:
136
    x-koha-embed:
137
      - smtp_server
137
      - smtp_server
138
  post:
138
  post:
Lines 141-223 Link Here
141
    tags:
141
    tags:
142
      - libraries
142
      - libraries
143
    summary: Add library
143
    summary: Add library
144
    produces:
145
      - application/json
144
    parameters:
146
    parameters:
145
      - name: body
147
      - description: A JSON object containing informations about the new library
146
        in: body
148
        in: body
147
        description: A JSON object containing informations about the new library
149
        name: body
148
        required: true
150
        required: true
149
        schema:
151
        schema:
150
          $ref: "../swagger.yaml#/definitions/library"
152
          $ref: ../swagger.yaml#/definitions/library
151
    produces:
152
      - application/json
153
    responses:
153
    responses:
154
      "201":
154
      201:
155
        description: Library added
155
        description: Library added
156
        schema:
156
        schema:
157
          $ref: "../swagger.yaml#/definitions/library"
157
          $ref: ../swagger.yaml#/definitions/library
158
      "400":
158
      400:
159
        description: Bad request
159
        description: Bad request
160
        schema:
160
        schema:
161
          $ref: "../swagger.yaml#/definitions/error"
161
          $ref: ../swagger.yaml#/definitions/error
162
      "401":
162
      401:
163
        description: Authentication required
163
        description: Authentication required
164
        schema:
164
        schema:
165
          $ref: "../swagger.yaml#/definitions/error"
165
          $ref: ../swagger.yaml#/definitions/error
166
      "403":
166
      403:
167
        description: Access forbidden
167
        description: Access forbidden
168
        schema:
168
        schema:
169
          $ref: "../swagger.yaml#/definitions/error"
169
          $ref: ../swagger.yaml#/definitions/error
170
      "409":
170
      409:
171
        description: Conflict in creating resource
171
        description: Conflict in creating resource
172
        schema:
172
        schema:
173
          $ref: "../swagger.yaml#/definitions/error"
173
          $ref: ../swagger.yaml#/definitions/error
174
      "500":
174
      500:
175
        description: |
176
          Internal server error. Possible `error_code` attribute values:
177
          
178
          * `internal_server_error`
179
        schema:
180
          $ref: ../swagger.yaml#/definitions/error
181
      503:
182
        description: Under maintenance
183
        schema:
184
          $ref: ../swagger.yaml#/definitions/error
185
    x-koha-authorization:
186
      permissions:
187
        parameters: manage_libraries
188
'/libraries/{library_id}':
189
  delete:
190
    x-mojo-to: Libraries#delete
191
    operationId: deleteLibrary
192
    tags:
193
      - libraries
194
    summary: Delete library
195
    produces:
196
      - application/json
197
    parameters:
198
      - $ref: ../swagger.yaml#/parameters/library_id_pp
199
    responses:
200
      204:
201
        description: Library deleted
202
        schema:
203
          type: string
204
      401:
205
        description: Authentication required
206
        schema:
207
          $ref: ../swagger.yaml#/definitions/error
208
      403:
209
        description: Access forbidden
210
        schema:
211
          $ref: ../swagger.yaml#/definitions/error
212
      404:
213
        description: Library not found
214
        schema:
215
          $ref: ../swagger.yaml#/definitions/error
216
      500:
175
        description: |
217
        description: |
176
          Internal server error. Possible `error_code` attribute values:
218
          Internal server error. Possible `error_code` attribute values:
177
219
          
178
          * `internal_server_error`
220
          * `internal_server_error`
179
        schema:
221
        schema:
180
          $ref: "../swagger.yaml#/definitions/error"
222
          $ref: ../swagger.yaml#/definitions/error
181
      "503":
223
      503:
182
        description: Under maintenance
224
        description: Under maintenance
183
        schema:
225
        schema:
184
          $ref: "../swagger.yaml#/definitions/error"
226
          $ref: ../swagger.yaml#/definitions/error
185
    x-koha-authorization:
227
    x-koha-authorization:
186
      permissions:
228
      permissions:
187
        parameters: manage_libraries
229
        parameters: manage_libraries
188
"/libraries/{library_id}":
189
  get:
230
  get:
190
    x-mojo-to: Libraries#get
231
    x-mojo-to: Libraries#get
191
    operationId: getLibrary
232
    operationId: getLibrary
192
    tags:
233
    tags:
193
      - libraries
234
      - libraries
194
    summary: Get library
235
    summary: Get library
236
    produces:
237
      - application/json
195
    parameters:
238
    parameters:
196
      - $ref: "../swagger.yaml#/parameters/library_id_pp"
239
      - $ref: ../swagger.yaml#/parameters/library_id_pp
197
      - name: x-koha-embed
240
      - collectionFormat: csv
198
        in: header
199
        required: false
200
        description: Embed list sent as a request header
241
        description: Embed list sent as a request header
201
        type: array
242
        in: header
202
        items:
243
        items:
203
          type: string
204
          enum:
244
          enum:
205
            - smtp_server
245
            - smtp_server
206
        collectionFormat: csv
246
          type: string
207
    produces:
247
        name: x-koha-embed
208
      - application/json
248
        required: false
249
        type: array
209
    responses:
250
    responses:
210
      "200":
251
      200:
211
        description: A library
252
        description: A library
212
        schema:
253
        schema:
213
          $ref: "../swagger.yaml#/definitions/library"
254
          $ref: ../swagger.yaml#/definitions/library
214
      "404":
255
      404:
215
        description: Library not found
256
        description: Library not found
216
        schema:
257
        schema:
217
          $ref: "../swagger.yaml#/definitions/error"
258
          $ref: ../swagger.yaml#/definitions/error
218
    x-koha-authorization:
259
    x-koha-authorization:
219
      permissions:
260
      permissions:
220
        catalogue: "1"
261
        catalogue: 1
221
    x-koha-embed:
262
    x-koha-embed:
222
      - smtp_server
263
      - smtp_server
223
  put:
264
  put:
Lines 226-319 Link Here
226
    tags:
267
    tags:
227
      - libraries
268
      - libraries
228
    summary: Update library
269
    summary: Update library
270
    produces:
271
      - application/json
229
    parameters:
272
    parameters:
230
      - $ref: "../swagger.yaml#/parameters/library_id_pp"
273
      - $ref: ../swagger.yaml#/parameters/library_id_pp
231
      - name: body
274
      - description: A JSON object containing information on the library
232
        in: body
275
        in: body
233
        description: A JSON object containing information on the library
276
        name: body
234
        required: true
277
        required: true
235
        schema:
278
        schema:
236
          $ref: "../swagger.yaml#/definitions/library"
279
          $ref: ../swagger.yaml#/definitions/library
237
    consumes:
238
      - application/json
239
    produces:
240
      - application/json
241
    responses:
280
    responses:
242
      "200":
281
      200:
243
        description: A library
282
        description: A library
244
        schema:
283
        schema:
245
          $ref: "../swagger.yaml#/definitions/library"
284
          $ref: ../swagger.yaml#/definitions/library
246
      "400":
285
      400:
247
        description: Bad request
286
        description: Bad request
248
        schema:
287
        schema:
249
          $ref: "../swagger.yaml#/definitions/error"
288
          $ref: ../swagger.yaml#/definitions/error
250
      "401":
289
      401:
251
        description: Authentication required
290
        description: Authentication required
252
        schema:
291
        schema:
253
          $ref: "../swagger.yaml#/definitions/error"
292
          $ref: ../swagger.yaml#/definitions/error
254
      "403":
293
      403:
255
        description: Access forbidden
294
        description: Access forbidden
256
        schema:
295
        schema:
257
          $ref: "../swagger.yaml#/definitions/error"
296
          $ref: ../swagger.yaml#/definitions/error
258
      "404":
297
      404:
259
        description: Library not found
298
        description: Library not found
260
        schema:
299
        schema:
261
          $ref: "../swagger.yaml#/definitions/error"
300
          $ref: ../swagger.yaml#/definitions/error
262
      "500":
301
      500:
263
        description: |
302
        description: |
264
          Internal server error. Possible `error_code` attribute values:
303
          Internal server error. Possible `error_code` attribute values:
265
304
          
266
          * `internal_server_error`
305
          * `internal_server_error`
267
        schema:
306
        schema:
268
          $ref: "../swagger.yaml#/definitions/error"
307
          $ref: ../swagger.yaml#/definitions/error
269
      "503":
308
      503:
270
        description: Under maintenance
309
        description: Under maintenance
271
        schema:
310
        schema:
272
          $ref: "../swagger.yaml#/definitions/error"
311
          $ref: ../swagger.yaml#/definitions/error
273
    x-koha-authorization:
312
    x-koha-authorization:
274
      permissions:
313
      permissions:
275
        parameters: manage_libraries
314
        parameters: manage_libraries
276
  delete:
315
    consumes:
277
    x-mojo-to: Libraries#delete
278
    operationId: deleteLibrary
279
    tags:
280
      - libraries
281
    summary: Delete library
282
    parameters:
283
      - $ref: "../swagger.yaml#/parameters/library_id_pp"
284
    produces:
285
      - application/json
316
      - application/json
286
    responses:
287
      "204":
288
        description: Library deleted
289
        schema:
290
          type: string
291
      "401":
292
        description: Authentication required
293
        schema:
294
          $ref: "../swagger.yaml#/definitions/error"
295
      "403":
296
        description: Access forbidden
297
        schema:
298
          $ref: "../swagger.yaml#/definitions/error"
299
      "404":
300
        description: Library not found
301
        schema:
302
          $ref: "../swagger.yaml#/definitions/error"
303
      "500":
304
        description: |
305
          Internal server error. Possible `error_code` attribute values:
306
307
          * `internal_server_error`
308
        schema:
309
          $ref: "../swagger.yaml#/definitions/error"
310
      "503":
311
        description: Under maintenance
312
        schema:
313
          $ref: "../swagger.yaml#/definitions/error"
314
    x-koha-authorization:
315
      permissions:
316
        parameters: manage_libraries
317
/public/libraries:
317
/public/libraries:
318
  get:
318
  get:
319
    x-mojo-to: Libraries#list
319
    x-mojo-to: Libraries#list
Lines 321-396 Link Here
321
    tags:
321
    tags:
322
      - libraries
322
      - libraries
323
    summary: List libraries
323
    summary: List libraries
324
    parameters:
325
      - $ref: "../swagger.yaml#/parameters/match"
326
      - $ref: "../swagger.yaml#/parameters/order_by"
327
      - $ref: "../swagger.yaml#/parameters/page"
328
      - $ref: "../swagger.yaml#/parameters/per_page"
329
      - $ref: "../swagger.yaml#/parameters/q_param"
330
      - $ref: "../swagger.yaml#/parameters/q_body"
331
      - $ref: "../swagger.yaml#/parameters/q_header"
332
      - $ref: "../swagger.yaml#/parameters/request_id_header"
333
    produces:
324
    produces:
334
      - application/json
325
      - application/json
326
    parameters:
327
      - $ref: ../swagger.yaml#/parameters/match
328
      - $ref: ../swagger.yaml#/parameters/order_by
329
      - $ref: ../swagger.yaml#/parameters/page
330
      - $ref: ../swagger.yaml#/parameters/per_page
331
      - $ref: ../swagger.yaml#/parameters/q_param
332
      - $ref: ../swagger.yaml#/parameters/q_body
333
      - $ref: ../swagger.yaml#/parameters/q_header
334
      - $ref: ../swagger.yaml#/parameters/request_id_header
335
    responses:
335
    responses:
336
      "200":
336
      200:
337
        description: A list of libraries
337
        description: A list of libraries
338
        schema:
338
        schema:
339
          type: array
339
          type: array
340
          items:
340
          items:
341
            $ref: "../swagger.yaml#/definitions/library"
341
            $ref: ../swagger.yaml#/definitions/library
342
      "500":
342
      500:
343
        description: |
343
        description: |
344
          Internal server error. Possible `error_code` attribute values:
344
          Internal server error. Possible `error_code` attribute values:
345
345
          
346
          * `internal_server_error`
346
          * `internal_server_error`
347
        schema:
347
        schema:
348
          $ref: "../swagger.yaml#/definitions/error"
348
          $ref: ../swagger.yaml#/definitions/error
349
      "503":
349
      503:
350
        description: Under maintenance
350
        description: Under maintenance
351
        schema:
351
        schema:
352
          $ref: "../swagger.yaml#/definitions/error"
352
          $ref: ../swagger.yaml#/definitions/error
353
"/public/libraries/{library_id}":
353
'/public/libraries/{library_id}':
354
  get:
354
  get:
355
    x-mojo-to: Libraries#get
355
    x-mojo-to: Libraries#get
356
    operationId: getLibraryPublic
356
    operationId: getLibraryPublic
357
    tags:
357
    tags:
358
      - libraries
358
      - libraries
359
    summary: Get library (public)
359
    summary: Get library (public)
360
    parameters:
361
      - $ref: "../swagger.yaml#/parameters/library_id_pp"
362
    produces:
360
    produces:
363
      - application/json
361
      - application/json
362
    parameters:
363
      - $ref: ../swagger.yaml#/parameters/library_id_pp
364
    responses:
364
    responses:
365
      "200":
365
      200:
366
        description: A library
366
        description: A library
367
      "401":
367
      401:
368
        description: Authentication required
368
        description: Authentication required
369
        schema:
369
        schema:
370
          $ref: "../swagger.yaml#/definitions/error"
370
          $ref: ../swagger.yaml#/definitions/error
371
      "403":
371
      403:
372
        description: Access forbidden
372
        description: Access forbidden
373
        schema:
373
        schema:
374
          $ref: "../swagger.yaml#/definitions/error"
374
          $ref: ../swagger.yaml#/definitions/error
375
      "404":
375
      404:
376
        description: Library not found
376
        description: Library not found
377
        schema:
377
        schema:
378
          $ref: "../swagger.yaml#/definitions/error"
378
          $ref: ../swagger.yaml#/definitions/error
379
      "406":
379
      406:
380
        description: Not acceptable
380
        description: Not acceptable
381
        schema:
381
        schema:
382
          type: array
383
          description: Accepted content-types
382
          description: Accepted content-types
383
          type: array
384
          items:
384
          items:
385
            type: string
385
            type: string
386
      "500":
386
      500:
387
        description: |
387
        description: |
388
          Internal server error. Possible `error_code` attribute values:
388
          Internal server error. Possible `error_code` attribute values:
389
389
          
390
          * `internal_server_error`
390
          * `internal_server_error`
391
        schema:
391
        schema:
392
          $ref: "../swagger.yaml#/definitions/error"
392
          $ref: ../swagger.yaml#/definitions/error
393
      "503":
393
      503:
394
        description: Under maintenance
394
        description: Under maintenance
395
        schema:
395
        schema:
396
          $ref: "../swagger.yaml#/definitions/error"
396
          $ref: ../swagger.yaml#/definitions/error
(-)a/api/v1/swagger/paths/oauth.yaml (-13 / +13 lines)
Lines 9-45 Link Here
9
    produces:
9
    produces:
10
      - application/json
10
      - application/json
11
    parameters:
11
    parameters:
12
      - name: grant_type
12
      - description: grant type (client_credentials)
13
        in: formData
13
        in: formData
14
        description: grant type (client_credentials)
14
        name: grant_type
15
        required: true
15
        required: true
16
        type: string
16
        type: string
17
      - name: client_id
17
      - description: client id
18
        in: formData
18
        in: formData
19
        description: client id
19
        name: client_id
20
        type: string
20
        type: string
21
      - name: client_secret
21
      - description: client secret
22
        in: formData
22
        in: formData
23
        description: client secret
23
        name: client_secret
24
        type: string
24
        type: string
25
    responses:
25
    responses:
26
      "200":
26
      200:
27
        description: OK
27
        description: OK
28
        schema:
28
        schema:
29
          type: object
29
          type: object
30
          properties:
30
          properties:
31
            access_token:
31
            access_token:
32
              type: string
32
              type: string
33
            token_type:
34
              type: string
35
            expires_in:
33
            expires_in:
36
              type: integer
34
              type: integer
35
            token_type:
36
              type: string
37
          additionalProperties: false
37
          additionalProperties: false
38
      "400":
38
      400:
39
        description: Bad Request
39
        description: Bad Request
40
        schema:
40
        schema:
41
          $ref: "../swagger.yaml#/definitions/error"
41
          $ref: ../swagger.yaml#/definitions/error
42
      "403":
42
      403:
43
        description: Access forbidden
43
        description: Access forbidden
44
        schema:
44
        schema:
45
          $ref: "../swagger.yaml#/definitions/error"
45
          $ref: ../swagger.yaml#/definitions/error
(-)a/api/v1/swagger/paths/patrons.yaml (-286 / +286 lines)
Lines 9-399 Link Here
9
    produces:
9
    produces:
10
      - application/json
10
      - application/json
11
    parameters:
11
    parameters:
12
      - name: patron_id
12
      - description: Search on patron_id
13
        in: query
13
        in: query
14
        description: Search on patron_id
14
        name: patron_id
15
        required: false
15
        required: false
16
        type: string
16
        type: string
17
      - name: cardnumber
17
      - description: Case insensitive search on cardnumber
18
        in: query
18
        in: query
19
        description: Case insensitive search on cardnumber
19
        name: cardnumber
20
        required: false
20
        required: false
21
        type: string
21
        type: string
22
      - name: surname
22
      - description: Case insensitive search on surname
23
        in: query
23
        in: query
24
        description: Case insensitive search on surname
24
        name: surname
25
        required: false
25
        required: false
26
        type: string
26
        type: string
27
      - name: firstname
27
      - description: Case insensitive search on firstname
28
        in: query
28
        in: query
29
        description: Case insensitive search on firstname
29
        name: firstname
30
        required: false
30
        required: false
31
        type: string
31
        type: string
32
      - name: title
32
      - description: Case insensitive search on title
33
        in: query
33
        in: query
34
        description: Case insensitive search on title
34
        name: title
35
        required: false
35
        required: false
36
        type: string
36
        type: string
37
      - name: other_name
37
      - description: Case insensitive search on othernames
38
        in: query
38
        in: query
39
        description: Case insensitive search on othernames
39
        name: other_name
40
        required: false
40
        required: false
41
        type: string
41
        type: string
42
      - name: initials
42
      - description: Case insensitive search on initials
43
        in: query
43
        in: query
44
        description: Case insensitive search on initials
44
        name: initials
45
        required: false
45
        required: false
46
        type: string
46
        type: string
47
      - name: street_number
47
      - description: Case insensitive search on streetnumber
48
        in: query
48
        in: query
49
        description: Case insensitive search on streetnumber
49
        name: street_number
50
        required: false
50
        required: false
51
        type: string
51
        type: string
52
      - name: street_type
52
      - description: Case insensitive search on streettype
53
        in: query
53
        in: query
54
        description: Case insensitive search on streettype
54
        name: street_type
55
        required: false
55
        required: false
56
        type: string
56
        type: string
57
      - name: address
57
      - description: Case insensitive search on address
58
        in: query
58
        in: query
59
        description: Case insensitive search on address
59
        name: address
60
        required: false
60
        required: false
61
        type: string
61
        type: string
62
      - name: address2
62
      - description: Case insensitive search on address2
63
        in: query
63
        in: query
64
        description: Case insensitive search on address2
64
        name: address2
65
        required: false
65
        required: false
66
        type: string
66
        type: string
67
      - name: city
67
      - description: Case insensitive search on city
68
        in: query
68
        in: query
69
        description: Case insensitive search on city
69
        name: city
70
        required: false
70
        required: false
71
        type: string
71
        type: string
72
      - name: state
72
      - description: Case insensitive search on state
73
        in: query
73
        in: query
74
        description: Case insensitive search on state
74
        name: state
75
        required: false
75
        required: false
76
        type: string
76
        type: string
77
      - name: postal_code
77
      - description: Case insensitive search on zipcode
78
        in: query
78
        in: query
79
        description: Case insensitive search on zipcode
79
        name: postal_code
80
        required: false
80
        required: false
81
        type: string
81
        type: string
82
      - name: country
82
      - description: Case insensitive search on country
83
        in: query
83
        in: query
84
        description: Case insensitive search on country
84
        name: country
85
        required: false
85
        required: false
86
        type: string
86
        type: string
87
      - name: email
87
      - description: Case insensitive search on email
88
        in: query
88
        in: query
89
        description: Case insensitive search on email
89
        name: email
90
        required: false
90
        required: false
91
        type: string
91
        type: string
92
      - name: phone
92
      - description: Case insensitive search on phone
93
        in: query
93
        in: query
94
        description: Case insensitive search on phone
94
        name: phone
95
        required: false
95
        required: false
96
        type: string
96
        type: string
97
      - name: mobile
97
      - description: Case insensitive search on mobile
98
        in: query
98
        in: query
99
        description: Case insensitive search on mobile
99
        name: mobile
100
        required: false
100
        required: false
101
        type: string
101
        type: string
102
      - name: fax
102
      - description: Case insensitive search on fax
103
        in: query
103
        in: query
104
        description: Case insensitive search on fax
104
        name: fax
105
        required: false
105
        required: false
106
        type: string
106
        type: string
107
      - name: secondary_email
107
      - description: Case insensitive search on secondary_email
108
        in: query
108
        in: query
109
        description: Case insensitive search on secondary_email
109
        name: secondary_email
110
        required: false
110
        required: false
111
        type: string
111
        type: string
112
      - name: secondary_phone
112
      - description: Case insensitive search on secondary_phone
113
        in: query
113
        in: query
114
        description: Case insensitive search on secondary_phone
114
        name: secondary_phone
115
        required: false
115
        required: false
116
        type: string
116
        type: string
117
      - name: altaddress_street_number
117
      - description: Case insensitive search on altaddress_street_number
118
        in: query
118
        in: query
119
        description: Case insensitive search on altaddress_street_number
119
        name: altaddress_street_number
120
        required: false
120
        required: false
121
        type: string
121
        type: string
122
      - name: altaddress_street_type
122
      - description: Case insensitive search on altaddress_street_type
123
        in: query
123
        in: query
124
        description: Case insensitive search on altaddress_street_type
124
        name: altaddress_street_type
125
        required: false
125
        required: false
126
        type: string
126
        type: string
127
      - name: altaddress_address
127
      - description: Case insensitive search on altaddress_address
128
        in: query
128
        in: query
129
        description: Case insensitive search on altaddress_address
129
        name: altaddress_address
130
        required: false
130
        required: false
131
        type: string
131
        type: string
132
      - name: altaddress_address2
132
      - description: Case insensitive search on altaddress_address2
133
        in: query
133
        in: query
134
        description: Case insensitive search on altaddress_address2
134
        name: altaddress_address2
135
        required: false
135
        required: false
136
        type: string
136
        type: string
137
      - name: altaddress_city
137
      - description: Case insensitive search on altaddress_city
138
        in: query
138
        in: query
139
        description: Case insensitive search on altaddress_city
139
        name: altaddress_city
140
        required: false
140
        required: false
141
        type: string
141
        type: string
142
      - name: altaddress_state
142
      - description: Case insensitive search on altaddress_state
143
        in: query
143
        in: query
144
        description: Case insensitive search on altaddress_state
144
        name: altaddress_state
145
        required: false
145
        required: false
146
        type: string
146
        type: string
147
      - name: altaddress_postal_code
147
      - description: Case insensitive search on altaddress_postal_code
148
        in: query
148
        in: query
149
        description: Case insensitive search on altaddress_postal_code
149
        name: altaddress_postal_code
150
        required: false
150
        required: false
151
        type: string
151
        type: string
152
      - name: altaddress_country
152
      - description: Case insensitive search on altaddress_country
153
        in: query
153
        in: query
154
        description: Case insensitive search on altaddress_country
154
        name: altaddress_country
155
        required: false
155
        required: false
156
        type: string
156
        type: string
157
      - name: altaddress_email
157
      - description: Case insensitive search on altaddress_email
158
        in: query
158
        in: query
159
        description: Case insensitive search on altaddress_email
159
        name: altaddress_email
160
        required: false
160
        required: false
161
        type: string
161
        type: string
162
      - name: altaddress_phone
162
      - description: Case insensitive search on altaddress_phone
163
        in: query
163
        in: query
164
        description: Case insensitive search on altaddress_phone
164
        name: altaddress_phone
165
        required: false
165
        required: false
166
        type: string
166
        type: string
167
      - name: date_of_birth
167
      - description: Case insensitive search on date_of_birth
168
        in: query
168
        in: query
169
        description: Case insensitive search on date_of_birth
169
        name: date_of_birth
170
        required: false
170
        required: false
171
        type: string
171
        type: string
172
      - name: library_id
172
      - description: Case insensitive search on library_id
173
        in: query
173
        in: query
174
        description: Case insensitive search on library_id
174
        name: library_id
175
        required: false
175
        required: false
176
        type: string
176
        type: string
177
      - name: category_id
177
      - description: Case insensitive search on category_id
178
        in: query
178
        in: query
179
        description: Case insensitive search on category_id
179
        name: category_id
180
        required: false
180
        required: false
181
        type: string
181
        type: string
182
      - name: date_enrolled
182
      - description: Case insensitive search on date_enrolled
183
        in: query
183
        in: query
184
        description: Case insensitive search on date_enrolled
184
        name: date_enrolled
185
        required: false
185
        required: false
186
        type: string
186
        type: string
187
      - name: expiry_date
187
      - description: Case insensitive search on expiry_date
188
        in: query
188
        in: query
189
        description: Case insensitive search on expiry_date
189
        name: expiry_date
190
        required: false
190
        required: false
191
        type: string
191
        type: string
192
      - name: incorrect_address
192
      - description: Search on incorrect_address
193
        in: query
193
        in: query
194
        description: Search on incorrect_address
194
        name: incorrect_address
195
        required: false
195
        required: false
196
        type: boolean
196
        type: boolean
197
      - name: patron_card_lost
197
      - description: Search on patron_card_lost
198
        in: query
198
        in: query
199
        description: Search on patron_card_lost
199
        name: patron_card_lost
200
        required: false
200
        required: false
201
        type: boolean
201
        type: boolean
202
      - name: restricted
202
      - description: Filter search by restricted
203
        in: query
203
        in: query
204
        description: Filter search by restricted
204
        name: restricted
205
        required: false
205
        required: false
206
        type: boolean
206
        type: boolean
207
      - name: guarantor_id
207
      - description: Search on guarantor_id
208
        in: query
208
        in: query
209
        description: Search on guarantor_id
209
        name: guarantor_id
210
        required: false
210
        required: false
211
        type: string
211
        type: string
212
      - name: staff_notes
212
      - description: Case insensitive search on staff_notes
213
        in: query
213
        in: query
214
        description: Case insensitive search on staff_notes
214
        name: staff_notes
215
        required: false
215
        required: false
216
        type: string
216
        type: string
217
      - name: relationship_type
217
      - description: Case insensitive search on relationship_type
218
        in: query
218
        in: query
219
        description: Case insensitive search on relationship_type
219
        name: relationship_type
220
        required: false
220
        required: false
221
        type: string
221
        type: string
222
      - name: gender
222
      - description: Case insensitive search on gender
223
        in: query
223
        in: query
224
        description: Case insensitive search on gender
224
        name: gender
225
        required: false
225
        required: false
226
        type: string
226
        type: string
227
      - name: userid
227
      - description: Case insensitive search on userid
228
        in: query
228
        in: query
229
        description: Case insensitive search on userid
229
        name: userid
230
        required: false
230
        required: false
231
        type: string
231
        type: string
232
      - name: opac_notes
232
      - description: Case insensitive search on opac_notes
233
        in: query
233
        in: query
234
        description: Case insensitive search on opac_notes
234
        name: opac_notes
235
        required: false
235
        required: false
236
        type: string
236
        type: string
237
      - name: altaddress_notes
237
      - description: Case insensitive search on altaddress_notes
238
        in: query
238
        in: query
239
        description: Case insensitive search on altaddress_notes
239
        name: altaddress_notes
240
        required: false
240
        required: false
241
        type: string
241
        type: string
242
      - name: statistics_1
242
      - description: Case insensitive search on statistics_1
243
        in: query
243
        in: query
244
        description: Case insensitive search on statistics_1
244
        name: statistics_1
245
        required: false
245
        required: false
246
        type: string
246
        type: string
247
      - name: statistics_2
247
      - description: Case insensitive search on statistics_2
248
        in: query
248
        in: query
249
        description: Case insensitive search on statistics_2
249
        name: statistics_2
250
        required: false
250
        required: false
251
        type: string
251
        type: string
252
      - name: autorenew_checkouts
252
      - description: Search on autorenew_checkouts
253
        in: query
253
        in: query
254
        description: Search on autorenew_checkouts
254
        name: autorenew_checkouts
255
        required: false
255
        required: false
256
        type: boolean
256
        type: boolean
257
      - name: altcontact_firstname
257
      - description: Case insensitive search on altcontact_firstname
258
        in: query
258
        in: query
259
        description: Case insensitive search on altcontact_firstname
259
        name: altcontact_firstname
260
        required: false
260
        required: false
261
        type: string
261
        type: string
262
      - name: altcontact_surname
262
      - description: Case insensitive search on altcontact_surname
263
        in: query
263
        in: query
264
        description: Case insensitive search on altcontact_surname
264
        name: altcontact_surname
265
        required: false
265
        required: false
266
        type: string
266
        type: string
267
      - name: altcontact_address
267
      - description: Case insensitive search on altcontact_address
268
        in: query
268
        in: query
269
        description: Case insensitive search on altcontact_address
269
        name: altcontact_address
270
        required: false
270
        required: false
271
        type: string
271
        type: string
272
      - name: altcontact_address2
272
      - description: Case insensitive search on altcontact_address2
273
        in: query
273
        in: query
274
        description: Case insensitive search on altcontact_address2
274
        name: altcontact_address2
275
        required: false
275
        required: false
276
        type: string
276
        type: string
277
      - name: altcontact_city
277
      - description: Case insensitive search on altcontact_city
278
        in: query
278
        in: query
279
        description: Case insensitive search on altcontact_city
279
        name: altcontact_city
280
        required: false
280
        required: false
281
        type: string
281
        type: string
282
      - name: altcontact_state
282
      - description: Case insensitive search on altcontact_state
283
        in: query
283
        in: query
284
        description: Case insensitive search on altcontact_state
284
        name: altcontact_state
285
        required: false
285
        required: false
286
        type: string
286
        type: string
287
      - name: altcontact_postal_code
287
      - description: Case insensitive search on altcontact_postal_code
288
        in: query
288
        in: query
289
        description: Case insensitive search on altcontact_postal_code
289
        name: altcontact_postal_code
290
        required: false
290
        required: false
291
        type: string
291
        type: string
292
      - name: altcontact_country
292
      - description: Case insensitive search on altcontact_country
293
        in: query
293
        in: query
294
        description: Case insensitive search on altcontact_country
294
        name: altcontact_country
295
        required: false
295
        required: false
296
        type: string
296
        type: string
297
      - name: altcontact_phone
297
      - description: Case insensitive search on altcontact_phone
298
        in: query
298
        in: query
299
        description: Case insensitive search on altcontact_phone
299
        name: altcontact_phone
300
        required: false
300
        required: false
301
        type: string
301
        type: string
302
      - name: sms_number
302
      - description: Case insensitive search on sms_number
303
        in: query
303
        in: query
304
        description: Case insensitive search on sms_number
304
        name: sms_number
305
        required: false
305
        required: false
306
        type: string
306
        type: string
307
      - name: sms_provider_id
307
      - description: Case insensitive search on sms_provider_id
308
        in: query
308
        in: query
309
        description: Case insensitive search on sms_provider_id
309
        name: sms_provider_id
310
        required: false
310
        required: false
311
        type: string
311
        type: string
312
      - name: privacy
312
      - description: Search on privacy
313
        in: query
313
        in: query
314
        description: Search on privacy
314
        name: privacy
315
        required: false
315
        required: false
316
        type: string
316
        type: string
317
      - name: privacy_guarantor_checkouts
317
      - description: Search on privacy_guarantor_checkouts
318
        in: query
318
        in: query
319
        description: Search on privacy_guarantor_checkouts
319
        name: privacy_guarantor_checkouts
320
        required: false
320
        required: false
321
        type: string
321
        type: string
322
      - name: check_previous_checkout
322
      - description: Case insensitive search on check_previous_checkout
323
        in: query
323
        in: query
324
        description: Case insensitive search on check_previous_checkout
324
        name: check_previous_checkout
325
        required: false
325
        required: false
326
        type: string
326
        type: string
327
      - name: updated_on
327
      - description: Search on updated_on
328
        in: query
328
        in: query
329
        description: Search on updated_on
329
        name: updated_on
330
        required: false
330
        required: false
331
        type: string
331
        type: string
332
      - name: last_seen
332
      - description: Case insensitive search on last_seen
333
        in: query
333
        in: query
334
        description: Case insensitive search on last_seen
334
        name: last_seen
335
        required: false
335
        required: false
336
        type: string
336
        type: string
337
      - name: lang
337
      - description: Case insensitive search on lang
338
        in: query
338
        in: query
339
        description: Case insensitive search on lang
339
        name: lang
340
        required: false
340
        required: false
341
        type: string
341
        type: string
342
      - name: login_attempts
342
      - description: Search on login_attempts
343
        in: query
343
        in: query
344
        description: Search on login_attempts
344
        name: login_attempts
345
        required: false
345
        required: false
346
        type: string
346
        type: string
347
      - $ref: "../swagger.yaml#/parameters/match"
347
      - $ref: ../swagger.yaml#/parameters/match
348
      - $ref: "../swagger.yaml#/parameters/order_by"
348
      - $ref: ../swagger.yaml#/parameters/order_by
349
      - $ref: "../swagger.yaml#/parameters/page"
349
      - $ref: ../swagger.yaml#/parameters/page
350
      - $ref: "../swagger.yaml#/parameters/per_page"
350
      - $ref: ../swagger.yaml#/parameters/per_page
351
      - $ref: "../swagger.yaml#/parameters/q_param"
351
      - $ref: ../swagger.yaml#/parameters/q_param
352
      - $ref: "../swagger.yaml#/parameters/q_body"
352
      - $ref: ../swagger.yaml#/parameters/q_body
353
      - $ref: "../swagger.yaml#/parameters/q_header"
353
      - $ref: ../swagger.yaml#/parameters/q_header
354
      - $ref: "../swagger.yaml#/parameters/request_id_header"
354
      - $ref: ../swagger.yaml#/parameters/request_id_header
355
      - name: x-koha-embed
355
      - collectionFormat: csv
356
        in: header
357
        required: false
358
        description: Embed list sent as a request header
356
        description: Embed list sent as a request header
359
        type: array
357
        in: header
360
        items:
358
        items:
361
          type: string
362
          enum:
359
          enum:
363
            - extended_attributes
360
            - extended_attributes
364
        collectionFormat: csv
361
          type: string
362
        name: x-koha-embed
363
        required: false
364
        type: array
365
    responses:
365
    responses:
366
      "200":
366
      200:
367
        description: A list of patrons
367
        description: A list of patrons
368
        schema:
368
        schema:
369
          type: array
369
          type: array
370
          items:
370
          items:
371
            $ref: "../swagger.yaml#/definitions/patron"
371
            $ref: ../swagger.yaml#/definitions/patron
372
      "401":
372
      401:
373
        description: Authentication required
373
        description: Authentication required
374
        schema:
374
        schema:
375
          $ref: "../swagger.yaml#/definitions/error"
375
          $ref: ../swagger.yaml#/definitions/error
376
      "403":
376
      403:
377
        description: Access forbidden
377
        description: Access forbidden
378
        schema:
378
        schema:
379
          $ref: "../swagger.yaml#/definitions/error"
379
          $ref: ../swagger.yaml#/definitions/error
380
      "500":
380
      500:
381
        description: |
381
        description: |
382
          Internal server error. Possible `error_code` attribute values:
382
          Internal server error. Possible `error_code` attribute values:
383
383
          
384
          * `internal_server_error`
384
          * `internal_server_error`
385
        schema:
385
        schema:
386
          $ref: "../swagger.yaml#/definitions/error"
386
          $ref: ../swagger.yaml#/definitions/error
387
      "503":
387
      503:
388
        description: Under maintenance
388
        description: Under maintenance
389
        schema:
389
        schema:
390
          $ref: "../swagger.yaml#/definitions/error"
390
          $ref: ../swagger.yaml#/definitions/error
391
    x-koha-authorization:
391
    x-koha-authorization:
392
      permissions:
392
      permissions:
393
        - borrowers: "edit_borrowers"
393
        - borrowers: edit_borrowers
394
        - tools: "label_creator"
394
        - tools: label_creator
395
        - serials: "routing"
395
        - serials: routing
396
        - acquisition: "order_manage"
396
        - acquisition: order_manage
397
    x-koha-embed:
397
    x-koha-embed:
398
      - extended_attributes
398
      - extended_attributes
399
      - checkouts+count
399
      - checkouts+count
Lines 405-510 Link Here
405
    tags:
405
    tags:
406
      - patrons
406
      - patrons
407
    summary: Add patron
407
    summary: Add patron
408
    produces:
409
      - application/json
408
    parameters:
410
    parameters:
409
      - name: body
411
      - description: A JSON object containing information about the new patron
410
        in: body
412
        in: body
411
        description: A JSON object containing information about the new patron
413
        name: body
412
        required: true
414
        required: true
413
        schema:
415
        schema:
414
          $ref: "../swagger.yaml#/definitions/patron"
416
          $ref: ../swagger.yaml#/definitions/patron
415
    consumes:
416
      - application/json
417
    produces:
418
      - application/json
419
    responses:
417
    responses:
420
      "201":
418
      201:
421
        description: A successfully created patron
419
        description: A successfully created patron
422
        schema:
420
        schema:
423
          items:
421
          items:
424
            $ref: "../swagger.yaml#/definitions/patron"
422
            $ref: ../swagger.yaml#/definitions/patron
425
      "400":
423
      400:
426
        description: Bad parameter
424
        description: Bad parameter
427
        schema:
425
        schema:
428
          $ref: "../swagger.yaml#/definitions/error"
426
          $ref: ../swagger.yaml#/definitions/error
429
      "401":
427
      401:
430
        description: Authentication required
428
        description: Authentication required
431
        schema:
429
        schema:
432
          $ref: "../swagger.yaml#/definitions/error"
430
          $ref: ../swagger.yaml#/definitions/error
433
      "403":
431
      403:
434
        description: Access forbidden
432
        description: Access forbidden
435
        schema:
433
        schema:
436
          $ref: "../swagger.yaml#/definitions/error"
434
          $ref: ../swagger.yaml#/definitions/error
437
      "404":
435
      404:
438
        description: Resource not found
436
        description: Resource not found
439
        schema:
437
        schema:
440
          $ref: "../swagger.yaml#/definitions/error"
438
          $ref: ../swagger.yaml#/definitions/error
441
      "409":
439
      409:
442
        description: Conflict in creating resource
440
        description: Conflict in creating resource
443
        schema:
441
        schema:
444
          $ref: "../swagger.yaml#/definitions/error"
442
          $ref: ../swagger.yaml#/definitions/error
445
      "500":
443
      500:
446
        description: |
444
        description: |
447
          Internal server error. Possible `error_code` attribute values:
445
          Internal server error. Possible `error_code` attribute values:
448
446
          
449
          * `internal_server_error`
447
          * `internal_server_error`
450
        schema:
448
        schema:
451
          $ref: "../swagger.yaml#/definitions/error"
449
          $ref: ../swagger.yaml#/definitions/error
452
      "503":
450
      503:
453
        description: Under maintenance
451
        description: Under maintenance
454
        schema:
452
        schema:
455
          $ref: "../swagger.yaml#/definitions/error"
453
          $ref: ../swagger.yaml#/definitions/error
456
    x-koha-authorization:
454
    x-koha-authorization:
457
      permissions:
455
      permissions:
458
        borrowers: edit_borrowers
456
        borrowers: edit_borrowers
459
"/patrons/{patron_id}":
457
    consumes:
458
      - application/json
459
'/patrons/{patron_id}':
460
  delete:
461
    x-mojo-to: Patrons#delete
462
    operationId: deletePatron
463
    tags:
464
      - patrons
465
    summary: Delete patron
466
    produces:
467
      - application/json
468
    parameters:
469
      - $ref: ../swagger.yaml#/parameters/patron_id_pp
470
    responses:
471
      204:
472
        description: Patron deleted
473
      400:
474
        description: Patron deletion failed
475
        schema:
476
          $ref: ../swagger.yaml#/definitions/error
477
      401:
478
        description: Authentication required
479
        schema:
480
          $ref: ../swagger.yaml#/definitions/error
481
      403:
482
        description: Access forbidden
483
        schema:
484
          $ref: ../swagger.yaml#/definitions/error
485
      404:
486
        description: Patron not found
487
        schema:
488
          $ref: ../swagger.yaml#/definitions/error
489
      409:
490
        description: |
491
          Conflict. Possible `error_code` attribute values:
492
          
493
            * `has_checkouts`: The patron has pending checkouts
494
            * `has_debt`: The patron has pending debts
495
            * `has_guarantees`: The patron has guarantees
496
            * `is_anonymous_patron`: The system-wide anonymous patron cannot be deleted
497
        schema:
498
          $ref: ../swagger.yaml#/definitions/error
499
      500:
500
        description: |
501
          Internal server error. Possible `error_code` attribute values:
502
          
503
          * `internal_server_error`
504
        schema:
505
          $ref: ../swagger.yaml#/definitions/error
506
      503:
507
        description: Under maintenance
508
        schema:
509
          $ref: ../swagger.yaml#/definitions/error
510
    x-koha-authorization:
511
      permissions:
512
        borrowers: delete_borrowers
460
  get:
513
  get:
461
    x-mojo-to: Patrons#get
514
    x-mojo-to: Patrons#get
462
    operationId: getPatron
515
    operationId: getPatron
463
    tags:
516
    tags:
464
      - patrons
517
      - patrons
465
    summary: Get patron
518
    summary: Get patron
519
    produces:
520
      - application/json
466
    parameters:
521
    parameters:
467
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
522
      - $ref: ../swagger.yaml#/parameters/patron_id_pp
468
      - name: x-koha-embed
523
      - collectionFormat: csv
469
        in: header
470
        required: false
471
        description: Embed list sent as a request header
524
        description: Embed list sent as a request header
472
        type: array
525
        in: header
473
        items:
526
        items:
474
          type: string
475
          enum:
527
          enum:
476
            - extended_attributes
528
            - extended_attributes
477
        collectionFormat: csv
529
          type: string
478
    produces:
530
        name: x-koha-embed
479
      - application/json
531
        required: false
532
        type: array
480
    responses:
533
    responses:
481
      "200":
534
      200:
482
        description: A patron
535
        description: A patron
483
        schema:
536
        schema:
484
          $ref: "../swagger.yaml#/definitions/patron"
537
          $ref: ../swagger.yaml#/definitions/patron
485
      "401":
538
      401:
486
        description: Authentication required
539
        description: Authentication required
487
        schema:
540
        schema:
488
          $ref: "../swagger.yaml#/definitions/error"
541
          $ref: ../swagger.yaml#/definitions/error
489
      "403":
542
      403:
490
        description: Access forbidden
543
        description: Access forbidden
491
        schema:
544
        schema:
492
          $ref: "../swagger.yaml#/definitions/error"
545
          $ref: ../swagger.yaml#/definitions/error
493
      "404":
546
      404:
494
        description: Patron not found
547
        description: Patron not found
495
        schema:
548
        schema:
496
          $ref: "../swagger.yaml#/definitions/error"
549
          $ref: ../swagger.yaml#/definitions/error
497
      "500":
550
      500:
498
        description: |
551
        description: |
499
          Internal server error. Possible `error_code` attribute values:
552
          Internal server error. Possible `error_code` attribute values:
500
553
          
501
          * `internal_server_error`
554
          * `internal_server_error`
502
        schema:
555
        schema:
503
          $ref: "../swagger.yaml#/definitions/error"
556
          $ref: ../swagger.yaml#/definitions/error
504
      "503":
557
      503:
505
        description: Under maintenance
558
        description: Under maintenance
506
        schema:
559
        schema:
507
          $ref: "../swagger.yaml#/definitions/error"
560
          $ref: ../swagger.yaml#/definitions/error
508
    x-koha-authorization:
561
    x-koha-authorization:
509
      permissions:
562
      permissions:
510
        borrowers: edit_borrowers
563
        borrowers: edit_borrowers
Lines 516-619 Link Here
516
    tags:
569
    tags:
517
      - patrons
570
      - patrons
518
    summary: Update patron
571
    summary: Update patron
572
    produces:
573
      - application/json
519
    parameters:
574
    parameters:
520
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
575
      - $ref: ../swagger.yaml#/parameters/patron_id_pp
521
      - name: body
576
      - description: A JSON object containing new information about existing patron
522
        in: body
577
        in: body
523
        description: A JSON object containing new information about existing patron
578
        name: body
524
        required: true
579
        required: true
525
        schema:
580
        schema:
526
          $ref: "../swagger.yaml#/definitions/patron"
581
          $ref: ../swagger.yaml#/definitions/patron
527
    consumes:
528
      - application/json
529
    produces:
530
      - application/json
531
    responses:
582
    responses:
532
      "200":
583
      200:
533
        description: A successfully updated patron
584
        description: A successfully updated patron
534
        schema:
585
        schema:
535
          items:
586
          items:
536
            $ref: "../swagger.yaml#/definitions/patron"
587
            $ref: ../swagger.yaml#/definitions/patron
537
      "400":
588
      400:
538
        description: Bad parameter
589
        description: Bad parameter
539
        schema:
590
        schema:
540
          $ref: "../swagger.yaml#/definitions/error"
591
          $ref: ../swagger.yaml#/definitions/error
541
      "403":
592
      403:
542
        description: Access forbidden
593
        description: Access forbidden
543
        schema:
594
        schema:
544
          $ref: "../swagger.yaml#/definitions/error"
595
          $ref: ../swagger.yaml#/definitions/error
545
      "404":
596
      404:
546
        description: Resource not found
597
        description: Resource not found
547
        schema:
598
        schema:
548
          $ref: "../swagger.yaml#/definitions/error"
599
          $ref: ../swagger.yaml#/definitions/error
549
      "409":
600
      409:
550
        description: Conflict in updating resource
601
        description: Conflict in updating resource
551
        schema:
602
        schema:
552
          $ref: "../swagger.yaml#/definitions/error"
603
          $ref: ../swagger.yaml#/definitions/error
553
      "500":
604
      500:
554
        description: |
605
        description: |
555
          Internal server error. Possible `error_code` attribute values:
606
          Internal server error. Possible `error_code` attribute values:
556
607
          
557
          * `internal_server_error`
608
          * `internal_server_error`
558
        schema:
609
        schema:
559
          $ref: "../swagger.yaml#/definitions/error"
610
          $ref: ../swagger.yaml#/definitions/error
560
      "503":
611
      503:
561
        description: Under maintenance
612
        description: Under maintenance
562
        schema:
613
        schema:
563
          $ref: "../swagger.yaml#/definitions/error"
614
          $ref: ../swagger.yaml#/definitions/error
564
    x-koha-authorization:
615
    x-koha-authorization:
565
      permissions:
616
      permissions:
566
        borrowers: "1"
617
        borrowers: 1
567
  delete:
618
    consumes:
568
    x-mojo-to: Patrons#delete
569
    operationId: deletePatron
570
    tags:
571
      - patrons
572
    summary: Delete patron
573
    parameters:
574
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
575
    produces:
576
      - application/json
619
      - application/json
577
    responses:
578
      "204":
579
        description: Patron deleted
580
      "400":
581
        description: Patron deletion failed
582
        schema:
583
          $ref: "../swagger.yaml#/definitions/error"
584
      "401":
585
        description: Authentication required
586
        schema:
587
          $ref: "../swagger.yaml#/definitions/error"
588
      "403":
589
        description: Access forbidden
590
        schema:
591
          $ref: "../swagger.yaml#/definitions/error"
592
      "404":
593
        description: Patron not found
594
        schema:
595
          $ref: "../swagger.yaml#/definitions/error"
596
      "409":
597
        description: |
598
          Conflict. Possible `error_code` attribute values:
599
600
            * `has_checkouts`: The patron has pending checkouts
601
            * `has_debt`: The patron has pending debts
602
            * `has_guarantees`: The patron has guarantees
603
            * `is_anonymous_patron`: The system-wide anonymous patron cannot be deleted
604
        schema:
605
          $ref: "../swagger.yaml#/definitions/error"
606
      "500":
607
        description: |
608
          Internal server error. Possible `error_code` attribute values:
609
610
          * `internal_server_error`
611
        schema:
612
          $ref: "../swagger.yaml#/definitions/error"
613
      "503":
614
        description: Under maintenance
615
        schema:
616
          $ref: "../swagger.yaml#/definitions/error"
617
    x-koha-authorization:
618
      permissions:
619
        borrowers: delete_borrowers
(-)a/api/v1/swagger/paths/patrons_account.yaml (-36 / +36 lines)
Lines 1-92 Link Here
1
---
1
---
2
"/patrons/{patron_id}/account":
2
'/patrons/{patron_id}/account':
3
  get:
3
  get:
4
    x-mojo-to: Patrons::Account#get
4
    x-mojo-to: Patrons::Account#get
5
    operationId: getPatronAccount
5
    operationId: getPatronAccount
6
    tags:
6
    tags:
7
      - patrons
7
      - patrons
8
    summary: Get account information for a patron
8
    summary: Get account information for a patron
9
    parameters:
10
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
11
    produces:
9
    produces:
12
      - application/json
10
      - application/json
11
    parameters:
12
      - $ref: ../swagger.yaml#/parameters/patron_id_pp
13
    responses:
13
    responses:
14
      "200":
14
      200:
15
        description: Patron's account balance
15
        description: Patron's account balance
16
        schema:
16
        schema:
17
          $ref: "../swagger.yaml#/definitions/patron_balance"
17
          $ref: ../swagger.yaml#/definitions/patron_balance
18
      "401":
18
      401:
19
        description: Authentication required
19
        description: Authentication required
20
        schema:
20
        schema:
21
          $ref: "../swagger.yaml#/definitions/error"
21
          $ref: ../swagger.yaml#/definitions/error
22
      "403":
22
      403:
23
        description: Access forbidden
23
        description: Access forbidden
24
        schema:
24
        schema:
25
          $ref: "../swagger.yaml#/definitions/error"
25
          $ref: ../swagger.yaml#/definitions/error
26
      "404":
26
      404:
27
        description: Patron not found
27
        description: Patron not found
28
        schema:
28
        schema:
29
          $ref: "../swagger.yaml#/definitions/error"
29
          $ref: ../swagger.yaml#/definitions/error
30
      "500":
30
      500:
31
        description: |
31
        description: |
32
          Internal server error. Possible `error_code` attribute values:
32
          Internal server error. Possible `error_code` attribute values:
33
33
          
34
          * `internal_server_error`
34
          * `internal_server_error`
35
        schema:
35
        schema:
36
          $ref: "../swagger.yaml#/definitions/error"
36
          $ref: ../swagger.yaml#/definitions/error
37
      "503":
37
      503:
38
        description: Under maintenance
38
        description: Under maintenance
39
        schema:
39
        schema:
40
          $ref: "../swagger.yaml#/definitions/error"
40
          $ref: ../swagger.yaml#/definitions/error
41
    x-koha-authorization:
41
    x-koha-authorization:
42
      permissions:
42
      permissions:
43
        borrowers: edit_borrowers
43
        borrowers: edit_borrowers
44
        updatecharges: remaining_permissions
44
        updatecharges: remaining_permissions
45
"/patrons/{patron_id}/account/credits":
45
'/patrons/{patron_id}/account/credits':
46
  post:
46
  post:
47
    x-mojo-to: Patrons::Account#add_credit
47
    x-mojo-to: Patrons::Account#add_credit
48
    operationId: addPatronCredit
48
    operationId: addPatronCredit
49
    tags:
49
    tags:
50
      - patrons
50
      - patrons
51
    summary: Add credit to a patron's account
51
    summary: Add credit to a patron's account
52
    produces:
53
      - application/json
52
    parameters:
54
    parameters:
53
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
55
      - $ref: ../swagger.yaml#/parameters/patron_id_pp
54
      - name: body
56
      - description: A JSON object containing credit information
55
        in: body
57
        in: body
56
        description: A JSON object containing credit information
58
        name: body
57
        required: true
59
        required: true
58
        schema:
60
        schema:
59
          $ref: "../swagger.yaml#/definitions/patron_account_credit"
61
          $ref: ../swagger.yaml#/definitions/patron_account_credit
60
    produces:
61
      - application/json
62
    responses:
62
    responses:
63
      "201":
63
      201:
64
        description: Credit added
64
        description: Credit added
65
        schema:
65
        schema:
66
          $ref: "../swagger.yaml#/definitions/account_line"
66
          $ref: ../swagger.yaml#/definitions/account_line
67
      "401":
67
      401:
68
        description: Authentication required
68
        description: Authentication required
69
        schema:
69
        schema:
70
          $ref: "../swagger.yaml#/definitions/error"
70
          $ref: ../swagger.yaml#/definitions/error
71
      "403":
71
      403:
72
        description: Access forbidden
72
        description: Access forbidden
73
        schema:
73
        schema:
74
          $ref: "../swagger.yaml#/definitions/error"
74
          $ref: ../swagger.yaml#/definitions/error
75
      "404":
75
      404:
76
        description: Patron not found
76
        description: Patron not found
77
        schema:
77
        schema:
78
          $ref: "../swagger.yaml#/definitions/error"
78
          $ref: ../swagger.yaml#/definitions/error
79
      "500":
79
      500:
80
        description: |
80
        description: |
81
          Internal server error. Possible `error_code` attribute values:
81
          Internal server error. Possible `error_code` attribute values:
82
82
          
83
          * `internal_server_error`
83
          * `internal_server_error`
84
        schema:
84
        schema:
85
          $ref: "../swagger.yaml#/definitions/error"
85
          $ref: ../swagger.yaml#/definitions/error
86
      "503":
86
      503:
87
        description: Under maintenance
87
        description: Under maintenance
88
        schema:
88
        schema:
89
          $ref: "../swagger.yaml#/definitions/error"
89
          $ref: ../swagger.yaml#/definitions/error
90
    x-koha-authorization:
90
    x-koha-authorization:
91
      permissions:
91
      permissions:
92
        updatecharges: remaining_permissions
92
        updatecharges: remaining_permissions
(-)a/api/v1/swagger/paths/patrons_extended_attributes.yaml (-141 / +140 lines)
Lines 1-53 Link Here
1
---
1
---
2
"/patrons/{patron_id}/extended_attributes":
2
'/patrons/{patron_id}/extended_attributes':
3
  get:
3
  get:
4
    x-mojo-to: Patrons::Attributes#list_patron_attributes
4
    x-mojo-to: Patrons::Attributes#list_patron_attributes
5
    operationId: getPatronAttributes
5
    operationId: getPatronAttributes
6
    tags:
6
    tags:
7
      - patrons
7
      - patrons
8
    summary: List extended attributes for a patron
8
    summary: List extended attributes for a patron
9
    parameters:
10
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
11
      - $ref: "../swagger.yaml#/parameters/match"
12
      - $ref: "../swagger.yaml#/parameters/order_by"
13
      - $ref: "../swagger.yaml#/parameters/page"
14
      - $ref: "../swagger.yaml#/parameters/per_page"
15
      - $ref: "../swagger.yaml#/parameters/q_param"
16
      - $ref: "../swagger.yaml#/parameters/q_body"
17
      - $ref: "../swagger.yaml#/parameters/q_header"
18
      - $ref: "../swagger.yaml#/parameters/request_id_header"
19
    produces:
9
    produces:
20
      - application/json
10
      - application/json
11
    parameters:
12
      - $ref: ../swagger.yaml#/parameters/patron_id_pp
13
      - $ref: ../swagger.yaml#/parameters/match
14
      - $ref: ../swagger.yaml#/parameters/order_by
15
      - $ref: ../swagger.yaml#/parameters/page
16
      - $ref: ../swagger.yaml#/parameters/per_page
17
      - $ref: ../swagger.yaml#/parameters/q_param
18
      - $ref: ../swagger.yaml#/parameters/q_body
19
      - $ref: ../swagger.yaml#/parameters/q_header
20
      - $ref: ../swagger.yaml#/parameters/request_id_header
21
    responses:
21
    responses:
22
      "200":
22
      200:
23
        description: The patron extended attributes
23
        description: The patron extended attributes
24
        schema:
24
        schema:
25
          type: array
25
          type: array
26
          items:
26
          items:
27
            $ref: "../swagger.yaml#/definitions/patron_extended_attribute"
27
            $ref: ../swagger.yaml#/definitions/patron_extended_attribute
28
      "401":
28
      401:
29
        description: Authentication required
29
        description: Authentication required
30
        schema:
30
        schema:
31
          $ref: "../swagger.yaml#/definitions/error"
31
          $ref: ../swagger.yaml#/definitions/error
32
      "403":
32
      403:
33
        description: Access forbidden
33
        description: Access forbidden
34
        schema:
34
        schema:
35
          $ref: "../swagger.yaml#/definitions/error"
35
          $ref: ../swagger.yaml#/definitions/error
36
      "404":
36
      404:
37
        description: Patron not found
37
        description: Patron not found
38
        schema:
38
        schema:
39
          $ref: "../swagger.yaml#/definitions/error"
39
          $ref: ../swagger.yaml#/definitions/error
40
      "500":
40
      500:
41
        description: |
41
        description: |
42
          Internal server error. Possible `error_code` attribute values:
42
          Internal server error. Possible `error_code` attribute values:
43
43
          
44
          * `internal_server_error`
44
          * `internal_server_error`
45
        schema:
45
        schema:
46
          $ref: "../swagger.yaml#/definitions/error"
46
          $ref: ../swagger.yaml#/definitions/error
47
      "503":
47
      503:
48
        description: Under maintenance
48
        description: Under maintenance
49
        schema:
49
        schema:
50
          $ref: "../swagger.yaml#/definitions/error"
50
          $ref: ../swagger.yaml#/definitions/error
51
    x-koha-authorization:
51
    x-koha-authorization:
52
      permissions:
52
      permissions:
53
        borrowers: edit_borrowers
53
        borrowers: edit_borrowers
Lines 57-108 Link Here
57
    tags:
57
    tags:
58
      - patrons
58
      - patrons
59
    summary: Add extended attribute for a patron
59
    summary: Add extended attribute for a patron
60
    produces:
61
      - application/json
60
    parameters:
62
    parameters:
61
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
63
      - $ref: ../swagger.yaml#/parameters/patron_id_pp
62
      - name: body
64
      - description: A JSON representation of the patron extended attribute
63
        in: body
65
        in: body
64
        description: A JSON representation of the patron extended attribute
66
        name: body
65
        required: true
67
        required: true
66
        schema:
68
        schema:
67
          $ref: "../swagger.yaml#/definitions/patron_extended_attribute"
69
          $ref: ../swagger.yaml#/definitions/patron_extended_attribute
68
    produces:
69
      - application/json
70
    responses:
70
    responses:
71
      "201":
71
      201:
72
        description: A successfully created patron extended attribute
72
        description: A successfully created patron extended attribute
73
        schema:
73
        schema:
74
          $ref: "../swagger.yaml#/definitions/patron_extended_attribute"
74
          $ref: ../swagger.yaml#/definitions/patron_extended_attribute
75
      "400":
75
      400:
76
        description: Bad parameter
76
        description: Bad parameter
77
        schema:
77
        schema:
78
          $ref: "../swagger.yaml#/definitions/error"
78
          $ref: ../swagger.yaml#/definitions/error
79
      "401":
79
      401:
80
        description: Authentication required
80
        description: Authentication required
81
        schema:
81
        schema:
82
          $ref: "../swagger.yaml#/definitions/error"
82
          $ref: ../swagger.yaml#/definitions/error
83
      "403":
83
      403:
84
        description: Access forbidden
84
        description: Access forbidden
85
        schema:
85
        schema:
86
          $ref: "../swagger.yaml#/definitions/error"
86
          $ref: ../swagger.yaml#/definitions/error
87
      "404":
87
      404:
88
        description: Patron not found
88
        description: Patron not found
89
        schema:
89
        schema:
90
          $ref: "../swagger.yaml#/definitions/error"
90
          $ref: ../swagger.yaml#/definitions/error
91
      "409":
91
      409:
92
        description: Conflict in creating resource
92
        description: Conflict in creating resource
93
        schema:
93
        schema:
94
          $ref: "../swagger.yaml#/definitions/error"
94
          $ref: ../swagger.yaml#/definitions/error
95
      "500":
95
      500:
96
        description: |
96
        description: |
97
          Internal server error. Possible `error_code` attribute values:
97
          Internal server error. Possible `error_code` attribute values:
98
98
          
99
          * `internal_server_error`
99
          * `internal_server_error`
100
        schema:
100
        schema:
101
          $ref: "../swagger.yaml#/definitions/error"
101
          $ref: ../swagger.yaml#/definitions/error
102
      "503":
102
      503:
103
        description: Under maintenance
103
        description: Under maintenance
104
        schema:
104
        schema:
105
          $ref: "../swagger.yaml#/definitions/error"
105
          $ref: ../swagger.yaml#/definitions/error
106
    x-koha-authorization:
106
    x-koha-authorization:
107
      permissions:
107
      permissions:
108
        borrowers: edit_borrowers
108
        borrowers: edit_borrowers
Lines 112-278 Link Here
112
    tags:
112
    tags:
113
      - patrons
113
      - patrons
114
    summary: Overwrite extended attributes for a patron
114
    summary: Overwrite extended attributes for a patron
115
    produces:
116
      - application/json
115
    parameters:
117
    parameters:
116
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
118
      - $ref: ../swagger.yaml#/parameters/patron_id_pp
117
      - name: body
119
      - description: A JSON representation of the patron extended attribute
118
        in: body
120
        in: body
119
        description: A JSON representation of the patron extended attribute
121
        name: body
120
        required: true
122
        required: true
121
        schema:
123
        schema:
122
          type: array
123
          items:
124
          items:
124
            $ref: "../swagger.yaml#/definitions/patron_extended_attribute"
125
            $ref: ../swagger.yaml#/definitions/patron_extended_attribute
125
    produces:
126
          type: array
126
      - application/json
127
    responses:
127
    responses:
128
      "200":
128
      200:
129
        description: The successfully created patron extended attributes
129
        description: The successfully created patron extended attributes
130
        schema:
130
        schema:
131
          type: array
131
          type: array
132
          items:
132
          items:
133
            $ref: "../swagger.yaml#/definitions/patron_extended_attribute"
133
            $ref: ../swagger.yaml#/definitions/patron_extended_attribute
134
      "400":
134
      400:
135
        description: Bad parameters
135
        description: Bad parameters
136
        schema:
136
        schema:
137
          $ref: "../swagger.yaml#/definitions/error"
137
          $ref: ../swagger.yaml#/definitions/error
138
      "401":
138
      401:
139
        description: Authentication required
139
        description: Authentication required
140
        schema:
140
        schema:
141
          $ref: "../swagger.yaml#/definitions/error"
141
          $ref: ../swagger.yaml#/definitions/error
142
      "403":
142
      403:
143
        description: Access forbidden
143
        description: Access forbidden
144
        schema:
144
        schema:
145
          $ref: "../swagger.yaml#/definitions/error"
145
          $ref: ../swagger.yaml#/definitions/error
146
      "404":
146
      404:
147
        description: Patron not found
147
        description: Patron not found
148
        schema:
148
        schema:
149
          $ref: "../swagger.yaml#/definitions/error"
149
          $ref: ../swagger.yaml#/definitions/error
150
      "409":
150
      409:
151
        description: Conflict in creating resource
151
        description: Conflict in creating resource
152
        schema:
152
        schema:
153
          $ref: "../swagger.yaml#/definitions/error"
153
          $ref: ../swagger.yaml#/definitions/error
154
      "500":
154
      500:
155
        description: |
155
        description: |
156
          Internal server error. Possible `error_code` attribute values:
156
          Internal server error. Possible `error_code` attribute values:
157
157
          
158
          * `internal_server_error`
158
          * `internal_server_error`
159
        schema:
159
        schema:
160
          $ref: "../swagger.yaml#/definitions/error"
160
          $ref: ../swagger.yaml#/definitions/error
161
      "503":
161
      503:
162
        description: Under maintenance
162
        description: Under maintenance
163
        schema:
163
        schema:
164
          $ref: "../swagger.yaml#/definitions/error"
164
          $ref: ../swagger.yaml#/definitions/error
165
    x-koha-authorization:
165
    x-koha-authorization:
166
      permissions:
166
      permissions:
167
        borrowers: edit_borrowers
167
        borrowers: edit_borrowers
168
"/patrons/{patron_id}/extended_attributes/{extended_attribute_id}":
168
'/patrons/{patron_id}/extended_attributes/{extended_attribute_id}':
169
  patch:
169
  delete:
170
    x-mojo-to: Patrons::Attributes#update
170
    x-mojo-to: Patrons::Attributes#delete
171
    operationId: updatePatronAttribute
171
    operationId: deletePatronAttribute
172
    tags:
172
    tags:
173
      - patrons
173
      - patrons
174
    summary: Update extended attribute
174
    summary: Delete extended attribute
175
    produces:
176
      - application/json
175
    parameters:
177
    parameters:
176
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
178
      - $ref: ../swagger.yaml#/parameters/patron_id_pp
177
      - name: extended_attribute_id
179
      - description: Internal patron extended attribute identifier
178
        in: path
180
        in: path
179
        description: Internal patron extended attribute identifier
181
        name: extended_attribute_id
180
        type: integer
181
        required: true
182
        required: true
182
      - name: body
183
        type: integer
183
        in: body
184
        description: An object containing the updated values for the patron extended
185
          attribute
186
        required: true
187
        schema:
188
          type: object
189
          properties:
190
            value:
191
              description: Extended attribute value
192
              type: string
193
          additionalProperties: false
194
    produces:
195
      - application/json
196
    responses:
184
    responses:
197
      "200":
185
      204:
198
        description: A successfully updated patron extended attribute
186
        description: Extended patron attribute deleted
199
        schema:
187
      401:
200
          $ref: "../swagger.yaml#/definitions/patron_extended_attribute"
201
      "400":
202
        description: Bad parameter
203
        schema:
204
          $ref: "../swagger.yaml#/definitions/error"
205
      "401":
206
        description: Authentication required
188
        description: Authentication required
207
        schema:
189
        schema:
208
          $ref: "../swagger.yaml#/definitions/error"
190
          $ref: ../swagger.yaml#/definitions/error
209
      "403":
191
      403:
210
        description: Access forbidden
192
        description: Access forbidden
211
        schema:
193
        schema:
212
          $ref: "../swagger.yaml#/definitions/error"
194
          $ref: ../swagger.yaml#/definitions/error
213
      "404":
195
      404:
214
        description: Object not found
196
        description: Patron not found
215
        schema:
216
          $ref: "../swagger.yaml#/definitions/error"
217
      "409":
218
        description: Conflict in updating resource
219
        schema:
197
        schema:
220
          $ref: "../swagger.yaml#/definitions/error"
198
          $ref: ../swagger.yaml#/definitions/error
221
      "500":
199
      500:
222
        description: |
200
        description: |
223
          Internal server error. Possible `error_code` attribute values:
201
          Internal server error. Possible `error_code` attribute values:
224
202
          
225
          * `internal_server_error`
203
          * `internal_server_error`
226
        schema:
204
        schema:
227
          $ref: "../swagger.yaml#/definitions/error"
205
          $ref: ../swagger.yaml#/definitions/error
228
      "503":
206
      503:
229
        description: Under maintenance
207
        description: Under maintenance
230
        schema:
208
        schema:
231
          $ref: "../swagger.yaml#/definitions/error"
209
          $ref: ../swagger.yaml#/definitions/error
232
    x-koha-authorization:
210
    x-koha-authorization:
233
      permissions:
211
      permissions:
234
        borrowers: edit_borrowers
212
        borrowers: edit_borrowers
235
  delete:
213
  patch:
236
    x-mojo-to: Patrons::Attributes#delete
214
    x-mojo-to: Patrons::Attributes#update
237
    operationId: deletePatronAttribute
215
    operationId: updatePatronAttribute
238
    tags:
216
    tags:
239
      - patrons
217
      - patrons
240
    summary: Delete extended attribute
218
    summary: Update extended attribute
219
    produces:
220
      - application/json
241
    parameters:
221
    parameters:
242
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
222
      - $ref: ../swagger.yaml#/parameters/patron_id_pp
243
      - name: extended_attribute_id
223
      - description: Internal patron extended attribute identifier
244
        in: path
224
        in: path
245
        description: Internal patron extended attribute identifier
225
        name: extended_attribute_id
226
        required: true
246
        type: integer
227
        type: integer
228
      - description: An object containing the updated values for the patron extended attribute
229
        in: body
230
        name: body
247
        required: true
231
        required: true
248
    produces:
232
        schema:
249
      - application/json
233
          additionalProperties: false
234
          properties:
235
            value:
236
              description: Extended attribute value
237
              type: string
238
          type: object
250
    responses:
239
    responses:
251
      "204":
240
      200:
252
        description: Extended patron attribute deleted
241
        description: A successfully updated patron extended attribute
253
      "401":
242
        schema:
243
          $ref: ../swagger.yaml#/definitions/patron_extended_attribute
244
      400:
245
        description: Bad parameter
246
        schema:
247
          $ref: ../swagger.yaml#/definitions/error
248
      401:
254
        description: Authentication required
249
        description: Authentication required
255
        schema:
250
        schema:
256
          $ref: "../swagger.yaml#/definitions/error"
251
          $ref: ../swagger.yaml#/definitions/error
257
      "403":
252
      403:
258
        description: Access forbidden
253
        description: Access forbidden
259
        schema:
254
        schema:
260
          $ref: "../swagger.yaml#/definitions/error"
255
          $ref: ../swagger.yaml#/definitions/error
261
      "404":
256
      404:
262
        description: Patron not found
257
        description: Object not found
258
        schema:
259
          $ref: ../swagger.yaml#/definitions/error
260
      409:
261
        description: Conflict in updating resource
263
        schema:
262
        schema:
264
          $ref: "../swagger.yaml#/definitions/error"
263
          $ref: ../swagger.yaml#/definitions/error
265
      "500":
264
      500:
266
        description: |
265
        description: |
267
          Internal server error. Possible `error_code` attribute values:
266
          Internal server error. Possible `error_code` attribute values:
268
267
          
269
          * `internal_server_error`
268
          * `internal_server_error`
270
        schema:
269
        schema:
271
          $ref: "../swagger.yaml#/definitions/error"
270
          $ref: ../swagger.yaml#/definitions/error
272
      "503":
271
      503:
273
        description: Under maintenance
272
        description: Under maintenance
274
        schema:
273
        schema:
275
          $ref: "../swagger.yaml#/definitions/error"
274
          $ref: ../swagger.yaml#/definitions/error
276
    x-koha-authorization:
275
    x-koha-authorization:
277
      permissions:
276
      permissions:
278
        borrowers: edit_borrowers
277
        borrowers: edit_borrowers
(-)a/api/v1/swagger/paths/patrons_holds.yaml (-24 / +24 lines)
Lines 1-53 Link Here
1
---
1
---
2
"/patrons/{patron_id}/holds":
2
'/patrons/{patron_id}/holds':
3
  get:
3
  get:
4
    x-mojo-to: Patrons::Holds#list
4
    x-mojo-to: Patrons::Holds#list
5
    operationId: getPatronHolds
5
    operationId: getPatronHolds
6
    tags:
6
    tags:
7
      - holds
7
      - holds
8
    summary: List holds for a patron
8
    summary: List holds for a patron
9
    parameters:
10
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
11
      - $ref: "../swagger.yaml#/parameters/match"
12
      - $ref: "../swagger.yaml#/parameters/order_by"
13
      - $ref: "../swagger.yaml#/parameters/page"
14
      - $ref: "../swagger.yaml#/parameters/per_page"
15
      - $ref: "../swagger.yaml#/parameters/q_param"
16
      - $ref: "../swagger.yaml#/parameters/q_body"
17
      - $ref: "../swagger.yaml#/parameters/q_header"
18
      - $ref: "../swagger.yaml#/parameters/request_id_header"
19
    produces:
9
    produces:
20
      - application/json
10
      - application/json
11
    parameters:
12
      - $ref: ../swagger.yaml#/parameters/patron_id_pp
13
      - $ref: ../swagger.yaml#/parameters/match
14
      - $ref: ../swagger.yaml#/parameters/order_by
15
      - $ref: ../swagger.yaml#/parameters/page
16
      - $ref: ../swagger.yaml#/parameters/per_page
17
      - $ref: ../swagger.yaml#/parameters/q_param
18
      - $ref: ../swagger.yaml#/parameters/q_body
19
      - $ref: ../swagger.yaml#/parameters/q_header
20
      - $ref: ../swagger.yaml#/parameters/request_id_header
21
    responses:
21
    responses:
22
      "200":
22
      200:
23
        description: The patron holds
23
        description: The patron holds
24
        schema:
24
        schema:
25
          type: array
25
          type: array
26
          items:
26
          items:
27
            $ref: "../swagger.yaml#/definitions/hold"
27
            $ref: ../swagger.yaml#/definitions/hold
28
      "401":
28
      401:
29
        description: Authentication required
29
        description: Authentication required
30
        schema:
30
        schema:
31
          $ref: "../swagger.yaml#/definitions/error"
31
          $ref: ../swagger.yaml#/definitions/error
32
      "403":
32
      403:
33
        description: Access forbidden
33
        description: Access forbidden
34
        schema:
34
        schema:
35
          $ref: "../swagger.yaml#/definitions/error"
35
          $ref: ../swagger.yaml#/definitions/error
36
      "404":
36
      404:
37
        description: Patron not found
37
        description: Patron not found
38
        schema:
38
        schema:
39
          $ref: "../swagger.yaml#/definitions/error"
39
          $ref: ../swagger.yaml#/definitions/error
40
      "500":
40
      500:
41
        description: |
41
        description: |
42
          Internal server error. Possible `error_code` attribute values:
42
          Internal server error. Possible `error_code` attribute values:
43
43
          
44
          * `internal_server_error`
44
          * `internal_server_error`
45
        schema:
45
        schema:
46
          $ref: "../swagger.yaml#/definitions/error"
46
          $ref: ../swagger.yaml#/definitions/error
47
      "503":
47
      503:
48
        description: Under maintenance
48
        description: Under maintenance
49
        schema:
49
        schema:
50
          $ref: "../swagger.yaml#/definitions/error"
50
          $ref: ../swagger.yaml#/definitions/error
51
    x-koha-authorization:
51
    x-koha-authorization:
52
      permissions:
52
      permissions:
53
        borrowers: edit_borrowers
53
        borrowers: edit_borrowers
(-)a/api/v1/swagger/paths/patrons_password.yaml (-23 / +23 lines)
Lines 1-18 Link Here
1
---
1
---
2
"/patrons/{patron_id}/password":
2
'/patrons/{patron_id}/password':
3
  post:
3
  post:
4
    x-mojo-to: Patrons::Password#set
4
    x-mojo-to: Patrons::Password#set
5
    operationId: setPatronPassword
5
    operationId: setPatronPassword
6
    tags:
6
    tags:
7
      - patrons
7
      - patrons
8
    summary: Set password for a patron
8
    summary: Set password for a patron
9
    produces:
10
      - application/json
9
    parameters:
11
    parameters:
10
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
12
      - $ref: ../swagger.yaml#/parameters/patron_id_pp
11
      - name: body
13
      - description: A JSON object containing password information
12
        in: body
14
        in: body
13
        description: A JSON object containing password information
15
        name: body
14
        schema:
16
        schema:
15
          type: object
17
          additionalProperties: false
16
          properties:
18
          properties:
17
            password:
19
            password:
18
              description: New password (plain text)
20
              description: New password (plain text)
Lines 23-61 Link Here
23
          required:
25
          required:
24
            - password
26
            - password
25
            - password_2
27
            - password_2
26
          additionalProperties: false
28
          type: object
27
    produces:
28
      - application/json
29
    responses:
29
    responses:
30
      "200":
30
      200:
31
        description: Password changed
31
        description: Password changed
32
      "400":
32
      400:
33
        description: Bad request
33
        description: Bad request
34
        schema:
34
        schema:
35
          $ref: "../swagger.yaml#/definitions/error"
35
          $ref: ../swagger.yaml#/definitions/error
36
      "401":
36
      401:
37
        description: Authentication required
37
        description: Authentication required
38
        schema:
38
        schema:
39
          $ref: "../swagger.yaml#/definitions/error"
39
          $ref: ../swagger.yaml#/definitions/error
40
      "403":
40
      403:
41
        description: Access forbidden
41
        description: Access forbidden
42
        schema:
42
        schema:
43
          $ref: "../swagger.yaml#/definitions/error"
43
          $ref: ../swagger.yaml#/definitions/error
44
      "404":
44
      404:
45
        description: Patron not found
45
        description: Patron not found
46
        schema:
46
        schema:
47
          $ref: "../swagger.yaml#/definitions/error"
47
          $ref: ../swagger.yaml#/definitions/error
48
      "500":
48
      500:
49
        description: |
49
        description: |
50
          Internal server error. Possible `error_code` attribute values:
50
          Internal server error. Possible `error_code` attribute values:
51
51
          
52
          * `internal_server_error`
52
          * `internal_server_error`
53
        schema:
53
        schema:
54
          $ref: "../swagger.yaml#/definitions/error"
54
          $ref: ../swagger.yaml#/definitions/error
55
      "503":
55
      503:
56
        description: Under maintenance
56
        description: Under maintenance
57
        schema:
57
        schema:
58
          $ref: "../swagger.yaml#/definitions/error"
58
          $ref: ../swagger.yaml#/definitions/error
59
    x-koha-authorization:
59
    x-koha-authorization:
60
      permissions:
60
      permissions:
61
        borrowers: "1"
61
        borrowers: 1
(-)a/api/v1/swagger/paths/public_patrons.yaml (-98 / +96 lines)
Lines 1-172 Link Here
1
---
1
---
2
"/public/patrons/{patron_id}/password":
2
'/public/patrons/{patron_id}/guarantors/can_see_charges':
3
  post:
3
  put:
4
    x-mojo-to: Patrons::Password#set_public
4
    x-mojo-to: Patrons#guarantors_can_see_charges
5
    operationId: setPatronPasswordPublic
5
    operationId: setPatronGuarantorsCanSeeCharges
6
    tags:
6
    tags:
7
      - patrons
7
      - patrons
8
    summary: Set password for a patron (public)
8
    summary: Set if guarantors can see charges (public)
9
    produces:
10
      - application/json
9
    parameters:
11
    parameters:
10
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
12
      - $ref: ../swagger.yaml#/parameters/patron_id_pp
11
      - name: body
13
      - description: A boolean representing if guarantors should be able to see the patron's charges
12
        in: body
14
        in: body
13
        description: A JSON object containing password information
15
        name: body
16
        required: true
14
        schema:
17
        schema:
15
          type: object
16
          properties:
17
            password:
18
              description: New password (plain text)
19
              type: string
20
            password_repeated:
21
              description: Repeated new password (plain text)
22
              type: string
23
            old_password:
24
              description: Patron's original password
25
              type: string
26
          required:
27
            - password
28
            - password_repeated
29
            - old_password
30
          additionalProperties: false
18
          additionalProperties: false
31
    produces:
19
          properties:
32
      - application/json
20
            allowed:
21
              type: boolean
22
          type: object
33
    responses:
23
    responses:
34
      "200":
24
      200:
35
        description: Password changed
25
        description: Charges view policy for guarantors changed
36
      "400":
26
      400:
37
        description: Bad request
27
        description: Bad request
38
        schema:
28
        schema:
39
          $ref: "../swagger.yaml#/definitions/error"
29
          $ref: ../swagger.yaml#/definitions/error
40
      "401":
30
      401:
41
        description: Authentication required
31
        description: Authentication required
42
        schema:
32
        schema:
43
          $ref: "../swagger.yaml#/definitions/error"
33
          $ref: ../swagger.yaml#/definitions/error
44
      "403":
34
      403:
45
        description: Access forbidden
35
        description: Access forbidden
46
        schema:
36
        schema:
47
          $ref: "../swagger.yaml#/definitions/error"
37
          $ref: ../swagger.yaml#/definitions/error
48
      "404":
38
      404:
49
        description: Patron not found
39
        description: Patron not found
50
        schema:
40
        schema:
51
          $ref: "../swagger.yaml#/definitions/error"
41
          $ref: ../swagger.yaml#/definitions/error
52
      "500":
42
      500:
53
        description: |
43
        description: |
54
          Internal server error. Possible `error_code` attribute values:
44
          Internal server error. Possible `error_code` attribute values:
55
45
          
56
          * `internal_server_error`
46
          * `internal_server_error`
57
        schema:
47
        schema:
58
          $ref: "../swagger.yaml#/definitions/error"
48
          $ref: ../swagger.yaml#/definitions/error
59
      "503":
49
      503:
60
        description: Under maintenance
50
        description: Under maintenance
61
        schema:
51
        schema:
62
          $ref: "../swagger.yaml#/definitions/error"
52
          $ref: ../swagger.yaml#/definitions/error
63
    x-koha-authorization:
53
    x-koha-authorization:
64
      allow-owner: true
54
      allow-owner: true
65
"/public/patrons/{patron_id}/guarantors/can_see_charges":
55
'/public/patrons/{patron_id}/guarantors/can_see_checkouts':
66
  put:
56
  put:
67
    x-mojo-to: Patrons#guarantors_can_see_charges
57
    x-mojo-to: Patrons#guarantors_can_see_checkouts
68
    operationId: setPatronGuarantorsCanSeeCharges
58
    operationId: setPatronGuarantorsCanSeeCheckouts
69
    tags:
59
    tags:
70
      - patrons
60
      - patrons
71
    summary: Set if guarantors can see charges (public)
61
    summary: Set if guarantors can see checkouts
62
    produces:
63
      - application/json
72
    parameters:
64
    parameters:
73
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
65
      - $ref: ../swagger.yaml#/parameters/patron_id_pp
74
      - name: body
66
      - description: A boolean representing if guarantors should be able to see the patron's checkouts
75
        in: body
67
        in: body
76
        description: A boolean representing if guarantors should be able to see the
68
        name: body
77
          patron's charges
78
        required: true
69
        required: true
79
        schema:
70
        schema:
80
          type: object
71
          additionalProperties: false
81
          properties:
72
          properties:
82
            allowed:
73
            allowed:
83
              type: boolean
74
              type: boolean
84
          additionalProperties: false
75
          type: object
85
    produces:
86
      - application/json
87
    responses:
76
    responses:
88
      "200":
77
      200:
89
        description: Charges view policy for guarantors changed
78
        description: Check-out view policy for guarantors changed
90
      "400":
79
      400:
91
        description: Bad request
80
        description: Bad request
92
        schema:
81
        schema:
93
          $ref: "../swagger.yaml#/definitions/error"
82
          $ref: ../swagger.yaml#/definitions/error
94
      "401":
83
      401:
95
        description: Authentication required
84
        description: Authentication required
96
        schema:
85
        schema:
97
          $ref: "../swagger.yaml#/definitions/error"
86
          $ref: ../swagger.yaml#/definitions/error
98
      "403":
87
      403:
99
        description: Access forbidden
88
        description: Access forbidden
100
        schema:
89
        schema:
101
          $ref: "../swagger.yaml#/definitions/error"
90
          $ref: ../swagger.yaml#/definitions/error
102
      "404":
91
      404:
103
        description: Patron not found
92
        description: Patron not found
104
        schema:
93
        schema:
105
          $ref: "../swagger.yaml#/definitions/error"
94
          $ref: ../swagger.yaml#/definitions/error
106
      "500":
95
      500:
107
        description: |
96
        description: |
108
          Internal server error. Possible `error_code` attribute values:
97
          Internal server error. Possible `error_code` attribute values:
109
98
          
110
          * `internal_server_error`
99
          * `internal_server_error`
111
        schema:
100
        schema:
112
          $ref: "../swagger.yaml#/definitions/error"
101
          $ref: ../swagger.yaml#/definitions/error
113
      "503":
102
      503:
114
        description: Under maintenance
103
        description: Under maintenance
115
        schema:
104
        schema:
116
          $ref: "../swagger.yaml#/definitions/error"
105
          $ref: ../swagger.yaml#/definitions/error
117
    x-koha-authorization:
106
    x-koha-authorization:
118
      allow-owner: true
107
      allow-owner: true
119
"/public/patrons/{patron_id}/guarantors/can_see_checkouts":
108
'/public/patrons/{patron_id}/password':
120
  put:
109
  post:
121
    x-mojo-to: Patrons#guarantors_can_see_checkouts
110
    x-mojo-to: Patrons::Password#set_public
122
    operationId: setPatronGuarantorsCanSeeCheckouts
111
    operationId: setPatronPasswordPublic
123
    tags:
112
    tags:
124
      - patrons
113
      - patrons
125
    summary: Set if guarantors can see checkouts
114
    summary: Set password for a patron (public)
115
    produces:
116
      - application/json
126
    parameters:
117
    parameters:
127
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
118
      - $ref: ../swagger.yaml#/parameters/patron_id_pp
128
      - name: body
119
      - description: A JSON object containing password information
129
        in: body
120
        in: body
130
        description: A boolean representing if guarantors should be able to see the
121
        name: body
131
          patron's checkouts
132
        required: true
133
        schema:
122
        schema:
134
          type: object
135
          properties:
136
            allowed:
137
              type: boolean
138
          additionalProperties: false
123
          additionalProperties: false
139
    produces:
124
          properties:
140
      - application/json
125
            old_password:
126
              description: Patron's original password
127
              type: string
128
            password:
129
              description: New password (plain text)
130
              type: string
131
            password_repeated:
132
              description: Repeated new password (plain text)
133
              type: string
134
          required:
135
            - password
136
            - password_repeated
137
            - old_password
138
          type: object
141
    responses:
139
    responses:
142
      "200":
140
      200:
143
        description: Check-out view policy for guarantors changed
141
        description: Password changed
144
      "400":
142
      400:
145
        description: Bad request
143
        description: Bad request
146
        schema:
144
        schema:
147
          $ref: "../swagger.yaml#/definitions/error"
145
          $ref: ../swagger.yaml#/definitions/error
148
      "401":
146
      401:
149
        description: Authentication required
147
        description: Authentication required
150
        schema:
148
        schema:
151
          $ref: "../swagger.yaml#/definitions/error"
149
          $ref: ../swagger.yaml#/definitions/error
152
      "403":
150
      403:
153
        description: Access forbidden
151
        description: Access forbidden
154
        schema:
152
        schema:
155
          $ref: "../swagger.yaml#/definitions/error"
153
          $ref: ../swagger.yaml#/definitions/error
156
      "404":
154
      404:
157
        description: Patron not found
155
        description: Patron not found
158
        schema:
156
        schema:
159
          $ref: "../swagger.yaml#/definitions/error"
157
          $ref: ../swagger.yaml#/definitions/error
160
      "500":
158
      500:
161
        description: |
159
        description: |
162
          Internal server error. Possible `error_code` attribute values:
160
          Internal server error. Possible `error_code` attribute values:
163
161
          
164
          * `internal_server_error`
162
          * `internal_server_error`
165
        schema:
163
        schema:
166
          $ref: "../swagger.yaml#/definitions/error"
164
          $ref: ../swagger.yaml#/definitions/error
167
      "503":
165
      503:
168
        description: Under maintenance
166
        description: Under maintenance
169
        schema:
167
        schema:
170
          $ref: "../swagger.yaml#/definitions/error"
168
          $ref: ../swagger.yaml#/definitions/error
171
    x-koha-authorization:
169
    x-koha-authorization:
172
      allow-owner: true
170
      allow-owner: true
(-)a/api/v1/swagger/paths/quotes.yaml (-110 / +110 lines)
Lines 9-226 Link Here
9
    produces:
9
    produces:
10
      - application/json
10
      - application/json
11
    parameters:
11
    parameters:
12
      - name: quote_id
12
      - description: Case insensitive search on quote id
13
        in: query
13
        in: query
14
        description: Case insensitive search on quote id
14
        name: quote_id
15
        required: false
15
        required: false
16
        type: string
16
        type: string
17
      - name: source
17
      - description: Case insensitive search on source
18
        in: query
18
        in: query
19
        description: Case insensitive search on source
19
        name: source
20
        required: false
20
        required: false
21
        type: string
21
        type: string
22
      - name: text
22
      - description: Case insensitive search on text
23
        in: query
23
        in: query
24
        description: Case insensitive search on text
24
        name: text
25
        required: false
25
        required: false
26
        type: string
26
        type: string
27
      - name: displayed_on
27
      - description: Case Insensative search on last displayed date
28
        in: query
28
        in: query
29
        description: Case Insensative search on last displayed date
29
        name: displayed_on
30
        required: false
30
        required: false
31
        type: string
31
        type: string
32
      - $ref: "../swagger.yaml#/parameters/match"
32
      - $ref: ../swagger.yaml#/parameters/match
33
      - $ref: "../swagger.yaml#/parameters/order_by"
33
      - $ref: ../swagger.yaml#/parameters/order_by
34
      - $ref: "../swagger.yaml#/parameters/page"
34
      - $ref: ../swagger.yaml#/parameters/page
35
      - $ref: "../swagger.yaml#/parameters/per_page"
35
      - $ref: ../swagger.yaml#/parameters/per_page
36
      - $ref: "../swagger.yaml#/parameters/q_param"
36
      - $ref: ../swagger.yaml#/parameters/q_param
37
      - $ref: "../swagger.yaml#/parameters/q_body"
37
      - $ref: ../swagger.yaml#/parameters/q_body
38
      - $ref: "../swagger.yaml#/parameters/q_header"
38
      - $ref: ../swagger.yaml#/parameters/q_header
39
      - $ref: "../swagger.yaml#/parameters/request_id_header"
39
      - $ref: ../swagger.yaml#/parameters/request_id_header
40
    responses:
40
    responses:
41
      "200":
41
      200:
42
        description: A list of quotes
42
        description: A list of quotes
43
        schema:
43
        schema:
44
          type: array
44
          type: array
45
          items:
45
          items:
46
            $ref: "../swagger.yaml#/definitions/quote"
46
            $ref: ../swagger.yaml#/definitions/quote
47
      "403":
47
      403:
48
        description: Access forbidden
48
        description: Access forbidden
49
        schema:
49
        schema:
50
          $ref: "../swagger.yaml#/definitions/error"
50
          $ref: ../swagger.yaml#/definitions/error
51
      "500":
51
      500:
52
        description: |
52
        description: |
53
          Internal server error. Possible `error_code` attribute values:
53
          Internal server error. Possible `error_code` attribute values:
54
54
          
55
          * `internal_server_error`
55
          * `internal_server_error`
56
        schema:
56
        schema:
57
          $ref: "../swagger.yaml#/definitions/error"
57
          $ref: ../swagger.yaml#/definitions/error
58
      "503":
58
      503:
59
        description: Under maintenance
59
        description: Under maintenance
60
        schema:
60
        schema:
61
          $ref: "../swagger.yaml#/definitions/error"
61
          $ref: ../swagger.yaml#/definitions/error
62
    x-koha-authorization:
62
    x-koha-authorization:
63
      permissions:
63
      permissions:
64
        catalogue: "1"
64
        catalogue: 1
65
  post:
65
  post:
66
    x-mojo-to: Quotes#add
66
    x-mojo-to: Quotes#add
67
    operationId: addQuote
67
    operationId: addQuote
68
    tags:
68
    tags:
69
      - quotes
69
      - quotes
70
    summary: Add quote
70
    summary: Add quote
71
    produces:
72
      - application/json
71
    parameters:
73
    parameters:
72
      - name: body
74
      - description: A JSON object containing informations about the new quote
73
        in: body
75
        in: body
74
        description: A JSON object containing informations about the new quote
76
        name: body
75
        required: true
77
        required: true
76
        schema:
78
        schema:
77
          $ref: "../swagger.yaml#/definitions/quote"
79
          $ref: ../swagger.yaml#/definitions/quote
78
    produces:
79
      - application/json
80
    responses:
80
    responses:
81
      "201":
81
      201:
82
        description: Quote added
82
        description: Quote added
83
        schema:
83
        schema:
84
          $ref: "../swagger.yaml#/definitions/quote"
84
          $ref: ../swagger.yaml#/definitions/quote
85
      "401":
85
      401:
86
        description: Authentication required
86
        description: Authentication required
87
        schema:
87
        schema:
88
          $ref: "../swagger.yaml#/definitions/error"
88
          $ref: ../swagger.yaml#/definitions/error
89
      "403":
89
      403:
90
        description: Access forbidden
90
        description: Access forbidden
91
        schema:
91
        schema:
92
          $ref: "../swagger.yaml#/definitions/error"
92
          $ref: ../swagger.yaml#/definitions/error
93
      "500":
93
      500:
94
        description: |
94
        description: |
95
          Internal server error. Possible `error_code` attribute values:
95
          Internal server error. Possible `error_code` attribute values:
96
96
          
97
          * `internal_server_error`
97
          * `internal_server_error`
98
        schema:
98
        schema:
99
          $ref: "../swagger.yaml#/definitions/error"
99
          $ref: ../swagger.yaml#/definitions/error
100
      "503":
100
      503:
101
        description: Under maintenance
101
        description: Under maintenance
102
        schema:
102
        schema:
103
          $ref: "../swagger.yaml#/definitions/error"
103
          $ref: ../swagger.yaml#/definitions/error
104
    x-koha-authorization:
104
    x-koha-authorization:
105
      permissions:
105
      permissions:
106
        tools: edit_quotes
106
        tools: edit_quotes
107
"/quotes/{quote_id}":
107
'/quotes/{quote_id}':
108
  get:
108
  delete:
109
    x-mojo-to: Quotes#get
109
    x-mojo-to: Quotes#delete
110
    operationId: getQuote
110
    operationId: deleteQuote
111
    tags:
111
    tags:
112
      - quotes
112
      - quotes
113
    summary: Get quote
113
    summary: Delete quote
114
    parameters:
115
      - $ref: "../swagger.yaml#/parameters/quote_id_pp"
116
    produces:
114
    produces:
117
      - application/json
115
      - application/json
116
    parameters:
117
      - $ref: ../swagger.yaml#/parameters/quote_id_pp
118
    responses:
118
    responses:
119
      "200":
119
      204:
120
        description: A Quote
120
        description: Quote deleted
121
      401:
122
        description: Authentication required
121
        schema:
123
        schema:
122
          $ref: "../swagger.yaml#/definitions/quote"
124
          $ref: ../swagger.yaml#/definitions/error
123
      "404":
125
      403:
126
        description: Access forbidden
127
        schema:
128
          $ref: ../swagger.yaml#/definitions/error
129
      404:
124
        description: Quote not found
130
        description: Quote not found
125
        schema:
131
        schema:
126
          $ref: "../swagger.yaml#/definitions/error"
132
          $ref: ../swagger.yaml#/definitions/error
127
      "500":
133
      500:
128
        description: |
134
        description: |
129
          Internal server error. Possible `error_code` attribute values:
135
          Internal server error. Possible `error_code` attribute values:
130
136
          
131
          * `internal_server_error`
137
          * `internal_server_error`
132
        schema:
138
        schema:
133
          $ref: "../swagger.yaml#/definitions/error"
139
          $ref: ../swagger.yaml#/definitions/error
134
      "503":
140
      503:
135
        description: Under maintenance
141
        description: Under maintenance
136
        schema:
142
        schema:
137
          $ref: "../swagger.yaml#/definitions/error"
143
          $ref: ../swagger.yaml#/definitions/error
138
    x-koha-authorization:
144
    x-koha-authorization:
139
      permissions:
145
      permissions:
140
        catalogue: "1"
146
        tools: edit_quotes
141
  put:
147
  get:
142
    x-mojo-to: Quotes#update
148
    x-mojo-to: Quotes#get
143
    operationId: updateQuote
149
    operationId: getQuote
144
    tags:
150
    tags:
145
      - quotes
151
      - quotes
146
    summary: Update quote
152
    summary: Get quote
147
    parameters:
148
      - $ref: "../swagger.yaml#/parameters/quote_id_pp"
149
      - name: body
150
        in: body
151
        description: a quote object
152
        required: true
153
        schema:
154
          $ref: "../swagger.yaml#/definitions/quote"
155
    produces:
153
    produces:
156
      - application/json
154
      - application/json
155
    parameters:
156
      - $ref: ../swagger.yaml#/parameters/quote_id_pp
157
    responses:
157
    responses:
158
      "200":
158
      200:
159
        description: A quote
159
        description: A Quote
160
        schema:
161
          $ref: "../swagger.yaml#/definitions/quote"
162
      "401":
163
        description: Authentication required
164
        schema:
165
          $ref: "../swagger.yaml#/definitions/error"
166
      "403":
167
        description: Access forbidden
168
        schema:
160
        schema:
169
          $ref: "../swagger.yaml#/definitions/error"
161
          $ref: ../swagger.yaml#/definitions/quote
170
      "404":
162
      404:
171
        description: Quote not found
163
        description: Quote not found
172
        schema:
164
        schema:
173
          $ref: "../swagger.yaml#/definitions/error"
165
          $ref: ../swagger.yaml#/definitions/error
174
      "500":
166
      500:
175
        description: |
167
        description: |
176
          Internal server error. Possible `error_code` attribute values:
168
          Internal server error. Possible `error_code` attribute values:
177
169
          
178
          * `internal_server_error`
170
          * `internal_server_error`
179
        schema:
171
        schema:
180
          $ref: "../swagger.yaml#/definitions/error"
172
          $ref: ../swagger.yaml#/definitions/error
181
      "503":
173
      503:
182
        description: Under maintenance
174
        description: Under maintenance
183
        schema:
175
        schema:
184
          $ref: "../swagger.yaml#/definitions/error"
176
          $ref: ../swagger.yaml#/definitions/error
185
    x-koha-authorization:
177
    x-koha-authorization:
186
      permissions:
178
      permissions:
187
        tools: edit_quotes
179
        catalogue: 1
188
  delete:
180
  put:
189
    x-mojo-to: Quotes#delete
181
    x-mojo-to: Quotes#update
190
    operationId: deleteQuote
182
    operationId: updateQuote
191
    tags:
183
    tags:
192
      - quotes
184
      - quotes
193
    summary: Delete quote
185
    summary: Update quote
194
    parameters:
195
      - $ref: "../swagger.yaml#/parameters/quote_id_pp"
196
    produces:
186
    produces:
197
      - application/json
187
      - application/json
188
    parameters:
189
      - $ref: ../swagger.yaml#/parameters/quote_id_pp
190
      - description: a quote object
191
        in: body
192
        name: body
193
        required: true
194
        schema:
195
          $ref: ../swagger.yaml#/definitions/quote
198
    responses:
196
    responses:
199
      "204":
197
      200:
200
        description: Quote deleted
198
        description: A quote
201
      "401":
199
        schema:
200
          $ref: ../swagger.yaml#/definitions/quote
201
      401:
202
        description: Authentication required
202
        description: Authentication required
203
        schema:
203
        schema:
204
          $ref: "../swagger.yaml#/definitions/error"
204
          $ref: ../swagger.yaml#/definitions/error
205
      "403":
205
      403:
206
        description: Access forbidden
206
        description: Access forbidden
207
        schema:
207
        schema:
208
          $ref: "../swagger.yaml#/definitions/error"
208
          $ref: ../swagger.yaml#/definitions/error
209
      "404":
209
      404:
210
        description: Quote not found
210
        description: Quote not found
211
        schema:
211
        schema:
212
          $ref: "../swagger.yaml#/definitions/error"
212
          $ref: ../swagger.yaml#/definitions/error
213
      "500":
213
      500:
214
        description: |
214
        description: |
215
          Internal server error. Possible `error_code` attribute values:
215
          Internal server error. Possible `error_code` attribute values:
216
216
          
217
          * `internal_server_error`
217
          * `internal_server_error`
218
        schema:
218
        schema:
219
          $ref: "../swagger.yaml#/definitions/error"
219
          $ref: ../swagger.yaml#/definitions/error
220
      "503":
220
      503:
221
        description: Under maintenance
221
        description: Under maintenance
222
        schema:
222
        schema:
223
          $ref: "../swagger.yaml#/definitions/error"
223
          $ref: ../swagger.yaml#/definitions/error
224
    x-koha-authorization:
224
    x-koha-authorization:
225
      permissions:
225
      permissions:
226
        tools: edit_quotes
226
        tools: edit_quotes
(-)a/api/v1/swagger/paths/return_claims.yaml (-123 / +122 lines)
Lines 3-252 Link Here
3
  post:
3
  post:
4
    x-mojo-to: ReturnClaims#claim_returned
4
    x-mojo-to: ReturnClaims#claim_returned
5
    operationId: claimReturned
5
    operationId: claimReturned
6
    summary: Add a return claim
7
    tags:
6
    tags:
8
      - return_claims
7
      - return_claims
8
    summary: Add a return claim
9
    produces:
10
      - application/json
9
    parameters:
11
    parameters:
10
      - name: body
12
      - description: A JSON object containing fields to modify
11
        in: body
13
        in: body
12
        description: A JSON object containing fields to modify
14
        name: body
13
        required: true
15
        required: true
14
        schema:
16
        schema:
15
          type: object
17
          additionalProperties: false
16
          properties:
18
          properties:
19
            charge_lost_fee:
20
              description: Charge a lost fee if true and Koha is set to allow a choice. Ignored otherwise.
21
              type: boolean
22
            created_by:
23
              description: User id for the librarian submitting this claim
24
              type: string
17
            item_id:
25
            item_id:
18
              description: Internal item id to claim as returned
26
              description: Internal item id to claim as returned
19
              type: integer
27
              type: integer
20
            notes:
28
            notes:
21
              description: Notes about this return claim
29
              description: Notes about this return claim
22
              type: string
30
              type: string
23
            created_by:
31
          type: object
24
              description: User id for the librarian submitting this claim
25
              type: string
26
            charge_lost_fee:
27
              description: Charge a lost fee if true and Koha is set to allow a choice.
28
                Ignored otherwise.
29
              type: boolean
30
          additionalProperties: false
31
    produces:
32
      - application/json
33
    responses:
32
    responses:
34
      "201":
33
      201:
35
        description: Created claim
34
        description: Created claim
36
        schema:
35
        schema:
37
          $ref: "../swagger.yaml#/definitions/return_claim"
36
          $ref: ../swagger.yaml#/definitions/return_claim
38
      "400":
37
      400:
39
        description: Bad request
38
        description: Bad request
40
        schema:
39
        schema:
41
          $ref: "../swagger.yaml#/definitions/error"
40
          $ref: ../swagger.yaml#/definitions/error
42
      "401":
41
      401:
43
        description: Authentication required
42
        description: Authentication required
44
        schema:
43
        schema:
45
          $ref: "../swagger.yaml#/definitions/error"
44
          $ref: ../swagger.yaml#/definitions/error
46
      "403":
45
      403:
47
        description: Access forbidden
46
        description: Access forbidden
48
        schema:
47
        schema:
49
          $ref: "../swagger.yaml#/definitions/error"
48
          $ref: ../swagger.yaml#/definitions/error
50
      "404":
49
      404:
51
        description: Checkout not found
50
        description: Checkout not found
52
        schema:
51
        schema:
53
          $ref: "../swagger.yaml#/definitions/error"
52
          $ref: ../swagger.yaml#/definitions/error
54
      "409":
53
      409:
55
        description: Conflict creating the resource
54
        description: Conflict creating the resource
56
        schema:
55
        schema:
57
          $ref: "../swagger.yaml#/definitions/error"
56
          $ref: ../swagger.yaml#/definitions/error
58
      "500":
57
      500:
59
        description: |
58
        description: |
60
          Internal server error. Possible `error_code` attribute values:
59
          Internal server error. Possible `error_code` attribute values:
61
60
          
62
          * `internal_server_error`
61
          * `internal_server_error`
63
        schema:
62
        schema:
64
          $ref: "../swagger.yaml#/definitions/error"
63
          $ref: ../swagger.yaml#/definitions/error
65
      "503":
64
      503:
66
        description: Under maintenance
65
        description: Under maintenance
67
        schema:
66
        schema:
68
          $ref: "../swagger.yaml#/definitions/error"
67
          $ref: ../swagger.yaml#/definitions/error
69
    x-koha-authorization:
68
    x-koha-authorization:
70
      permissions:
69
      permissions:
71
        circulate: circulate_remaining_permissions
70
        circulate: circulate_remaining_permissions
72
"/return_claims/{claim_id}/notes":
71
'/return_claims/{claim_id}':
73
  put:
72
  delete:
74
    x-mojo-to: ReturnClaims#update_notes
73
    x-mojo-to: ReturnClaims#delete_claim
75
    operationId: updateClaimNotes
74
    operationId: deletedClaim
76
    summary: Update notes
77
    tags:
75
    tags:
78
      - return_claims
76
      - return_claims
77
    summary: Delete claim
78
    produces:
79
      - application/json
79
    parameters:
80
    parameters:
80
      - name: claim_id
81
      - description: Unique identifier for the claim to be deleted
81
        in: path
82
        in: path
83
        name: claim_id
82
        required: true
84
        required: true
83
        description: Unique identifier for the claim whose notes are to be updated
84
        type: integer
85
        type: integer
85
      - name: body
86
        in: body
87
        description: A JSON object containing fields to modify
88
        required: true
89
        schema:
90
          type: object
91
          properties:
92
            notes:
93
              description: Notes about this return claim
94
              type: string
95
            updated_by:
96
              description: Interal identifier for the librarian updating the claim notes
97
              type: string
98
          additionalProperties: false
99
    produces:
100
      - application/json
101
    responses:
86
    responses:
102
      "200":
87
      204:
103
        description: Claim notes updated
88
        description: Claim deleted
104
        schema:
89
        schema:
105
          $ref: "../swagger.yaml#/definitions/return_claim"
90
          $ref: ../swagger.yaml#/definitions/return_claim
106
      "400":
91
      400:
107
        description: Bad request
92
        description: Bad request
108
        schema:
93
        schema:
109
          $ref: "../swagger.yaml#/definitions/error"
94
          $ref: ../swagger.yaml#/definitions/error
110
      "401":
95
      401:
111
        description: Authentication required
96
        description: Authentication required
112
        schema:
97
        schema:
113
          $ref: "../swagger.yaml#/definitions/error"
98
          $ref: ../swagger.yaml#/definitions/error
114
      "403":
99
      403:
115
        description: Access forbidden
100
        description: Access forbidden
116
        schema:
101
        schema:
117
          $ref: "../swagger.yaml#/definitions/error"
102
          $ref: ../swagger.yaml#/definitions/error
118
      "404":
103
      404:
119
        description: Claim not found
104
        description: Claim not found
120
        schema:
105
        schema:
121
          $ref: "../swagger.yaml#/definitions/error"
106
          $ref: ../swagger.yaml#/definitions/error
122
      "500":
107
      500:
123
        description: |
108
        description: |
124
          Internal server error. Possible `error_code` attribute values:
109
          Internal server error. Possible `error_code` attribute values:
125
110
          
126
          * `internal_server_error`
111
          * `internal_server_error`
127
        schema:
112
        schema:
128
          $ref: "../swagger.yaml#/definitions/error"
113
          $ref: ../swagger.yaml#/definitions/error
129
      "503":
114
      503:
130
        description: Under maintenance
115
        description: Under maintenance
131
        schema:
116
        schema:
132
          $ref: "../swagger.yaml#/definitions/error"
117
          $ref: ../swagger.yaml#/definitions/error
133
    x-koha-authorization:
118
    x-koha-authorization:
134
      permissions:
119
      permissions:
135
        circulate: circulate_remaining_permissions
120
        circulate: circulate_remaining_permissions
136
"/return_claims/{claim_id}":
121
'/return_claims/{claim_id}/notes':
137
  delete:
122
  put:
138
    x-mojo-to: ReturnClaims#delete_claim
123
    x-mojo-to: ReturnClaims#update_notes
139
    operationId: deletedClaim
124
    operationId: updateClaimNotes
140
    summary: Delete claim
141
    tags:
125
    tags:
142
      - return_claims
126
      - return_claims
127
    summary: Update notes
128
    produces:
129
      - application/json
143
    parameters:
130
    parameters:
144
      - name: claim_id
131
      - description: Unique identifier for the claim whose notes are to be updated
145
        in: path
132
        in: path
133
        name: claim_id
146
        required: true
134
        required: true
147
        description: Unique identifier for the claim to be deleted
148
        type: integer
135
        type: integer
149
    produces:
136
      - description: A JSON object containing fields to modify
150
      - application/json
137
        in: body
138
        name: body
139
        required: true
140
        schema:
141
          additionalProperties: false
142
          properties:
143
            notes:
144
              description: Notes about this return claim
145
              type: string
146
            updated_by:
147
              description: Interal identifier for the librarian updating the claim notes
148
              type: string
149
          type: object
151
    responses:
150
    responses:
152
      "204":
151
      200:
153
        description: Claim deleted
152
        description: Claim notes updated
154
        schema:
153
        schema:
155
          $ref: "../swagger.yaml#/definitions/return_claim"
154
          $ref: ../swagger.yaml#/definitions/return_claim
156
      "400":
155
      400:
157
        description: Bad request
156
        description: Bad request
158
        schema:
157
        schema:
159
          $ref: "../swagger.yaml#/definitions/error"
158
          $ref: ../swagger.yaml#/definitions/error
160
      "401":
159
      401:
161
        description: Authentication required
160
        description: Authentication required
162
        schema:
161
        schema:
163
          $ref: "../swagger.yaml#/definitions/error"
162
          $ref: ../swagger.yaml#/definitions/error
164
      "403":
163
      403:
165
        description: Access forbidden
164
        description: Access forbidden
166
        schema:
165
        schema:
167
          $ref: "../swagger.yaml#/definitions/error"
166
          $ref: ../swagger.yaml#/definitions/error
168
      "404":
167
      404:
169
        description: Claim not found
168
        description: Claim not found
170
        schema:
169
        schema:
171
          $ref: "../swagger.yaml#/definitions/error"
170
          $ref: ../swagger.yaml#/definitions/error
172
      "500":
171
      500:
173
        description: |
172
        description: |
174
          Internal server error. Possible `error_code` attribute values:
173
          Internal server error. Possible `error_code` attribute values:
175
174
          
176
          * `internal_server_error`
175
          * `internal_server_error`
177
        schema:
176
        schema:
178
          $ref: "../swagger.yaml#/definitions/error"
177
          $ref: ../swagger.yaml#/definitions/error
179
      "503":
178
      503:
180
        description: Under maintenance
179
        description: Under maintenance
181
        schema:
180
        schema:
182
          $ref: "../swagger.yaml#/definitions/error"
181
          $ref: ../swagger.yaml#/definitions/error
183
    x-koha-authorization:
182
    x-koha-authorization:
184
      permissions:
183
      permissions:
185
        circulate: circulate_remaining_permissions
184
        circulate: circulate_remaining_permissions
186
"/return_claims/{claim_id}/resolve":
185
'/return_claims/{claim_id}/resolve':
187
  put:
186
  put:
188
    x-mojo-to: ReturnClaims#resolve_claim
187
    x-mojo-to: ReturnClaims#resolve_claim
189
    operationId: updateClaimResolve
188
    operationId: updateClaimResolve
190
    summary: Resolve claim
191
    tags:
189
    tags:
192
      - return_claims
190
      - return_claims
191
    summary: Resolve claim
192
    produces:
193
      - application/json
193
    parameters:
194
    parameters:
194
      - name: claim_id
195
      - description: Unique identifier for the claim to be resolved
195
        in: path
196
        in: path
197
        name: claim_id
196
        required: true
198
        required: true
197
        description: Unique identifier for the claim to be resolved
198
        type: integer
199
        type: integer
199
      - name: body
200
      - description: A JSON object containing fields to modify
200
        in: body
201
        in: body
201
        description: A JSON object containing fields to modify
202
        name: body
202
        required: true
203
        required: true
203
        schema:
204
        schema:
204
          type: object
205
          additionalProperties: false
205
          properties:
206
          properties:
207
            new_lost_status:
208
              description: New lost status to set to the item
209
              type: string
206
            resolution:
210
            resolution:
207
              description: The RETURN_CLAIM_RESOLUTION code to be used to resolve the calim
211
              description: The RETURN_CLAIM_RESOLUTION code to be used to resolve the calim
208
              type: string
212
              type: string
209
            resolved_by:
213
            resolved_by:
210
              description: User id for the librarian resolving the claim
214
              description: User id for the librarian resolving the claim
211
              type: string
215
              type: string
212
            new_lost_status:
216
          type: object
213
              description: New lost status to set to the item
214
              type: string
215
          additionalProperties: false
216
    produces:
217
      - application/json
218
    responses:
217
    responses:
219
      "200":
218
      200:
220
        description: Claim resolved
219
        description: Claim resolved
221
        schema:
220
        schema:
222
          $ref: "../swagger.yaml#/definitions/return_claim"
221
          $ref: ../swagger.yaml#/definitions/return_claim
223
      "400":
222
      400:
224
        description: Bad request
223
        description: Bad request
225
        schema:
224
        schema:
226
          $ref: "../swagger.yaml#/definitions/error"
225
          $ref: ../swagger.yaml#/definitions/error
227
      "401":
226
      401:
228
        description: Authentication required
227
        description: Authentication required
229
        schema:
228
        schema:
230
          $ref: "../swagger.yaml#/definitions/error"
229
          $ref: ../swagger.yaml#/definitions/error
231
      "403":
230
      403:
232
        description: Access forbidden
231
        description: Access forbidden
233
        schema:
232
        schema:
234
          $ref: "../swagger.yaml#/definitions/error"
233
          $ref: ../swagger.yaml#/definitions/error
235
      "404":
234
      404:
236
        description: Claim not found
235
        description: Claim not found
237
        schema:
236
        schema:
238
          $ref: "../swagger.yaml#/definitions/error"
237
          $ref: ../swagger.yaml#/definitions/error
239
      "500":
238
      500:
240
        description: |
239
        description: |
241
          Internal server error. Possible `error_code` attribute values:
240
          Internal server error. Possible `error_code` attribute values:
242
241
          
243
          * `internal_server_error`
242
          * `internal_server_error`
244
        schema:
243
        schema:
245
          $ref: "../swagger.yaml#/definitions/error"
244
          $ref: ../swagger.yaml#/definitions/error
246
      "503":
245
      503:
247
        description: Under maintenance
246
        description: Under maintenance
248
        schema:
247
        schema:
249
          $ref: "../swagger.yaml#/definitions/error"
248
          $ref: ../swagger.yaml#/definitions/error
250
    x-koha-authorization:
249
    x-koha-authorization:
251
      permissions:
250
      permissions:
252
        circulate: circulate_remaining_permissions
251
        circulate: circulate_remaining_permissions
(-)a/api/v1/swagger/paths/rotas.yaml (-25 / +25 lines)
Lines 1-60 Link Here
1
---
1
---
2
"/rotas/{rota_id}/stages/{stage_id}/position":
2
'/rotas/{rota_id}/stages/{stage_id}/position':
3
  put:
3
  put:
4
    x-mojo-to: Stage#move
4
    x-mojo-to: Stage#move
5
    operationId: moveStage
5
    operationId: moveStage
6
    summary: Update stage
7
    tags:
6
    tags:
8
      - rotas
7
      - rotas
8
    summary: Update stage
9
    produces:
10
      - application/json
9
    parameters:
11
    parameters:
10
      - name: rota_id
12
      - description: A rotas ID
11
        in: path
13
        in: path
14
        name: rota_id
12
        required: true
15
        required: true
13
        description: A rotas ID
14
        type: integer
16
        type: integer
15
      - name: stage_id
17
      - description: A stages ID
16
        in: path
18
        in: path
19
        name: stage_id
17
        required: true
20
        required: true
18
        description: A stages ID
19
        type: integer
21
        type: integer
20
      - name: position
22
      - description: A stages position in the rota
21
        in: body
23
        in: body
24
        name: position
22
        required: true
25
        required: true
23
        description: A stages position in the rota
24
        schema:
26
        schema:
25
          type: integer
27
          type: integer
26
    produces:
27
      - application/json
28
    responses:
28
    responses:
29
      "200":
29
      200:
30
        description: OK
30
        description: OK
31
      "400":
31
      400:
32
        description: Bad request
32
        description: Bad request
33
        schema:
33
        schema:
34
          $ref: "../swagger.yaml#/definitions/error"
34
          $ref: ../swagger.yaml#/definitions/error
35
      "401":
35
      401:
36
        description: Authentication required
36
        description: Authentication required
37
        schema:
37
        schema:
38
          $ref: "../swagger.yaml#/definitions/error"
38
          $ref: ../swagger.yaml#/definitions/error
39
      "403":
39
      403:
40
        description: Access forbidden
40
        description: Access forbidden
41
        schema:
41
        schema:
42
          $ref: "../swagger.yaml#/definitions/error"
42
          $ref: ../swagger.yaml#/definitions/error
43
      "404":
43
      404:
44
        description: Position not found
44
        description: Position not found
45
        schema:
45
        schema:
46
          $ref: "../swagger.yaml#/definitions/error"
46
          $ref: ../swagger.yaml#/definitions/error
47
      "500":
47
      500:
48
        description: |
48
        description: |
49
          Internal server error. Possible `error_code` attribute values:
49
          Internal server error. Possible `error_code` attribute values:
50
50
          
51
          * `internal_server_error`
51
          * `internal_server_error`
52
        schema:
52
        schema:
53
          $ref: "../swagger.yaml#/definitions/error"
53
          $ref: ../swagger.yaml#/definitions/error
54
      "503":
54
      503:
55
        description: Under maintenance
55
        description: Under maintenance
56
        schema:
56
        schema:
57
          $ref: "../swagger.yaml#/definitions/error"
57
          $ref: ../swagger.yaml#/definitions/error
58
    x-koha-authorization:
58
    x-koha-authorization:
59
      permissions:
59
      permissions:
60
        stockrotation: "1"
60
        stockrotation: 1
(-)a/api/v1/swagger/paths/suggestions.yaml (-137 / +137 lines)
Lines 3-262 Link Here
3
  get:
3
  get:
4
    x-mojo-to: Suggestions#list
4
    x-mojo-to: Suggestions#list
5
    operationId: listSuggestions
5
    operationId: listSuggestions
6
    description: This resource returns a list of purchase suggestions
7
    summary: List purchase suggestions
8
    tags:
6
    tags:
9
      - suggestions
7
      - suggestions
10
    parameters:
8
    summary: List purchase suggestions
11
      - $ref: "../swagger.yaml#/parameters/match"
12
      - $ref: "../swagger.yaml#/parameters/order_by"
13
      - $ref: "../swagger.yaml#/parameters/page"
14
      - $ref: "../swagger.yaml#/parameters/per_page"
15
      - $ref: "../swagger.yaml#/parameters/q_param"
16
      - $ref: "../swagger.yaml#/parameters/q_body"
17
      - $ref: "../swagger.yaml#/parameters/q_header"
18
      - $ref: "../swagger.yaml#/parameters/request_id_header"
19
    produces:
9
    produces:
20
      - application/json
10
      - application/json
11
    parameters:
12
      - $ref: ../swagger.yaml#/parameters/match
13
      - $ref: ../swagger.yaml#/parameters/order_by
14
      - $ref: ../swagger.yaml#/parameters/page
15
      - $ref: ../swagger.yaml#/parameters/per_page
16
      - $ref: ../swagger.yaml#/parameters/q_param
17
      - $ref: ../swagger.yaml#/parameters/q_body
18
      - $ref: ../swagger.yaml#/parameters/q_header
19
      - $ref: ../swagger.yaml#/parameters/request_id_header
21
    responses:
20
    responses:
22
      "200":
21
      200:
23
        description: A list of suggestions
22
        description: A list of suggestions
24
        schema:
23
        schema:
25
          type: array
24
          type: array
26
          items:
25
          items:
27
            $ref: "../swagger.yaml#/definitions/suggestion"
26
            $ref: ../swagger.yaml#/definitions/suggestion
28
      "403":
27
      403:
29
        description: Access forbidden
28
        description: Access forbidden
30
        schema:
29
        schema:
31
          $ref: "../swagger.yaml#/definitions/error"
30
          $ref: ../swagger.yaml#/definitions/error
32
      "500":
31
      500:
33
        description: |
32
        description: |
34
          Internal server error. Possible `error_code` attribute values:
33
          Internal server error. Possible `error_code` attribute values:
35
34
          
36
          * `internal_server_error`
35
          * `internal_server_error`
37
        schema:
36
        schema:
38
          $ref: "../swagger.yaml#/definitions/error"
37
          $ref: ../swagger.yaml#/definitions/error
39
      "503":
38
      503:
40
        description: Under maintenance
39
        description: Under maintenance
41
        schema:
40
        schema:
42
          $ref: "../swagger.yaml#/definitions/error"
41
          $ref: ../swagger.yaml#/definitions/error
43
    x-koha-authorization:
42
    x-koha-authorization:
44
      permissions:
43
      permissions:
45
        suggestions: suggestions_manage
44
        suggestions: suggestions_manage
45
    description: This resource returns a list of purchase suggestions
46
  post:
46
  post:
47
    x-mojo-to: Suggestions#add
47
    x-mojo-to: Suggestions#add
48
    operationId: addSuggestions
48
    operationId: addSuggestions
49
    description: This resource accepts a new purchase suggestion and creates it
50
    summary: Add a purchase suggestion
51
    tags:
49
    tags:
52
      - suggestions
50
      - suggestions
51
    summary: Add a purchase suggestion
52
    produces:
53
      - application/json
53
    parameters:
54
    parameters:
54
      - name: body
55
      - description: A JSON object containing informations about the new suggestion
55
        in: body
56
        in: body
56
        description: A JSON object containing informations about the new suggestion
57
        name: body
57
        required: true
58
        required: true
58
        schema:
59
        schema:
59
          $ref: "../swagger.yaml#/definitions/suggestion"
60
          $ref: ../swagger.yaml#/definitions/suggestion
60
    produces:
61
      - application/json
62
    responses:
61
    responses:
63
      "201":
62
      201:
64
        description: Suggestion added
63
        description: Suggestion added
65
        schema:
64
        schema:
66
          $ref: "../swagger.yaml#/definitions/suggestion"
65
          $ref: ../swagger.yaml#/definitions/suggestion
67
      "400":
66
      400:
68
        description: Bad request
67
        description: Bad request
69
        schema:
68
        schema:
70
          $ref: "../swagger.yaml#/definitions/error"
69
          $ref: ../swagger.yaml#/definitions/error
71
      "403":
70
      403:
72
        description: Access forbidden
71
        description: Access forbidden
73
        schema:
72
        schema:
74
          $ref: "../swagger.yaml#/definitions/error"
73
          $ref: ../swagger.yaml#/definitions/error
75
      "500":
74
      500:
76
        description: |
75
        description: |
77
          Internal server error. Possible `error_code` attribute values:
76
          Internal server error. Possible `error_code` attribute values:
78
77
          
79
          * `internal_server_error`
78
          * `internal_server_error`
80
        schema:
79
        schema:
81
          $ref: "../swagger.yaml#/definitions/error"
80
          $ref: ../swagger.yaml#/definitions/error
82
      "503":
81
      503:
83
        description: Under maintenance
82
        description: Under maintenance
84
        schema:
83
        schema:
85
          $ref: "../swagger.yaml#/definitions/error"
84
          $ref: ../swagger.yaml#/definitions/error
86
    x-koha-authorization:
85
    x-koha-authorization:
87
      permissions:
86
      permissions:
88
        suggestions: suggestions_manage
87
        suggestions: suggestions_manage
89
"/suggestions/{suggestion_id}":
88
    description: This resource accepts a new purchase suggestion and creates it
89
/suggestions/managers:
90
  get:
90
  get:
91
    x-mojo-to: Suggestions#get
91
    x-mojo-to: Suggestions#list_managers
92
    operationId: getSuggestion
92
    operationId: listSuggestionsManagers
93
    description: This resource gives access to a specific purchase suggestion
94
    summary: Get purchase suggestion
95
    tags:
93
    tags:
96
      - suggestions
94
      - suggestions
97
    parameters:
95
    summary: List possibe managers for suggestions
98
      - $ref: "../swagger.yaml#/parameters/suggestion_id_pp"
99
    produces:
96
    produces:
100
      - application/json
97
      - application/json
98
    parameters:
99
      - $ref: ../swagger.yaml#/parameters/match
100
      - $ref: ../swagger.yaml#/parameters/order_by
101
      - $ref: ../swagger.yaml#/parameters/page
102
      - $ref: ../swagger.yaml#/parameters/per_page
103
      - $ref: ../swagger.yaml#/parameters/q_param
104
      - $ref: ../swagger.yaml#/parameters/q_body
105
      - $ref: ../swagger.yaml#/parameters/q_header
101
    responses:
106
    responses:
102
      "200":
107
      200:
103
        description: A suggestion
108
        description: A list of suggestions' managers
104
        schema:
109
        schema:
105
          $ref: "../swagger.yaml#/definitions/suggestion"
110
          type: array
106
      "403":
111
          items:
112
            $ref: ../swagger.yaml#/definitions/patron
113
      403:
107
        description: Access forbidden
114
        description: Access forbidden
108
        schema:
115
        schema:
109
          $ref: "../swagger.yaml#/definitions/error"
116
          $ref: ../swagger.yaml#/definitions/error
110
      "404":
117
      500:
111
        description: Suggestion not found
112
        schema:
113
          $ref: "../swagger.yaml#/definitions/error"
114
      "500":
115
        description: |
118
        description: |
116
          Internal server error. Possible `error_code` attribute values:
119
          Internal server error. Possible `error_code` attribute values:
117
120
          
118
          * `internal_server_error`
121
          * `internal_server_error`
119
        schema:
122
        schema:
120
          $ref: "../swagger.yaml#/definitions/error"
123
          $ref: ../swagger.yaml#/definitions/error
121
      "503":
124
      503:
122
        description: Under maintenance
125
        description: Under maintenance
123
        schema:
126
        schema:
124
          $ref: "../swagger.yaml#/definitions/error"
127
          $ref: ../swagger.yaml#/definitions/error
125
    x-koha-authorization:
128
    x-koha-authorization:
126
      permissions:
129
      permissions:
127
        suggestions: suggestions_manage
130
        suggestions: suggestions_manage
128
  put:
131
    description: This resource returns a list of patron allowed to be a manager for suggestions
129
    x-mojo-to: Suggestions#update
132
    x-koha-embed:
130
    operationId: updateSuggestion
133
      - extended_attributes
131
    description: This resource allows updating an existing purchase suggestion
134
'/suggestions/{suggestion_id}':
132
    summary: Update purchase suggestion
135
  delete:
136
    x-mojo-to: Suggestions#delete
137
    operationId: deleteSuggestion
133
    tags:
138
    tags:
134
      - suggestions
139
      - suggestions
135
    parameters:
140
    summary: Delete purchase suggestion
136
      - $ref: "../swagger.yaml#/parameters/suggestion_id_pp"
137
      - name: body
138
        in: body
139
        description: A JSON object containing informations about the new hold
140
        required: true
141
        schema:
142
          $ref: "../swagger.yaml#/definitions/suggestion"
143
    produces:
141
    produces:
144
      - application/json
142
      - application/json
143
    parameters:
144
      - $ref: ../swagger.yaml#/parameters/suggestion_id_pp
145
    responses:
145
    responses:
146
      "200":
146
      204:
147
        description: A suggestion
147
        description: Suggestion deleted
148
        schema:
148
        schema:
149
          $ref: "../swagger.yaml#/definitions/suggestion"
149
          type: string
150
      "400":
150
      401:
151
        description: Bad request
151
        description: Authentication required
152
        schema:
152
        schema:
153
          $ref: "../swagger.yaml#/definitions/error"
153
          $ref: ../swagger.yaml#/definitions/error
154
      "403":
154
      403:
155
        description: Access forbidden
155
        description: Access forbidden
156
        schema:
156
        schema:
157
          $ref: "../swagger.yaml#/definitions/error"
157
          $ref: ../swagger.yaml#/definitions/error
158
      "404":
158
      404:
159
        description: Suggestion not found
159
        description: Suggestion not found
160
        schema:
160
        schema:
161
          $ref: "../swagger.yaml#/definitions/error"
161
          $ref: ../swagger.yaml#/definitions/error
162
      "500":
162
      500:
163
        description: |
163
        description: |
164
          Internal server error. Possible `error_code` attribute values:
164
          Internal server error. Possible `error_code` attribute values:
165
165
          
166
          * `internal_server_error`
166
          * `internal_server_error`
167
        schema:
167
        schema:
168
          $ref: "../swagger.yaml#/definitions/error"
168
          $ref: ../swagger.yaml#/definitions/error
169
      "503":
169
      503:
170
        description: Under maintenance
170
        description: Under maintenance
171
        schema:
171
        schema:
172
          $ref: "../swagger.yaml#/definitions/error"
172
          $ref: ../swagger.yaml#/definitions/error
173
    x-koha-authorization:
173
    x-koha-authorization:
174
      permissions:
174
      permissions:
175
        suggestions: suggestions_manage
175
        suggestions: suggestions_manage
176
  delete:
177
    x-mojo-to: Suggestions#delete
178
    operationId: deleteSuggestion
179
    description: This resource deletes an existing purchase suggestion
176
    description: This resource deletes an existing purchase suggestion
180
    summary: Delete purchase suggestion
177
  get:
178
    x-mojo-to: Suggestions#get
179
    operationId: getSuggestion
181
    tags:
180
    tags:
182
      - suggestions
181
      - suggestions
183
    parameters:
182
    summary: Get purchase suggestion
184
      - $ref: "../swagger.yaml#/parameters/suggestion_id_pp"
185
    produces:
183
    produces:
186
      - application/json
184
      - application/json
185
    parameters:
186
      - $ref: ../swagger.yaml#/parameters/suggestion_id_pp
187
    responses:
187
    responses:
188
      "204":
188
      200:
189
        description: Suggestion deleted
189
        description: A suggestion
190
        schema:
191
          type: string
192
      "401":
193
        description: Authentication required
194
        schema:
190
        schema:
195
          $ref: "../swagger.yaml#/definitions/error"
191
          $ref: ../swagger.yaml#/definitions/suggestion
196
      "403":
192
      403:
197
        description: Access forbidden
193
        description: Access forbidden
198
        schema:
194
        schema:
199
          $ref: "../swagger.yaml#/definitions/error"
195
          $ref: ../swagger.yaml#/definitions/error
200
      "404":
196
      404:
201
        description: Suggestion not found
197
        description: Suggestion not found
202
        schema:
198
        schema:
203
          $ref: "../swagger.yaml#/definitions/error"
199
          $ref: ../swagger.yaml#/definitions/error
204
      "500":
200
      500:
205
        description: |
201
        description: |
206
          Internal server error. Possible `error_code` attribute values:
202
          Internal server error. Possible `error_code` attribute values:
207
203
          
208
          * `internal_server_error`
204
          * `internal_server_error`
209
        schema:
205
        schema:
210
          $ref: "../swagger.yaml#/definitions/error"
206
          $ref: ../swagger.yaml#/definitions/error
211
      "503":
207
      503:
212
        description: Under maintenance
208
        description: Under maintenance
213
        schema:
209
        schema:
214
          $ref: "../swagger.yaml#/definitions/error"
210
          $ref: ../swagger.yaml#/definitions/error
215
    x-koha-authorization:
211
    x-koha-authorization:
216
      permissions:
212
      permissions:
217
        suggestions: suggestions_manage
213
        suggestions: suggestions_manage
218
/suggestions/managers:
214
    description: This resource gives access to a specific purchase suggestion
219
  get:
215
  put:
220
    x-mojo-to: Suggestions#list_managers
216
    x-mojo-to: Suggestions#update
221
    operationId: listSuggestionsManagers
217
    operationId: updateSuggestion
222
    description: This resource returns a list of patron allowed to be a manager for suggestions
223
    summary: List possibe managers for suggestions
224
    tags:
218
    tags:
225
      - suggestions
219
      - suggestions
226
    parameters:
220
    summary: Update purchase suggestion
227
      - $ref: "../swagger.yaml#/parameters/match"
228
      - $ref: "../swagger.yaml#/parameters/order_by"
229
      - $ref: "../swagger.yaml#/parameters/page"
230
      - $ref: "../swagger.yaml#/parameters/per_page"
231
      - $ref: "../swagger.yaml#/parameters/q_param"
232
      - $ref: "../swagger.yaml#/parameters/q_body"
233
      - $ref: "../swagger.yaml#/parameters/q_header"
234
    produces:
221
    produces:
235
      - application/json
222
      - application/json
223
    parameters:
224
      - $ref: ../swagger.yaml#/parameters/suggestion_id_pp
225
      - description: A JSON object containing informations about the new hold
226
        in: body
227
        name: body
228
        required: true
229
        schema:
230
          $ref: ../swagger.yaml#/definitions/suggestion
236
    responses:
231
    responses:
237
      "200":
232
      200:
238
        description: A list of suggestions' managers
233
        description: A suggestion
239
        schema:
234
        schema:
240
          type: array
235
          $ref: ../swagger.yaml#/definitions/suggestion
241
          items:
236
      400:
242
            $ref: "../swagger.yaml#/definitions/patron"
237
        description: Bad request
243
      "403":
238
        schema:
239
          $ref: ../swagger.yaml#/definitions/error
240
      403:
244
        description: Access forbidden
241
        description: Access forbidden
245
        schema:
242
        schema:
246
          $ref: "../swagger.yaml#/definitions/error"
243
          $ref: ../swagger.yaml#/definitions/error
247
      "500":
244
      404:
245
        description: Suggestion not found
246
        schema:
247
          $ref: ../swagger.yaml#/definitions/error
248
      500:
248
        description: |
249
        description: |
249
          Internal server error. Possible `error_code` attribute values:
250
          Internal server error. Possible `error_code` attribute values:
250
251
          
251
          * `internal_server_error`
252
          * `internal_server_error`
252
        schema:
253
        schema:
253
          $ref: "../swagger.yaml#/definitions/error"
254
          $ref: ../swagger.yaml#/definitions/error
254
      "503":
255
      503:
255
        description: Under maintenance
256
        description: Under maintenance
256
        schema:
257
        schema:
257
          $ref: "../swagger.yaml#/definitions/error"
258
          $ref: ../swagger.yaml#/definitions/error
258
    x-koha-authorization:
259
    x-koha-authorization:
259
      permissions:
260
      permissions:
260
        suggestions: suggestions_manage
261
        suggestions: suggestions_manage
261
    x-koha-embed:
262
    description: This resource allows updating an existing purchase suggestion
262
      - extended_attributes
(-)a/api/v1/swagger/paths/transfer_limits.yaml (-176 / +171 lines)
Lines 1-316 Link Here
1
---
1
/transfer_limits:
2
/transfer_limits:
2
  get:
3
  get:
3
    x-mojo-to: TransferLimits#list
4
    x-mojo-to: TransferLimits#list
4
    operationId: listTransferLimits
5
    operationId: listTransferLimits
5
    description: This resource returns a list of existing transfer limits.
6
    summary: List transfer limits
7
    tags:
6
    tags:
8
      - transfer
7
      - transfer
8
    summary: List transfer limits
9
    produces:
10
      - application/json
9
    parameters:
11
    parameters:
10
      - name: to_library_id
12
      - description: Search on to_library_id
11
        in: query
13
        in: query
12
        description: Search on to_library_id
14
        name: to_library_id
13
        required: false
15
        required: false
14
        type: string
16
        type: string
15
      - name: from_library_id
17
      - description: Search on from_library_id
16
        in: query
18
        in: query
17
        description: Search on from_library_id
19
        name: from_library_id
18
        required: false
20
        required: false
19
        type: string
21
        type: string
20
      - name: item_type
22
      - description: Search on item_type
21
        in: query
23
        in: query
22
        description: Search on item_type
24
        name: item_type
23
        required: false
25
        required: false
24
        type: string
26
        type: string
25
      - name: collection_code
27
      - description: Search on collection_code
26
        in: query
28
        in: query
27
        description: Search on collection_code
29
        name: collection_code
28
        required: false
30
        required: false
29
        type: string
31
        type: string
30
      - $ref: "../swagger.yaml#/parameters/match"
32
      - $ref: ../swagger.yaml#/parameters/match
31
      - $ref: "../swagger.yaml#/parameters/order_by"
33
      - $ref: ../swagger.yaml#/parameters/order_by
32
      - $ref: "../swagger.yaml#/parameters/page"
34
      - $ref: ../swagger.yaml#/parameters/page
33
      - $ref: "../swagger.yaml#/parameters/per_page"
35
      - $ref: ../swagger.yaml#/parameters/per_page
34
      - $ref: "../swagger.yaml#/parameters/q_param"
36
      - $ref: ../swagger.yaml#/parameters/q_param
35
      - $ref: "../swagger.yaml#/parameters/q_body"
37
      - $ref: ../swagger.yaml#/parameters/q_body
36
      - $ref: "../swagger.yaml#/parameters/q_header"
38
      - $ref: ../swagger.yaml#/parameters/q_header
37
      - $ref: "../swagger.yaml#/parameters/request_id_header"
39
      - $ref: ../swagger.yaml#/parameters/request_id_header
38
    produces:
39
      - application/json
40
    responses:
40
    responses:
41
      "200":
41
      200:
42
        description: A list of transfer limits
42
        description: A list of transfer limits
43
        schema:
43
        schema:
44
          type: array
44
          type: array
45
          items:
45
          items:
46
            $ref: "../swagger.yaml#/definitions/transfer_limit"
46
            $ref: ../swagger.yaml#/definitions/transfer_limit
47
      "500":
47
      500:
48
        description: |
48
        description: |
49
          Internal server error. Possible `error_code` attribute values:
49
          Internal server error. Possible `error_code` attribute values:
50
50
          
51
          * `internal_server_error`
51
          * `internal_server_error`
52
        schema:
52
        schema:
53
          $ref: "../swagger.yaml#/definitions/error"
53
          $ref: ../swagger.yaml#/definitions/error
54
      "503":
54
      503:
55
        description: Under maintenance
55
        description: Under maintenance
56
        schema:
56
        schema:
57
          $ref: "../swagger.yaml#/definitions/error"
57
          $ref: ../swagger.yaml#/definitions/error
58
    x-koha-authorization:
58
    x-koha-authorization:
59
      permissions:
59
      permissions:
60
        parameters: manage_transfers
60
        parameters: manage_transfers
61
    description: This resource returns a list of existing transfer limits.
61
  post:
62
  post:
62
    x-mojo-to: TransferLimits#add
63
    x-mojo-to: TransferLimits#add
63
    operationId: addTransferLimit
64
    operationId: addTransferLimit
64
    description: This resource accepts a new transfer limit and creates it if it does not
65
      already exist.
66
    tags:
65
    tags:
67
      - transfer
66
      - transfer
68
    summary: Add a transfer limit
67
    summary: Add a transfer limit
68
    produces:
69
      - application/json
69
    parameters:
70
    parameters:
70
      - name: body
71
      - description: A JSON object containing information about a new transfer limit
71
        in: body
72
        in: body
72
        description: A JSON object containing information about a new transfer limit
73
        name: body
73
        required: true
74
        required: true
74
        schema:
75
        schema:
75
          $ref: "../swagger.yaml#/definitions/transfer_limit"
76
          $ref: ../swagger.yaml#/definitions/transfer_limit
76
    produces:
77
      - application/json
78
    responses:
77
    responses:
79
      "201":
78
      201:
80
        description: Transfer limit added
79
        description: Transfer limit added
81
        schema:
80
        schema:
82
          $ref: "../swagger.yaml#/definitions/transfer_limit"
81
          $ref: ../swagger.yaml#/definitions/transfer_limit
83
      "400":
82
      400:
84
        description: Bad request
83
        description: Bad request
85
        schema:
84
        schema:
86
          $ref: "../swagger.yaml#/definitions/error"
85
          $ref: ../swagger.yaml#/definitions/error
87
      "401":
86
      401:
88
        description: Authentication required
87
        description: Authentication required
89
        schema:
88
        schema:
90
          $ref: "../swagger.yaml#/definitions/error"
89
          $ref: ../swagger.yaml#/definitions/error
91
      "403":
90
      403:
92
        description: Access forbidden
91
        description: Access forbidden
93
        schema:
92
        schema:
94
          $ref: "../swagger.yaml#/definitions/error"
93
          $ref: ../swagger.yaml#/definitions/error
95
      "409":
94
      409:
96
        description: Conflict in creating resource
95
        description: Conflict in creating resource
97
        schema:
96
        schema:
98
          $ref: "../swagger.yaml#/definitions/error"
97
          $ref: ../swagger.yaml#/definitions/error
99
      "500":
98
      500:
100
        description: |
99
        description: |
101
          Internal server error. Possible `error_code` attribute values:
100
          Internal server error. Possible `error_code` attribute values:
102
101
          
103
          * `internal_server_error`
102
          * `internal_server_error`
104
        schema:
103
        schema:
105
          $ref: "../swagger.yaml#/definitions/error"
104
          $ref: ../swagger.yaml#/definitions/error
106
      "503":
105
      503:
107
        description: Under maintenance
106
        description: Under maintenance
108
        schema:
107
        schema:
109
          $ref: "../swagger.yaml#/definitions/error"
108
          $ref: ../swagger.yaml#/definitions/error
110
    x-koha-authorization:
109
    x-koha-authorization:
111
      permissions:
110
      permissions:
112
        parameters: manage_transfers
111
        parameters: manage_transfers
113
"/transfer_limits/{limit_id}":
112
    description: This resource accepts a new transfer limit and creates it if it does not already exist.
113
/transfer_limits/batch:
114
  delete:
114
  delete:
115
    x-mojo-to: TransferLimits#delete
115
    x-mojo-to: TransferLimits#batch_delete
116
    operationId: deleteTransferLimit
116
    operationId: batchDeleteTransferLimits
117
    description: This resource deletes a transfer limit for the given limit id
118
    tags:
117
    tags:
119
      - transfer
118
      - transfer
120
    summary: Delete transfer limit
119
    summary: Batch delete transfer limits
121
    parameters:
122
      - $ref: "../swagger.yaml#/parameters/transfer_limit_id_pp"
123
    produces:
120
    produces:
124
      - application/json
121
      - application/json
122
    parameters:
123
      - description: A JSON object containing information about new transfer limits.
124
        in: body
125
        name: body
126
        required: true
127
        schema:
128
          additionalProperties: false
129
          properties:
130
            collection_code:
131
              description: Authorized value for the collection code associated with this limit
132
              type:
133
                - string
134
                - "null"
135
            from_library_id:
136
              description: Internal library id for which library the item is coming from
137
              type: string
138
            item_type:
139
              description: Itemtype defining the type for this limi
140
              type:
141
                - string
142
                - "null"
143
            to_library_id:
144
              description: Internal library id for which library the item is going to
145
              type: string
146
          type: object
125
    responses:
147
    responses:
126
      "204":
148
      204:
127
        description: Transfer limit deleted
149
        description: Transfer limits deleted
128
        schema:
150
        schema:
129
          type: string
151
          type: string
130
      "401":
152
      401:
131
        description: Authentication required
153
        description: Authentication required
132
        schema:
154
        schema:
133
          $ref: "../swagger.yaml#/definitions/error"
155
          $ref: ../swagger.yaml#/definitions/error
134
      "403":
156
      403:
135
        description: Access forbidden
157
        description: Access forbidden
136
        schema:
158
        schema:
137
          $ref: "../swagger.yaml#/definitions/error"
159
          $ref: ../swagger.yaml#/definitions/error
138
      "404":
160
      404:
139
        description: Library not found
161
        description: Library not found
140
        schema:
162
        schema:
141
          $ref: "../swagger.yaml#/definitions/error"
163
          $ref: ../swagger.yaml#/definitions/error
142
      "500":
164
      500:
143
        description: |
165
        description: |
144
          Internal server error. Possible `error_code` attribute values:
166
          Internal server error. Possible `error_code` attribute values:
145
167
          
146
          * `internal_server_error`
168
          * `internal_server_error`
147
        schema:
169
        schema:
148
          $ref: "../swagger.yaml#/definitions/error"
170
          $ref: ../swagger.yaml#/definitions/error
149
      "503":
171
      503:
150
        description: Under maintenance
172
        description: Under maintenance
151
        schema:
173
        schema:
152
          $ref: "../swagger.yaml#/definitions/error"
174
          $ref: ../swagger.yaml#/definitions/error
153
    x-koha-authorization:
175
    x-koha-authorization:
154
      permissions:
176
      permissions:
155
        parameters: manage_transfers
177
        parameters: manage_transfers
156
/transfer_limits/batch:
178
    description: 'This endpoint works just like [the POST version](#op-post-transfer_limits-batch), except it deletes transfer in batch rather than creating them.'
157
  post:
179
  post:
158
    x-mojo-to: TransferLimits#batch_add
180
    x-mojo-to: TransferLimits#batch_add
159
    operationId: batchAddTransferLimits
181
    operationId: batchAddTransferLimits
160
    description: >
161
162
      This resource batch creates new transfer limits based on the given data.
163
164
      For example, if the paramters `to_library_id: 'BranchA'` and `item_type: 'BOOK'` are passed in
165
      new transfer limits for `BOOK`s will be created, with one transfer limit each for all the
166
      branches defined in Koha. Given 4 branches, 3 limits would be created:
167
168
      * to_library_id: 'BranchA', from_library_id: 'BranchB', item_type: 'BOOK'
169
      * to_library_id: 'BranchA', from_library_id: 'BranchC', item_type: 'BOOK'
170
      * to_library_id: 'BranchA', from_library_id: 'BranchD', item_type: 'BOOK'
171
172
173
      The body of the query would look like
174
175
      ```
176
177
      {
178
          'to_library_id': 'BranchA',
179
          'item_type': 'BOOK'
180
181
      }
182
183
      ```
184
185
      As another example, imagine we have an itemtype that is never supposed to be transferred to another library.
186
      If we call that itemtype `LOCAL_ONLY` we would need to just pass `item_type: 'LOCAL_ONLY'`, which would create transfer
187
      limits for all libraries, meaning those items would never be allowed to transfer to another
188
      library. The body of the query would look like
189
190
      ```
191
192
      {
193
          'item_type': 'LOCAL_ONLY'
194
      }
195
196
      ```
197
    tags:
182
    tags:
198
      - transfer
183
      - transfer
199
    summary: Batch add transfer limits
184
    summary: Batch add transfer limits
185
    produces:
186
      - application/json
200
    parameters:
187
    parameters:
201
      - name: body
188
      - description: A JSON object containing information about new transfer limits.
202
        in: body
189
        in: body
203
        description: A JSON object containing information about new transfer limits.
190
        name: body
204
        required: true
191
        required: true
205
        schema:
192
        schema:
206
          type: object
193
          additionalProperties: false
207
          properties:
194
          properties:
208
            to_library_id:
195
            collection_code:
209
              type: string
196
              description: Authorized value for the collection code associated with this limit
210
              description: Internal library id for which library the item is going to
211
            from_library_id:
212
              type: string
213
              description: Internal library id for which library the item is coming from
214
            item_type:
215
              type:
197
              type:
216
                - string
198
                - string
217
                - "null"
199
                - "null"
200
            from_library_id:
201
              description: Internal library id for which library the item is coming from
202
              type: string
203
            item_type:
218
              description: Itemtype defining the type for this limi
204
              description: Itemtype defining the type for this limi
219
            collection_code:
220
              type:
205
              type:
221
                - string
206
                - string
222
                - "null"
207
                - "null"
223
              description: Authorized value for the collection code associated with this
208
            to_library_id:
224
                limit
209
              description: Internal library id for which library the item is going to
225
          additionalProperties: false
210
              type: string
226
    produces:
211
          type: object
227
      - application/json
228
    responses:
212
    responses:
229
      "201":
213
      201:
230
        description: A list of transfer limits
214
        description: A list of transfer limits
231
        schema:
215
        schema:
232
          type: array
216
          type: array
233
          items:
217
          items:
234
            $ref: "../swagger.yaml#/definitions/transfer_limit"
218
            $ref: ../swagger.yaml#/definitions/transfer_limit
235
      "500":
219
      500:
236
        description: |
220
        description: |
237
          Internal server error. Possible `error_code` attribute values:
221
          Internal server error. Possible `error_code` attribute values:
238
222
          
239
          * `internal_server_error`
223
          * `internal_server_error`
240
        schema:
224
        schema:
241
          $ref: "../swagger.yaml#/definitions/error"
225
          $ref: ../swagger.yaml#/definitions/error
242
      "503":
226
      503:
243
        description: Under maintenance
227
        description: Under maintenance
244
        schema:
228
        schema:
245
          $ref: "../swagger.yaml#/definitions/error"
229
          $ref: ../swagger.yaml#/definitions/error
246
    x-koha-authorization:
230
    x-koha-authorization:
247
      permissions:
231
      permissions:
248
        parameters: manage_transfers
232
        parameters: manage_transfers
233
    description: |2
234
      
235
       This resource batch creates new transfer limits based on the given data.
236
      
237
       For example, if the paramters `to_library_id: 'BranchA'` and `item_type: 'BOOK'` are passed in
238
       new transfer limits for `BOOK`s will be created, with one transfer limit each for all the
239
       branches defined in Koha. Given 4 branches, 3 limits would be created:
240
      
241
       * to_library_id: 'BranchA', from_library_id: 'BranchB', item_type: 'BOOK'
242
       * to_library_id: 'BranchA', from_library_id: 'BranchC', item_type: 'BOOK'
243
       * to_library_id: 'BranchA', from_library_id: 'BranchD', item_type: 'BOOK'
244
      
245
      
246
       The body of the query would look like
247
      
248
       ```
249
      
250
       {
251
           'to_library_id': 'BranchA',
252
           'item_type': 'BOOK'
253
      
254
       }
255
      
256
       ```
257
      
258
       As another example, imagine we have an itemtype that is never supposed to be transferred to another library.
259
       If we call that itemtype `LOCAL_ONLY` we would need to just pass `item_type: 'LOCAL_ONLY'`, which would create transfer
260
       limits for all libraries, meaning those items would never be allowed to transfer to another
261
       library. The body of the query would look like
262
      
263
       ```
264
      
265
       {
266
           'item_type': 'LOCAL_ONLY'
267
       }
268
      
269
       ```
270
'/transfer_limits/{limit_id}':
249
  delete:
271
  delete:
250
    x-mojo-to: TransferLimits#batch_delete
272
    x-mojo-to: TransferLimits#delete
251
    operationId: batchDeleteTransferLimits
273
    operationId: deleteTransferLimit
252
    description: This endpoint works just like [the POST
253
      version](#op-post-transfer_limits-batch), except it deletes transfer in
254
      batch rather than creating them.
255
    tags:
274
    tags:
256
      - transfer
275
      - transfer
257
    summary: Batch delete transfer limits
276
    summary: Delete transfer limit
258
    parameters:
259
      - name: body
260
        in: body
261
        description: A JSON object containing information about new transfer limits.
262
        required: true
263
        schema:
264
          type: object
265
          properties:
266
            to_library_id:
267
              type: string
268
              description: Internal library id for which library the item is going to
269
            from_library_id:
270
              type: string
271
              description: Internal library id for which library the item is coming from
272
            item_type:
273
              type:
274
                - string
275
                - "null"
276
              description: Itemtype defining the type for this limi
277
            collection_code:
278
              type:
279
                - string
280
                - "null"
281
              description: Authorized value for the collection code associated with this
282
                limit
283
          additionalProperties: false
284
    produces:
277
    produces:
285
      - application/json
278
      - application/json
279
    parameters:
280
      - $ref: ../swagger.yaml#/parameters/transfer_limit_id_pp
286
    responses:
281
    responses:
287
      "204":
282
      204:
288
        description: Transfer limits deleted
283
        description: Transfer limit deleted
289
        schema:
284
        schema:
290
          type: string
285
          type: string
291
      "401":
286
      401:
292
        description: Authentication required
287
        description: Authentication required
293
        schema:
288
        schema:
294
          $ref: "../swagger.yaml#/definitions/error"
289
          $ref: ../swagger.yaml#/definitions/error
295
      "403":
290
      403:
296
        description: Access forbidden
291
        description: Access forbidden
297
        schema:
292
        schema:
298
          $ref: "../swagger.yaml#/definitions/error"
293
          $ref: ../swagger.yaml#/definitions/error
299
      "404":
294
      404:
300
        description: Library not found
295
        description: Library not found
301
        schema:
296
        schema:
302
          $ref: "../swagger.yaml#/definitions/error"
297
          $ref: ../swagger.yaml#/definitions/error
303
      "500":
298
      500:
304
        description: |
299
        description: |
305
          Internal server error. Possible `error_code` attribute values:
300
          Internal server error. Possible `error_code` attribute values:
306
301
          
307
          * `internal_server_error`
302
          * `internal_server_error`
308
        schema:
303
        schema:
309
          $ref: "../swagger.yaml#/definitions/error"
304
          $ref: ../swagger.yaml#/definitions/error
310
      "503":
305
      503:
311
        description: Under maintenance
306
        description: Under maintenance
312
        schema:
307
        schema:
313
          $ref: "../swagger.yaml#/definitions/error"
308
          $ref: ../swagger.yaml#/definitions/error
314
    x-koha-authorization:
309
    x-koha-authorization:
315
      permissions:
310
      permissions:
316
        parameters: manage_transfers
311
        parameters: manage_transfers
317
- 
312
    description: This resource deletes a transfer limit for the given limit id

Return to bug 30385