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

(-)a/api/v1/swagger/definitions.json (-95 lines)
Lines 1-95 Link Here
1
{
2
  "account_line": {
3
    "$ref": "definitions/account_line.json"
4
  },
5
  "basket": {
6
    "$ref": "definitions/basket.json"
7
  },
8
  "cashup": {
9
    "$ref": "definitions/cashup.json"
10
  },
11
  "circ-rule-kind": {
12
    "$ref": "definitions/circ-rule-kind.json"
13
  },
14
  "city": {
15
    "$ref": "definitions/city.yaml"
16
  },
17
  "error": {
18
    "$ref": "definitions/error.json"
19
  },
20
  "fund": {
21
    "$ref": "definitions/fund.json"
22
  },
23
  "hold": {
24
    "$ref": "definitions/hold.json"
25
  },
26
  "invoice": {
27
    "$ref": "definitions/invoice.json"
28
  },
29
  "item": {
30
    "$ref": "definitions/item.yaml"
31
  },
32
  "checkouts": {
33
    "$ref": "definitions/checkouts.json"
34
  },
35
  "checkout": {
36
    "$ref": "definitions/checkout.json"
37
  },
38
  "holds": {
39
    "$ref": "definitions/holds.json"
40
  },
41
  "ill_backends": {
42
    "$ref": "definitions/ill_backends.json"
43
  },
44
  "ill_backend": {
45
    "$ref": "definitions/ill_backend.json"
46
  },
47
  "import_batch_profile": {
48
    "$ref": "definitions/import_batch_profile.json"
49
  },
50
  "import_batch_profiles": {
51
    "$ref": "definitions/import_batch_profiles.json"
52
  },
53
  "library": {
54
    "$ref": "definitions/library.json"
55
  },
56
  "transfer_limit": {
57
    "$ref": "definitions/transfer_limit.json"
58
  },
59
  "order": {
60
    "$ref": "definitions/order.json"
61
  },
62
  "advancededitormacro": {
63
    "$ref": "definitions/advancededitormacro.json"
64
  },
65
  "patron": {
66
    "$ref": "definitions/patron.json"
67
  },
68
  "patron_account_credit": {
69
    "$ref": "definitions/patron_account_credit.json"
70
  },
71
  "patron_balance": {
72
    "$ref": "definitions/patron_balance.json"
73
  },
74
  "patron_extended_attribute": {
75
    "$ref": "definitions/patron_extended_attribute.json"
76
  },
77
  "quote": {
78
    "$ref": "definitions/quote.json"
79
  },
80
  "allows_renewal": {
81
    "$ref": "definitions/allows_renewal.json"
82
  },
83
  "vendor": {
84
    "$ref": "definitions/vendor.json"
85
  },
86
  "return_claim": {
87
    "$ref": "definitions/return_claim.json"
88
  },
89
  "smtp_server": {
90
    "$ref": "definitions/smtp_server.json"
91
  },
92
  "suggestion": {
93
    "$ref": "definitions/suggestion.yaml"
94
  }
95
}
(-)a/api/v1/swagger/definitions.yaml (+63 lines)
Line 0 Link Here
1
---
2
account_line:
3
  $ref: definitions/account_line.yaml
4
advancededitormacro:
5
  $ref: definitions/advancededitormacro.yaml
6
allows_renewal:
7
  $ref: definitions/allows_renewal.yaml
8
basket:
9
  $ref: definitions/basket.yaml
10
cashup:
11
  $ref: definitions/cashup.yaml
12
checkout:
13
  $ref: definitions/checkout.yaml
14
checkouts:
15
  $ref: definitions/checkouts.yaml
16
circ-rule-kind:
17
  $ref: definitions/circ-rule-kind.yaml
18
city:
19
  $ref: definitions/city.yaml
20
error:
21
  $ref: definitions/error.yaml
22
fund:
23
  $ref: definitions/fund.yaml
24
hold:
25
  $ref: definitions/hold.yaml
26
holds:
27
  $ref: definitions/holds.yaml
28
ill_backend:
29
  $ref: definitions/ill_backend.yaml
30
ill_backends:
31
  $ref: definitions/ill_backends.yaml
32
import_batch_profile:
33
  $ref: definitions/import_batch_profile.yaml
34
import_batch_profiles:
35
  $ref: definitions/import_batch_profiles.yaml
36
invoice:
37
  $ref: definitions/invoice.yaml
38
item:
39
  $ref: definitions/item.yaml
40
library:
41
  $ref: definitions/library.yaml
42
order:
43
  $ref: definitions/order.yaml
44
patron:
45
  $ref: definitions/patron.yaml
46
patron_account_credit:
47
  $ref: definitions/patron_account_credit.yaml
48
patron_balance:
49
  $ref: definitions/patron_balance.yaml
50
patron_extended_attribute:
51
  $ref: definitions/patron_extended_attribute.yaml
52
quote:
53
  $ref: definitions/quote.yaml
54
return_claim:
55
  $ref: definitions/return_claim.yaml
56
smtp_server:
57
  $ref: definitions/smtp_server.yaml
58
suggestion:
59
  $ref: definitions/suggestion.yaml
60
transfer_limit:
61
  $ref: definitions/transfer_limit.yaml
62
vendor:
63
  $ref: definitions/vendor.yaml
(-)a/api/v1/swagger/definitions/account_line.json (-121 lines)
Lines 1-121 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "account_line_id": {
5
      "type": "integer",
6
      "description": "Internal account line identifier"
7
    },
8
    "checkout_id": {
9
      "type": [
10
        "integer",
11
        "null"
12
      ],
13
      "description": "Internal identifier for the checkout the account line is related to"
14
    },
15
    "patron_id": {
16
      "type": "integer",
17
      "description": "Internal identifier for the patron the account line belongs to"
18
    },
19
    "item_id": {
20
      "type": [
21
        "integer",
22
        "null"
23
      ],
24
      "description": "Internal identifier for the item the account line is related to"
25
    },
26
    "date": {
27
      "type": "string",
28
      "format": "date-time",
29
      "description": "Date the account line was created"
30
    },
31
    "amount": {
32
      "type": "number",
33
      "description": "Account line amount"
34
    },
35
    "description": {
36
      "type": [
37
        "string",
38
        "null"
39
      ],
40
      "description": "Account line description"
41
    },
42
    "account_type": {
43
      "type": [
44
          "string",
45
          "null"
46
      ],
47
      "description": "Account line type"
48
    },
49
    "debit_type": {
50
      "type": [
51
          "string",
52
          "null"
53
      ],
54
      "description": "Account line debit type"
55
    },
56
    "credit_type": {
57
      "type": [
58
          "string",
59
          "null"
60
      ],
61
      "description": "Account line credit type"
62
    },
63
    "payment_type": {
64
      "type": [
65
        "string",
66
        "null"
67
      ],
68
      "description": "Payment type"
69
    },
70
    "amount_outstanding": {
71
      "type": "number",
72
      "description": "Outstanding amount"
73
    },
74
    "last_increment": {
75
      "type": [
76
        "number",
77
        "null"
78
      ],
79
      "description": "The amount the line was increased last time"
80
    },
81
    "timestamp": {
82
      "type": "string",
83
      "format": "date-time",
84
      "description": "Timestamp for the latest line update"
85
    },
86
    "internal_note": {
87
      "type": [
88
        "string",
89
        "null"
90
      ],
91
      "description": "Internal note"
92
    },
93
    "user_id": {
94
      "type": [
95
        "integer",
96
        "null"
97
      ],
98
      "description": "Internal patron identifier for the staff member that introduced the account line"
99
    },
100
    "library_id": {
101
      "type": [
102
        "string",
103
        "null"
104
      ],
105
      "description": "Internal identifier for the library in which the transaction took place"
106
    },
107
    "interface": {
108
      "type": [ "string", "null" ],
109
      "description": "Interface in which the account line was generated (values can be: api, cron, commandline, intranet, opac and sip)"
110
    },
111
    "status": {
112
      "type": [ "string", "null" ],
113
      "description": "The credit/debit status"
114
    },
115
    "cash_register_id": {
116
      "type": [ "integer", "null" ],
117
      "description": "Internal identifier for the cash register used for the payment (if any)"
118
    }
119
  },
120
  "additionalProperties": false
121
}
(-)a/api/v1/swagger/definitions/account_line.yaml (+96 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  account_line_id:
5
    type: integer
6
    description: Internal account line identifier
7
  checkout_id:
8
    type:
9
      - integer
10
      - "null"
11
    description: Internal identifier for the checkout the account line is related to
12
  patron_id:
13
    type: integer
14
    description: Internal identifier for the patron the account line belongs to
15
  item_id:
16
    type:
17
      - integer
18
      - "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:
25
    type: number
26
    description: Account line amount
27
  description:
28
    type:
29
      - string
30
      - "null"
31
    description: Account line description
32
  account_type:
33
    type:
34
      - string
35
      - "null"
36
    description: Account line type
37
  debit_type:
38
    type:
39
      - string
40
      - "null"
41
    description: Account line debit type
42
  credit_type:
43
    type:
44
      - string
45
      - "null"
46
    description: Account line credit type
47
  payment_type:
48
    type:
49
      - string
50
      - "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:
65
    type:
66
      - string
67
      - "null"
68
    description: Internal note
69
  user_id:
70
    type:
71
      - integer
72
      - "null"
73
    description: Internal patron identifier for the staff member that introduced the
74
      account line
75
  library_id:
76
    type:
77
      - string
78
      - "null"
79
    description: Internal identifier for the library in which the transaction took place
80
  interface:
81
    type:
82
      - string
83
      - "null"
84
    description: "Interface in which the account line was generated (values can be: api,
85
      cron, commandline, intranet, opac and sip)"
86
  status:
87
    type:
88
      - string
89
      - "null"
90
    description: The credit/debit status
91
  cash_register_id:
92
    type:
93
      - integer
94
      - "null"
95
    description: Internal identifier for the cash register used for the payment (if any)
96
additionalProperties: false
(-)a/api/v1/swagger/definitions/advancededitormacro.json (-26 lines)
Lines 1-26 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "macro_id": {
5
      "$ref": "../x-primitives.json#/advancededitormacro_id"
6
    },
7
    "name": {
8
      "description": "macro name",
9
      "type": "string"
10
    },
11
    "macro_text": {
12
      "description": "macro text",
13
      "type": ["string", "null"]
14
    },
15
    "patron_id": {
16
      "description": "borrower number",
17
      "type": ["integer", "null"]
18
    },
19
    "shared": {
20
        "description": "is macro shared",
21
        "type": ["boolean", "null"]
22
    }
23
  },
24
  "additionalProperties": false,
25
  "required": ["name", "macro_text", "patron_id", "shared"]
26
}
(-)a/api/v1/swagger/definitions/advancededitormacro.yaml (+29 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  macro_id:
5
    $ref: ../x-primitives.yaml#/advancededitormacro_id
6
  name:
7
    description: macro name
8
    type: string
9
  macro_text:
10
    description: macro text
11
    type:
12
      - string
13
      - "null"
14
  patron_id:
15
    description: borrower number
16
    type:
17
      - integer
18
      - "null"
19
  shared:
20
    description: is macro shared
21
    type:
22
      - boolean
23
      - "null"
24
additionalProperties: false
25
required:
26
  - name
27
  - macro_text
28
  - patron_id
29
  - shared
(-)a/api/v1/swagger/definitions/allows_renewal.json (-26 lines)
Lines 1-26 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "allows_renewal": {
5
      "type": "boolean",
6
      "description": "Renewability status; true = renewable, false = not renewable"
7
    },
8
    "max_renewals": {
9
      "type": "integer",
10
      "description": "Maximum number of possible renewals"
11
    },
12
     "current_renewals": {
13
      "type": "integer",
14
      "description": "Current used renewals"
15
    },
16
     "unseen_renewals": {
17
      "type": "integer",
18
      "description": "Number of consecutive times the item was renewed without being seen"
19
    },
20
    "error": {
21
      "type": ["string", "null"],
22
      "description": "Description on false allows_renewal."
23
    }
24
  },
25
  "additionalProperties": false
26
}
(-)a/api/v1/swagger/definitions/allows_renewal.yaml (+21 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  allows_renewal:
5
    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:
11
    type: integer
12
    description: Current used renewals
13
  unseen_renewals:
14
    type: integer
15
    description: Number of consecutive times the item was renewed without being seen
16
  error:
17
    type:
18
      - string
19
      - "null"
20
    description: Description on false allows_renewal.
21
additionalProperties: false
(-)a/api/v1/swagger/definitions/basket.json (-100 lines)
Lines 1-100 Link Here
1
{
2
    "type": "object",
3
    "properties": {
4
        "basket_id": {
5
            "type": "integer",
6
            "description": "Internal identifier for the basket"
7
        },
8
        "name": {
9
            "type": "string",
10
            "description": "Basket name"
11
        },
12
        "internal_note": {
13
            "type": [
14
                "string",
15
                "null"
16
            ],
17
            "description": "Internal note"
18
        },
19
        "vendor_note": {
20
            "type": [
21
                "string",
22
                "null"
23
            ],
24
            "description": "Vendor note"
25
        },
26
        "contract_id": {
27
            "type": "integer",
28
            "description": "Internal identifier of the linked contract"
29
        },
30
        "creation_date": {
31
            "type": [
32
                "string",
33
                "null"
34
            ],
35
            "format": "date",
36
            "description": "The date the basket was created"
37
        },
38
        "close_date": {
39
            "type": [
40
                "string",
41
                "null"
42
            ],
43
            "format": "date",
44
            "description": "The date the basket was closed"
45
        },
46
        "vendor_id": {
47
            "type": "integer",
48
            "description": "Internal identifier for the vendor"
49
        },
50
        "authorised_by": {
51
            "type": [
52
                "integer",
53
                "null"
54
            ],
55
            "description": "Internal patron identifier of the basket creator"
56
        },
57
        "basket_group_id": {
58
            "type": [
59
                "integer",
60
                "null"
61
            ],
62
            "description": "links this basket to its group (aqbasketgroups.id)"
63
        },
64
        "delivery_library": {
65
            "type": [
66
                "string",
67
                "null"
68
            ],
69
            "description": "basket delivery place"
70
        },
71
        "billing_library": {
72
            "type": [
73
                "string",
74
                "null"
75
            ],
76
            "description": "basket billing place"
77
        },
78
        "library_id": {
79
            "type": [
80
                "integer",
81
                "null"
82
            ],
83
            "description": "Library the basket belongs to"
84
        },
85
        "standing": {
86
            "type": "boolean",
87
            "description": "If the orders in this basket are standing"
88
        },
89
        "create_items": {
90
            "type": "string",
91
            "enum": [
92
                "ordering",
93
                "receiving",
94
                "cataloguing"
95
            ],
96
            "description": "When items should be created for orders in this basket (Options: 'ordering', 'receiving', 'cataloguing'. Null means system wide config)"
97
        }
98
    },
99
    "additionalProperties": false
100
}
(-)a/api/v1/swagger/definitions/basket.yaml (+74 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  basket_id:
5
    type: integer
6
    description: Internal identifier for the basket
7
  name:
8
    type: string
9
    description: Basket name
10
  internal_note:
11
    type:
12
      - string
13
      - "null"
14
    description: Internal note
15
  vendor_note:
16
    type:
17
      - string
18
      - "null"
19
    description: Vendor note
20
  contract_id:
21
    type: integer
22
    description: Internal identifier of the linked contract
23
  creation_date:
24
    type:
25
      - string
26
      - "null"
27
    format: date
28
    description: The date the basket was created
29
  close_date:
30
    type:
31
      - string
32
      - "null"
33
    format: date
34
    description: The date the basket was closed
35
  vendor_id:
36
    type: integer
37
    description: Internal identifier for the vendor
38
  authorised_by:
39
    type:
40
      - integer
41
      - "null"
42
    description: Internal patron identifier of the basket creator
43
  basket_group_id:
44
    type:
45
      - integer
46
      - "null"
47
    description: links this basket to its group (aqbasketgroups.id)
48
  delivery_library:
49
    type:
50
      - string
51
      - "null"
52
    description: basket delivery place
53
  billing_library:
54
    type:
55
      - string
56
      - "null"
57
    description: basket billing place
58
  library_id:
59
    type:
60
      - integer
61
      - "null"
62
    description: Library the basket belongs to
63
  standing:
64
    type: boolean
65
    description: If the orders in this basket are standing
66
  create_items:
67
    type: string
68
    enum:
69
      - ordering
70
      - receiving
71
      - cataloguing
72
    description: "When items should be created for orders in this basket (Options:
73
      'ordering', 'receiving', 'cataloguing'. Null means system wide config)"
74
additionalProperties: false
(-)a/api/v1/swagger/definitions/cashup.json (-38 lines)
Lines 1-38 Link Here
1
{
2
    "type": "object",
3
    "properties": {
4
        "cashup_id": {
5
            "type": "integer",
6
            "description": "Internal cashup identifier"
7
        },
8
        "cash_register_id": {
9
            "type": "integer",
10
            "description": "Internal identifier for the register the cashup belongs to"
11
        },
12
        "manager_id": {
13
            "type": "integer",
14
            "description": "Internal identifier for the manager the cashup was performed by"
15
        },
16
        "manager": {
17
            "type": [
18
                "object",
19
                "null"
20
            ],
21
            "description": "The object representing the manager the cashup was performed by"
22
        },
23
        "amount": {
24
            "type": "number",
25
            "description": "Account line amount"
26
        },
27
        "timestamp": {
28
            "type": "string",
29
            "format": "date-time",
30
            "description": "Timestamp for the latest line update"
31
        },
32
        "summary": {
33
            "type": "object",
34
            "description": "A summary of the cashup action"
35
        }
36
    },
37
    "additionalProperties": false
38
}
(-)a/api/v1/swagger/definitions/cashup.yaml (+28 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  cashup_id:
5
    type: integer
6
    description: Internal cashup identifier
7
  cash_register_id:
8
    type: integer
9
    description: Internal identifier for the register the cashup belongs to
10
  manager_id:
11
    type: integer
12
    description: Internal identifier for the manager the cashup was performed by
13
  manager:
14
    type:
15
      - object
16
      - "null"
17
    description: The object representing the manager the cashup was performed by
18
  amount:
19
    type: number
20
    description: Account line amount
21
  timestamp:
22
    type: string
23
    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
(-)a/api/v1/swagger/definitions/checkout.json (-110 lines)
Lines 1-110 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "checkout_id": {
5
      "type": "integer",
6
      "description": "internally assigned checkout identifier"
7
    },
8
    "patron_id": {
9
      "$ref": "../x-primitives.json#/patron_id"
10
    },
11
    "item_id": {
12
      "type": "integer",
13
      "description": "internal identifier of checked out item"
14
    },
15
    "due_date": {
16
      "type": "string",
17
      "format": "date-time",
18
      "description": "Due date"
19
    },
20
    "library_id": {
21
      "type": ["string", "null"],
22
      "description": "code of the library the item was checked out"
23
    },
24
    "issuer_id": {
25
      "type": [ "integer", "null" ],
26
      "description": "internally assigned for the user that processed the checkout"
27
    },
28
    "checkin_date": {
29
      "type": ["string", "null"],
30
      "format": "date-time",
31
      "description": "Date the item was returned"
32
    },
33
    "last_renewed_date": {
34
      "type": ["string", "null"],
35
      "format": "date-time",
36
      "description": "Date the item was last renewed"
37
    },
38
    "renewals": {
39
      "type": ["integer", "null"],
40
      "description": "Number of renewals"
41
    },
42
    "unseen_renewals": {
43
      "type": ["integer", "null"],
44
      "description": "Number of consecutive unseen renewals"
45
    },
46
    "auto_renew": {
47
      "type": "boolean",
48
      "description": "Auto renewal"
49
    },
50
    "auto_renew_error": {
51
      "type": ["string", "null"],
52
      "description": "Auto renewal error"
53
    },
54
    "timestamp": {
55
      "type": "string",
56
      "description": "Last update time"
57
    },
58
    "checkout_date": {
59
      "type": "string",
60
      "format": "date-time",
61
      "description": "Date the item was issued"
62
    },
63
    "onsite_checkout": {
64
      "type": "boolean",
65
      "description": "On site checkout"
66
    },
67
    "note": {
68
      "type": ["string", "null"],
69
      "description": "Issue note text"
70
    },
71
    "note_date": {
72
      "type": ["string", "null"],
73
      "format": "date",
74
      "description": "Datetime of the issue note"
75
    },
76
    "note_seen": {
77
      "type": ["boolean", "null"],
78
      "description": "has the note been seen already"
79
    },
80
    "issuer": {
81
      "type": [
82
          "object",
83
          "null"
84
      ],
85
      "description": "The object representing the checkout issuer"
86
    },
87
    "item": {
88
      "type": [
89
          "object",
90
          "null"
91
      ],
92
      "description": "The object representing the checked out item"
93
    },
94
    "library": {
95
      "type": [
96
          "object",
97
          "null"
98
      ],
99
      "description": "The object representing the checkout library"
100
    },
101
    "patron": {
102
      "type": [
103
          "object",
104
          "null"
105
      ],
106
      "description": "The object representing the checkout patron"
107
    }
108
  },
109
  "additionalProperties": false
110
}
(-)a/api/v1/swagger/definitions/checkout.yaml (+102 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  checkout_id:
5
    type: integer
6
    description: internally assigned checkout identifier
7
  patron_id:
8
    $ref: ../x-primitives.yaml#/patron_id
9
  item_id:
10
    type: integer
11
    description: internal identifier of checked out item
12
  due_date:
13
    type: string
14
    format: date-time
15
    description: Due date
16
  library_id:
17
    type:
18
      - string
19
      - "null"
20
    description: code of the library the item was checked out
21
  issuer_id:
22
    type:
23
      - integer
24
      - "null"
25
    description: internally assigned for the user that processed the checkout
26
  checkin_date:
27
    type:
28
      - string
29
      - "null"
30
    format: date-time
31
    description: Date the item was returned
32
  last_renewed_date:
33
    type:
34
      - string
35
      - "null"
36
    format: date-time
37
    description: Date the item was last renewed
38
  renewals:
39
    type:
40
      - integer
41
      - "null"
42
    description: Number of renewals
43
  unseen_renewals:
44
    type:
45
      - integer
46
      - "null"
47
    description: Number of consecutive unseen renewals
48
  auto_renew:
49
    type: boolean
50
    description: Auto renewal
51
  auto_renew_error:
52
    type:
53
      - string
54
      - "null"
55
    description: Auto renewal error
56
  timestamp:
57
    type: string
58
    description: Last update time
59
  checkout_date:
60
    type: string
61
    format: date-time
62
    description: Date the item was issued
63
  onsite_checkout:
64
    type: boolean
65
    description: On site checkout
66
  note:
67
    type:
68
      - string
69
      - "null"
70
    description: Issue note text
71
  note_date:
72
    type:
73
      - string
74
      - "null"
75
    format: date
76
    description: Datetime of the issue note
77
  note_seen:
78
    type:
79
      - boolean
80
      - "null"
81
    description: has the note been seen already
82
  issuer:
83
    type:
84
      - object
85
      - "null"
86
    description: The object representing the checkout issuer
87
  item:
88
    type:
89
      - object
90
      - "null"
91
    description: The object representing the checked out item
92
  library:
93
    type:
94
      - object
95
      - "null"
96
    description: The object representing the checkout library
97
  patron:
98
    type:
99
      - object
100
      - "null"
101
    description: The object representing the checkout patron
102
additionalProperties: false
(-)a/api/v1/swagger/definitions/checkouts.json (-7 lines)
Lines 1-7 Link Here
1
{
2
  "type": "array",
3
  "items": {
4
    "$ref": "checkout.json"
5
  },
6
  "additionalProperties": false
7
}
(-)a/api/v1/swagger/definitions/checkouts.yaml (+5 lines)
Line 0 Link Here
1
---
2
type: array
3
items:
4
  $ref: checkout.yaml
5
additionalProperties: false
(-)a/api/v1/swagger/definitions/circ-rule-kind.json (-15 lines)
Lines 1-15 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "scope": {
5
      "description": "levels that this rule kind can be set for",
6
      "type": "array",
7
      "items": {
8
        "type": "string",
9
        "enum": [ "branchcode", "categorycode", "itemtype" ]
10
      }
11
    }
12
  },
13
  "additionalProperties": false,
14
  "required": ["scope"]
15
}
(-)a/api/v1/swagger/definitions/circ-rule-kind.yaml (+15 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  scope:
5
    description: levels that this rule kind can be set for
6
    type: array
7
    items:
8
      type: string
9
      enum:
10
        - branchcode
11
        - categorycode
12
        - itemtype
13
additionalProperties: false
14
required:
15
  - scope
(-)a/api/v1/swagger/definitions/city.yaml (-1 / +1 lines)
Lines 2-8 Link Here
2
type: object
2
type: object
3
properties:
3
properties:
4
  city_id:
4
  city_id:
5
    $ref: ../x-primitives.json#/city_id
5
    $ref: ../x-primitives.yaml#/city_id
6
  name:
6
  name:
7
    description: city name
7
    description: city name
8
    type: string
8
    type: string
(-)a/api/v1/swagger/definitions/club_hold.json (-27 lines)
Lines 1-27 Link Here
1
{
2
    "type": "object",
3
    "properties": {
4
      "club_hold_id": {
5
        "type": "integer",
6
        "description": "Internal club hold identifier"
7
      },
8
      "club_id": {
9
        "type": "integer",
10
        "description": "Internal club identifier"
11
      },
12
      "biblio_id": {
13
        "type": "integer",
14
        "description": "Internal biblio identifier"
15
      },
16
      "item_id": {
17
        "type": ["string", "null"],
18
        "description": "Internal item identifier"
19
      },
20
      "date_created": {
21
        "type": "string",
22
        "format": "date-time",
23
        "description": "Date and time the hold was created"
24
      }
25
    },
26
    "additionalProperties": false
27
}
(-)a/api/v1/swagger/definitions/club_hold.yaml (+22 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  club_hold_id:
5
    type: integer
6
    description: Internal club hold identifier
7
  club_id:
8
    type: integer
9
    description: Internal club identifier
10
  biblio_id:
11
    type: integer
12
    description: Internal biblio identifier
13
  item_id:
14
    type:
15
      - string
16
      - "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
(-)a/api/v1/swagger/definitions/club_hold_patron_hold.json (-31 lines)
Lines 1-31 Link Here
1
{
2
    "type": "object",
3
    "properties": {
4
      "club_hold_patron_hold_id": {
5
        "type": "integer",
6
        "description": "Internal club hold to patron hold identifier"
7
      },
8
      "club_hold_id": {
9
        "type": "integer",
10
        "description": "Internal club hold identifier"
11
      },
12
      "hold_id": {
13
        "type": ["integer", "null"],
14
        "description": "Internal hold identifier"
15
      },
16
      "patron_id": {
17
        "type": "integer",
18
        "description": "Internal patron identifier"
19
      },
20
      "error_code": {
21
        "type": ["string", "null"],
22
        "format": "date",
23
        "description": "Code returned by CanItemBeReserved"
24
      },
25
      "error_message": {
26
        "type": ["string", "null"],
27
        "description": "Generic error message"
28
      }
29
    },
30
    "additionalProperties": false
31
}
(-)a/api/v1/swagger/definitions/club_hold_patron_hold.yaml (+29 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  club_hold_patron_hold_id:
5
    type: integer
6
    description: Internal club hold to patron hold identifier
7
  club_hold_id:
8
    type: integer
9
    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
17
    description: Internal patron identifier
18
  error_code:
19
    type:
20
      - string
21
      - "null"
22
    format: date
23
    description: Code returned by CanItemBeReserved
24
  error_message:
25
    type:
26
      - string
27
      - "null"
28
    description: Generic error message
29
additionalProperties: false
(-)a/api/v1/swagger/definitions/club_hold_patron_holds.json (-7 lines)
Lines 1-7 Link Here
1
{
2
    "type": "array",
3
    "items": {
4
      "$ref": "club_hold_patron_hold.json"
5
    },
6
    "additionalProperties": false
7
}
(-)a/api/v1/swagger/definitions/club_hold_patron_holds.yaml (+5 lines)
Line 0 Link Here
1
---
2
type: array
3
items:
4
  $ref: club_hold_patron_hold.yaml
5
additionalProperties: false
(-)a/api/v1/swagger/definitions/club_holds.json (-7 lines)
Lines 1-7 Link Here
1
{
2
    "type": "array",
3
    "items": {
4
      "$ref": "club_hold.json"
5
    },
6
    "additionalProperties": false
7
}
(-)a/api/v1/swagger/definitions/club_holds.yaml (+5 lines)
Line 0 Link Here
1
---
2
type: array
3
items:
4
  $ref: club_hold.yaml
5
additionalProperties: false
(-)a/api/v1/swagger/definitions/error.json (-10 lines)
Lines 1-10 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "error": {
5
      "description": "Error message",
6
      "type": "string"
7
    }
8
  },
9
  "additionalProperties": true
10
}
(-)a/api/v1/swagger/definitions/error.yaml (+7 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  error:
5
    description: Error message
6
    type: string
7
additionalProperties: true
(-)a/api/v1/swagger/definitions/fund.json (-105 lines)
Lines 1-105 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "fund_id": {
5
      "$ref": "../x-primitives.json#/fund_id"
6
    },
7
    "code": {
8
      "type": [
9
        "string",
10
        "null"
11
      ],
12
      "description": "Code assigned to the fund by the user"
13
    },
14
    "name": {
15
      "type": [
16
        "string",
17
        "null"
18
      ],
19
      "description": "Name assigned to the fund by the user"
20
    },
21
    "library_id": {
22
      "type": [
23
        "string",
24
        "null"
25
      ],
26
      "description": "Internal identifier for the library that this fund belongs to"
27
    },
28
    "total_amount": {
29
      "type": [
30
        "number",
31
        "null"
32
      ],
33
      "description": "Total amount for this fund"
34
    },
35
    "warn_at_percentage": {
36
      "type": [
37
        "number",
38
        "null"
39
      ],
40
      "description": "Warning at percentage"
41
    },
42
    "warn_at_amount": {
43
      "type": [
44
        "number",
45
        "null"
46
      ],
47
      "description": "Warning at amount"
48
    },
49
    "notes": {
50
      "type": [
51
        "string",
52
        "null"
53
      ],
54
      "description": "Notes related to this fund"
55
    },
56
    "budget_id": {
57
      "type": [
58
        "number",
59
        "null"
60
      ],
61
      "description": "Internal identifier for the budget"
62
    },
63
    "timestamp": {
64
      "type": [
65
        "string"
66
      ],
67
      "format": "date-time",
68
      "description": "Timestamp"
69
    },
70
    "fund_owner_id": {
71
      "type": [
72
        "number",
73
        "null"
74
      ],
75
      "description": "Internal identifier for the fund owner"
76
    },
77
    "fund_access": {
78
      "type": [
79
        "number",
80
        "null"
81
      ],
82
      "description": "Level of permission for this fund (1: owner, 2: owner, users and library, 3: owner and users)"
83
    },
84
    "parent_fund_id": {
85
        "type": [ "integer", "null" ],
86
        "description": "Internal identifier for parent fund"
87
    },
88
    "statistic1_auth_value_category": {
89
      "type": [
90
        "string",
91
        "null"
92
      ],
93
      "description": "Statistical category for this fund"
94
    },
95
    "statistic2_auth_value_category": {
96
      "type": [
97
        "string",
98
        "null"
99
      ],
100
      "description": "Second statistical category for this fund"
101
    }
102
  },
103
  "additionalProperties": false,
104
  "required": ["name"]
105
}
(-)a/api/v1/swagger/definitions/fund.yaml (+79 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  fund_id:
5
    $ref: ../x-primitives.yaml#/fund_id
6
  code:
7
    type:
8
      - string
9
      - "null"
10
    description: Code assigned to the fund by the user
11
  name:
12
    type:
13
      - string
14
      - "null"
15
    description: Name assigned to the fund by the user
16
  library_id:
17
    type:
18
      - string
19
      - "null"
20
    description: Internal identifier for the library that this fund belongs to
21
  total_amount:
22
    type:
23
      - number
24
      - "null"
25
    description: Total amount for this fund
26
  warn_at_percentage:
27
    type:
28
      - number
29
      - "null"
30
    description: Warning at percentage
31
  warn_at_amount:
32
    type:
33
      - number
34
      - "null"
35
    description: Warning at amount
36
  notes:
37
    type:
38
      - string
39
      - "null"
40
    description: Notes related to this fund
41
  budget_id:
42
    type:
43
      - number
44
      - "null"
45
    description: Internal identifier for the budget
46
  timestamp:
47
    type:
48
      - string
49
    format: date-time
50
    description: Timestamp
51
  fund_owner_id:
52
    type:
53
      - number
54
      - "null"
55
    description: Internal identifier for the fund owner
56
  fund_access:
57
    type:
58
      - number
59
      - "null"
60
    description: "Level of permission for this fund (1: owner, 2: owner, users and library,
61
      3: owner and users)"
62
  parent_fund_id:
63
    type:
64
      - integer
65
      - "null"
66
    description: Internal identifier for parent fund
67
  statistic1_auth_value_category:
68
    type:
69
      - string
70
      - "null"
71
    description: Statistical category for this fund
72
  statistic2_auth_value_category:
73
    type:
74
      - string
75
      - "null"
76
    description: Second statistical category for this fund
77
additionalProperties: false
78
required:
79
  - name
(-)a/api/v1/swagger/definitions/hold.json (-96 lines)
Lines 1-96 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "hold_id": {
5
      "type": "integer",
6
      "description": "Internal hold identifier"
7
    },
8
    "patron_id": {
9
      "type": "integer",
10
      "description": "Internal patron identifier"
11
    },
12
    "hold_date": {
13
      "type": ["string", "null"],
14
      "format": "date",
15
      "description": "The date the hold was placed"
16
    },
17
    "biblio_id": {
18
      "type": "integer",
19
      "description": "Internal biblio identifier"
20
    },
21
    "pickup_library_id": {
22
      "type": ["string", "null"],
23
      "description": "Internal library identifier for the pickup library"
24
    },
25
    "desk_id": {
26
      "type": ["integer", "null"],
27
      "description": "The id of the desk"
28
    },
29
    "cancellation_date": {
30
      "type": ["string", "null"],
31
      "format": "date",
32
      "description": "The date the hold was cancelled"
33
    },
34
    "cancellation_reason": {
35
      "type": ["string", "null"],
36
      "description": "The reason the hold was cancelled"
37
    },
38
    "notes": {
39
      "type": ["string", "null"],
40
      "description": "Notes related to this hold"
41
    },
42
    "priority": {
43
      "type": ["integer", "null"],
44
      "description": "Where in the queue the patron sits"
45
    },
46
    "status": {
47
      "type": ["string", "null"],
48
      "description": "A one letter code defining what the status of the hold is after it has been confirmed"
49
    },
50
    "timestamp": {
51
      "type": "string",
52
      "format": "date-time",
53
      "description": "Timestamp for the latest hold update"
54
    },
55
    "item_id": {
56
      "type": ["string", "null"],
57
      "description": "Internal item identifier"
58
    },
59
    "waiting_date": {
60
      "type": ["string", "null"],
61
      "format": "date",
62
      "description": "The date the item was marked as waiting for the patron at the library"
63
    },
64
    "expiration_date": {
65
      "type": ["string", "null"],
66
      "format": "date",
67
      "description": "The date the hold expires"
68
    },
69
    "lowest_priority": {
70
      "type": "boolean",
71
      "description": "Controls if the hold is given the lowest priority on the queue"
72
    },
73
    "suspended": {
74
      "type": "boolean",
75
      "description": "Controls if the hold is suspended"
76
    },
77
    "suspended_until": {
78
      "type": ["string", "null"],
79
      "format": "date-time",
80
      "description": "Date until which the hold has been suspended"
81
    },
82
    "non_priority": {
83
      "description": "Set this hold as non priority",
84
      "type": "boolean"
85
    },
86
    "item_type": {
87
      "type": ["string", "null"],
88
      "description": "If record level hold, the optional itemtype of the item the patron is requesting"
89
    },
90
    "item_level": {
91
      "type": "boolean",
92
      "description": "If the hold is placed at item level"
93
    }
94
  },
95
  "additionalProperties": false
96
}
(-)a/api/v1/swagger/definitions/hold.yaml (+101 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  hold_id:
5
    type: integer
6
    description: Internal hold identifier
7
  patron_id:
8
    type: integer
9
    description: Internal patron identifier
10
  hold_date:
11
    type:
12
      - string
13
      - "null"
14
    format: date
15
    description: The date the hold was placed
16
  biblio_id:
17
    type: integer
18
    description: Internal biblio identifier
19
  pickup_library_id:
20
    type:
21
      - string
22
      - "null"
23
    description: Internal library identifier for the pickup library
24
  desk_id:
25
    type:
26
      - integer
27
      - "null"
28
    description: The id of the desk
29
  cancellation_date:
30
    type:
31
      - string
32
      - "null"
33
    format: date
34
    description: The date the hold was cancelled
35
  cancellation_reason:
36
    type:
37
      - string
38
      - "null"
39
    description: The reason the hold was cancelled
40
  notes:
41
    type:
42
      - string
43
      - "null"
44
    description: Notes related to this hold
45
  priority:
46
    type:
47
      - integer
48
      - "null"
49
    description: Where in the queue the patron sits
50
  status:
51
    type:
52
      - string
53
      - "null"
54
    description: A one letter code defining what the status of the hold is after it has
55
      been confirmed
56
  timestamp:
57
    type: string
58
    format: date-time
59
    description: Timestamp for the latest hold update
60
  item_id:
61
    type:
62
      - string
63
      - "null"
64
    description: Internal item identifier
65
  waiting_date:
66
    type:
67
      - string
68
      - "null"
69
    format: date
70
    description: The date the item was marked as waiting for the patron at the library
71
  expiration_date:
72
    type:
73
      - string
74
      - "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:
81
    type: boolean
82
    description: Controls if the hold is suspended
83
  suspended_until:
84
    type:
85
      - string
86
      - "null"
87
    format: date-time
88
    description: Date until which the hold has been suspended
89
  non_priority:
90
    description: Set this hold as non priority
91
    type: boolean
92
  item_type:
93
    type:
94
      - string
95
      - "null"
96
    description: If record level hold, the optional itemtype of the item the patron is
97
      requesting
98
  item_level:
99
    type: boolean
100
    description: If the hold is placed at item level
101
additionalProperties: false
(-)a/api/v1/swagger/definitions/holds.json (-7 lines)
Lines 1-7 Link Here
1
{
2
  "type": "array",
3
  "items": {
4
    "$ref": "hold.json"
5
  },
6
  "additionalProperties": false
7
}
(-)a/api/v1/swagger/definitions/holds.yaml (+5 lines)
Line 0 Link Here
1
---
2
type: array
3
items:
4
  $ref: hold.yaml
5
additionalProperties: false
(-)a/api/v1/swagger/definitions/ill_backend.json (-14 lines)
Lines 1-14 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "ill_backend_id": {
5
      "type": "string",
6
      "description": "Internal ILL backend identifier"
7
    },
8
    "capabilities": {
9
      "type": "object",
10
      "description": "List of capabilities"
11
    }
12
  },
13
  "additionalProperties": false
14
}
(-)a/api/v1/swagger/definitions/ill_backend.yaml (+10 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  ill_backend_id:
5
    type: string
6
    description: Internal ILL backend identifier
7
  capabilities:
8
    type: object
9
    description: List of capabilities
10
additionalProperties: false
(-)a/api/v1/swagger/definitions/ill_backends.json (-7 lines)
Lines 1-7 Link Here
1
{
2
  "type": "array",
3
  "items": {
4
    "$ref": "ill_backend.json"
5
  },
6
  "additionalProperties": false
7
}
(-)a/api/v1/swagger/definitions/ill_backends.yaml (+5 lines)
Line 0 Link Here
1
---
2
type: array
3
items:
4
  $ref: ill_backend.yaml
5
additionalProperties: false
(-)a/api/v1/swagger/definitions/import_batch_profile.json (-54 lines)
Lines 1-54 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "profile_id": {
5
      "type": "integer",
6
      "description": "Internal profile identifier"
7
    },
8
    "name": {
9
      "description": "name of this profile",
10
      "type": "string"
11
    },
12
    "matcher_id": {
13
      "description": "the id of the match rule used (matchpoints.matcher_id)",
14
      "type": ["integer", "null"]
15
    },
16
    "template_id": {
17
      "description": "the id of the marc modification template",
18
      "type": ["integer", "null"]
19
    },
20
    "overlay_action": {
21
      "description": "how to handle duplicate records",
22
      "type": ["string", "null"]
23
    },
24
    "nomatch_action": {
25
      "description": "how to handle records where no match is found",
26
      "type": ["string", "null"]
27
    },
28
    "item_action": {
29
      "description": "what to do with item records",
30
      "type": ["string", "null"]
31
    },
32
    "parse_items": {
33
      "description": "should items be parsed",
34
      "type": ["boolean", "null"]
35
    },
36
    "record_type": {
37
      "description": "type of record in the batch",
38
      "type": ["string", "null"]
39
    },
40
    "encoding": {
41
      "description": "file encoding",
42
      "type": ["string", "null"]
43
    },
44
    "format": {
45
      "description": "marc format",
46
      "type": ["string", "null"]
47
    },
48
    "comments": {
49
      "description": "any comments added when the file was uploaded",
50
      "type": ["string", "null"]
51
    }
52
  },
53
  "additionalProperties": false
54
}
(-)a/api/v1/swagger/definitions/import_batch_profile.yaml (+60 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  profile_id:
5
    type: integer
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:
13
      - integer
14
      - "null"
15
  template_id:
16
    description: the id of the marc modification template
17
    type:
18
      - integer
19
      - "null"
20
  overlay_action:
21
    description: how to handle duplicate records
22
    type:
23
      - string
24
      - "null"
25
  nomatch_action:
26
    description: how to handle records where no match is found
27
    type:
28
      - string
29
      - "null"
30
  item_action:
31
    description: what to do with item records
32
    type:
33
      - string
34
      - "null"
35
  parse_items:
36
    description: should items be parsed
37
    type:
38
      - boolean
39
      - "null"
40
  record_type:
41
    description: type of record in the batch
42
    type:
43
      - string
44
      - "null"
45
  encoding:
46
    description: file encoding
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:
58
      - string
59
      - "null"
60
additionalProperties: false
(-)a/api/v1/swagger/definitions/import_batch_profiles.json (-7 lines)
Lines 1-7 Link Here
1
{
2
    "type": "array",
3
    "items": {
4
      "$ref": "import_batch_profile.json"
5
    },
6
    "additionalProperties": false
7
}
(-)a/api/v1/swagger/definitions/import_batch_profiles.yaml (+5 lines)
Line 0 Link Here
1
---
2
type: array
3
items:
4
  $ref: import_batch_profile.yaml
5
additionalProperties: false
(-)a/api/v1/swagger/definitions/invoice.json (-57 lines)
Lines 1-57 Link Here
1
{
2
    "type": "object",
3
    "properties": {
4
        "invoice_id": {
5
            "type": "integer",
6
            "description": "Internal identifier for the incoide. Generated on POST"
7
        },
8
        "invoice_number": {
9
            "type": "string",
10
            "description": "Invoice number assigned by the vendor"
11
        },
12
        "vendor_id": {
13
            "type": "integer",
14
            "description": "Internal identifier for the vendor"
15
        },
16
        "shipping_date": {
17
            "type": [
18
                "string",
19
                "null"
20
            ],
21
            "format": "date",
22
            "description": "Date of shipping"
23
        },
24
        "invoice_date": {
25
            "type": [
26
                "string",
27
                "null"
28
            ],
29
            "format": "date",
30
            "description": "Date of billing"
31
        },
32
        "closed": {
33
            "type": "boolean",
34
            "description": "If the invoice is closed"
35
        },
36
        "close_date": {
37
            "type": "string",
38
            "format": "date",
39
            "description": "Invoice close date (only when the invoice is closed)"
40
        },
41
        "shipping_cost": {
42
            "type": [
43
                "integer",
44
                "null"
45
            ],
46
            "description": "Shipping cost"
47
        },
48
        "shipping_cost_budget_id": {
49
            "type": [
50
                "integer",
51
                "null"
52
            ],
53
            "description": "Shipping cost linking to budget"
54
        }
55
    },
56
    "additionalProperties": false
57
}
(-)a/api/v1/swagger/definitions/invoice.yaml (+42 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  invoice_id:
5
    type: integer
6
    description: Internal identifier for the incoide. Generated on POST
7
  invoice_number:
8
    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
18
    description: Date of shipping
19
  invoice_date:
20
    type:
21
      - string
22
      - "null"
23
    format: date
24
    description: Date of billing
25
  closed:
26
    type: boolean
27
    description: If the invoice is closed
28
  close_date:
29
    type: string
30
    format: date
31
    description: Invoice close date (only when the invoice is closed)
32
  shipping_cost:
33
    type:
34
      - integer
35
      - "null"
36
    description: Shipping cost
37
  shipping_cost_budget_id:
38
    type:
39
      - integer
40
      - "null"
41
    description: Shipping cost linking to budget
42
additionalProperties: false
(-)a/api/v1/swagger/definitions/library.json (-106 lines)
Lines 1-106 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "library_id": {
5
      "$ref": "../x-primitives.json#/library_id"
6
    },
7
    "name": {
8
      "type": "string",
9
      "description": "Printable name of library"
10
    },
11
    "address1": {
12
      "type": ["string", "null"],
13
      "description": "the first address line of the library"
14
    },
15
    "address2": {
16
      "type": ["string", "null"],
17
      "description": "the second address line of the library"
18
    },
19
    "address3": {
20
      "type": ["string", "null"],
21
      "description": "the third address line of the library"
22
    },
23
    "postal_code": {
24
      "type": ["string", "null"],
25
      "description": "the postal code of the library"
26
    },
27
    "city": {
28
      "type": ["string", "null"],
29
      "description": "the city or province of the library"
30
    },
31
    "state": {
32
      "type": ["string", "null"],
33
      "description": "the reqional state of the library"
34
    },
35
    "country": {
36
      "type": ["string", "null"],
37
      "description": "the county of the library"
38
    },
39
    "phone": {
40
      "type": ["string", "null"],
41
      "description": "the primary phone of the library"
42
    },
43
    "fax": {
44
      "type": ["string", "null"],
45
      "description": "the fax number of the library"
46
    },
47
    "email": {
48
      "type": ["string", "null"],
49
      "description": "the primary email address of the library"
50
    },
51
    "illemail": {
52
      "type": ["string", "null"],
53
      "description": "the ILL staff email address of the library"
54
    },
55
    "reply_to_email": {
56
      "type": ["string", "null"],
57
      "description": "the email to be used as a Reply-To"
58
    },
59
    "return_path_email": {
60
      "type": ["string", "null"],
61
      "description": "the email to be used as Return-Path"
62
    },
63
    "url": {
64
      "type": ["string", "null"],
65
      "description": "the URL for your library or branch's website"
66
    },
67
    "ip": {
68
      "type": ["string", "null"],
69
      "description": "the IP address for your library or branch"
70
    },
71
    "notes": {
72
      "type": ["string", "null"],
73
      "description": "notes related to your library or branch"
74
    },
75
    "opac_info": {
76
      "type": ["string", "null"],
77
      "description": "HTML that displays in OPAC"
78
    },
79
    "geolocation": {
80
      "type": ["string", "null"],
81
      "description": "geolocation of your library"
82
    },
83
    "marc_org_code": {
84
        "type": [ "string", "null" ],
85
        "description": "MARC Organization Code, see http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults to syspref MARCOrgCode"
86
    },
87
    "pickup_location": {
88
        "type": "boolean",
89
        "description": "If the library can act as a pickup location"
90
    },
91
    "public": {
92
        "type": "boolean",
93
        "description": "If the library is visible to the public"
94
    },
95
    "smtp_server": {
96
        "type": ["object", "null"],
97
        "description": "The library effective SMTP server"
98
    },
99
    "needs_override": {
100
        "type": "boolean",
101
        "description": "If the library needs an override to act as pickup location for a hold"
102
    }
103
  },
104
  "additionalProperties": false,
105
  "required": ["library_id", "name"]
106
}
(-)a/api/v1/swagger/definitions/library.yaml (+123 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  library_id:
5
    $ref: ../x-primitives.yaml#/library_id
6
  name:
7
    type: string
8
    description: Printable name of library
9
  address1:
10
    type:
11
      - string
12
      - "null"
13
    description: the first address line of the library
14
  address2:
15
    type:
16
      - string
17
      - "null"
18
    description: the second address line of the library
19
  address3:
20
    type:
21
      - string
22
      - "null"
23
    description: the third address line of the library
24
  postal_code:
25
    type:
26
      - string
27
      - "null"
28
    description: the postal code of the library
29
  city:
30
    type:
31
      - string
32
      - "null"
33
    description: the city or province of the library
34
  state:
35
    type:
36
      - string
37
      - "null"
38
    description: the reqional state of the library
39
  country:
40
    type:
41
      - string
42
      - "null"
43
    description: the county of the library
44
  phone:
45
    type:
46
      - string
47
      - "null"
48
    description: the primary phone of the library
49
  fax:
50
    type:
51
      - string
52
      - "null"
53
    description: the fax number of the library
54
  email:
55
    type:
56
      - string
57
      - "null"
58
    description: the primary email address of the library
59
  illemail:
60
    type:
61
      - string
62
      - "null"
63
    description: the ILL staff email address of the library
64
  reply_to_email:
65
    type:
66
      - string
67
      - "null"
68
    description: the email to be used as a Reply-To
69
  return_path_email:
70
    type:
71
      - string
72
      - "null"
73
    description: the email to be used as Return-Path
74
  url:
75
    type:
76
      - string
77
      - "null"
78
    description: the URL for your library or branch's website
79
  ip:
80
    type:
81
      - string
82
      - "null"
83
    description: the IP address for your library or branch
84
  notes:
85
    type:
86
      - string
87
      - "null"
88
    description: notes related to your library or branch
89
  opac_info:
90
    type:
91
      - string
92
      - "null"
93
    description: HTML that displays in OPAC
94
  geolocation:
95
    type:
96
      - string
97
      - "null"
98
    description: geolocation of your library
99
  marc_org_code:
100
    type:
101
      - string
102
      - "null"
103
    description: MARC Organization Code, see
104
      http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults
105
      to syspref MARCOrgCode
106
  pickup_location:
107
    type: boolean
108
    description: If the library can act as a pickup location
109
  public:
110
    type: boolean
111
    description: If the library is visible to the public
112
  smtp_server:
113
    type:
114
      - object
115
      - "null"
116
    description: The library effective SMTP server
117
  needs_override:
118
    type: boolean
119
    description: If the library needs an override to act as pickup location for a hold
120
additionalProperties: false
121
required:
122
  - library_id
123
  - name
(-)a/api/v1/swagger/definitions/order.json (-335 lines)
Lines 1-335 Link Here
1
{
2
    "type": "object",
3
    "properties": {
4
        "order_id": {
5
            "type": "integer",
6
            "description": "Internally assigned order identifier"
7
        },
8
        "biblio_id": {
9
            "type": [
10
                "integer",
11
                "null"
12
            ],
13
            "description": "Identifier for the linked bibliographic record"
14
        },
15
        "created_by": {
16
            "type": [
17
                "integer",
18
                "null"
19
            ],
20
            "description": "Interal patron identifier of the order line creator"
21
        },
22
        "entry_date": {
23
            "type": [
24
                "string",
25
                "null"
26
            ],
27
            "format": "date",
28
            "description": "Date the bib was added to the basket"
29
        },
30
        "quantity": {
31
            "type": [
32
                "integer",
33
                "null"
34
            ],
35
            "description": "Ordered quantity"
36
        },
37
        "currency": {
38
            "type": [
39
                "string",
40
                "null"
41
            ],
42
            "description": "Currency used for the purchase"
43
        },
44
        "list_price": {
45
            "type": [
46
                "number",
47
                "null"
48
            ],
49
            "description": "Vendor price for the line item"
50
        },
51
        "replacement_price": {
52
            "type": [
53
                "number",
54
                "null"
55
            ],
56
            "description": "Replacement cost for this item"
57
        },
58
        "date_received": {
59
            "type": [
60
                "string",
61
                "null"
62
            ],
63
            "format": "date",
64
            "description": "Date the order was received"
65
        },
66
        "invoice_id": {
67
            "type": [
68
                "integer",
69
                "null"
70
            ],
71
            "description": "Id of the order invoice"
72
        },
73
        "shipping_cost": {
74
            "type": [
75
                "number",
76
                "null"
77
            ],
78
            "description": "Shipping cost"
79
        },
80
        "unit_price": {
81
            "type": [
82
                "number",
83
                "null"
84
            ],
85
            "description": "The actual cost entered when receiving this line item"
86
        },
87
        "unit_price_tax_excluded": {
88
            "type": [
89
                "number",
90
                "null"
91
            ],
92
            "description": "Unit price excluding tax (on receiving)"
93
        },
94
        "unit_price_tax_included": {
95
            "type": [
96
                "number",
97
                "null"
98
            ],
99
            "description": "Unit price including tax (on receiving)"
100
        },
101
        "quantity_received": {
102
            "type": "integer",
103
            "description": "Quantity received so far"
104
        },
105
        "cancellation_date": {
106
            "type": [
107
                "string",
108
                "null"
109
            ],
110
            "format": "date",
111
            "description": "Date the line item was deleted"
112
        },
113
        "cancellation_reason": {
114
            "type": [
115
                "string",
116
                "null"
117
            ],
118
            "description": "Reason of cancellation"
119
        },
120
        "internal_note": {
121
            "type": [
122
                "string",
123
                "null"
124
            ],
125
            "description": "Notes related to this order line, made for staff"
126
        },
127
        "vendor_note": {
128
            "type": [
129
                "string",
130
                "null"
131
            ],
132
            "description": "Notes related to this order line, made for vendor"
133
        },
134
        "basket_id": {
135
            "type": [
136
                "integer",
137
                "null"
138
            ],
139
            "description": "Basket this order is linked to"
140
        },
141
        "timestamp": {
142
            "type": "string",
143
            "format": "date-time",
144
            "description": "Date and time this order line was last modified"
145
        },
146
        "rrp": {
147
            "type": [
148
                "number",
149
                "null"
150
            ],
151
            "description": "Retail cost for this item"
152
        },
153
        "rrp_tax_excluded": {
154
            "type": [
155
                "number",
156
                "null"
157
            ],
158
            "description": "Replacement cost for this item (tax excluded)"
159
        },
160
        "rrp_tax_included": {
161
            "type": [
162
                "number",
163
                "null"
164
            ],
165
            "description": "Replacement cost for this item (tax included)"
166
        },
167
        "ecost": {
168
            "type": [
169
                "number",
170
                "null"
171
            ],
172
            "description": "Effective cost"
173
        },
174
        "ecost_tax_excluded": {
175
            "type": [
176
                "number",
177
                "null"
178
            ],
179
            "description": "Effective cost (tax excluded)"
180
        },
181
        "ecost_tax_included": {
182
            "type": [
183
                "number",
184
                "null"
185
            ],
186
            "description": "Effective cost (tax included)"
187
        },
188
        "tax_rate_on_ordering": {
189
            "type": [
190
                "number",
191
                "null"
192
            ],
193
            "description": "Tax rate on ordering (%)"
194
        },
195
        "tax_rate_on_receiving": {
196
            "type": [
197
                "number",
198
                "null"
199
            ],
200
            "description": "Tax rate on receiving (%)"
201
        },
202
        "tax_value_on_ordering": {
203
            "type": [
204
                "number",
205
                "null"
206
            ],
207
            "description": "Tax value on ordering"
208
        },
209
        "tax_value_on_receiving": {
210
            "type": [
211
                "number",
212
                "null"
213
            ],
214
            "description": "Tax value on receiving"
215
        },
216
        "discount_rate": {
217
            "type": [
218
                "number",
219
                "null"
220
            ],
221
            "description": "Discount rate"
222
        },
223
        "fund_id": {
224
            "type": "integer",
225
            "description": "Internal identifier for the fund this order goes against"
226
        },
227
        "statistics_1": {
228
            "type": [
229
                "string",
230
                "null"
231
            ],
232
            "description": "Statistical field"
233
        },
234
        "statistics_2": {
235
            "type": [
236
                "string",
237
                "null"
238
            ],
239
            "description": "Statistical field (2)"
240
        },
241
        "statistics_1_authcat": {
242
            "type": [
243
                "string",
244
                "null"
245
            ],
246
            "description": "Statistical category for this order"
247
        },
248
        "statistics_2_authcat": {
249
            "type": [
250
                "string",
251
                "null"
252
            ],
253
            "description": "Statistical category for this order (2)"
254
        },
255
        "uncertain_price": {
256
            "type": "boolean",
257
            "description": "If this price was uncertain"
258
        },
259
        "claims_count": {
260
            "type": "integer",
261
            "description": "Generated claim letters count"
262
        },
263
        "last_claim_date": {
264
            "type": [
265
                "string",
266
                "null"
267
            ],
268
            "format": "date",
269
            "description": "Last date a claim letter was generated"
270
        },
271
        "subscription_id": {
272
            "type": [
273
                "integer",
274
                "null"
275
            ],
276
            "description": "Subscription ID linking the order to a subscription"
277
        },
278
        "parent_order_id": {
279
            "type": [
280
                "integer",
281
                "null"
282
            ],
283
            "description": "Order ID of parent order line if exists"
284
        },
285
        "status": {
286
            "type": "string",
287
            "enum": [
288
                "new",
289
                "ordered",
290
                "partial",
291
                "complete",
292
                "cancelled"
293
            ],
294
            "description": "The current order status"
295
        },
296
        "basket": {
297
            "type": [
298
                "object",
299
                "null"
300
            ]
301
        },
302
        "biblio": {
303
            "type": [
304
                "object",
305
                "null"
306
            ]
307
        },
308
        "current_item_level_holds_count": {
309
            "type": "integer",
310
            "description": "Current holds count for associated items"
311
        },
312
        "fund": {
313
            "type": [
314
                "object",
315
                "null"
316
            ]
317
        },
318
        "invoice": {
319
            "type": [
320
                "object",
321
                "null"
322
            ]
323
        },
324
        "items": {
325
            "type": "array"
326
        },
327
        "subscription": {
328
            "type": [
329
                "object",
330
                "null"
331
            ]
332
        }
333
    },
334
    "additionalProperties": false
335
}
(-)a/api/v1/swagger/definitions/order.yaml (+241 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  order_id:
5
    type: integer
6
    description: Internally assigned order identifier
7
  biblio_id:
8
    type:
9
      - integer
10
      - "null"
11
    description: Identifier for the linked bibliographic record
12
  created_by:
13
    type:
14
      - integer
15
      - "null"
16
    description: Interal patron identifier of the order line creator
17
  entry_date:
18
    type:
19
      - string
20
      - "null"
21
    format: date
22
    description: Date the bib was added to the basket
23
  quantity:
24
    type:
25
      - integer
26
      - "null"
27
    description: Ordered quantity
28
  currency:
29
    type:
30
      - string
31
      - "null"
32
    description: Currency used for the purchase
33
  list_price:
34
    type:
35
      - number
36
      - "null"
37
    description: Vendor price for the line item
38
  replacement_price:
39
    type:
40
      - number
41
      - "null"
42
    description: Replacement cost for this item
43
  date_received:
44
    type:
45
      - string
46
      - "null"
47
    format: date
48
    description: Date the order was received
49
  invoice_id:
50
    type:
51
      - integer
52
      - "null"
53
    description: Id of the order invoice
54
  shipping_cost:
55
    type:
56
      - number
57
      - "null"
58
    description: Shipping cost
59
  unit_price:
60
    type:
61
      - number
62
      - "null"
63
    description: The actual cost entered when receiving this line item
64
  unit_price_tax_excluded:
65
    type:
66
      - number
67
      - "null"
68
    description: Unit price excluding tax (on receiving)
69
  unit_price_tax_included:
70
    type:
71
      - number
72
      - "null"
73
    description: Unit price including tax (on receiving)
74
  quantity_received:
75
    type: integer
76
    description: Quantity received so far
77
  cancellation_date:
78
    type:
79
      - string
80
      - "null"
81
    format: date
82
    description: Date the line item was deleted
83
  cancellation_reason:
84
    type:
85
      - string
86
      - "null"
87
    description: Reason of cancellation
88
  internal_note:
89
    type:
90
      - string
91
      - "null"
92
    description: Notes related to this order line, made for staff
93
  vendor_note:
94
    type:
95
      - string
96
      - "null"
97
    description: Notes related to this order line, made for vendor
98
  basket_id:
99
    type:
100
      - integer
101
      - "null"
102
    description: Basket this order is linked to
103
  timestamp:
104
    type: string
105
    format: date-time
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:
119
      - number
120
      - "null"
121
    description: Replacement cost for this item (tax included)
122
  ecost:
123
    type:
124
      - number
125
      - "null"
126
    description: Effective cost
127
  ecost_tax_excluded:
128
    type:
129
      - number
130
      - "null"
131
    description: Effective cost (tax excluded)
132
  ecost_tax_included:
133
    type:
134
      - number
135
      - "null"
136
    description: Effective cost (tax included)
137
  tax_rate_on_ordering:
138
    type:
139
      - number
140
      - "null"
141
    description: Tax rate on ordering (%)
142
  tax_rate_on_receiving:
143
    type:
144
      - number
145
      - "null"
146
    description: Tax rate on receiving (%)
147
  tax_value_on_ordering:
148
    type:
149
      - number
150
      - "null"
151
    description: Tax value on ordering
152
  tax_value_on_receiving:
153
    type:
154
      - number
155
      - "null"
156
    description: Tax value on receiving
157
  discount_rate:
158
    type:
159
      - number
160
      - "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:
166
    type:
167
      - string
168
      - "null"
169
    description: Statistical field
170
  statistics_2:
171
    type:
172
      - string
173
      - "null"
174
    description: Statistical field (2)
175
  statistics_1_authcat:
176
    type:
177
      - string
178
      - "null"
179
    description: Statistical category for this order
180
  statistics_2_authcat:
181
    type:
182
      - string
183
      - "null"
184
    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:
193
      - string
194
      - "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:
208
    type: string
209
    enum:
210
      - new
211
      - ordered
212
      - partial
213
      - complete
214
      - cancelled
215
    description: The current order status
216
  basket:
217
    type:
218
      - object
219
      - "null"
220
  biblio:
221
    type:
222
      - object
223
      - "null"
224
  current_item_level_holds_count:
225
    type: integer
226
    description: Current holds count for associated items
227
  fund:
228
    type:
229
      - object
230
      - "null"
231
  invoice:
232
    type:
233
      - object
234
      - "null"
235
  items:
236
    type: array
237
  subscription:
238
    type:
239
      - object
240
      - "null"
241
additionalProperties: false
(-)a/api/v1/swagger/definitions/patron.json (-296 lines)
Lines 1-296 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "patron_id": {
5
      "$ref": "../x-primitives.json#/patron_id"
6
    },
7
    "cardnumber": {
8
      "$ref": "../x-primitives.json#/cardnumber"
9
    },
10
    "surname": {
11
      "$ref": "../x-primitives.json#/surname"
12
    },
13
    "firstname": {
14
      "$ref": "../x-primitives.json#/firstname"
15
    },
16
    "title": {
17
      "type": ["string", "null"],
18
      "description": "patron's title"
19
    },
20
    "other_name": {
21
      "type": ["string", "null"],
22
      "description": "any other names associated with the patron"
23
    },
24
    "initials": {
25
      "type": ["string", "null"],
26
      "description": "initials of the patron"
27
    },
28
    "street_number": {
29
      "type": ["string", "null"],
30
      "description": "street number of patron's primary address"
31
    },
32
    "street_type": {
33
      "type": ["string", "null"],
34
      "description": "street type of patron's primary address"
35
    },
36
    "address": {
37
      "type": ["string", "null"],
38
      "description": "first address line of patron's primary address"
39
    },
40
    "address2": {
41
      "type": ["string", "null"],
42
      "description": "second address line of patron's primary address"
43
    },
44
    "city": {
45
      "type": ["string", "null"],
46
      "description": "city or town of patron's primary address"
47
    },
48
    "state": {
49
      "type": ["string", "null"],
50
      "description": "state or province of patron's primary address"
51
    },
52
    "postal_code": {
53
      "type": ["string", "null"],
54
      "description": "zip or postal code of patron's primary address"
55
    },
56
    "country": {
57
      "type": ["string", "null"],
58
      "description": "country of patron's primary address"
59
    },
60
    "email": {
61
      "$ref": "../x-primitives.json#/email"
62
    },
63
    "phone": {
64
      "$ref": "../x-primitives.json#/phone"
65
    },
66
    "mobile": {
67
      "type": ["string", "null"],
68
      "description": "the other phone number for patron's primary address"
69
    },
70
    "fax": {
71
      "type": ["string", "null"],
72
      "description": "fax number for patron's primary address"
73
    },
74
    "secondary_email": {
75
      "type": ["string", "null"],
76
      "description": "secondary email address for patron's primary address"
77
    },
78
    "secondary_phone": {
79
      "type": ["string", "null"],
80
      "description": "secondary phone number for patron's primary address"
81
    },
82
    "altaddress_street_number": {
83
      "type": ["string", "null"],
84
      "description": "street number of patron's alternate address"
85
    },
86
    "altaddress_street_type": {
87
      "type": ["string", "null"],
88
      "description": "street type of patron's alternate address"
89
    },
90
    "altaddress_address": {
91
      "type": ["string", "null"],
92
      "description": "first address line of patron's alternate address"
93
    },
94
    "altaddress_address2": {
95
      "type": ["string", "null"],
96
      "description": "second address line of patron's alternate address"
97
    },
98
    "altaddress_city": {
99
      "type": ["string", "null"],
100
      "description": "city or town of patron's alternate address"
101
    },
102
    "altaddress_state": {
103
      "type": ["string", "null"],
104
      "description": "state or province of patron's alternate address"
105
    },
106
    "altaddress_postal_code": {
107
      "type": ["string", "null"],
108
      "description": "zip or postal code of patron's alternate address"
109
    },
110
    "altaddress_country": {
111
      "type": ["string", "null"],
112
      "description": "country of patron's alternate address"
113
    },
114
    "altaddress_email": {
115
      "type": ["string", "null"],
116
      "description": "email address for patron's alternate address"
117
    },
118
    "altaddress_phone": {
119
      "type": ["string", "null"],
120
      "description": "phone number for patron's alternate address"
121
    },
122
    "date_of_birth": {
123
      "type": ["string", "null"],
124
      "format": "date",
125
      "description": "patron's date of birth"
126
    },
127
    "library_id": {
128
      "type": "string",
129
      "description": "Internal identifier for the patron's home library"
130
    },
131
    "category_id": {
132
      "type": "string",
133
      "description": "Internal identifier for the patron's category"
134
    },
135
    "date_enrolled": {
136
      "type": ["string", "null"],
137
      "format": "date",
138
      "description": "date the patron was added to Koha"
139
    },
140
    "expiry_date": {
141
      "type": ["string", "null"],
142
      "format": "date",
143
      "description": "date the patron's card is set to expire"
144
    },
145
    "date_renewed": {
146
      "type": ["string", "null"],
147
      "format": "date",
148
      "description": "date the patron's card was last renewed"
149
    },
150
    "incorrect_address": {
151
      "type": ["boolean", "null"],
152
      "description": "set to 1 if library marked this patron as having an unconfirmed address"
153
    },
154
    "patron_card_lost": {
155
      "type": ["boolean", "null"],
156
      "description": "set to 1 if library marked this patron as having lost his card"
157
    },
158
    "restricted": {
159
      "type": "boolean",
160
      "readOnly": true,
161
      "description": "If any restriction applies to the patron"
162
    },
163
    "staff_notes": {
164
      "type": ["string", "null"],
165
      "description": "a note on the patron's account"
166
    },
167
    "relationship_type": {
168
      "type": ["string", "null"],
169
      "description": "used for children to include the relationship to their guarantor"
170
    },
171
    "gender": {
172
      "type": ["string", "null"],
173
      "description": "patron's gender"
174
    },
175
    "userid": {
176
      "type": ["string", "null"],
177
      "description": "patron's login"
178
    },
179
    "opac_notes": {
180
      "type": ["string", "null"],
181
      "description": "a note on the patron's account visible in OPAC and staff interface"
182
    },
183
    "altaddress_notes": {
184
      "type": ["string", "null"],
185
      "description": "a note related to patron's alternate address"
186
    },
187
    "statistics_1": {
188
      "type": ["string", "null"],
189
      "description": "a field that can be used for any information unique to the library"
190
    },
191
    "statistics_2": {
192
      "type": ["string", "null"],
193
      "description": "a field that can be used for any information unique to the library"
194
    },
195
    "autorenew_checkouts": {
196
      "type": "boolean",
197
      "description": "indicate whether auto-renewal is allowed for patron"
198
    },
199
    "altcontact_firstname": {
200
      "type": ["string", "null"],
201
      "description": "first name of alternate contact for the patron"
202
    },
203
    "altcontact_surname": {
204
      "type": ["string", "null"],
205
      "description": "surname or last name of the alternate contact for the patron"
206
    },
207
    "altcontact_address": {
208
      "type": ["string", "null"],
209
      "description": "the first address line for the alternate contact for the patron"
210
    },
211
    "altcontact_address2": {
212
      "type": ["string", "null"],
213
      "description": "the second address line for the alternate contact for the patron"
214
    },
215
    "altcontact_city": {
216
      "type": ["string", "null"],
217
      "description": "the city for the alternate contact for the patron"
218
    },
219
    "altcontact_state": {
220
      "type": ["string", "null"],
221
      "description": "the state for the alternate contact for the patron"
222
    },
223
    "altcontact_postal_code": {
224
      "type": ["string", "null"],
225
      "description": "the zipcode for the alternate contact for the patron"
226
    },
227
    "altcontact_country": {
228
      "type": ["string", "null"],
229
      "description": "the country for the alternate contact for the patron"
230
    },
231
    "altcontact_phone": {
232
      "type": ["string", "null"],
233
      "description": "the phone number for the alternate contact for the patron"
234
    },
235
    "sms_number": {
236
      "type": ["string", "null"],
237
      "description": "the mobile phone number where the patron would like to receive notices (if SMS turned on)"
238
    },
239
    "sms_provider_id": {
240
      "type": ["integer", "null"],
241
      "description": "the provider of the mobile phone number defined in smsalertnumber"
242
    },
243
    "privacy": {
244
      "type": "integer",
245
      "description": "patron's privacy settings related to their checkout history"
246
    },
247
    "privacy_guarantor_checkouts": {
248
      "type": "integer",
249
      "description": "controls if relatives can see this patron's checkouts"
250
    },
251
    "privacy_guarantor_fines": {
252
      "type": "boolean",
253
      "description": "controls if relatives can see this patron's fines"
254
    },
255
    "check_previous_checkout": {
256
      "type": "string",
257
      "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'"
258
    },
259
    "updated_on": {
260
      "type": "string",
261
      "format": "date-time",
262
      "description": "time of last change could be useful for synchronization with external systems (among others)"
263
    },
264
    "last_seen": {
265
      "type": ["string", "null"],
266
      "format": "date-time",
267
      "description": "last time a patron has been seen (connected at the OPAC or staff interface)"
268
    },
269
    "lang": {
270
      "type": "string",
271
      "description": "lang to use to send notices to this patron"
272
    },
273
    "login_attempts": {
274
      "type": ["integer", "null"],
275
      "description": "number of failed login attemps"
276
    },
277
    "overdrive_auth_token": {
278
      "type": ["string", "null"],
279
      "description": "persist OverDrive auth token"
280
    },
281
    "anonymized": {
282
      "type": "boolean",
283
      "readOnly": true,
284
      "description": "If the patron has been anonymized"
285
    },
286
    "extended_attributes": {
287
      "type": "array",
288
      "description": "patron's extended attributes",
289
      "items": {
290
        "$ref": "patron_extended_attribute.json"
291
      }
292
    }
293
  },
294
  "additionalProperties": false,
295
  "required": ["surname", "address", "city", "library_id", "category_id"]
296
}
(-)a/api/v1/swagger/definitions/patron.yaml (+337 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  patron_id:
5
    $ref: ../x-primitives.yaml#/patron_id
6
  cardnumber:
7
    $ref: ../x-primitives.yaml#/cardnumber
8
  surname:
9
    $ref: ../x-primitives.yaml#/surname
10
  firstname:
11
    $ref: ../x-primitives.yaml#/firstname
12
  title:
13
    type:
14
      - string
15
      - "null"
16
    description: patron's title
17
  other_name:
18
    type:
19
      - string
20
      - "null"
21
    description: any other names associated with the patron
22
  initials:
23
    type:
24
      - string
25
      - "null"
26
    description: initials of the patron
27
  street_number:
28
    type:
29
      - string
30
      - "null"
31
    description: street number of patron's primary address
32
  street_type:
33
    type:
34
      - string
35
      - "null"
36
    description: street type of patron's primary address
37
  address:
38
    type:
39
      - string
40
      - "null"
41
    description: first address line of patron's primary address
42
  address2:
43
    type:
44
      - string
45
      - "null"
46
    description: second address line of patron's primary address
47
  city:
48
    type:
49
      - string
50
      - "null"
51
    description: city or town of patron's primary address
52
  state:
53
    type:
54
      - string
55
      - "null"
56
    description: state or province of patron's primary address
57
  postal_code:
58
    type:
59
      - string
60
      - "null"
61
    description: zip or postal code of patron's primary address
62
  country:
63
    type:
64
      - string
65
      - "null"
66
    description: country of patron's primary address
67
  email:
68
    $ref: ../x-primitives.yaml#/email
69
  phone:
70
    $ref: ../x-primitives.yaml#/phone
71
  mobile:
72
    type:
73
      - string
74
      - "null"
75
    description: the other phone number for patron's primary address
76
  fax:
77
    type:
78
      - string
79
      - "null"
80
    description: fax number for patron's primary address
81
  secondary_email:
82
    type:
83
      - string
84
      - "null"
85
    description: secondary email address for patron's primary address
86
  secondary_phone:
87
    type:
88
      - string
89
      - "null"
90
    description: secondary phone number for patron's primary address
91
  altaddress_street_number:
92
    type:
93
      - string
94
      - "null"
95
    description: street number of patron's alternate address
96
  altaddress_street_type:
97
    type:
98
      - string
99
      - "null"
100
    description: street type of patron's alternate address
101
  altaddress_address:
102
    type:
103
      - string
104
      - "null"
105
    description: first address line of patron's alternate address
106
  altaddress_address2:
107
    type:
108
      - string
109
      - "null"
110
    description: second address line of patron's alternate address
111
  altaddress_city:
112
    type:
113
      - string
114
      - "null"
115
    description: city or town of patron's alternate address
116
  altaddress_state:
117
    type:
118
      - string
119
      - "null"
120
    description: state or province of patron's alternate address
121
  altaddress_postal_code:
122
    type:
123
      - string
124
      - "null"
125
    description: zip or postal code of patron's alternate address
126
  altaddress_country:
127
    type:
128
      - string
129
      - "null"
130
    description: country of patron's alternate address
131
  altaddress_email:
132
    type:
133
      - string
134
      - "null"
135
    description: email address for patron's alternate address
136
  altaddress_phone:
137
    type:
138
      - string
139
      - "null"
140
    description: phone number for patron's alternate address
141
  date_of_birth:
142
    type:
143
      - string
144
      - "null"
145
    format: date
146
    description: patron's date of birth
147
  library_id:
148
    type: string
149
    description: Internal identifier for the patron's home library
150
  category_id:
151
    type: string
152
    description: Internal identifier for the patron's category
153
  date_enrolled:
154
    type:
155
      - string
156
      - "null"
157
    format: date
158
    description: date the patron was added to Koha
159
  expiry_date:
160
    type:
161
      - string
162
      - "null"
163
    format: date
164
    description: date the patron's card is set to expire
165
  date_renewed:
166
    type:
167
      - string
168
      - "null"
169
    format: date
170
    description: date the patron's card was last renewed
171
  incorrect_address:
172
    type:
173
      - boolean
174
      - "null"
175
    description: set to 1 if library marked this patron as having an unconfirmed address
176
  patron_card_lost:
177
    type:
178
      - boolean
179
      - "null"
180
    description: set to 1 if library marked this patron as having lost his card
181
  restricted:
182
    type: boolean
183
    readOnly: true
184
    description: If any restriction applies to the patron
185
  staff_notes:
186
    type:
187
      - string
188
      - "null"
189
    description: a note on the patron's account
190
  relationship_type:
191
    type:
192
      - string
193
      - "null"
194
    description: used for children to include the relationship to their guarantor
195
  gender:
196
    type:
197
      - string
198
      - "null"
199
    description: patron's gender
200
  userid:
201
    type:
202
      - string
203
      - "null"
204
    description: patron's login
205
  opac_notes:
206
    type:
207
      - string
208
      - "null"
209
    description: a note on the patron's account visible in OPAC and staff interface
210
  altaddress_notes:
211
    type:
212
      - string
213
      - "null"
214
    description: a note related to patron's alternate address
215
  statistics_1:
216
    type:
217
      - string
218
      - "null"
219
    description: a field that can be used for any information unique to the library
220
  statistics_2:
221
    type:
222
      - string
223
      - "null"
224
    description: a field that can be used for any information unique to the library
225
  autorenew_checkouts:
226
    type: boolean
227
    description: indicate whether auto-renewal is allowed for patron
228
  altcontact_firstname:
229
    type:
230
      - string
231
      - "null"
232
    description: first name of alternate contact for the patron
233
  altcontact_surname:
234
    type:
235
      - string
236
      - "null"
237
    description: surname or last name of the alternate contact for the patron
238
  altcontact_address:
239
    type:
240
      - string
241
      - "null"
242
    description: the first address line for the alternate contact for the patron
243
  altcontact_address2:
244
    type:
245
      - string
246
      - "null"
247
    description: the second address line for the alternate contact for the patron
248
  altcontact_city:
249
    type:
250
      - string
251
      - "null"
252
    description: the city for the alternate contact for the patron
253
  altcontact_state:
254
    type:
255
      - string
256
      - "null"
257
    description: the state for the alternate contact for the patron
258
  altcontact_postal_code:
259
    type:
260
      - string
261
      - "null"
262
    description: the zipcode for the alternate contact for the patron
263
  altcontact_country:
264
    type:
265
      - string
266
      - "null"
267
    description: the country for the alternate contact for the patron
268
  altcontact_phone:
269
    type:
270
      - string
271
      - "null"
272
    description: the phone number for the alternate contact for the patron
273
  sms_number:
274
    type:
275
      - string
276
      - "null"
277
    description: the mobile phone number where the patron would like to receive notices (if
278
      SMS turned on)
279
  sms_provider_id:
280
    type:
281
      - integer
282
      - "null"
283
    description: the provider of the mobile phone number defined in smsalertnumber
284
  privacy:
285
    type: integer
286
    description: patron's privacy settings related to their checkout history
287
  privacy_guarantor_checkouts:
288
    type: integer
289
    description: controls if relatives can see this patron's checkouts
290
  privacy_guarantor_fines:
291
    type: boolean
292
    description: controls if relatives can see this patron's fines
293
  check_previous_checkout:
294
    type: string
295
    description: produce a warning for this patron if this item has previously been checked
296
      out to this patron if 'yes', not if 'no', defer to category setting if
297
      'inherit'
298
  updated_on:
299
    type: string
300
    format: date-time
301
    description: time of last change could be useful for synchronization with external
302
      systems (among others)
303
  last_seen:
304
    type:
305
      - string
306
      - "null"
307
    format: date-time
308
    description: last time a patron has been seen (connected at the OPAC or staff interface)
309
  lang:
310
    type: string
311
    description: lang to use to send notices to this patron
312
  login_attempts:
313
    type:
314
      - integer
315
      - "null"
316
    description: number of failed login attemps
317
  overdrive_auth_token:
318
    type:
319
      - string
320
      - "null"
321
    description: persist OverDrive auth token
322
  anonymized:
323
    type: boolean
324
    readOnly: true
325
    description: If the patron has been anonymized
326
  extended_attributes:
327
    type: array
328
    description: patron's extended attributes
329
    items:
330
      $ref: patron_extended_attribute.yaml
331
additionalProperties: false
332
required:
333
  - surname
334
  - address
335
  - city
336
  - library_id
337
  - category_id
(-)a/api/v1/swagger/definitions/patron_account_credit.json (-44 lines)
Lines 1-44 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "credit_type": {
5
      "type": "string",
6
      "description": "Type of credit ('CREDIT', 'FORGIVEN', 'LOST_FOUND', 'PAYMENT', 'WRITEOFF' )"
7
    },
8
    "amount": {
9
      "type": "number",
10
      "minimum": 0,
11
      "description": "Credit amount"
12
    },
13
    "library_id": {
14
      "type": [ "string", "null" ],
15
      "description": "Internal identifier for the library in which the transaction took place"
16
    },
17
    "account_lines_ids": {
18
        "type": "array",
19
        "items": {
20
            "type": "integer"
21
        },
22
        "description": "List of account line ids the credit goes against (optional)"
23
    },
24
    "payment_type": {
25
        "type": "string",
26
        "description":  "Payment type (only applies when credit_type=payment)"
27
    },
28
    "date": {
29
      "type": "string",
30
      "format": "date",
31
      "description": "Date the credit was recorded (optional)"
32
    },
33
    "description": {
34
      "type": "string",
35
      "description": "Description"
36
    },
37
    "note": {
38
      "type": "string",
39
      "description": "Internal note"
40
    }
41
  },
42
  "required": [ "amount" ],
43
  "additionalProperties": false
44
}
(-)a/api/v1/swagger/definitions/patron_account_credit.yaml (+36 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  credit_type:
5
    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:
17
    type: array
18
    items:
19
      type: integer
20
    description: List of account line ids the credit goes against (optional)
21
  payment_type:
22
    type: string
23
    description: Payment type (only applies when credit_type=payment)
24
  date:
25
    type: string
26
    format: date
27
    description: Date the credit was recorded (optional)
28
  description:
29
    type: string
30
    description: Description
31
  note:
32
    type: string
33
    description: Internal note
34
required:
35
  - amount
36
additionalProperties: false
(-)a/api/v1/swagger/definitions/patron_balance.json (-40 lines)
Lines 1-40 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "balance": {
5
      "type": "number",
6
      "description": "Signed decimal number"
7
    },
8
    "outstanding_credits": {
9
      "properties": {
10
        "total": {
11
            "type": "number"
12
        },
13
        "lines": {
14
            "type": "array",
15
            "items": {
16
                "$ref": "account_line.json"
17
            }
18
        }
19
      }
20
    },
21
    "outstanding_debits": {
22
      "type": "object",
23
      "properties": {
24
        "total": {
25
            "type": "number"
26
        },
27
        "lines": {
28
            "type": "array",
29
            "items": {
30
                "$ref": "account_line.json"
31
            }
32
        }
33
      }
34
    }
35
  },
36
  "additionalProperties": false,
37
  "required": [
38
    "balance"
39
  ]
40
}
(-)a/api/v1/swagger/definitions/patron_balance.yaml (+26 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  balance:
5
    type: number
6
    description: Signed decimal number
7
  outstanding_credits:
8
    properties:
9
      total:
10
        type: number
11
      lines:
12
        type: array
13
        items:
14
          $ref: account_line.yaml
15
  outstanding_debits:
16
    type: object
17
    properties:
18
      total:
19
        type: number
20
      lines:
21
        type: array
22
        items:
23
          $ref: account_line.yaml
24
additionalProperties: false
25
required:
26
  - balance
(-)a/api/v1/swagger/definitions/patron_extended_attribute.json (-24 lines)
Lines 1-24 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "extended_attribute_id": {
5
      "description": "Internal ID for the extended attribute",
6
      "type": "integer"
7
    },
8
    "type": {
9
      "description": "Extended attribute type",
10
      "type": "string"
11
    },
12
    "value": {
13
      "description": "Extended attribute value",
14
      "type": [
15
        "string"
16
      ]
17
    }
18
  },
19
  "additionalProperties": false,
20
  "required": [
21
    "type",
22
    "value"
23
  ]
24
}
(-)a/api/v1/swagger/definitions/patron_extended_attribute.yaml (+17 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  extended_attribute_id:
5
    description: Internal ID for the extended attribute
6
    type: integer
7
  type:
8
    description: Extended attribute type
9
    type: string
10
  value:
11
    description: Extended attribute value
12
    type:
13
      - string
14
additionalProperties: false
15
required:
16
  - type
17
  - value
(-)a/api/v1/swagger/definitions/quote.json (-22 lines)
Lines 1-22 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "quote_id": {
5
      "$ref": "../x-primitives.json#/quote_id"
6
    },
7
    "source": {
8
      "description": "source of the quote",
9
      "type": "string"
10
    },
11
    "text": {
12
      "description": "text",
13
      "type": ["string", "null"]
14
    },
15
    "displayed_on": {
16
      "description": "Last display date",
17
      "type": ["string", "null"]
18
    }
19
  },
20
  "additionalProperties": false,
21
  "required": ["quote_id", "source", "text"]
22
}
(-)a/api/v1/swagger/definitions/quote.yaml (+23 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  quote_id:
5
    $ref: ../x-primitives.yaml#/quote_id
6
  source:
7
    description: source of the quote
8
    type: string
9
  text:
10
    description: text
11
    type:
12
      - string
13
      - "null"
14
  displayed_on:
15
    description: Last display date
16
    type:
17
      - string
18
      - "null"
19
additionalProperties: false
20
required:
21
  - quote_id
22
  - source
23
  - text
(-)a/api/v1/swagger/definitions/return_claim.json (-94 lines)
Lines 1-94 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "claim_id": {
5
      "type": [
6
        "integer"
7
      ],
8
      "description": "internally assigned return claim identifier"
9
    },
10
    "item_id": {
11
      "type": [
12
        "integer"
13
      ],
14
      "description": "internal identifier of the claimed item"
15
    },
16
    "issue_id": {
17
      "type": [
18
        "integer",
19
        "null"
20
      ],
21
      "description": "internal identifier of the claimed checkout if still checked out"
22
    },
23
    "old_issue_id": {
24
      "type": [
25
        "integer",
26
        "null"
27
      ],
28
      "description": "internal identifier of the claimed checkout if not longer checked out"
29
    },
30
    "patron_id": {
31
      "$ref": "../x-primitives.json#/patron_id"
32
    },
33
    "notes": {
34
      "type": [
35
        "string",
36
        "null"
37
      ],
38
      "description": "notes about this claim"
39
    },
40
    "created_on": {
41
      "type": [
42
        "string",
43
        "null"
44
      ],
45
      "format": "date-time",
46
      "description": "date of claim creation"
47
    },
48
    "created_by": {
49
      "type": [
50
        "integer",
51
        "null"
52
      ],
53
      "description": "patron id of librarian who made the claim"
54
    },
55
    "updated_on": {
56
      "type": [
57
        "string",
58
        "null"
59
      ],
60
      "format": "date-time",
61
      "description": "date the claim was last updated"
62
    },
63
    "updated_by": {
64
      "type": [
65
        "integer",
66
        "null"
67
      ],
68
      "description": "patron id of librarian who last updated the claim"
69
    },
70
    "resolution": {
71
      "type": [
72
        "string",
73
        "null"
74
      ],
75
      "description": "code of resolution type for this claim"
76
    },
77
    "resolved_on": {
78
      "type": [
79
        "string",
80
        "null"
81
      ],
82
      "format": "date-time",
83
      "description": "date the claim was resolved"
84
    },
85
    "resolved_by": {
86
      "type": [
87
        "integer",
88
        "null"
89
      ],
90
      "description": "patron id of librarian who resolved this claim"
91
    }
92
  },
93
  "additionalProperties": false
94
}
(-)a/api/v1/swagger/definitions/return_claim.yaml (+67 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  claim_id:
5
    type:
6
      - integer
7
    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:
14
      - integer
15
      - "null"
16
    description: internal identifier of the claimed checkout if still checked out
17
  old_issue_id:
18
    type:
19
      - integer
20
      - "null"
21
    description: internal identifier of the claimed checkout if not longer checked out
22
  patron_id:
23
    $ref: ../x-primitives.yaml#/patron_id
24
  notes:
25
    type:
26
      - string
27
      - "null"
28
    description: notes about this claim
29
  created_on:
30
    type:
31
      - string
32
      - "null"
33
    format: date-time
34
    description: date of claim creation
35
  created_by:
36
    type:
37
      - integer
38
      - "null"
39
    description: patron id of librarian who made the claim
40
  updated_on:
41
    type:
42
      - string
43
      - "null"
44
    format: date-time
45
    description: date the claim was last updated
46
  updated_by:
47
    type:
48
      - integer
49
      - "null"
50
    description: patron id of librarian who last updated the claim
51
  resolution:
52
    type:
53
      - string
54
      - "null"
55
    description: code of resolution type for this claim
56
  resolved_on:
57
    type:
58
      - string
59
      - "null"
60
    format: date-time
61
    description: date the claim was resolved
62
  resolved_by:
63
    type:
64
      - integer
65
      - "null"
66
    description: patron id of librarian who resolved this claim
67
additionalProperties: false
(-)a/api/v1/swagger/definitions/smtp_server.json (-57 lines)
Lines 1-57 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "smtp_server_id": {
5
      "type": "integer",
6
      "description": "Internal SMTP server identifier",
7
      "readOnly": true
8
    },
9
    "name": {
10
      "type": "string",
11
      "description": "Name of the SMTP server"
12
    },
13
    "host": {
14
      "type": "string",
15
      "description": "SMTP host name"
16
    },
17
    "port": {
18
      "type": "integer",
19
      "description": "TCP port number"
20
    },
21
    "timeout": {
22
      "type": "integer",
23
      "description": "Maximum time in seconds to wait for server"
24
    },
25
    "ssl_mode": {
26
      "type": "string",
27
      "enum": [
28
        "disabled",
29
        "ssl",
30
        "starttls"
31
      ],
32
      "description": "If SSL/TLS will be used"
33
    },
34
    "user_name": {
35
      "type": [
36
        "string",
37
        "null"
38
      ],
39
      "description": "The user name to use for authentication (optional)"
40
    },
41
    "password": {
42
      "type": [
43
        "string",
44
        "null"
45
      ],
46
      "description": "The password to use for authentication (optional)"
47
    },
48
    "debug": {
49
      "type": "boolean",
50
      "description": "If the SMTP connection is set to debug mode"
51
    }
52
  },
53
  "additionalProperties": false,
54
  "required": [
55
    "name"
56
  ]
57
}
(-)a/api/v1/swagger/definitions/smtp_server.yaml (+42 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  smtp_server_id:
5
    type: integer
6
    description: Internal SMTP server identifier
7
    readOnly: true
8
  name:
9
    type: string
10
    description: Name of the SMTP server
11
  host:
12
    type: string
13
    description: SMTP host name
14
  port:
15
    type: integer
16
    description: TCP port number
17
  timeout:
18
    type: integer
19
    description: Maximum time in seconds to wait for server
20
  ssl_mode:
21
    type: string
22
    enum:
23
      - disabled
24
      - ssl
25
      - starttls
26
    description: If SSL/TLS will be used
27
  user_name:
28
    type:
29
      - string
30
      - "null"
31
    description: The user name to use for authentication (optional)
32
  password:
33
    type:
34
      - string
35
      - "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
41
required:
42
  - name
(-)a/api/v1/swagger/definitions/transfer_limit.json (-27 lines)
Lines 1-27 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "limit_id": {
5
      "type": "integer",
6
      "description": "Internal transfer limit identifier"
7
    },
8
    "to_library_id": {
9
      "type": "string",
10
      "description": "Internal library id for which library the item is going to"
11
    },
12
    "from_library_id": {
13
      "type": "string",
14
      "description": "Internal library id for which library the item is coming from"
15
    },
16
    "item_type": {
17
      "type": ["string", "null"],
18
      "description": "Itemtype defining the type for this limi"
19
    },
20
    "collection_code": {
21
      "type": ["string", "null"],
22
      "description": "Authorized value for the collection code associated with this limit"
23
    }
24
  },
25
  "additionalProperties": false,
26
  "required": ["to_library_id", "from_library_id"]
27
}
(-)a/api/v1/swagger/definitions/transfer_limit.yaml (+26 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  limit_id:
5
    type: integer
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:
15
      - string
16
      - "null"
17
    description: Itemtype defining the type for this limi
18
  collection_code:
19
    type:
20
      - string
21
      - "null"
22
    description: Authorized value for the collection code associated with this limit
23
additionalProperties: false
24
required:
25
  - to_library_id
26
  - from_library_id
(-)a/api/v1/swagger/definitions/vendor.json (-149 lines)
Lines 1-149 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "id": {
5
      "$ref": "../x-primitives.json#/vendor_id"
6
    },
7
    "name": {
8
      "type": [
9
        "string"
10
      ],
11
      "description": "Vendor name"
12
    },
13
    "address1": {
14
      "type": [
15
        "string",
16
        "null"
17
      ],
18
      "description": "Vendor physical address (line 1)"
19
    },
20
    "address2": {
21
      "type": [
22
        "string",
23
        "null"
24
      ],
25
      "description": "Vendor physical address (line 2)"
26
    },
27
    "address3": {
28
      "type": [
29
        "string",
30
        "null"
31
      ],
32
      "description": "Vendor physical address (line 3)"
33
    },
34
    "address4": {
35
      "type": [
36
        "string",
37
        "null"
38
      ],
39
      "description": "Vendor physical address (line 4)"
40
    },
41
    "phone": {
42
      "type": [
43
        "string",
44
        "null"
45
      ],
46
      "description": "Vendor phone number"
47
    },
48
    "fax": {
49
      "type": [
50
        "string",
51
        "null"
52
      ],
53
      "description": "Vendor fax number"
54
    },
55
    "accountnumber": {
56
      "type": [
57
        "string",
58
        "null"
59
      ],
60
      "description": "Vendor account number"
61
    },
62
    "notes": {
63
      "type": [
64
        "string",
65
        "null"
66
      ],
67
      "description": "Vendor notes"
68
    },
69
    "postal": {
70
      "type": [
71
        "string",
72
        "null"
73
      ],
74
      "description": "Vendor postal address"
75
    },
76
    "url": {
77
      "type": [
78
        "string",
79
        "null"
80
      ],
81
      "description": "Vendor web address"
82
    },
83
    "active": {
84
      "type": [
85
        "boolean",
86
        "null"
87
      ],
88
      "description": "Is this vendor active"
89
    },
90
    "list_currency": {
91
      "type": [
92
        "string",
93
        "null"
94
      ],
95
      "description": "List prices currency"
96
    },
97
    "invoice_currency": {
98
      "type": [
99
        "string",
100
        "null"
101
      ],
102
      "description": "Invoice prices currency"
103
    },
104
    "gst": {
105
      "type": [
106
        "boolean",
107
        "null"
108
      ],
109
      "description": "Is the library taxed when buying from this vendor"
110
    },
111
    "list_includes_gst": {
112
      "type": [
113
        "boolean",
114
        "null"
115
      ],
116
      "description": "List prices include taxes"
117
    },
118
    "invoice_includes_gst": {
119
      "type": [
120
        "boolean",
121
        "null"
122
      ],
123
      "description": "Invoice prices include taxes"
124
    },
125
    "tax_rate": {
126
      "type": [
127
        "number",
128
        "null"
129
      ],
130
      "description": "Default tax rate for items ordered from this vendor"
131
    },
132
    "discount": {
133
      "type": [
134
        "number",
135
        "null"
136
      ],
137
      "description": "Default discount rate for items ordered from this vendor"
138
    },
139
    "deliverytime": {
140
      "type": [
141
        "integer",
142
        "null"
143
      ],
144
      "description": "Expected delivery time (in days)"
145
    }
146
  },
147
  "additionalProperties": false,
148
  "required": ["name"]
149
}
(-)a/api/v1/swagger/definitions/vendor.yaml (+107 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  id:
5
    $ref: ../x-primitives.yaml#/vendor_id
6
  name:
7
    type:
8
      - string
9
    description: Vendor name
10
  address1:
11
    type:
12
      - string
13
      - "null"
14
    description: Vendor physical address (line 1)
15
  address2:
16
    type:
17
      - string
18
      - "null"
19
    description: Vendor physical address (line 2)
20
  address3:
21
    type:
22
      - string
23
      - "null"
24
    description: Vendor physical address (line 3)
25
  address4:
26
    type:
27
      - string
28
      - "null"
29
    description: Vendor physical address (line 4)
30
  phone:
31
    type:
32
      - string
33
      - "null"
34
    description: Vendor phone number
35
  fax:
36
    type:
37
      - string
38
      - "null"
39
    description: Vendor fax number
40
  accountnumber:
41
    type:
42
      - string
43
      - "null"
44
    description: Vendor account number
45
  notes:
46
    type:
47
      - string
48
      - "null"
49
    description: Vendor notes
50
  postal:
51
    type:
52
      - string
53
      - "null"
54
    description: Vendor postal address
55
  url:
56
    type:
57
      - string
58
      - "null"
59
    description: Vendor web address
60
  active:
61
    type:
62
      - boolean
63
      - "null"
64
    description: Is this vendor active
65
  list_currency:
66
    type:
67
      - string
68
      - "null"
69
    description: List prices currency
70
  invoice_currency:
71
    type:
72
      - string
73
      - "null"
74
    description: Invoice prices currency
75
  gst:
76
    type:
77
      - boolean
78
      - "null"
79
    description: Is the library taxed when buying from this vendor
80
  list_includes_gst:
81
    type:
82
      - boolean
83
      - "null"
84
    description: List prices include taxes
85
  invoice_includes_gst:
86
    type:
87
      - boolean
88
      - "null"
89
    description: Invoice prices include taxes
90
  tax_rate:
91
    type:
92
      - number
93
      - "null"
94
    description: Default tax rate for items ordered from this vendor
95
  discount:
96
    type:
97
      - number
98
      - "null"
99
    description: Default discount rate for items ordered from this vendor
100
  deliverytime:
101
    type:
102
      - integer
103
      - "null"
104
    description: Expected delivery time (in days)
105
additionalProperties: false
106
required:
107
  - name
(-)a/api/v1/swagger/parameters.json (-126 lines)
Lines 1-126 Link Here
1
{
2
  "biblio_id_pp": {
3
    "$ref": "parameters/biblio.json#/biblio_id_pp"
4
  },
5
  "advancededitormacro_id_pp": {
6
    "$ref": "parameters/advancededitormacro.json#/advancededitormacro_id_pp"
7
  },
8
  "patron_id_pp": {
9
    "$ref": "parameters/patron.json#/patron_id_pp"
10
  },
11
  "transfer_limit_id_pp": {
12
    "$ref": "parameters/transfer_limit.json#/transfer_limit_id_pp"
13
  },
14
  "patron_id_qp": {
15
    "$ref": "parameters/patron.json#/patron_id_qp"
16
  },
17
  "import_batch_profile_id_pp": {
18
    "$ref": "parameters/import_batch_profile.json#/import_batch_profile_id_pp"
19
  },
20
  "city_id_pp": {
21
    "$ref": "parameters/city.json#/city_id_pp"
22
  },
23
  "hold_id_pp": {
24
    "$ref": "parameters/hold.json#/hold_id_pp"
25
  },
26
  "club_id_pp": {
27
    "$ref": "parameters/club.json#/club_id_pp"
28
  },
29
  "library_id_pp": {
30
    "$ref": "parameters/library.json#/library_id_pp"
31
  },
32
  "item_id_pp": {
33
    "$ref": "parameters/item.json#/item_id_pp"
34
  },
35
  "order_id_pp": {
36
    "$ref": "parameters/order.json#/order_id_pp"
37
  },
38
  "quote_id_pp": {
39
    "$ref": "parameters/quote.json#/quote_id_pp"
40
  },
41
  "smtp_server_id_pp": {
42
    "$ref": "parameters/smtp_server.json#/smtp_server_id_pp"
43
  },
44
  "vendoridPathParam": {
45
    "$ref": "parameters/vendor.json#/vendoridPathParam"
46
  },
47
  "checkout_id_pp": {
48
    "$ref": "parameters/checkout.json#/checkout_id_pp"
49
  },
50
  "seen_pp": {
51
    "$ref": "parameters/checkout.json#/seen_pp"
52
  },
53
  "cash_register_id_pp": {
54
    "$ref": "parameters/cash_register.json#/cash_register_id_pp"
55
  },
56
  "cashup_id_pp": {
57
    "$ref": "parameters/cashup.json#/cashup_id_pp"
58
  },
59
  "match": {
60
    "name": "_match",
61
    "in": "query",
62
    "required": false,
63
    "description": "Matching criteria",
64
    "type": "string",
65
    "enum": [
66
        "contains",
67
        "exact",
68
        "starts_with",
69
        "ends_with"
70
    ]
71
  },
72
  "order_by": {
73
    "name": "_order_by",
74
    "in": "query",
75
    "required": false,
76
    "description": "Sorting criteria",
77
    "type": "array",
78
    "collectionFormat": "csv",
79
    "items": {
80
        "type": "string"
81
    }
82
  },
83
  "page": {
84
    "name": "_page",
85
    "in": "query",
86
    "required": false,
87
    "description": "Page number, for paginated object listing",
88
    "type": "integer"
89
  },
90
  "per_page": {
91
    "name": "_per_page",
92
    "in": "query",
93
    "required": false,
94
    "description": "Page size, for paginated object listing",
95
    "type": "integer"
96
  },
97
  "q_body": {
98
    "name": "query",
99
    "in": "body",
100
    "required": false,
101
    "description": "Query filter sent through request's body",
102
    "schema": {
103
      "type": ["object", "array"]
104
    }
105
  },
106
  "q_param": {
107
    "name": "q",
108
    "in": "query",
109
    "required": false,
110
    "description": "Query filter sent as a request parameter",
111
    "type": "string"
112
  },
113
  "q_header": {
114
    "name": "x-koha-query",
115
    "in": "header",
116
    "required": false,
117
    "description": "Query filter sent as a request header",
118
    "type": "string"
119
  },
120
  "fundidPathParam": {
121
    "$ref": "parameters/fund.json#/fundidPathParam"
122
  },
123
  "suggestion_id_pp": {
124
    "$ref": "parameters/suggestion.json#/suggestion_id_pp"
125
  }
126
}
(-)a/api/v1/swagger/parameters.yaml (+96 lines)
Line 0 Link Here
1
---
2
advancededitormacro_id_pp:
3
  $ref: parameters/advancededitormacro.yaml#/advancededitormacro_id_pp
4
biblio_id_pp:
5
  $ref: parameters/biblio.yaml#/biblio_id_pp
6
cash_register_id_pp:
7
  $ref: parameters/cash_register.yaml#/cash_register_id_pp
8
cashup_id_pp:
9
  $ref: parameters/cashup.yaml#/cashup_id_pp
10
checkout_id_pp:
11
  $ref: parameters/checkout.yaml#/checkout_id_pp
12
city_id_pp:
13
  $ref: parameters/city.yaml#/city_id_pp
14
club_id_pp:
15
  $ref: parameters/club.yaml#/club_id_pp
16
fundidPathParam:
17
  $ref: parameters/fund.yaml#/fundidPathParam
18
hold_id_pp:
19
  $ref: parameters/hold.yaml#/hold_id_pp
20
import_batch_profile_id_pp:
21
  $ref: parameters/import_batch_profile.yaml#/import_batch_profile_id_pp
22
item_id_pp:
23
  $ref: parameters/item.yaml#/item_id_pp
24
library_id_pp:
25
  $ref: parameters/library.yaml#/library_id_pp
26
match:
27
  name: _match
28
  in: query
29
  required: false
30
  description: Matching criteria
31
  type: string
32
  enum:
33
    - contains
34
    - exact
35
    - starts_with
36
    - ends_with
37
order_by:
38
  name: _order_by
39
  in: query
40
  required: false
41
  description: Sorting criteria
42
  type: array
43
  collectionFormat: csv
44
  items:
45
    type: string
46
order_id_pp:
47
  $ref: parameters/order.yaml#/order_id_pp
48
page:
49
  name: _page
50
  in: query
51
  required: false
52
  description: Page number, for paginated object listing
53
  type: integer
54
patron_id_pp:
55
  $ref: parameters/patron.yaml#/patron_id_pp
56
patron_id_qp:
57
  $ref: parameters/patron.yaml#/patron_id_qp
58
per_page:
59
  name: _per_page
60
  in: query
61
  required: false
62
  description: Page size, for paginated object listing
63
  type: integer
64
q_body:
65
  name: query
66
  in: body
67
  required: false
68
  description: Query filter sent through request's body
69
  schema:
70
    type:
71
      - object
72
      - array
73
q_param:
74
  name: q
75
  in: query
76
  required: false
77
  description: Query filter sent as a request parameter
78
  type: string
79
q_header:
80
  name: x-koha-query
81
  in: header
82
  required: false
83
  description: Query filter sent as a request header
84
  type: string
85
quote_id_pp:
86
  $ref: parameters/quote.yaml#/quote_id_pp
87
seen_pp:
88
  $ref: parameters/checkout.yaml#/seen_pp
89
smtp_server_id_pp:
90
  $ref: parameters/smtp_server.yaml#/smtp_server_id_pp
91
suggestion_id_pp:
92
  $ref: parameters/suggestion.yaml#/suggestion_id_pp
93
transfer_limit_id_pp:
94
  $ref: parameters/transfer_limit.yaml#/transfer_limit_id_pp
95
vendoridPathParam:
96
  $ref: parameters/vendor.yaml#/vendoridPathParam
(-)a/api/v1/swagger/parameters/advancededitormacro.json (-9 lines)
Lines 1-9 Link Here
1
{
2
    "advancededitormacro_id_pp": {
3
      "name": "advancededitormacro_id",
4
      "in": "path",
5
      "description": "Advanced editor macro internal identifier",
6
      "required": true,
7
      "type": "integer"
8
    }
9
}
(-)a/api/v1/swagger/parameters/advancededitormacro.yaml (+7 lines)
Line 0 Link Here
1
---
2
advancededitormacro_id_pp:
3
  name: advancededitormacro_id
4
  in: path
5
  description: Advanced editor macro internal identifier
6
  required: true
7
  type: integer
(-)a/api/v1/swagger/parameters/biblio.json (-9 lines)
Lines 1-9 Link Here
1
{
2
    "biblio_id_pp": {
3
      "name": "biblio_id",
4
      "in": "path",
5
      "description": "Record internal identifier",
6
      "required": true,
7
      "type": "integer"
8
    }
9
}
(-)a/api/v1/swagger/parameters/biblio.yaml (+7 lines)
Line 0 Link Here
1
---
2
biblio_id_pp:
3
  name: biblio_id
4
  in: path
5
  description: Record internal identifier
6
  required: true
7
  type: integer
(-)a/api/v1/swagger/parameters/cash_register.json (-9 lines)
Lines 1-9 Link Here
1
{
2
    "cash_register_id_pp": {
3
      "name": "cash_register_id",
4
      "in": "path",
5
      "description": "Cash register internal identifier",
6
      "required": true,
7
      "type": "integer"
8
    }
9
}
(-)a/api/v1/swagger/parameters/cash_register.yaml (+7 lines)
Line 0 Link Here
1
---
2
cash_register_id_pp:
3
  name: cash_register_id
4
  in: path
5
  description: Cash register internal identifier
6
  required: true
7
  type: integer
(-)a/api/v1/swagger/parameters/cashup.json (-9 lines)
Lines 1-9 Link Here
1
{
2
    "cashup_id_pp": {
3
      "name": "cashup_id",
4
      "in": "path",
5
      "description": "Cashup internal identifier",
6
      "required": true,
7
      "type": "integer"
8
    }
9
}
(-)a/api/v1/swagger/parameters/cashup.yaml (+7 lines)
Line 0 Link Here
1
---
2
cashup_id_pp:
3
  name: cashup_id
4
  in: path
5
  description: Cashup internal identifier
6
  required: true
7
  type: integer
(-)a/api/v1/swagger/parameters/checkout.json (-16 lines)
Lines 1-16 Link Here
1
{
2
  "checkout_id_pp": {
3
    "name": "checkout_id",
4
    "in": "path",
5
    "description": "Internal checkout identifier",
6
    "required": true,
7
    "type": "integer"
8
  },
9
  "seen_pp": {
10
    "name": "seen",
11
    "in": "query",
12
    "description": "Item was seen flag",
13
    "required": false,
14
    "type": "integer"
15
  }
16
}
(-)a/api/v1/swagger/parameters/checkout.yaml (+13 lines)
Line 0 Link Here
1
---
2
checkout_id_pp:
3
  name: checkout_id
4
  in: path
5
  description: Internal checkout identifier
6
  required: true
7
  type: integer
8
seen_pp:
9
  name: seen
10
  in: query
11
  description: Item was seen flag
12
  required: false
13
  type: integer
(-)a/api/v1/swagger/parameters/city.json (-9 lines)
Lines 1-9 Link Here
1
{
2
    "city_id_pp": {
3
      "name": "city_id",
4
      "in": "path",
5
      "description": "City internal identifier",
6
      "required": true,
7
      "type": "integer"
8
    }
9
}
(-)a/api/v1/swagger/parameters/city.yaml (+7 lines)
Line 0 Link Here
1
---
2
city_id_pp:
3
  name: city_id
4
  in: path
5
  description: City internal identifier
6
  required: true
7
  type: integer
(-)a/api/v1/swagger/parameters/club.json (-9 lines)
Lines 1-9 Link Here
1
{
2
    "club_id_pp": {
3
        "name": "club_id",
4
        "in": "path",
5
        "description": "Internal club identifier",
6
        "required": true,
7
        "type": "integer"
8
      }
9
}
(-)a/api/v1/swagger/parameters/club.yaml (+7 lines)
Line 0 Link Here
1
---
2
club_id_pp:
3
  name: club_id
4
  in: path
5
  description: Internal club identifier
6
  required: true
7
  type: integer
(-)a/api/v1/swagger/parameters/fund.json (-9 lines)
Lines 1-9 Link Here
1
{
2
    "fundidPathParam": {
3
      "name": "fund_id",
4
      "in": "path",
5
      "description": "Fund id",
6
      "required": true,
7
      "type": "integer"
8
    }
9
}
(-)a/api/v1/swagger/parameters/fund.yaml (+7 lines)
Line 0 Link Here
1
---
2
fundidPathParam:
3
  name: fund_id
4
  in: path
5
  description: Fund id
6
  required: true
7
  type: integer
(-)a/api/v1/swagger/parameters/hold.json (-9 lines)
Lines 1-9 Link Here
1
{
2
  "hold_id_pp": {
3
    "name": "hold_id",
4
    "in": "path",
5
    "description": "Internal hold identifier",
6
    "required": true,
7
    "type": "integer"
8
  }
9
}
(-)a/api/v1/swagger/parameters/hold.yaml (+7 lines)
Line 0 Link Here
1
---
2
hold_id_pp:
3
  name: hold_id
4
  in: path
5
  description: Internal hold identifier
6
  required: true
7
  type: integer
(-)a/api/v1/swagger/parameters/import_batch_profile.json (-9 lines)
Lines 1-9 Link Here
1
{
2
  "import_batch_profile_id_pp": {
3
    "name": "import_batch_profile_id",
4
    "in": "path",
5
    "description": "Internal profile identifier",
6
    "required": true,
7
    "type": "integer"
8
  }
9
}
(-)a/api/v1/swagger/parameters/import_batch_profile.yaml (+7 lines)
Line 0 Link Here
1
---
2
import_batch_profile_id_pp:
3
  name: import_batch_profile_id
4
  in: path
5
  description: Internal profile identifier
6
  required: true
7
  type: integer
(-)a/api/v1/swagger/parameters/item.json (-9 lines)
Lines 1-9 Link Here
1
{
2
  "item_id_pp": {
3
    "name": "item_id",
4
    "in": "path",
5
    "description": "Internal item identifier",
6
    "required": true,
7
    "type": "integer"
8
  }
9
}
(-)a/api/v1/swagger/parameters/item.yaml (+7 lines)
Line 0 Link Here
1
---
2
item_id_pp:
3
  name: item_id
4
  in: path
5
  description: Internal item identifier
6
  required: true
7
  type: integer
(-)a/api/v1/swagger/parameters/library.json (-9 lines)
Lines 1-9 Link Here
1
{
2
  "library_id_pp": {
3
    "name": "library_id",
4
    "in": "path",
5
    "description": "Internal library identifier",
6
    "required": true,
7
    "type": "string"
8
  }
9
}
(-)a/api/v1/swagger/parameters/library.yaml (+7 lines)
Line 0 Link Here
1
---
2
library_id_pp:
3
  name: library_id
4
  in: path
5
  description: Internal library identifier
6
  required: true
7
  type: string
(-)a/api/v1/swagger/parameters/order.json (-9 lines)
Lines 1-9 Link Here
1
{
2
    "order_id_pp": {
3
      "name": "order_id",
4
      "in": "path",
5
      "description": "Internal order identifier",
6
      "required": true,
7
      "type": "integer"
8
    }
9
}
(-)a/api/v1/swagger/parameters/order.yaml (+7 lines)
Line 0 Link Here
1
---
2
order_id_pp:
3
  name: order_id
4
  in: path
5
  description: Internal order identifier
6
  required: true
7
  type: integer
(-)a/api/v1/swagger/parameters/patron.json (-15 lines)
Lines 1-15 Link Here
1
{
2
  "patron_id_pp": {
3
    "name": "patron_id",
4
    "in": "path",
5
    "description": "Internal patron identifier",
6
    "required": true,
7
    "type": "integer"
8
  },
9
  "patron_id_qp": {
10
    "name": "patron_id",
11
    "in": "query",
12
    "description": "Internal patron identifier",
13
    "type": "integer"
14
  }
15
}
(-)a/api/v1/swagger/parameters/patron.yaml (+12 lines)
Line 0 Link Here
1
---
2
patron_id_pp:
3
  name: patron_id
4
  in: path
5
  description: Internal patron identifier
6
  required: true
7
  type: integer
8
patron_id_qp:
9
  name: patron_id
10
  in: query
11
  description: Internal patron identifier
12
  type: integer
(-)a/api/v1/swagger/parameters/quote.json (-9 lines)
Lines 1-9 Link Here
1
{
2
    "quote_id_pp": {
3
      "name": "quote_id",
4
      "in": "path",
5
      "description": "Quote internal identifier",
6
      "required": true,
7
      "type": "integer"
8
    }
9
}
(-)a/api/v1/swagger/parameters/quote.yaml (+7 lines)
Line 0 Link Here
1
---
2
quote_id_pp:
3
  name: quote_id
4
  in: path
5
  description: Quote internal identifier
6
  required: true
7
  type: integer
(-)a/api/v1/swagger/parameters/smtp_server.json (-9 lines)
Lines 1-9 Link Here
1
{
2
    "smtp_server_id_pp": {
3
      "name": "smtp_server_id",
4
      "in": "path",
5
      "description": "SMTP server internal identifier",
6
      "required": true,
7
      "type": "integer"
8
    }
9
}
(-)a/api/v1/swagger/parameters/smtp_server.yaml (+7 lines)
Line 0 Link Here
1
---
2
smtp_server_id_pp:
3
  name: smtp_server_id
4
  in: path
5
  description: SMTP server internal identifier
6
  required: true
7
  type: integer
(-)a/api/v1/swagger/parameters/suggestion.json (-9 lines)
Lines 1-9 Link Here
1
{
2
  "suggestion_id_pp": {
3
    "name": "suggestion_id",
4
    "in": "path",
5
    "description": "Internal suggestion identifier",
6
    "required": true,
7
    "type": "integer"
8
  }
9
}
(-)a/api/v1/swagger/parameters/suggestion.yaml (+7 lines)
Line 0 Link Here
1
---
2
suggestion_id_pp:
3
  name: suggestion_id
4
  in: path
5
  description: Internal suggestion identifier
6
  required: true
7
  type: integer
(-)a/api/v1/swagger/parameters/transfer_limit.json (-9 lines)
Lines 1-9 Link Here
1
{
2
  "transfer_limit_id_pp": {
3
    "name": "limit_id",
4
    "in": "path",
5
    "description": "Internal transfer limit identifier",
6
    "required": true,
7
    "type": "string"
8
  }
9
}
(-)a/api/v1/swagger/parameters/transfer_limit.yaml (+7 lines)
Line 0 Link Here
1
---
2
transfer_limit_id_pp:
3
  name: limit_id
4
  in: path
5
  description: Internal transfer limit identifier
6
  required: true
7
  type: string
(-)a/api/v1/swagger/parameters/vendor.json (-9 lines)
Lines 1-9 Link Here
1
{
2
    "vendoridPathParam": {
3
      "name": "vendor_id",
4
      "in": "path",
5
      "description": "Vendor id",
6
      "required": true,
7
      "type": "integer"
8
    }
9
}
(-)a/api/v1/swagger/parameters/vendor.yaml (+7 lines)
Line 0 Link Here
1
---
2
vendoridPathParam:
3
  name: vendor_id
4
  in: path
5
  description: Vendor id
6
  required: true
7
  type: integer
(-)a/api/v1/swagger/paths.json (-215 lines)
Lines 1-215 Link Here
1
{
2
  "/oauth/token": {
3
    "$ref": "paths/oauth.json#/~1oauth~1token"
4
  },
5
  "/acquisitions/orders": {
6
    "$ref": "paths/acquisitions_orders.json#/~1acquisitions~1orders"
7
  },
8
  "/acquisitions/orders/{order_id}": {
9
    "$ref": "paths/acquisitions_orders.json#/~1acquisitions~1orders~1{order_id}"
10
  },
11
  "/acquisitions/vendors": {
12
    "$ref": "paths/acquisitions_vendors.json#/~1acquisitions~1vendors"
13
  },
14
  "/acquisitions/vendors/{vendor_id}": {
15
    "$ref": "paths/acquisitions_vendors.json#/~1acquisitions~1vendors~1{vendor_id}"
16
  },
17
  "/acquisitions/funds": {
18
    "$ref": "paths/acquisitions_funds.json#/~1acquisitions~1funds"
19
  },
20
  "/article_requests/{article_request_id}": {
21
    "$ref": "paths/article_requests.yaml#/~1article_requests~1{article_request_id}"
22
  },
23
  "/biblios/{biblio_id}": {
24
    "$ref": "paths/biblios.json#/~1biblios~1{biblio_id}"
25
  },
26
  "/biblios/{biblio_id}/checkouts": {
27
    "$ref": "paths/biblios.json#/~1biblios~1{biblio_id}~1checkouts"
28
  },
29
  "/biblios/{biblio_id}/items": {
30
    "$ref": "paths/biblios.json#/~1biblios~1{biblio_id}~1items"
31
  },
32
  "/biblios/{biblio_id}/pickup_locations": {
33
    "$ref": "paths/biblios.json#/~1biblios~1{biblio_id}~1pickup_locations"
34
  },
35
  "/cash_registers/{cash_register_id}/cashups": {
36
    "$ref": "paths/cash_registers.json#/~1cash_registers~1{cash_register_id}~1cashups"
37
  },
38
  "/cashups/{cashup_id}": {
39
    "$ref": "paths/cash_registers.json#/~1cashups~1{cashup_id}"
40
  },
41
  "/checkouts": {
42
    "$ref": "paths/checkouts.json#/~1checkouts"
43
  },
44
  "/checkouts/{checkout_id}": {
45
    "$ref": "paths/checkouts.json#/~1checkouts~1{checkout_id}"
46
  },
47
  "/checkouts/{checkout_id}/renewal": {
48
    "$ref": "paths/checkouts.json#/~1checkouts~1{checkout_id}~1renewal"
49
  },
50
  "/circulation-rules/kinds": {
51
    "$ref": "paths/circulation-rules.json#/~1circulation-rules~1kinds"
52
  },
53
  "/cities": {
54
    "$ref": "paths/cities.yaml#/~1cities"
55
  },
56
  "/cities/{city_id}": {
57
    "$ref": "paths/cities.yaml#/~1cities~1{city_id}"
58
  },
59
  "/clubs/{club_id}/holds": {
60
    "$ref": "paths/clubs.json#/~1clubs~1{club_id}~1holds"
61
  },
62
  "/config/smtp_servers": {
63
    "$ref": "paths/config_smtp_servers.json#/~1config~1smtp_servers"
64
  },
65
  "/config/smtp_servers/{smtp_server_id}": {
66
    "$ref": "paths/config_smtp_servers.json#/~1config~1smtp_servers~1{smtp_server_id}"
67
  },
68
  "/holds": {
69
    "$ref": "paths/holds.json#/~1holds"
70
  },
71
  "/holds/{hold_id}": {
72
    "$ref": "paths/holds.json#/~1holds~1{hold_id}"
73
  },
74
  "/holds/{hold_id}/priority": {
75
    "$ref": "paths/holds.json#/~1holds~1{hold_id}~1priority"
76
  },
77
  "/holds/{hold_id}/suspension": {
78
    "$ref": "paths/holds.json#/~1holds~1{hold_id}~1suspension"
79
  },
80
  "/holds/{hold_id}/pickup_locations": {
81
    "$ref": "paths/holds.json#/~1holds~1{hold_id}~1pickup_locations"
82
  },
83
  "/holds/{hold_id}/pickup_location": {
84
    "$ref": "paths/holds.json#/~1holds~1{hold_id}~1pickup_location"
85
  },
86
  "/items": {
87
    "$ref": "paths/items.yaml#/~1items"
88
  },
89
  "/items/{item_id}": {
90
    "$ref": "paths/items.yaml#/~1items~1{item_id}"
91
  },
92
  "/items/{item_id}/pickup_locations": {
93
    "$ref": "paths/items.yaml#/~1items~1{item_id}~1pickup_locations"
94
  },
95
  "/libraries": {
96
    "$ref": "paths/libraries.json#/~1libraries"
97
  },
98
  "/libraries/{library_id}": {
99
    "$ref": "paths/libraries.json#/~1libraries~1{library_id}"
100
  },
101
  "/transfer_limits": {
102
    "$ref": "paths/transfer_limits.yaml#/~1transfer_limits"
103
  },
104
  "/transfer_limits/{limit_id}": {
105
    "$ref": "paths/transfer_limits.yaml#/~1transfer_limits~1{limit_id}"
106
  },
107
  "/transfer_limits/batch": {
108
    "$ref": "paths/transfer_limits.yaml#/~1transfer_limits~1batch"
109
  },
110
  "/checkouts/{checkout_id}/allows_renewal": {
111
    "$ref": "paths/checkouts.json#/~1checkouts~1{checkout_id}~1allows_renewal"
112
  },
113
  "/advanced_editor/macros": {
114
    "$ref": "paths/advancededitormacros.json#/~1advanced_editor~1macros"
115
  },
116
  "/advanced_editor/macros/{advancededitormacro_id}": {
117
    "$ref": "paths/advancededitormacros.json#/~1advanced_editor~1macros~1{advancededitormacro_id}"
118
  },
119
  "/advanced_editor/macros/shared": {
120
    "$ref": "paths/advancededitormacros.json#/~1advanced_editor~1macros~1shared"
121
  },
122
  "/advanced_editor/macros/shared/{advancededitormacro_id}": {
123
    "$ref": "paths/advancededitormacros.json#/~1advanced_editor~1macros~1shared~1{advancededitormacro_id}"
124
  },
125
  "/patrons": {
126
    "$ref": "paths/patrons.json#/~1patrons"
127
  },
128
  "/patrons/{patron_id}": {
129
    "$ref": "paths/patrons.json#/~1patrons~1{patron_id}"
130
  },
131
  "/patrons/{patron_id}/account": {
132
    "$ref": "paths/patrons_account.json#/~1patrons~1{patron_id}~1account"
133
  },
134
  "/patrons/{patron_id}/account/credits": {
135
    "$ref": "paths/patrons_account.json#/~1patrons~1{patron_id}~1account~1credits"
136
  },
137
  "/patrons/{patron_id}/extended_attributes": {
138
    "$ref": "paths/patrons_extended_attributes.json#/~1patrons~1{patron_id}~1extended_attributes"
139
  },
140
  "/patrons/{patron_id}/extended_attributes/{extended_attribute_id}": {
141
    "$ref": "paths/patrons_extended_attributes.json#/~1patrons~1{patron_id}~1extended_attributes~1{extended_attribute_id}"
142
  },
143
  "/patrons/{patron_id}/holds": {
144
    "$ref": "paths/patrons_holds.json#/~1patrons~1{patron_id}~1holds"
145
  },
146
  "/patrons/{patron_id}/password": {
147
    "$ref": "paths/patrons_password.json#/~1patrons~1{patron_id}~1password"
148
  },
149
  "/ill_backends": {
150
    "$ref": "paths/ill_backends.json#/~1ill_backends"
151
  },
152
  "/ill_backends/{ill_backend_id}": {
153
    "$ref": "paths/ill_backends.json#/~1ill_backends~1{ill_backend_id}"
154
  },
155
  "/illrequests": {
156
    "$ref": "paths/illrequests.json#/~1illrequests"
157
  },
158
  "/import_batch_profiles": {
159
    "$ref": "paths/import_batch_profiles.json#/~1import_batch_profiles"
160
  },
161
  "/import_batch_profiles/{import_batch_profile_id}": {
162
    "$ref": "paths/import_batch_profiles.json#/~1import_batch_profiles~1{import_batch_profile_id}"
163
  },
164
  "/rotas/{rota_id}/stages/{stage_id}/position": {
165
    "$ref": "paths/rotas.json#/~1rotas~1{rota_id}~1stages~1{stage_id}~1position"
166
  },
167
  "/public/biblios/{biblio_id}": {
168
    "$ref": "paths/biblios.json#/~1public~1biblios~1{biblio_id}"
169
  },
170
  "/public/biblios/{biblio_id}/items": {
171
    "$ref": "paths/biblios.json#/~1public~1biblios~1{biblio_id}~1items"
172
  },
173
  "/public/libraries": {
174
    "$ref": "paths/libraries.json#/~1public~1libraries"
175
  },
176
  "/public/libraries/{library_id}": {
177
    "$ref": "paths/libraries.json#/~1public~1libraries~1{library_id}"
178
  },
179
  "/public/patrons/{patron_id}/article_requests/{article_request_id}": {
180
    "$ref": "paths/article_requests.yaml#/~1public~1patrons~1{patron_id}~1article_requests~1{article_request_id}"
181
  },
182
  "/public/patrons/{patron_id}/password": {
183
    "$ref": "paths/public_patrons.json#/~1public~1patrons~1{patron_id}~1password"
184
  },
185
  "/public/patrons/{patron_id}/guarantors/can_see_charges": {
186
    "$ref": "paths/public_patrons.json#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_charges"
187
  },
188
  "/public/patrons/{patron_id}/guarantors/can_see_checkouts": {
189
    "$ref": "paths/public_patrons.json#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_checkouts"
190
  },
191
  "/quotes": {
192
    "$ref": "paths/quotes.json#/~1quotes"
193
  },
194
  "/quotes/{quote_id}": {
195
    "$ref": "paths/quotes.json#/~1quotes~1{quote_id}"
196
  },
197
  "/return_claims": {
198
    "$ref": "paths/return_claims.json#/~1return_claims"
199
  },
200
  "/return_claims/{claim_id}/notes": {
201
    "$ref": "paths/return_claims.json#/~1return_claims~1{claim_id}~1notes"
202
  },
203
  "/return_claims/{claim_id}/resolve": {
204
    "$ref": "paths/return_claims.json#/~1return_claims~1{claim_id}~1resolve"
205
  },
206
  "/return_claims/{claim_id}": {
207
    "$ref": "paths/return_claims.json#/~1return_claims~1{claim_id}"
208
  },
209
  "/suggestions": {
210
    "$ref": "paths/suggestions.yaml#/~1suggestions"
211
  },
212
  "/suggestions/{suggestion_id}": {
213
    "$ref": "paths/suggestions.yaml#/~1suggestions~1{suggestion_id}"
214
  }
215
}
(-)a/api/v1/swagger/paths.yaml (+143 lines)
Line 0 Link Here
1
---
2
/oauth/token:
3
  $ref: paths/oauth.yaml#/~1oauth~1token
4
/acquisitions/orders:
5
  $ref: paths/acquisitions_orders.yaml#/~1acquisitions~1orders
6
"/acquisitions/orders/{order_id}":
7
  $ref: paths/acquisitions_orders.yaml#/~1acquisitions~1orders~1{order_id}
8
/acquisitions/vendors:
9
  $ref: paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors
10
"/acquisitions/vendors/{vendor_id}":
11
  $ref: paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors~1{vendor_id}
12
/acquisitions/funds:
13
  $ref: paths/acquisitions_funds.yaml#/~1acquisitions~1funds
14
"/article_requests/{article_request_id}":
15
  $ref: paths/article_requests.yaml#/~1article_requests~1{article_request_id}
16
"/biblios/{biblio_id}":
17
  $ref: paths/biblios.yaml#/~1biblios~1{biblio_id}
18
"/biblios/{biblio_id}/checkouts":
19
  $ref: paths/biblios.yaml#/~1biblios~1{biblio_id}~1checkouts
20
"/biblios/{biblio_id}/items":
21
  $ref: paths/biblios.yaml#/~1biblios~1{biblio_id}~1items
22
"/biblios/{biblio_id}/pickup_locations":
23
  $ref: paths/biblios.yaml#/~1biblios~1{biblio_id}~1pickup_locations
24
"/cash_registers/{cash_register_id}/cashups":
25
  $ref: paths/cash_registers.yaml#/~1cash_registers~1{cash_register_id}~1cashups
26
"/cashups/{cashup_id}":
27
  $ref: paths/cash_registers.yaml#/~1cashups~1{cashup_id}
28
/checkouts:
29
  $ref: paths/checkouts.yaml#/~1checkouts
30
"/checkouts/{checkout_id}":
31
  $ref: paths/checkouts.yaml#/~1checkouts~1{checkout_id}
32
"/checkouts/{checkout_id}/renewal":
33
  $ref: paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1renewal
34
/circulation-rules/kinds:
35
  $ref: paths/circulation-rules.yaml#/~1circulation-rules~1kinds
36
/cities:
37
  $ref: paths/cities.yaml#/~1cities
38
"/cities/{city_id}":
39
  $ref: paths/cities.yaml#/~1cities~1{city_id}
40
"/clubs/{club_id}/holds":
41
  $ref: paths/clubs.yaml#/~1clubs~1{club_id}~1holds
42
/config/smtp_servers:
43
  $ref: paths/config_smtp_servers.yaml#/~1config~1smtp_servers
44
"/config/smtp_servers/{smtp_server_id}":
45
  $ref: paths/config_smtp_servers.yaml#/~1config~1smtp_servers~1{smtp_server_id}
46
/holds:
47
  $ref: paths/holds.yaml#/~1holds
48
"/holds/{hold_id}":
49
  $ref: paths/holds.yaml#/~1holds~1{hold_id}
50
"/holds/{hold_id}/priority":
51
  $ref: paths/holds.yaml#/~1holds~1{hold_id}~1priority
52
"/holds/{hold_id}/suspension":
53
  $ref: paths/holds.yaml#/~1holds~1{hold_id}~1suspension
54
"/holds/{hold_id}/pickup_locations":
55
  $ref: paths/holds.yaml#/~1holds~1{hold_id}~1pickup_locations
56
"/holds/{hold_id}/pickup_location":
57
  $ref: paths/holds.yaml#/~1holds~1{hold_id}~1pickup_location
58
/items:
59
  $ref: paths/items.yaml#/~1items
60
"/items/{item_id}":
61
  $ref: paths/items.yaml#/~1items~1{item_id}
62
"/items/{item_id}/pickup_locations":
63
  $ref: paths/items.yaml#/~1items~1{item_id}~1pickup_locations
64
/libraries:
65
  $ref: paths/libraries.yaml#/~1libraries
66
"/libraries/{library_id}":
67
  $ref: paths/libraries.yaml#/~1libraries~1{library_id}
68
/transfer_limits:
69
  $ref: paths/transfer_limits.yaml#/~1transfer_limits
70
"/transfer_limits/{limit_id}":
71
  $ref: paths/transfer_limits.yaml#/~1transfer_limits~1{limit_id}
72
/transfer_limits/batch:
73
  $ref: paths/transfer_limits.yaml#/~1transfer_limits~1batch
74
"/checkouts/{checkout_id}/allows_renewal":
75
  $ref: paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1allows_renewal
76
/advanced_editor/macros:
77
  $ref: paths/advancededitormacros.yaml#/~1advanced_editor~1macros
78
"/advanced_editor/macros/{advancededitormacro_id}":
79
  $ref: paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1{advancededitormacro_id}
80
/advanced_editor/macros/shared:
81
  $ref: paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared
82
"/advanced_editor/macros/shared/{advancededitormacro_id}":
83
  $ref: paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared~1{advancededitormacro_id}
84
/patrons:
85
  $ref: paths/patrons.yaml#/~1patrons
86
"/patrons/{patron_id}":
87
  $ref: paths/patrons.yaml#/~1patrons~1{patron_id}
88
"/patrons/{patron_id}/account":
89
  $ref: paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account
90
"/patrons/{patron_id}/account/credits":
91
  $ref: paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account~1credits
92
"/patrons/{patron_id}/extended_attributes":
93
  $ref: paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes
94
"/patrons/{patron_id}/extended_attributes/{extended_attribute_id}":
95
  $ref: paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes~1{extended_attribute_id}
96
"/patrons/{patron_id}/holds":
97
  $ref: paths/patrons_holds.yaml#/~1patrons~1{patron_id}~1holds
98
"/patrons/{patron_id}/password":
99
  $ref: paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password
100
/ill_backends:
101
  $ref: paths/ill_backends.yaml#/~1ill_backends
102
"/ill_backends/{ill_backend_id}":
103
  $ref: paths/ill_backends.yaml#/~1ill_backends~1{ill_backend_id}
104
/illrequests:
105
  $ref: paths/illrequests.yaml#/~1illrequests
106
/import_batch_profiles:
107
  $ref: paths/import_batch_profiles.yaml#/~1import_batch_profiles
108
"/import_batch_profiles/{import_batch_profile_id}":
109
  $ref: paths/import_batch_profiles.yaml#/~1import_batch_profiles~1{import_batch_profile_id}
110
"/rotas/{rota_id}/stages/{stage_id}/position":
111
  $ref: paths/rotas.yaml#/~1rotas~1{rota_id}~1stages~1{stage_id}~1position
112
"/public/biblios/{biblio_id}":
113
  $ref: paths/biblios.yaml#/~1public~1biblios~1{biblio_id}
114
"/public/biblios/{biblio_id}/items":
115
  $ref: paths/biblios.yaml#/~1public~1biblios~1{biblio_id}~1items
116
/public/libraries:
117
  $ref: paths/libraries.yaml#/~1public~1libraries
118
"/public/libraries/{library_id}":
119
  $ref: paths/libraries.yaml#/~1public~1libraries~1{library_id}
120
"/public/patrons/{patron_id}/article_requests/{article_request_id}":
121
  $ref: paths/article_requests.yaml#/~1public~1patrons~1{patron_id}~1article_requests~1{article_request_id}
122
"/public/patrons/{patron_id}/password":
123
  $ref: paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1password
124
"/public/patrons/{patron_id}/guarantors/can_see_charges":
125
  $ref: paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_charges
126
"/public/patrons/{patron_id}/guarantors/can_see_checkouts":
127
  $ref: paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_checkouts
128
/quotes:
129
  $ref: paths/quotes.yaml#/~1quotes
130
"/quotes/{quote_id}":
131
  $ref: paths/quotes.yaml#/~1quotes~1{quote_id}
132
/return_claims:
133
  $ref: paths/return_claims.yaml#/~1return_claims
134
"/return_claims/{claim_id}/notes":
135
  $ref: paths/return_claims.yaml#/~1return_claims~1{claim_id}~1notes
136
"/return_claims/{claim_id}/resolve":
137
  $ref: paths/return_claims.yaml#/~1return_claims~1{claim_id}~1resolve
138
"/return_claims/{claim_id}":
139
  $ref: paths/return_claims.yaml#/~1return_claims~1{claim_id}
140
/suggestions:
141
  $ref: paths/suggestions.yaml#/~1suggestions
142
"/suggestions/{suggestion_id}":
143
  $ref: paths/suggestions.yaml#/~1suggestions~1{suggestion_id}
(-)a/api/v1/swagger/paths/acquisitions_funds.json (-94 lines)
Lines 1-94 Link Here
1
{
2
  "/acquisitions/funds": {
3
    "get": {
4
      "x-mojo-to": "Acquisitions::Funds#list",
5
      "operationId": "listFunds",
6
      "tags": ["funds"],
7
      "summary": "List funds",
8
      "produces": [
9
        "application/json"
10
      ],
11
      "parameters": [{
12
        "name": "name",
13
        "in": "query",
14
        "description": "Case insensitive search on fund name",
15
        "required": false,
16
        "type": "string"
17
      },
18
      {
19
        "name": "fund_owner_id",
20
        "in": "query",
21
        "description": "Display only the funds that belongs to the given patron ID",
22
        "required": false,
23
        "type": "integer"
24
      },
25
      {
26
        "$ref": "../parameters.json#/match"
27
      },
28
      {
29
        "$ref": "../parameters.json#/order_by"
30
      },
31
      {
32
        "$ref": "../parameters.json#/page"
33
      },
34
      {
35
        "$ref": "../parameters.json#/per_page"
36
      },
37
      {
38
        "$ref": "../parameters.json#/q_param"
39
      },
40
      {
41
          "$ref": "../parameters.json#/q_body"
42
      },
43
      {
44
          "$ref": "../parameters.json#/q_header"
45
      }],
46
      "responses": {
47
        "200": {
48
          "description": "A list of funds",
49
          "schema": {
50
            "type": "array",
51
            "items": {
52
              "$ref": "../definitions.json#/fund"
53
            }
54
          }
55
        },
56
        "401": {
57
          "description": "Authentication required",
58
          "schema": {
59
            "$ref": "../definitions.json#/error"
60
          }
61
        },
62
        "403": {
63
          "description": "Access forbidden",
64
          "schema": {
65
            "$ref": "../definitions.json#/error"
66
          }
67
        },
68
        "404": {
69
          "description": "Fund not found",
70
          "schema": {
71
            "$ref": "../definitions.json#/error"
72
          }
73
        },
74
        "500": {
75
          "description": "Internal server error",
76
          "schema": {
77
            "$ref": "../definitions.json#/error"
78
          }
79
        },
80
        "503": {
81
          "description": "Under maintenance",
82
          "schema": {
83
            "$ref": "../definitions.json#/error"
84
          }
85
        }
86
      },
87
      "x-koha-authorization": {
88
        "permissions": {
89
          "acquisition": "budget_manage_all"
90
        }
91
      }
92
    }
93
  }
94
}
(-)a/api/v1/swagger/paths/acquisitions_funds.yaml (+58 lines)
Line 0 Link Here
1
---
2
/acquisitions/funds:
3
  get:
4
    x-mojo-to: Acquisitions::Funds#list
5
    operationId: listFunds
6
    tags:
7
      - funds
8
    summary: List funds
9
    produces:
10
      - application/json
11
    parameters:
12
      - name: name
13
        in: query
14
        description: Case insensitive search on fund name
15
        required: false
16
        type: string
17
      - name: fund_owner_id
18
        in: query
19
        description: Display only the funds that belongs to the given patron ID
20
        required: false
21
        type: integer
22
      - $ref: ../parameters.yaml#/match
23
      - $ref: ../parameters.yaml#/order_by
24
      - $ref: ../parameters.yaml#/page
25
      - $ref: ../parameters.yaml#/per_page
26
      - $ref: ../parameters.yaml#/q_param
27
      - $ref: ../parameters.yaml#/q_body
28
      - $ref: ../parameters.yaml#/q_header
29
    responses:
30
      "200":
31
        description: A list of funds
32
        schema:
33
          type: array
34
          items:
35
            $ref: ../definitions.yaml#/fund
36
      "401":
37
        description: Authentication required
38
        schema:
39
          $ref: ../definitions.yaml#/error
40
      "403":
41
        description: Access forbidden
42
        schema:
43
          $ref: ../definitions.yaml#/error
44
      "404":
45
        description: Fund not found
46
        schema:
47
          $ref: ../definitions.yaml#/error
48
      "500":
49
        description: Internal server error
50
        schema:
51
          $ref: ../definitions.yaml#/error
52
      "503":
53
        description: Under maintenance
54
        schema:
55
          $ref: ../definitions.yaml#/error
56
    x-koha-authorization:
57
      permissions:
58
        acquisition: budget_manage_all
(-)a/api/v1/swagger/paths/acquisitions_orders.json (-395 lines)
Lines 1-395 Link Here
1
{
2
    "/acquisitions/orders": {
3
        "get": {
4
            "x-mojo-to": "Acquisitions::Orders#list",
5
            "operationId": "listOrders",
6
            "tags": ["orders"],
7
            "summary": "List orders",
8
            "produces": [
9
                "application/json"
10
            ],
11
            "parameters": [
12
                {
13
                    "name": "biblio_id",
14
                    "in": "query",
15
                    "description": "Identifier for a linked bibliographic record",
16
                    "required": false,
17
                    "type": "integer"
18
                },
19
                {
20
                    "name": "basket_id",
21
                    "in": "query",
22
                    "description": "Identifier for a linked acquisition basket",
23
                    "required": false,
24
                    "type": "integer"
25
                },
26
                {
27
                    "name": "fund_id",
28
                    "in": "query",
29
                    "description": "Identifier for the fund the order goes against",
30
                    "required": false,
31
                    "type": "integer"
32
                },
33
                {
34
                    "name": "status",
35
                    "in": "query",
36
                    "description": "Current status for the order. Can be 'new', 'ordered', 'partial', 'complete' or 'cancelled'",
37
                    "required": false,
38
                    "type": "string"
39
                },
40
                {
41
                    "name": "only_active",
42
                    "in": "query",
43
                    "description": "If only active orders should be listed",
44
                    "required": false,
45
                    "type": "boolean"
46
                },
47
                {
48
                    "$ref": "../parameters.json#/match"
49
                },
50
                {
51
                    "$ref": "../parameters.json#/order_by"
52
                },
53
                {
54
                    "$ref": "../parameters.json#/page"
55
                },
56
                {
57
                    "$ref": "../parameters.json#/per_page"
58
                },
59
                {
60
                    "$ref": "../parameters.json#/q_param"
61
                },
62
                {
63
                    "$ref": "../parameters.json#/q_body"
64
                },
65
                {
66
                    "$ref": "../parameters.json#/q_header"
67
                }
68
            ],
69
            "responses": {
70
                "200": {
71
                    "description": "A list of orders",
72
                    "schema": {
73
                        "type": "array",
74
                        "items": {
75
                            "$ref": "../definitions.json#/order"
76
                        }
77
                    }
78
                },
79
                "401": {
80
                    "description": "Authentication required",
81
                    "schema": {
82
                        "$ref": "../definitions.json#/error"
83
                    }
84
                },
85
                "403": {
86
                    "description": "Access forbidden",
87
                    "schema": {
88
                        "$ref": "../definitions.json#/error"
89
                    }
90
                },
91
                "404": {
92
                    "description": "Order not found",
93
                    "schema": {
94
                        "$ref": "../definitions.json#/error"
95
                    }
96
                },
97
                "500": {
98
                    "description": "Internal server error",
99
                    "schema": {
100
                        "$ref": "../definitions.json#/error"
101
                    }
102
                },
103
                "503": {
104
                    "description": "Under maintenance",
105
                    "schema": {
106
                        "$ref": "../definitions.json#/error"
107
                    }
108
                }
109
            },
110
            "x-koha-authorization": {
111
                "permissions": {
112
                    "acquisition": [ "order_manage", "order_manage_all" ]
113
                }
114
            },
115
            "x-koha-embed": [
116
                "basket",
117
                "basket.basket_group",
118
                "basket.creator",
119
                "biblio",
120
                "biblio.active_orders+count",
121
                "biblio.holds+count",
122
                "biblio.items+count",
123
                "biblio.suggestions.suggester",
124
                "fund",
125
                "current_item_level_holds+count",
126
                "invoice",
127
                "items",
128
                "subscription"
129
            ]
130
        },
131
        "post": {
132
            "x-mojo-to": "Acquisitions::Orders#add",
133
            "operationId": "addOrder",
134
            "tags": ["orders"],
135
            "summary": "Add order",
136
            "parameters": [
137
                {
138
                    "name": "body",
139
                    "in": "body",
140
                    "description": "A JSON object representing an order",
141
                    "required": true,
142
                    "schema": {
143
                        "$ref": "../definitions.json#/order"
144
                    }
145
                }
146
            ],
147
            "produces": [
148
                "application/json"
149
            ],
150
            "responses": {
151
                "201": {
152
                    "description": "Order added",
153
                    "schema": {
154
                        "$ref": "../definitions.json#/order"
155
                    }
156
                },
157
                "400": {
158
                    "description": "Bad request",
159
                    "schema": {
160
                        "$ref": "../definitions.json#/error"
161
                    }
162
                },
163
                "401": {
164
                    "description": "Authentication required",
165
                    "schema": {
166
                        "$ref": "../definitions.json#/error"
167
                    }
168
                },
169
                "403": {
170
                    "description": "Access forbidden",
171
                    "schema": {
172
                        "$ref": "../definitions.json#/error"
173
                    }
174
                },
175
                "409": {
176
                    "description": "Conflict in creating the resource",
177
                    "schema": {
178
                        "$ref": "../definitions.json#/error"
179
                    }
180
                },
181
                "500": {
182
                    "description": "Internal server error",
183
                    "schema": {
184
                        "$ref": "../definitions.json#/error"
185
                    }
186
                },
187
                "503": {
188
                    "description": "Under maintenance",
189
                    "schema": {
190
                        "$ref": "../definitions.json#/error"
191
                    }
192
                }
193
            },
194
            "x-koha-authorization": {
195
                "permissions": {
196
                    "acquisition": "order_manage"
197
                }
198
            }
199
        }
200
    },
201
    "/acquisitions/orders/{order_id}": {
202
        "get": {
203
            "x-mojo-to": "Acquisitions::Orders#get",
204
            "operationId": "getOrder",
205
            "tags": ["orders"],
206
            "summary": "Get order",
207
            "parameters": [
208
                {
209
                    "$ref": "../parameters.json#/order_id_pp"
210
                }
211
            ],
212
            "produces": [
213
                "application/json"
214
            ],
215
            "responses": {
216
                "200": {
217
                    "description": "An order",
218
                    "schema": {
219
                        "$ref": "../definitions.json#/order"
220
                    }
221
                },
222
                "401": {
223
                    "description": "Authentication required",
224
                    "schema": {
225
                        "$ref": "../definitions.json#/error"
226
                    }
227
                },
228
                "403": {
229
                    "description": "Access forbidden",
230
                    "schema": {
231
                        "$ref": "../definitions.json#/error"
232
                    }
233
                },
234
                "404": {
235
                    "description": "Order not found",
236
                    "schema": {
237
                        "$ref": "../definitions.json#/error"
238
                    }
239
                },
240
                "500": {
241
                    "description": "Internal server error",
242
                    "schema": {
243
                        "$ref": "../definitions.json#/error"
244
                    }
245
                },
246
                "503": {
247
                    "description": "Under maintenance",
248
                    "schema": {
249
                        "$ref": "../definitions.json#/error"
250
                    }
251
                }
252
            },
253
            "x-koha-authorization": {
254
                "permissions": {
255
                    "acquisition": "order_manage"
256
                }
257
            },
258
            "x-koha-embed": [
259
                "basket",
260
                "basket.basket_group",
261
                "basket.creator",
262
                "biblio",
263
                "biblio.active_orders+count",
264
                "biblio.holds+count",
265
                "biblio.items+count",
266
                "biblio.suggestions.suggester",
267
                "fund",
268
                "current_item_level_holds+count",
269
                "invoice",
270
                "items",
271
                "subscription"
272
            ]
273
        },
274
        "put": {
275
            "x-mojo-to": "Acquisitions::Orders#update",
276
            "operationId": "updateOrder",
277
            "tags": ["orders"],
278
            "summary": "Update order",
279
            "parameters": [
280
                {
281
                    "$ref": "../parameters.json#/order_id_pp"
282
                },
283
                {
284
                    "name": "body",
285
                    "in": "body",
286
                    "description": "A JSON object representing an order",
287
                    "required": true,
288
                    "schema": {
289
                        "$ref": "../definitions.json#/order"
290
                    }
291
                }
292
            ],
293
            "produces": [
294
                "application/json"
295
            ],
296
            "responses": {
297
                "200": {
298
                    "description": "An order",
299
                    "schema": {
300
                        "$ref": "../definitions.json#/order"
301
                    }
302
                },
303
                "401": {
304
                    "description": "Authentication required",
305
                    "schema": {
306
                        "$ref": "../definitions.json#/error"
307
                    }
308
                },
309
                "403": {
310
                    "description": "Access forbidden",
311
                    "schema": {
312
                        "$ref": "../definitions.json#/error"
313
                    }
314
                },
315
                "404": {
316
                    "description": "Order not found",
317
                    "schema": {
318
                        "$ref": "../definitions.json#/error"
319
                    }
320
                },
321
                "500": {
322
                    "description": "Internal server error",
323
                    "schema": {
324
                        "$ref": "../definitions.json#/error"
325
                    }
326
                },
327
                "503": {
328
                    "description": "Under maintenance",
329
                    "schema": {
330
                        "$ref": "../definitions.json#/error"
331
                    }
332
                }
333
            },
334
            "x-koha-authorization": {
335
                "permissions": {
336
                    "acquisition": "order_manage"
337
                }
338
            }
339
        },
340
        "delete": {
341
            "x-mojo-to": "Acquisitions::Orders#delete",
342
            "operationId": "deleteOrder",
343
            "tags": ["orders"],
344
            "summary": "Delete order",
345
            "parameters": [
346
                {
347
                    "$ref": "../parameters.json#/order_id_pp"
348
                }
349
            ],
350
            "produces": [
351
                "application/json"
352
            ],
353
            "responses": {
354
                "204": {
355
                    "description": "Order deleted"
356
                },
357
                "401": {
358
                    "description": "Authentication required",
359
                    "schema": {
360
                        "$ref": "../definitions.json#/error"
361
                    }
362
                },
363
                "403": {
364
                    "description": "Access forbidden",
365
                    "schema": {
366
                        "$ref": "../definitions.json#/error"
367
                    }
368
                },
369
                "404": {
370
                    "description": "Order not found",
371
                    "schema": {
372
                        "$ref": "../definitions.json#/error"
373
                    }
374
                },
375
                "500": {
376
                    "description": "Internal server error",
377
                    "schema": {
378
                        "$ref": "../definitions.json#/error"
379
                    }
380
                },
381
                "503": {
382
                    "description": "Under maintenance",
383
                    "schema": {
384
                        "$ref": "../definitions.json#/error"
385
                    }
386
                }
387
            },
388
            "x-koha-authorization": {
389
                "permissions": {
390
                    "acquisition": "order_manage"
391
                }
392
            }
393
        }
394
    }
395
}
(-)a/api/v1/swagger/paths/acquisitions_orders.yaml (+270 lines)
Line 0 Link Here
1
---
2
/acquisitions/orders:
3
  get:
4
    x-mojo-to: Acquisitions::Orders#list
5
    operationId: listOrders
6
    tags:
7
      - orders
8
    summary: List orders
9
    produces:
10
      - application/json
11
    parameters:
12
      - name: biblio_id
13
        in: query
14
        description: Identifier for a linked bibliographic record
15
        required: false
16
        type: integer
17
      - name: basket_id
18
        in: query
19
        description: Identifier for a linked acquisition basket
20
        required: false
21
        type: integer
22
      - name: fund_id
23
        in: query
24
        description: Identifier for the fund the order goes against
25
        required: false
26
        type: integer
27
      - name: status
28
        in: query
29
        description: Current status for the order. Can be 'new', 'ordered', 'partial',
30
          'complete' or 'cancelled'
31
        required: false
32
        type: string
33
      - name: only_active
34
        in: query
35
        description: If only active orders should be listed
36
        required: false
37
        type: boolean
38
      - $ref: ../parameters.yaml#/match
39
      - $ref: ../parameters.yaml#/order_by
40
      - $ref: ../parameters.yaml#/page
41
      - $ref: ../parameters.yaml#/per_page
42
      - $ref: ../parameters.yaml#/q_param
43
      - $ref: ../parameters.yaml#/q_body
44
      - $ref: ../parameters.yaml#/q_header
45
    responses:
46
      "200":
47
        description: A list of orders
48
        schema:
49
          type: array
50
          items:
51
            $ref: ../definitions.yaml#/order
52
      "401":
53
        description: Authentication required
54
        schema:
55
          $ref: ../definitions.yaml#/error
56
      "403":
57
        description: Access forbidden
58
        schema:
59
          $ref: ../definitions.yaml#/error
60
      "404":
61
        description: Order not found
62
        schema:
63
          $ref: ../definitions.yaml#/error
64
      "500":
65
        description: Internal server error
66
        schema:
67
          $ref: ../definitions.yaml#/error
68
      "503":
69
        description: Under maintenance
70
        schema:
71
          $ref: ../definitions.yaml#/error
72
    x-koha-authorization:
73
      permissions:
74
        acquisition:
75
          - order_manage
76
          - order_manage_all
77
    x-koha-embed:
78
      - basket
79
      - basket.basket_group
80
      - basket.creator
81
      - biblio
82
      - biblio.active_orders+count
83
      - biblio.holds+count
84
      - biblio.items+count
85
      - biblio.suggestions.suggester
86
      - fund
87
      - current_item_level_holds+count
88
      - invoice
89
      - items
90
      - subscription
91
  post:
92
    x-mojo-to: Acquisitions::Orders#add
93
    operationId: addOrder
94
    tags:
95
      - orders
96
    summary: Add order
97
    parameters:
98
      - name: body
99
        in: body
100
        description: A JSON object representing an order
101
        required: true
102
        schema:
103
          $ref: ../definitions.yaml#/order
104
    produces:
105
      - application/json
106
    responses:
107
      "201":
108
        description: Order added
109
        schema:
110
          $ref: ../definitions.yaml#/order
111
      "400":
112
        description: Bad request
113
        schema:
114
          $ref: ../definitions.yaml#/error
115
      "401":
116
        description: Authentication required
117
        schema:
118
          $ref: ../definitions.yaml#/error
119
      "403":
120
        description: Access forbidden
121
        schema:
122
          $ref: ../definitions.yaml#/error
123
      "409":
124
        description: Conflict in creating the resource
125
        schema:
126
          $ref: ../definitions.yaml#/error
127
      "500":
128
        description: Internal server error
129
        schema:
130
          $ref: ../definitions.yaml#/error
131
      "503":
132
        description: Under maintenance
133
        schema:
134
          $ref: ../definitions.yaml#/error
135
    x-koha-authorization:
136
      permissions:
137
        acquisition: order_manage
138
"/acquisitions/orders/{order_id}":
139
  get:
140
    x-mojo-to: Acquisitions::Orders#get
141
    operationId: getOrder
142
    tags:
143
      - orders
144
    summary: Get order
145
    parameters:
146
      - $ref: ../parameters.yaml#/order_id_pp
147
    produces:
148
      - application/json
149
    responses:
150
      "200":
151
        description: An order
152
        schema:
153
          $ref: ../definitions.yaml#/order
154
      "401":
155
        description: Authentication required
156
        schema:
157
          $ref: ../definitions.yaml#/error
158
      "403":
159
        description: Access forbidden
160
        schema:
161
          $ref: ../definitions.yaml#/error
162
      "404":
163
        description: Order not found
164
        schema:
165
          $ref: ../definitions.yaml#/error
166
      "500":
167
        description: Internal server error
168
        schema:
169
          $ref: ../definitions.yaml#/error
170
      "503":
171
        description: Under maintenance
172
        schema:
173
          $ref: ../definitions.yaml#/error
174
    x-koha-authorization:
175
      permissions:
176
        acquisition: order_manage
177
    x-koha-embed:
178
      - basket
179
      - basket.basket_group
180
      - basket.creator
181
      - biblio
182
      - biblio.active_orders+count
183
      - biblio.holds+count
184
      - biblio.items+count
185
      - biblio.suggestions.suggester
186
      - fund
187
      - current_item_level_holds+count
188
      - invoice
189
      - items
190
      - subscription
191
  put:
192
    x-mojo-to: Acquisitions::Orders#update
193
    operationId: updateOrder
194
    tags:
195
      - orders
196
    summary: Update order
197
    parameters:
198
      - $ref: ../parameters.yaml#/order_id_pp
199
      - name: body
200
        in: body
201
        description: A JSON object representing an order
202
        required: true
203
        schema:
204
          $ref: ../definitions.yaml#/order
205
    produces:
206
      - application/json
207
    responses:
208
      "200":
209
        description: An order
210
        schema:
211
          $ref: ../definitions.yaml#/order
212
      "401":
213
        description: Authentication required
214
        schema:
215
          $ref: ../definitions.yaml#/error
216
      "403":
217
        description: Access forbidden
218
        schema:
219
          $ref: ../definitions.yaml#/error
220
      "404":
221
        description: Order not found
222
        schema:
223
          $ref: ../definitions.yaml#/error
224
      "500":
225
        description: Internal server error
226
        schema:
227
          $ref: ../definitions.yaml#/error
228
      "503":
229
        description: Under maintenance
230
        schema:
231
          $ref: ../definitions.yaml#/error
232
    x-koha-authorization:
233
      permissions:
234
        acquisition: order_manage
235
  delete:
236
    x-mojo-to: Acquisitions::Orders#delete
237
    operationId: deleteOrder
238
    tags:
239
      - orders
240
    summary: Delete order
241
    parameters:
242
      - $ref: ../parameters.yaml#/order_id_pp
243
    produces:
244
      - application/json
245
    responses:
246
      "204":
247
        description: Order deleted
248
      "401":
249
        description: Authentication required
250
        schema:
251
          $ref: ../definitions.yaml#/error
252
      "403":
253
        description: Access forbidden
254
        schema:
255
          $ref: ../definitions.yaml#/error
256
      "404":
257
        description: Order not found
258
        schema:
259
          $ref: ../definitions.yaml#/error
260
      "500":
261
        description: Internal server error
262
        schema:
263
          $ref: ../definitions.yaml#/error
264
      "503":
265
        description: Under maintenance
266
        schema:
267
          $ref: ../definitions.yaml#/error
268
    x-koha-authorization:
269
      permissions:
270
        acquisition: order_manage
(-)a/api/v1/swagger/paths/acquisitions_vendors.json (-319 lines)
Lines 1-319 Link Here
1
{
2
  "/acquisitions/vendors": {
3
    "get": {
4
      "x-mojo-to": "Acquisitions::Vendors#list",
5
      "operationId": "listVendors",
6
      "tags": ["vendors"],
7
      "summary": "List vendors",
8
      "produces": [
9
        "application/json"
10
      ],
11
      "parameters": [{
12
        "name": "name",
13
        "in": "query",
14
        "description": "Case insensitive search on vendor name",
15
        "required": false,
16
        "type": "string"
17
      }, {
18
        "name": "accountnumber",
19
        "in": "query",
20
        "description": "Case insensitive search on vendor's account number",
21
        "required": false,
22
        "type": "string"
23
      }, {
24
        "$ref": "../parameters.json#/match"
25
      }, {
26
        "$ref": "../parameters.json#/order_by"
27
      }, {
28
        "$ref": "../parameters.json#/page"
29
      }, {
30
        "$ref": "../parameters.json#/per_page"
31
      }, {
32
        "$ref": "../parameters.json#/q_param"
33
      }, {
34
        "$ref": "../parameters.json#/q_body"
35
      }, {
36
        "$ref": "../parameters.json#/q_header"
37
      }],
38
      "responses": {
39
        "200": {
40
          "description": "A list of vendors",
41
          "schema": {
42
            "type": "array",
43
            "items": {
44
              "$ref": "../definitions.json#/vendor"
45
            }
46
          }
47
        },
48
        "401": {
49
          "description": "Authentication required",
50
          "schema": {
51
            "$ref": "../definitions.json#/error"
52
          }
53
        },
54
        "403": {
55
          "description": "Access forbidden",
56
          "schema": {
57
            "$ref": "../definitions.json#/error"
58
          }
59
        },
60
        "404": {
61
          "description": "Vendor not found",
62
          "schema": {
63
            "$ref": "../definitions.json#/error"
64
          }
65
        },
66
        "500": {
67
          "description": "Internal server error",
68
          "schema": {
69
            "$ref": "../definitions.json#/error"
70
          }
71
        },
72
        "503": {
73
          "description": "Under maintenance",
74
          "schema": {
75
            "$ref": "../definitions.json#/error"
76
          }
77
        }
78
      },
79
      "x-koha-authorization": {
80
        "permissions": {
81
          "acquisition": "vendors_manage"
82
        }
83
      }
84
    },
85
    "post": {
86
      "x-mojo-to": "Acquisitions::Vendors#add",
87
      "operationId": "addVendor",
88
      "tags": ["vendors"],
89
      "summary": "Add vendor",
90
      "parameters": [{
91
        "name": "body",
92
        "in": "body",
93
        "description": "A JSON object representing a vendor",
94
        "required": true,
95
        "schema": {
96
          "$ref": "../definitions.json#/vendor"
97
        }
98
      }],
99
      "produces": [
100
        "application/json"
101
      ],
102
      "responses": {
103
        "201": {
104
          "description": "Vendor added",
105
          "schema": {
106
            "$ref": "../definitions.json#/vendor"
107
          }
108
        },
109
        "401": {
110
          "description": "Authentication required",
111
          "schema": {
112
            "$ref": "../definitions.json#/error"
113
          }
114
        },
115
        "403": {
116
          "description": "Access forbidden",
117
          "schema": {
118
            "$ref": "../definitions.json#/error"
119
          }
120
        },
121
        "404": {
122
          "description": "Vendor not found",
123
          "schema": {
124
            "$ref": "../definitions.json#/error"
125
          }
126
        },
127
        "500": {
128
          "description": "Internal server error",
129
          "schema": {
130
            "$ref": "../definitions.json#/error"
131
          }
132
        },
133
        "503": {
134
          "description": "Under maintenance",
135
          "schema": {
136
            "$ref": "../definitions.json#/error"
137
          }
138
        }
139
      },
140
      "x-koha-authorization": {
141
        "permissions": {
142
          "acquisition": "vendors_manage"
143
        }
144
      }
145
    }
146
  },
147
  "/acquisitions/vendors/{vendor_id}": {
148
    "get": {
149
      "x-mojo-to": "Acquisitions::Vendors#get",
150
      "operationId": "getVendor",
151
      "tags": ["vendors"],
152
      "summary": "Get vendor",
153
      "parameters": [{
154
        "$ref": "../parameters.json#/vendoridPathParam"
155
      }],
156
      "produces": [
157
        "application/json"
158
      ],
159
      "responses": {
160
        "200": {
161
          "description": "A vendor",
162
          "schema": {
163
            "$ref": "../definitions.json#/vendor"
164
          }
165
        },
166
        "401": {
167
          "description": "Authentication required",
168
          "schema": {
169
            "$ref": "../definitions.json#/error"
170
          }
171
        },
172
        "403": {
173
          "description": "Access forbidden",
174
          "schema": {
175
            "$ref": "../definitions.json#/error"
176
          }
177
        },
178
        "404": {
179
          "description": "Vendor not found",
180
          "schema": {
181
            "$ref": "../definitions.json#/error"
182
          }
183
        },
184
        "500": {
185
          "description": "Internal server error",
186
          "schema": {
187
            "$ref": "../definitions.json#/error"
188
          }
189
        },
190
        "503": {
191
          "description": "Under maintenance",
192
          "schema": {
193
            "$ref": "../definitions.json#/error"
194
          }
195
        }
196
      },
197
      "x-koha-authorization": {
198
        "permissions": {
199
          "acquisition": "vendors_manage"
200
        }
201
      }
202
    },
203
    "put": {
204
      "x-mojo-to": "Acquisitions::Vendors#update",
205
      "operationId": "updateVendor",
206
      "tags": ["vendors"],
207
      "summary": "Update vendor",
208
      "parameters": [{
209
        "$ref": "../parameters.json#/vendoridPathParam"
210
      }, {
211
        "name": "body",
212
        "in": "body",
213
        "description": "A JSON object representing a vendor",
214
        "required": true,
215
        "schema": {
216
          "$ref": "../definitions.json#/vendor"
217
        }
218
      }],
219
      "produces": [
220
        "application/json"
221
      ],
222
      "responses": {
223
        "200": {
224
          "description": "A vendor",
225
          "schema": {
226
            "$ref": "../definitions.json#/vendor"
227
          }
228
        },
229
        "401": {
230
          "description": "Authentication required",
231
          "schema": {
232
            "$ref": "../definitions.json#/error"
233
          }
234
        },
235
        "403": {
236
          "description": "Access forbidden",
237
          "schema": {
238
            "$ref": "../definitions.json#/error"
239
          }
240
        },
241
        "404": {
242
          "description": "Vendor not found",
243
          "schema": {
244
            "$ref": "../definitions.json#/error"
245
          }
246
        },
247
        "500": {
248
          "description": "Internal server error",
249
          "schema": {
250
            "$ref": "../definitions.json#/error"
251
          }
252
        },
253
        "503": {
254
          "description": "Under maintenance",
255
          "schema": {
256
            "$ref": "../definitions.json#/error"
257
          }
258
        }
259
      },
260
      "x-koha-authorization": {
261
        "permissions": {
262
          "acquisition": "vendors_manage"
263
        }
264
      }
265
    },
266
    "delete": {
267
      "x-mojo-to": "Acquisitions::Vendors#delete",
268
      "operationId": "deleteVendor",
269
      "tags": ["vendors"],
270
      "summary": "Delete vendor",
271
      "parameters": [{
272
        "$ref": "../parameters.json#/vendoridPathParam"
273
      }],
274
      "produces": [
275
        "application/json"
276
      ],
277
      "responses": {
278
        "204": {
279
          "description": "Vendor deleted"
280
        },
281
        "401": {
282
          "description": "Authentication required",
283
          "schema": {
284
            "$ref": "../definitions.json#/error"
285
          }
286
        },
287
        "403": {
288
          "description": "Access forbidden",
289
          "schema": {
290
            "$ref": "../definitions.json#/error"
291
          }
292
        },
293
        "404": {
294
          "description": "Vendor not found",
295
          "schema": {
296
            "$ref": "../definitions.json#/error"
297
          }
298
        },
299
        "500": {
300
          "description": "Internal server error",
301
          "schema": {
302
            "$ref": "../definitions.json#/error"
303
          }
304
        },
305
        "503": {
306
          "description": "Under maintenance",
307
          "schema": {
308
            "$ref": "../definitions.json#/error"
309
          }
310
        }
311
      },
312
      "x-koha-authorization": {
313
        "permissions": {
314
          "acquisition": "vendors_manage"
315
        }
316
      }
317
    }
318
  }
319
}
(-)a/api/v1/swagger/paths/acquisitions_vendors.yaml (+220 lines)
Line 0 Link Here
1
---
2
/acquisitions/vendors:
3
  get:
4
    x-mojo-to: Acquisitions::Vendors#list
5
    operationId: listVendors
6
    tags:
7
      - vendors
8
    summary: List vendors
9
    produces:
10
      - application/json
11
    parameters:
12
      - name: name
13
        in: query
14
        description: Case insensitive search on vendor name
15
        required: false
16
        type: string
17
      - name: accountnumber
18
        in: query
19
        description: Case insensitive search on vendor's account number
20
        required: false
21
        type: string
22
      - $ref: ../parameters.yaml#/match
23
      - $ref: ../parameters.yaml#/order_by
24
      - $ref: ../parameters.yaml#/page
25
      - $ref: ../parameters.yaml#/per_page
26
      - $ref: ../parameters.yaml#/q_param
27
      - $ref: ../parameters.yaml#/q_body
28
      - $ref: ../parameters.yaml#/q_header
29
    responses:
30
      "200":
31
        description: A list of vendors
32
        schema:
33
          type: array
34
          items:
35
            $ref: ../definitions.yaml#/vendor
36
      "401":
37
        description: Authentication required
38
        schema:
39
          $ref: ../definitions.yaml#/error
40
      "403":
41
        description: Access forbidden
42
        schema:
43
          $ref: ../definitions.yaml#/error
44
      "404":
45
        description: Vendor not found
46
        schema:
47
          $ref: ../definitions.yaml#/error
48
      "500":
49
        description: Internal server error
50
        schema:
51
          $ref: ../definitions.yaml#/error
52
      "503":
53
        description: Under maintenance
54
        schema:
55
          $ref: ../definitions.yaml#/error
56
    x-koha-authorization:
57
      permissions:
58
        acquisition: vendors_manage
59
  post:
60
    x-mojo-to: Acquisitions::Vendors#add
61
    operationId: addVendor
62
    tags:
63
      - vendors
64
    summary: Add vendor
65
    parameters:
66
      - name: body
67
        in: body
68
        description: A JSON object representing a vendor
69
        required: true
70
        schema:
71
          $ref: ../definitions.yaml#/vendor
72
    produces:
73
      - application/json
74
    responses:
75
      "201":
76
        description: Vendor added
77
        schema:
78
          $ref: ../definitions.yaml#/vendor
79
      "401":
80
        description: Authentication required
81
        schema:
82
          $ref: ../definitions.yaml#/error
83
      "403":
84
        description: Access forbidden
85
        schema:
86
          $ref: ../definitions.yaml#/error
87
      "404":
88
        description: Vendor not found
89
        schema:
90
          $ref: ../definitions.yaml#/error
91
      "500":
92
        description: Internal server error
93
        schema:
94
          $ref: ../definitions.yaml#/error
95
      "503":
96
        description: Under maintenance
97
        schema:
98
          $ref: ../definitions.yaml#/error
99
    x-koha-authorization:
100
      permissions:
101
        acquisition: vendors_manage
102
"/acquisitions/vendors/{vendor_id}":
103
  get:
104
    x-mojo-to: Acquisitions::Vendors#get
105
    operationId: getVendor
106
    tags:
107
      - vendors
108
    summary: Get vendor
109
    parameters:
110
      - $ref: ../parameters.yaml#/vendoridPathParam
111
    produces:
112
      - application/json
113
    responses:
114
      "200":
115
        description: A vendor
116
        schema:
117
          $ref: ../definitions.yaml#/vendor
118
      "401":
119
        description: Authentication required
120
        schema:
121
          $ref: ../definitions.yaml#/error
122
      "403":
123
        description: Access forbidden
124
        schema:
125
          $ref: ../definitions.yaml#/error
126
      "404":
127
        description: Vendor not found
128
        schema:
129
          $ref: ../definitions.yaml#/error
130
      "500":
131
        description: Internal server error
132
        schema:
133
          $ref: ../definitions.yaml#/error
134
      "503":
135
        description: Under maintenance
136
        schema:
137
          $ref: ../definitions.yaml#/error
138
    x-koha-authorization:
139
      permissions:
140
        acquisition: vendors_manage
141
  put:
142
    x-mojo-to: Acquisitions::Vendors#update
143
    operationId: updateVendor
144
    tags:
145
      - vendors
146
    summary: Update vendor
147
    parameters:
148
      - $ref: ../parameters.yaml#/vendoridPathParam
149
      - name: body
150
        in: body
151
        description: A JSON object representing a vendor
152
        required: true
153
        schema:
154
          $ref: ../definitions.yaml#/vendor
155
    produces:
156
      - application/json
157
    responses:
158
      "200":
159
        description: A vendor
160
        schema:
161
          $ref: ../definitions.yaml#/vendor
162
      "401":
163
        description: Authentication required
164
        schema:
165
          $ref: ../definitions.yaml#/error
166
      "403":
167
        description: Access forbidden
168
        schema:
169
          $ref: ../definitions.yaml#/error
170
      "404":
171
        description: Vendor not found
172
        schema:
173
          $ref: ../definitions.yaml#/error
174
      "500":
175
        description: Internal server error
176
        schema:
177
          $ref: ../definitions.yaml#/error
178
      "503":
179
        description: Under maintenance
180
        schema:
181
          $ref: ../definitions.yaml#/error
182
    x-koha-authorization:
183
      permissions:
184
        acquisition: vendors_manage
185
  delete:
186
    x-mojo-to: Acquisitions::Vendors#delete
187
    operationId: deleteVendor
188
    tags:
189
      - vendors
190
    summary: Delete vendor
191
    parameters:
192
      - $ref: ../parameters.yaml#/vendoridPathParam
193
    produces:
194
      - application/json
195
    responses:
196
      "204":
197
        description: Vendor deleted
198
      "401":
199
        description: Authentication required
200
        schema:
201
          $ref: ../definitions.yaml#/error
202
      "403":
203
        description: Access forbidden
204
        schema:
205
          $ref: ../definitions.yaml#/error
206
      "404":
207
        description: Vendor not found
208
        schema:
209
          $ref: ../definitions.yaml#/error
210
      "500":
211
        description: Internal server error
212
        schema:
213
          $ref: ../definitions.yaml#/error
214
      "503":
215
        description: Under maintenance
216
        schema:
217
          $ref: ../definitions.yaml#/error
218
    x-koha-authorization:
219
      permissions:
220
        acquisition: vendors_manage
(-)a/api/v1/swagger/paths/advancededitormacros.json (-557 lines)
Lines 1-557 Link Here
1
{
2
  "/advanced_editor/macros": {
3
    "get": {
4
      "x-mojo-to": "AdvancedEditorMacro#list",
5
      "operationId": "listMacro",
6
      "tags": ["macros"],
7
      "summary": "List advanced editor macros",
8
      "produces": [
9
        "application/json"
10
      ],
11
      "parameters": [
12
        {
13
          "name": "name",
14
          "in": "query",
15
          "description": "Case insensative search on macro name",
16
          "required": false,
17
          "type": "string"
18
        },
19
        {
20
          "name": "macro_text",
21
          "in": "query",
22
          "description": "Case insensative search on macro text",
23
          "required": false,
24
          "type": "string"
25
        },
26
        {
27
          "name": "patron_id",
28
          "in": "query",
29
          "description": "Search on internal patron_id",
30
          "required": false,
31
          "type": "string"
32
        },
33
        {
34
          "name": "shared",
35
          "in": "query",
36
          "description": "Search on shared macros",
37
          "required": false,
38
          "type": "string"
39
        },
40
        {
41
          "$ref": "../parameters.json#/match"
42
        },
43
        {
44
          "$ref": "../parameters.json#/order_by"
45
        },
46
        {
47
          "$ref": "../parameters.json#/page"
48
        },
49
        {
50
          "$ref": "../parameters.json#/per_page"
51
        },
52
        {
53
          "$ref": "../parameters.json#/q_param"
54
        },
55
        {
56
          "$ref": "../parameters.json#/q_body"
57
        },
58
        {
59
          "$ref": "../parameters.json#/q_header"
60
        }
61
      ],
62
      "responses": {
63
        "200": {
64
          "description": "A list of macros",
65
          "schema": {
66
            "type": "array",
67
            "items": {
68
              "$ref": "../definitions.json#/advancededitormacro"
69
            }
70
          }
71
        },
72
        "403": {
73
          "description": "Access forbidden",
74
          "schema": {
75
            "$ref": "../definitions.json#/error"
76
          }
77
        },
78
        "500": {
79
          "description": "Internal error",
80
          "schema": {
81
            "$ref": "../definitions.json#/error"
82
          }
83
        },
84
        "503": {
85
          "description": "Under maintenance",
86
          "schema": {
87
            "$ref": "../definitions.json#/error"
88
          }
89
        }
90
      },
91
      "x-koha-authorization": {
92
        "permissions": {
93
            "editcatalogue": "advanced_editor"
94
        }
95
      }
96
    },
97
    "post": {
98
      "x-mojo-to": "AdvancedEditorMacro#add",
99
      "operationId": "addAdvancedEditorMacro",
100
      "tags": ["macros"],
101
      "summary": "Add advanced editor macros",
102
      "parameters": [{
103
        "name": "body",
104
        "in": "body",
105
        "description": "A JSON object containing informations about the new macro",
106
        "required": true,
107
        "schema": {
108
          "$ref": "../definitions.json#/advancededitormacro"
109
        }
110
      }],
111
      "produces": [
112
        "application/json"
113
      ],
114
      "responses": {
115
        "201": {
116
          "description": "Macro added",
117
          "schema": {
118
            "$ref": "../definitions.json#/advancededitormacro"
119
          }
120
        },
121
        "401": {
122
          "description": "Authentication required",
123
          "schema": {
124
            "$ref": "../definitions.json#/error"
125
          }
126
        },
127
        "403": {
128
          "description": "Access forbidden",
129
          "schema": {
130
            "$ref": "../definitions.json#/error"
131
          }
132
        },
133
        "500": {
134
          "description": "Internal error",
135
          "schema": {
136
            "$ref": "../definitions.json#/error"
137
          }
138
        },
139
        "503": {
140
          "description": "Under maintenance",
141
          "schema": {
142
            "$ref": "../definitions.json#/error"
143
          }
144
        }
145
      },
146
      "x-koha-authorization": {
147
        "permissions": {
148
          "editcatalogue": "advanced_editor"
149
        }
150
      }
151
    }
152
  },
153
  "/advanced_editor/macros/shared": {
154
    "post": {
155
      "x-mojo-to": "AdvancedEditorMacro#add_shared",
156
      "operationId": "addsharedAdvancedEditorMacro",
157
      "tags": ["macros"],
158
      "summary": "Add shared advanced editor macros",
159
      "parameters": [{
160
        "name": "body",
161
        "in": "body",
162
        "description": "A JSON object containing informations about the new macro",
163
        "required": true,
164
        "schema": {
165
          "$ref": "../definitions.json#/advancededitormacro"
166
        }
167
      }],
168
      "produces": [
169
        "application/json"
170
      ],
171
      "responses": {
172
        "201": {
173
          "description": "Macro added",
174
          "schema": {
175
            "$ref": "../definitions.json#/advancededitormacro"
176
          }
177
        },
178
        "401": {
179
          "description": "Authentication required",
180
          "schema": {
181
            "$ref": "../definitions.json#/error"
182
          }
183
        },
184
        "403": {
185
          "description": "Access forbidden",
186
          "schema": {
187
            "$ref": "../definitions.json#/error"
188
          }
189
        },
190
        "500": {
191
          "description": "Internal error",
192
          "schema": {
193
            "$ref": "../definitions.json#/error"
194
          }
195
        },
196
        "503": {
197
          "description": "Under maintenance",
198
          "schema": {
199
            "$ref": "../definitions.json#/error"
200
          }
201
        }
202
      },
203
      "x-koha-authorization": {
204
        "permissions": {
205
          "editcatalogue": {
206
            "advanced_editor": 1,
207
            "create_shared_macros": 1
208
          }
209
        }
210
      }
211
    }
212
  },
213
  "/advanced_editor/macros/{advancededitormacro_id}": {
214
    "get": {
215
      "x-mojo-to": "AdvancedEditorMacro#get",
216
      "operationId": "getAdvancedEditorMacro",
217
      "tags": ["macros"],
218
      "summary": "Get advanced editor macro",
219
      "parameters": [{
220
        "$ref": "../parameters.json#/advancededitormacro_id_pp"
221
      }],
222
      "produces": [
223
        "application/json"
224
      ],
225
      "responses": {
226
        "200": {
227
          "description": "A macro",
228
          "schema": {
229
            "$ref": "../definitions.json#/advancededitormacro"
230
          }
231
        },
232
        "403": {
233
          "description": "Access forbidden",
234
          "schema": {
235
            "$ref": "../definitions.json#/error"
236
          }
237
        },
238
        "404": {
239
          "description": "AdvancedEditorMacro not found",
240
          "schema": {
241
            "$ref": "../definitions.json#/error"
242
          }
243
        },
244
        "500": {
245
          "description": "Internal error",
246
          "schema": {
247
            "$ref": "../definitions.json#/error"
248
          }
249
        },
250
        "503": {
251
          "description": "Under maintenance",
252
          "schema": {
253
            "$ref": "../definitions.json#/error"
254
          }
255
        }
256
      },
257
      "x-koha-authorization": {
258
        "permissions": {
259
            "editcatalogue": "advanced_editor"
260
        }
261
      }
262
    },
263
    "put": {
264
      "x-mojo-to": "AdvancedEditorMacro#update",
265
      "operationId": "updateAdvancedEditorMacro",
266
      "tags": ["macros"],
267
      "summary": "Update advanced editor macro",
268
      "parameters": [{
269
        "$ref": "../parameters.json#/advancededitormacro_id_pp"
270
      }, {
271
        "name": "body",
272
        "in": "body",
273
        "description": "An advanced editor macro object",
274
        "required": true,
275
        "schema": {
276
          "$ref": "../definitions.json#/advancededitormacro"
277
        }
278
      }],
279
      "produces": [
280
        "application/json"
281
      ],
282
      "responses": {
283
        "200": {
284
          "description": "An advanced editor macro",
285
          "schema": {
286
            "$ref": "../definitions.json#/advancededitormacro"
287
          }
288
        },
289
        "401": {
290
          "description": "Authentication required",
291
          "schema": {
292
            "$ref": "../definitions.json#/error"
293
          }
294
        },
295
        "403": {
296
          "description": "Access forbidden",
297
          "schema": {
298
            "$ref": "../definitions.json#/error"
299
          }
300
        },
301
        "404": {
302
          "description": "Macro not found",
303
          "schema": {
304
            "$ref": "../definitions.json#/error"
305
          }
306
        },
307
        "500": {
308
          "description": "Internal error",
309
          "schema": {
310
            "$ref": "../definitions.json#/error"
311
          }
312
        },
313
        "503": {
314
          "description": "Under maintenance",
315
          "schema": {
316
            "$ref": "../definitions.json#/error"
317
          }
318
        }
319
      },
320
      "x-koha-authorization": {
321
        "permissions": {
322
          "editcatalogue": "advanced_editor"
323
        }
324
      }
325
    },
326
    "delete": {
327
      "x-mojo-to": "AdvancedEditorMacro#delete",
328
      "operationId": "deleteAdvancedEditorMacro",
329
      "tags": ["macros"],
330
      "summary": "Delete advanced editor macro",
331
      "parameters": [{
332
        "$ref": "../parameters.json#/advancededitormacro_id_pp"
333
      }],
334
      "produces": [
335
        "application/json"
336
      ],
337
      "responses": {
338
        "204": {
339
          "description": "Advanced editor macro deleted",
340
          "schema": {
341
            "type": "string"
342
          }
343
        },
344
        "401": {
345
          "description": "Authentication required",
346
          "schema": {
347
            "$ref": "../definitions.json#/error"
348
          }
349
        },
350
        "403": {
351
          "description": "Access forbidden",
352
          "schema": {
353
            "$ref": "../definitions.json#/error"
354
          }
355
        },
356
        "404": {
357
          "description": "Macro not found",
358
          "schema": {
359
            "$ref": "../definitions.json#/error"
360
          }
361
        },
362
        "500": {
363
          "description": "Internal error",
364
          "schema": {
365
            "$ref": "../definitions.json#/error"
366
          }
367
        },
368
        "503": {
369
          "description": "Under maintenance",
370
          "schema": {
371
            "$ref": "../definitions.json#/error"
372
          }
373
        }
374
      },
375
      "x-koha-authorization": {
376
        "permissions": {
377
          "editcatalogue": "advanced_editor"
378
        }
379
      }
380
    }
381
  },
382
  "/advanced_editor/macros/shared/{advancededitormacro_id}": {
383
    "get": {
384
      "x-mojo-to": "AdvancedEditorMacro#get_shared",
385
      "operationId": "getsharedAdvancedEditorMacro",
386
      "tags": ["macros"],
387
      "summary": "Get shared advanced editor macro",
388
      "parameters": [{
389
        "$ref": "../parameters.json#/advancededitormacro_id_pp"
390
      }],
391
      "produces": [
392
        "application/json"
393
      ],
394
      "responses": {
395
        "200": {
396
          "description": "A macro",
397
          "schema": {
398
            "$ref": "../definitions.json#/advancededitormacro"
399
          }
400
        },
401
        "403": {
402
          "description": "Access forbidden",
403
          "schema": {
404
            "$ref": "../definitions.json#/error"
405
          }
406
        },
407
        "404": {
408
          "description": "AdvancedEditorMacro not found",
409
          "schema": {
410
            "$ref": "../definitions.json#/error"
411
          }
412
        },
413
        "500": {
414
          "description": "Internal error",
415
          "schema": {
416
            "$ref": "../definitions.json#/error"
417
          }
418
        },
419
        "503": {
420
          "description": "Under maintenance",
421
          "schema": {
422
            "$ref": "../definitions.json#/error"
423
          }
424
        }
425
      },
426
      "x-koha-authorization": {
427
        "permissions": {
428
            "editcatalogue": "advanced_editor"
429
        }
430
      }
431
    },
432
    "put": {
433
      "x-mojo-to": "AdvancedEditorMacro#update_shared",
434
      "operationId": "updatesharedAdvancedEditorMacro",
435
      "tags": ["macros"],
436
      "summary": "Update shared advanced editor macro",
437
      "parameters": [{
438
        "$ref": "../parameters.json#/advancededitormacro_id_pp"
439
      }, {
440
        "name": "body",
441
        "in": "body",
442
        "description": "An advanced editor macro object",
443
        "required": true,
444
        "schema": {
445
          "$ref": "../definitions.json#/advancededitormacro"
446
        }
447
      }],
448
      "produces": [
449
        "application/json"
450
      ],
451
      "responses": {
452
        "200": {
453
          "description": "An advanced editor macro",
454
          "schema": {
455
            "$ref": "../definitions.json#/advancededitormacro"
456
          }
457
        },
458
        "401": {
459
          "description": "Authentication required",
460
          "schema": {
461
            "$ref": "../definitions.json#/error"
462
          }
463
        },
464
        "403": {
465
          "description": "Access forbidden",
466
          "schema": {
467
            "$ref": "../definitions.json#/error"
468
          }
469
        },
470
        "404": {
471
          "description": "Macro not found",
472
          "schema": {
473
            "$ref": "../definitions.json#/error"
474
          }
475
        },
476
        "500": {
477
          "description": "Internal error",
478
          "schema": {
479
            "$ref": "../definitions.json#/error"
480
          }
481
        },
482
        "503": {
483
          "description": "Under maintenance",
484
          "schema": {
485
            "$ref": "../definitions.json#/error"
486
          }
487
        }
488
      },
489
      "x-koha-authorization": {
490
        "permissions": {
491
          "editcatalogue": {
492
            "advanced_editor": 1,
493
            "create_shared_macros": 1
494
          }
495
        }
496
      }
497
    },
498
    "delete": {
499
      "x-mojo-to": "AdvancedEditorMacro#delete_shared",
500
      "operationId": "deletesharedAdvancedEditorMacro",
501
      "tags": ["macros"],
502
      "summary": "Delete shared advanced editor macro",
503
      "parameters": [{
504
        "$ref": "../parameters.json#/advancededitormacro_id_pp"
505
      }],
506
      "produces": [
507
        "application/json"
508
      ],
509
      "responses": {
510
        "204": {
511
          "description": "Advanced editor macro deleted",
512
          "schema": {
513
            "type": "string"
514
          }
515
        },
516
        "401": {
517
          "description": "Authentication required",
518
          "schema": {
519
            "$ref": "../definitions.json#/error"
520
          }
521
        },
522
        "403": {
523
          "description": "Access forbidden",
524
          "schema": {
525
            "$ref": "../definitions.json#/error"
526
          }
527
        },
528
        "404": {
529
          "description": "Macro not found",
530
          "schema": {
531
            "$ref": "../definitions.json#/error"
532
          }
533
        },
534
        "500": {
535
          "description": "Internal error",
536
          "schema": {
537
            "$ref": "../definitions.json#/error"
538
          }
539
        },
540
        "503": {
541
          "description": "Under maintenance",
542
          "schema": {
543
            "$ref": "../definitions.json#/error"
544
          }
545
        }
546
      },
547
      "x-koha-authorization": {
548
        "permissions": {
549
          "editcatalogue": {
550
            "advanced_editor": 1,
551
            "delete_shared_macros": 1
552
          }
553
        }
554
      }
555
    }
556
  }
557
}
(-)a/api/v1/swagger/paths/advancededitormacros.yaml (+379 lines)
Line 0 Link Here
1
---
2
/advanced_editor/macros:
3
  get:
4
    x-mojo-to: AdvancedEditorMacro#list
5
    operationId: listMacro
6
    tags:
7
      - macros
8
    summary: List advanced editor macros
9
    produces:
10
      - application/json
11
    parameters:
12
      - name: name
13
        in: query
14
        description: Case insensative search on macro name
15
        required: false
16
        type: string
17
      - name: macro_text
18
        in: query
19
        description: Case insensative search on macro text
20
        required: false
21
        type: string
22
      - name: patron_id
23
        in: query
24
        description: Search on internal patron_id
25
        required: false
26
        type: string
27
      - name: shared
28
        in: query
29
        description: Search on shared macros
30
        required: false
31
        type: string
32
      - $ref: ../parameters.yaml#/match
33
      - $ref: ../parameters.yaml#/order_by
34
      - $ref: ../parameters.yaml#/page
35
      - $ref: ../parameters.yaml#/per_page
36
      - $ref: ../parameters.yaml#/q_param
37
      - $ref: ../parameters.yaml#/q_body
38
      - $ref: ../parameters.yaml#/q_header
39
    responses:
40
      "200":
41
        description: A list of macros
42
        schema:
43
          type: array
44
          items:
45
            $ref: ../definitions.yaml#/advancededitormacro
46
      "403":
47
        description: Access forbidden
48
        schema:
49
          $ref: ../definitions.yaml#/error
50
      "500":
51
        description: Internal error
52
        schema:
53
          $ref: ../definitions.yaml#/error
54
      "503":
55
        description: Under maintenance
56
        schema:
57
          $ref: ../definitions.yaml#/error
58
    x-koha-authorization:
59
      permissions:
60
        editcatalogue: advanced_editor
61
  post:
62
    x-mojo-to: AdvancedEditorMacro#add
63
    operationId: addAdvancedEditorMacro
64
    tags:
65
      - macros
66
    summary: Add advanced editor macros
67
    parameters:
68
      - name: body
69
        in: body
70
        description: A JSON object containing informations about the new macro
71
        required: true
72
        schema:
73
          $ref: ../definitions.yaml#/advancededitormacro
74
    produces:
75
      - application/json
76
    responses:
77
      "201":
78
        description: Macro added
79
        schema:
80
          $ref: ../definitions.yaml#/advancededitormacro
81
      "401":
82
        description: Authentication required
83
        schema:
84
          $ref: ../definitions.yaml#/error
85
      "403":
86
        description: Access forbidden
87
        schema:
88
          $ref: ../definitions.yaml#/error
89
      "500":
90
        description: Internal error
91
        schema:
92
          $ref: ../definitions.yaml#/error
93
      "503":
94
        description: Under maintenance
95
        schema:
96
          $ref: ../definitions.yaml#/error
97
    x-koha-authorization:
98
      permissions:
99
        editcatalogue: advanced_editor
100
/advanced_editor/macros/shared:
101
  post:
102
    x-mojo-to: AdvancedEditorMacro#add_shared
103
    operationId: addsharedAdvancedEditorMacro
104
    tags:
105
      - macros
106
    summary: Add shared advanced editor macros
107
    parameters:
108
      - name: body
109
        in: body
110
        description: A JSON object containing informations about the new macro
111
        required: true
112
        schema:
113
          $ref: ../definitions.yaml#/advancededitormacro
114
    produces:
115
      - application/json
116
    responses:
117
      "201":
118
        description: Macro added
119
        schema:
120
          $ref: ../definitions.yaml#/advancededitormacro
121
      "401":
122
        description: Authentication required
123
        schema:
124
          $ref: ../definitions.yaml#/error
125
      "403":
126
        description: Access forbidden
127
        schema:
128
          $ref: ../definitions.yaml#/error
129
      "500":
130
        description: Internal error
131
        schema:
132
          $ref: ../definitions.yaml#/error
133
      "503":
134
        description: Under maintenance
135
        schema:
136
          $ref: ../definitions.yaml#/error
137
    x-koha-authorization:
138
      permissions:
139
        editcatalogue:
140
          advanced_editor: 1
141
          create_shared_macros: 1
142
"/advanced_editor/macros/{advancededitormacro_id}":
143
  get:
144
    x-mojo-to: AdvancedEditorMacro#get
145
    operationId: getAdvancedEditorMacro
146
    tags:
147
      - macros
148
    summary: Get advanced editor macro
149
    parameters:
150
      - $ref: ../parameters.yaml#/advancededitormacro_id_pp
151
    produces:
152
      - application/json
153
    responses:
154
      "200":
155
        description: A macro
156
        schema:
157
          $ref: ../definitions.yaml#/advancededitormacro
158
      "403":
159
        description: Access forbidden
160
        schema:
161
          $ref: ../definitions.yaml#/error
162
      "404":
163
        description: AdvancedEditorMacro not found
164
        schema:
165
          $ref: ../definitions.yaml#/error
166
      "500":
167
        description: Internal error
168
        schema:
169
          $ref: ../definitions.yaml#/error
170
      "503":
171
        description: Under maintenance
172
        schema:
173
          $ref: ../definitions.yaml#/error
174
    x-koha-authorization:
175
      permissions:
176
        editcatalogue: advanced_editor
177
  put:
178
    x-mojo-to: AdvancedEditorMacro#update
179
    operationId: updateAdvancedEditorMacro
180
    tags:
181
      - macros
182
    summary: Update advanced editor macro
183
    parameters:
184
      - $ref: ../parameters.yaml#/advancededitormacro_id_pp
185
      - name: body
186
        in: body
187
        description: An advanced editor macro object
188
        required: true
189
        schema:
190
          $ref: ../definitions.yaml#/advancededitormacro
191
    produces:
192
      - application/json
193
    responses:
194
      "200":
195
        description: An advanced editor macro
196
        schema:
197
          $ref: ../definitions.yaml#/advancededitormacro
198
      "401":
199
        description: Authentication required
200
        schema:
201
          $ref: ../definitions.yaml#/error
202
      "403":
203
        description: Access forbidden
204
        schema:
205
          $ref: ../definitions.yaml#/error
206
      "404":
207
        description: Macro not found
208
        schema:
209
          $ref: ../definitions.yaml#/error
210
      "500":
211
        description: Internal error
212
        schema:
213
          $ref: ../definitions.yaml#/error
214
      "503":
215
        description: Under maintenance
216
        schema:
217
          $ref: ../definitions.yaml#/error
218
    x-koha-authorization:
219
      permissions:
220
        editcatalogue: advanced_editor
221
  delete:
222
    x-mojo-to: AdvancedEditorMacro#delete
223
    operationId: deleteAdvancedEditorMacro
224
    tags:
225
      - macros
226
    summary: Delete advanced editor macro
227
    parameters:
228
      - $ref: ../parameters.yaml#/advancededitormacro_id_pp
229
    produces:
230
      - application/json
231
    responses:
232
      "204":
233
        description: Advanced editor macro deleted
234
        schema:
235
          type: string
236
      "401":
237
        description: Authentication required
238
        schema:
239
          $ref: ../definitions.yaml#/error
240
      "403":
241
        description: Access forbidden
242
        schema:
243
          $ref: ../definitions.yaml#/error
244
      "404":
245
        description: Macro not found
246
        schema:
247
          $ref: ../definitions.yaml#/error
248
      "500":
249
        description: Internal error
250
        schema:
251
          $ref: ../definitions.yaml#/error
252
      "503":
253
        description: Under maintenance
254
        schema:
255
          $ref: ../definitions.yaml#/error
256
    x-koha-authorization:
257
      permissions:
258
        editcatalogue: advanced_editor
259
"/advanced_editor/macros/shared/{advancededitormacro_id}":
260
  get:
261
    x-mojo-to: AdvancedEditorMacro#get_shared
262
    operationId: getsharedAdvancedEditorMacro
263
    tags:
264
      - macros
265
    summary: Get shared advanced editor macro
266
    parameters:
267
      - $ref: ../parameters.yaml#/advancededitormacro_id_pp
268
    produces:
269
      - application/json
270
    responses:
271
      "200":
272
        description: A macro
273
        schema:
274
          $ref: ../definitions.yaml#/advancededitormacro
275
      "403":
276
        description: Access forbidden
277
        schema:
278
          $ref: ../definitions.yaml#/error
279
      "404":
280
        description: AdvancedEditorMacro not found
281
        schema:
282
          $ref: ../definitions.yaml#/error
283
      "500":
284
        description: Internal error
285
        schema:
286
          $ref: ../definitions.yaml#/error
287
      "503":
288
        description: Under maintenance
289
        schema:
290
          $ref: ../definitions.yaml#/error
291
    x-koha-authorization:
292
      permissions:
293
        editcatalogue: advanced_editor
294
  put:
295
    x-mojo-to: AdvancedEditorMacro#update_shared
296
    operationId: updatesharedAdvancedEditorMacro
297
    tags:
298
      - macros
299
    summary: Update shared advanced editor macro
300
    parameters:
301
      - $ref: ../parameters.yaml#/advancededitormacro_id_pp
302
      - name: body
303
        in: body
304
        description: An advanced editor macro object
305
        required: true
306
        schema:
307
          $ref: ../definitions.yaml#/advancededitormacro
308
    produces:
309
      - application/json
310
    responses:
311
      "200":
312
        description: An advanced editor macro
313
        schema:
314
          $ref: ../definitions.yaml#/advancededitormacro
315
      "401":
316
        description: Authentication required
317
        schema:
318
          $ref: ../definitions.yaml#/error
319
      "403":
320
        description: Access forbidden
321
        schema:
322
          $ref: ../definitions.yaml#/error
323
      "404":
324
        description: Macro not found
325
        schema:
326
          $ref: ../definitions.yaml#/error
327
      "500":
328
        description: Internal error
329
        schema:
330
          $ref: ../definitions.yaml#/error
331
      "503":
332
        description: Under maintenance
333
        schema:
334
          $ref: ../definitions.yaml#/error
335
    x-koha-authorization:
336
      permissions:
337
        editcatalogue:
338
          advanced_editor: 1
339
          create_shared_macros: 1
340
  delete:
341
    x-mojo-to: AdvancedEditorMacro#delete_shared
342
    operationId: deletesharedAdvancedEditorMacro
343
    tags:
344
      - macros
345
    summary: Delete shared advanced editor macro
346
    parameters:
347
      - $ref: ../parameters.yaml#/advancededitormacro_id_pp
348
    produces:
349
      - application/json
350
    responses:
351
      "204":
352
        description: Advanced editor macro deleted
353
        schema:
354
          type: string
355
      "401":
356
        description: Authentication required
357
        schema:
358
          $ref: ../definitions.yaml#/error
359
      "403":
360
        description: Access forbidden
361
        schema:
362
          $ref: ../definitions.yaml#/error
363
      "404":
364
        description: Macro not found
365
        schema:
366
          $ref: ../definitions.yaml#/error
367
      "500":
368
        description: Internal error
369
        schema:
370
          $ref: ../definitions.yaml#/error
371
      "503":
372
        description: Under maintenance
373
        schema:
374
          $ref: ../definitions.yaml#/error
375
    x-koha-authorization:
376
      permissions:
377
        editcatalogue:
378
          advanced_editor: 1
379
          delete_shared_macros: 1
(-)a/api/v1/swagger/paths/article_requests.yaml (-13 / +13 lines)
Lines 30-56 Link Here
30
      "400":
30
      "400":
31
        description: Bad request
31
        description: Bad request
32
        schema:
32
        schema:
33
          $ref: ../definitions.json#/error
33
          $ref: ../definitions.yaml#/error
34
      "401":
34
      "401":
35
        description: Authentication required
35
        description: Authentication required
36
        schema:
36
        schema:
37
          $ref: ../definitions.json#/error
37
          $ref: ../definitions.yaml#/error
38
      "403":
38
      "403":
39
        description: Access forbidden
39
        description: Access forbidden
40
        schema:
40
        schema:
41
          $ref: ../definitions.json#/error
41
          $ref: ../definitions.yaml#/error
42
      "404":
42
      "404":
43
        description: Patron not found
43
        description: Patron not found
44
        schema:
44
        schema:
45
          $ref: ../definitions.json#/error
45
          $ref: ../definitions.yaml#/error
46
      "500":
46
      "500":
47
        description: Internal server error
47
        description: Internal server error
48
        schema:
48
        schema:
49
          $ref: ../definitions.json#/error
49
          $ref: ../definitions.yaml#/error
50
      "503":
50
      "503":
51
        description: Under maintenance
51
        description: Under maintenance
52
        schema:
52
        schema:
53
          $ref: ../definitions.json#/error
53
          $ref: ../definitions.yaml#/error
54
    x-koha-authorization:
54
    x-koha-authorization:
55
      permissions:
55
      permissions:
56
        circulate: circulate_remaining_permissions
56
        circulate: circulate_remaining_permissions
Lines 62-68 Link Here
62
      - article_requests
62
      - article_requests
63
    summary: Cancel patron's article requests
63
    summary: Cancel patron's article requests
64
    parameters:
64
    parameters:
65
      - $ref: ../parameters.json#/patron_id_pp
65
      - $ref: ../parameters.yaml#/patron_id_pp
66
      - name: article_request_id
66
      - name: article_request_id
67
        in: path
67
        in: path
68
        description: Article request identifier
68
        description: Article request identifier
Lines 86-111 Link Here
86
      "400":
86
      "400":
87
        description: Bad request
87
        description: Bad request
88
        schema:
88
        schema:
89
          $ref: ../definitions.json#/error
89
          $ref: ../definitions.yaml#/error
90
      "401":
90
      "401":
91
        description: Authentication required
91
        description: Authentication required
92
        schema:
92
        schema:
93
          $ref: ../definitions.json#/error
93
          $ref: ../definitions.yaml#/error
94
      "403":
94
      "403":
95
        description: Access forbidden
95
        description: Access forbidden
96
        schema:
96
        schema:
97
          $ref: ../definitions.json#/error
97
          $ref: ../definitions.yaml#/error
98
      "404":
98
      "404":
99
        description: Patron not found
99
        description: Patron not found
100
        schema:
100
        schema:
101
          $ref: ../definitions.json#/error
101
          $ref: ../definitions.yaml#/error
102
      "500":
102
      "500":
103
        description: Internal server error
103
        description: Internal server error
104
        schema:
104
        schema:
105
          $ref: ../definitions.json#/error
105
          $ref: ../definitions.yaml#/error
106
      "503":
106
      "503":
107
        description: Under maintenance
107
        description: Under maintenance
108
        schema:
108
        schema:
109
          $ref: ../definitions.json#/error
109
          $ref: ../definitions.yaml#/error
110
    x-koha-authorization:
110
    x-koha-authorization:
111
      allow-owner: true
111
      allow-owner: true
(-)a/api/v1/swagger/paths/biblios.json (-569 lines)
Lines 1-569 Link Here
1
{
2
  "/biblios/{biblio_id}": {
3
    "get": {
4
      "x-mojo-to": "Biblios#get",
5
      "operationId": "getBiblio",
6
      "tags": [ "biblios" ],
7
      "summary": "Get biblio",
8
      "parameters": [
9
        {
10
          "$ref": "../parameters.json#/biblio_id_pp"
11
        }
12
      ],
13
      "produces": [
14
        "application/json",
15
        "application/marcxml+xml",
16
        "application/marc-in-json",
17
        "application/marc",
18
        "text/plain"
19
      ],
20
      "responses": {
21
        "200": {
22
          "description": "A biblio"
23
        },
24
        "401": {
25
          "description": "Authentication required",
26
          "schema": {
27
            "$ref": "../definitions.json#/error"
28
          }
29
        },
30
        "403": {
31
          "description": "Access forbidden",
32
          "schema": {
33
            "$ref": "../definitions.json#/error"
34
          }
35
        },
36
        "404": {
37
          "description": "Biblio not found",
38
          "schema": {
39
            "$ref": "../definitions.json#/error"
40
          }
41
        },
42
        "406": {
43
          "description": "Not acceptable",
44
          "schema": {
45
            "type": "array",
46
            "description": "Accepted content-types",
47
            "items": {
48
                "type": "string"
49
            }
50
          }
51
        },
52
        "500": {
53
          "description": "Internal server error",
54
          "schema": {
55
            "$ref": "../definitions.json#/error"
56
          }
57
        },
58
        "503": {
59
          "description": "Under maintenance",
60
          "schema": {
61
            "$ref": "../definitions.json#/error"
62
          }
63
        }
64
      },
65
      "x-koha-authorization": {
66
        "permissions": {
67
            "catalogue": "1"
68
        }
69
      }
70
    },
71
    "delete": {
72
      "x-mojo-to": "Biblios#delete",
73
      "operationId": "deleteBiblio",
74
      "tags": [ "biblios" ],
75
      "summary": "Delete biblio",
76
      "parameters": [
77
        {
78
          "$ref": "../parameters.json#/biblio_id_pp"
79
        }
80
      ],
81
      "produces": [
82
        "application/json"
83
      ],
84
      "responses": {
85
        "204": {
86
          "description": "Biblio deleted",
87
          "schema": {
88
            "type": "string"
89
          }
90
        },
91
        "401": {
92
          "description": "Authentication required",
93
          "schema": {
94
            "$ref": "../definitions.json#/error"
95
          }
96
        },
97
        "403": {
98
          "description": "Access forbidden",
99
          "schema": {
100
            "$ref": "../definitions.json#/error"
101
          }
102
        },
103
        "404": {
104
          "description": "Biblio not found",
105
          "schema": {
106
            "$ref": "../definitions.json#/error"
107
          }
108
        },
109
        "409": {
110
          "description": "Unable to perform action on biblio",
111
          "schema": {
112
            "$ref": "../definitions.json#/error"
113
          }
114
        },
115
        "500": {
116
          "description": "Internal error",
117
          "schema": {
118
            "$ref": "../definitions.json#/error"
119
          }
120
        },
121
        "503": {
122
          "description": "Under maintenance",
123
          "schema": {
124
            "$ref": "../definitions.json#/error"
125
          }
126
        }
127
      },
128
      "x-koha-authorization": {
129
        "permissions": {
130
          "editcatalogue": "edit_catalogue"
131
        }
132
      }
133
    }
134
  },
135
  "/biblios/{biblio_id}/checkouts": {
136
    "get": {
137
      "x-mojo-to": "Biblios#get_checkouts",
138
      "operationId": "listBiblioCheckouts",
139
      "tags": [
140
        "checkouts"
141
      ],
142
      "summary": "List checkouts for a biblio",
143
      "parameters": [
144
        {
145
          "$ref": "../parameters.json#/biblio_id_pp"
146
        },
147
        {
148
          "$ref": "../parameters.json#/page"
149
        },
150
        {
151
          "$ref": "../parameters.json#/per_page"
152
        },
153
        {
154
          "$ref": "../parameters.json#/match"
155
        },
156
        {
157
          "$ref": "../parameters.json#/order_by"
158
        },
159
        {
160
          "$ref": "../parameters.json#/q_param"
161
        },
162
        {
163
          "$ref": "../parameters.json#/q_body"
164
        },
165
        {
166
          "$ref": "../parameters.json#/q_header"
167
        },
168
        {
169
          "name": "checked_in",
170
          "in": "query",
171
          "description": "By default, current checkouts are returned, when this is true then checked in checkouts are returned as result.",
172
          "type": "boolean"
173
        }
174
      ],
175
      "produces": [
176
        "application/json"
177
      ],
178
      "responses": {
179
        "200": {
180
          "description": "A list of checkouts",
181
          "schema": {
182
            "$ref": "../definitions.json#/checkouts"
183
          }
184
        },
185
        "403": {
186
          "description": "Access forbidden",
187
          "schema": {
188
            "$ref": "../definitions.json#/error"
189
          }
190
        },
191
        "404": {
192
          "description": "Biblio not found",
193
          "schema": {
194
            "$ref": "../definitions.json#/error"
195
          }
196
        }
197
      },
198
      "x-koha-authorization": {
199
        "permissions": {
200
          "circulate": "circulate_remaining_permissions"
201
        }
202
      },
203
      "x-koha-embed": [
204
        "issuer",
205
        "item",
206
        "patron",
207
        "library"
208
      ]
209
    }
210
  },
211
  "/biblios/{biblio_id}/items": {
212
    "get": {
213
      "x-mojo-to": "Biblios#get_items",
214
      "operationId": "getBiblioItems",
215
      "tags": [
216
        "biblios"
217
      ],
218
      "summary": "Get items for a biblio",
219
      "parameters": [
220
        {
221
          "$ref": "../parameters.json#/biblio_id_pp"
222
        },
223
        {
224
          "$ref": "../parameters.json#/match"
225
        },
226
        {
227
          "$ref": "../parameters.json#/order_by"
228
        },
229
        {
230
          "$ref": "../parameters.json#/page"
231
        },
232
        {
233
          "$ref": "../parameters.json#/per_page"
234
        },
235
        {
236
          "$ref": "../parameters.json#/q_param"
237
        },
238
        {
239
          "$ref": "../parameters.json#/q_body"
240
        },
241
        {
242
          "$ref": "../parameters.json#/q_header"
243
        }
244
      ],
245
      "consumes": [
246
        "application/json"
247
      ],
248
      "produces": [
249
        "application/json"
250
      ],
251
      "responses": {
252
        "200": {
253
          "description": "A list of the items attached to the record",
254
          "schema": {
255
            "type": "array",
256
            "items": {
257
              "$ref": "../definitions.json#/item"
258
            }
259
          }
260
        },
261
        "401": {
262
          "description": "Authentication required",
263
          "schema": {
264
            "$ref": "../definitions.json#/error"
265
          }
266
        },
267
        "403": {
268
          "description": "Access forbidden",
269
          "schema": {
270
            "$ref": "../definitions.json#/error"
271
          }
272
        },
273
        "404": {
274
          "description": "Biblio not found",
275
          "schema": {
276
            "$ref": "../definitions.json#/error"
277
          }
278
        },
279
        "406": {
280
          "description": "Not acceptable",
281
          "schema": {
282
            "type": "array",
283
            "description": "Accepted content-types",
284
            "items": {
285
                "type": "string"
286
            }
287
          }
288
        },
289
        "500": {
290
          "description": "Internal server error",
291
          "schema": {
292
            "$ref": "../definitions.json#/error"
293
          }
294
        },
295
        "503": {
296
          "description": "Under maintenance",
297
          "schema": {
298
            "$ref": "../definitions.json#/error"
299
          }
300
        }
301
      },
302
      "x-koha-authorization": {
303
        "permissions": {
304
            "catalogue": "1"
305
        }
306
      }
307
    }
308
  },
309
  "/biblios/{biblio_id}/pickup_locations": {
310
    "get": {
311
      "x-mojo-to": "Biblios#pickup_locations",
312
      "operationId": "getBiblioPickupLocations",
313
      "tags": [
314
        "biblios"
315
      ],
316
      "summary": "Get valid pickup locations for a biblio",
317
      "parameters": [
318
        {
319
          "$ref": "../parameters.json#/biblio_id_pp"
320
        },
321
        {
322
          "name": "patron_id",
323
          "in": "query",
324
          "description": "Internal patron identifier",
325
          "required": true,
326
          "type": "integer"
327
        },
328
        {
329
          "$ref": "../parameters.json#/match"
330
        },
331
        {
332
          "$ref": "../parameters.json#/order_by"
333
        },
334
        {
335
          "$ref": "../parameters.json#/page"
336
        },
337
        {
338
          "$ref": "../parameters.json#/per_page"
339
        },
340
        {
341
          "$ref": "../parameters.json#/q_param"
342
        },
343
        {
344
          "$ref": "../parameters.json#/q_body"
345
        },
346
        {
347
          "$ref": "../parameters.json#/q_header"
348
        }
349
      ],
350
      "consumes": [
351
        "application/json"
352
      ],
353
      "produces": [
354
        "application/json"
355
      ],
356
      "responses": {
357
        "200": {
358
          "description": "Biblio pickup locations",
359
          "schema": {
360
            "type": "array",
361
            "items": {
362
              "$ref": "../definitions.json#/library"
363
            }
364
          }
365
        },
366
        "400": {
367
          "description": "Missing or wrong parameters",
368
          "schema": {
369
            "$ref": "../definitions.json#/error"
370
          }
371
        },
372
        "401": {
373
          "description": "Authentication required",
374
          "schema": {
375
            "$ref": "../definitions.json#/error"
376
          }
377
        },
378
        "403": {
379
          "description": "Access forbidden",
380
          "schema": {
381
            "$ref": "../definitions.json#/error"
382
          }
383
        },
384
        "404": {
385
          "description": "Biblio not found",
386
          "schema": {
387
            "$ref": "../definitions.json#/error"
388
          }
389
        },
390
        "500": {
391
          "description": "Internal server error",
392
          "schema": {
393
            "$ref": "../definitions.json#/error"
394
          }
395
        },
396
        "503": {
397
          "description": "Under maintenance",
398
          "schema": {
399
            "$ref": "../definitions.json#/error"
400
          }
401
        }
402
      },
403
      "x-koha-authorization": {
404
        "permissions": {
405
          "reserveforothers": "place_holds"
406
        }
407
      }
408
    }
409
  },
410
  "/public/biblios/{biblio_id}": {
411
    "get": {
412
      "x-mojo-to": "Biblios#get_public",
413
      "operationId": "getBiblioPublic",
414
      "tags": [
415
        "biblios"
416
      ],
417
      "summary": "Get biblio (public)",
418
      "parameters": [
419
        {
420
          "$ref": "../parameters.json#/biblio_id_pp"
421
        }
422
      ],
423
      "produces": [
424
        "application/marcxml+xml",
425
        "application/marc-in-json",
426
        "application/marc",
427
        "text/plain"
428
      ],
429
      "responses": {
430
        "200": {
431
          "description": "A biblio"
432
        },
433
        "401": {
434
          "description": "Authentication required",
435
          "schema": {
436
            "$ref": "../definitions.json#/error"
437
          }
438
        },
439
        "403": {
440
          "description": "Access forbidden",
441
          "schema": {
442
            "$ref": "../definitions.json#/error"
443
          }
444
        },
445
        "404": {
446
          "description": "Biblio not found",
447
          "schema": {
448
            "$ref": "../definitions.json#/error"
449
          }
450
        },
451
        "406": {
452
          "description": "Not acceptable",
453
          "schema": {
454
            "type": "array",
455
            "description": "Accepted content-types",
456
            "items": {
457
                "type": "string"
458
            }
459
          }
460
        },
461
        "500": {
462
          "description": "Internal server error",
463
          "schema": {
464
            "$ref": "../definitions.json#/error"
465
          }
466
        },
467
        "503": {
468
          "description": "Under maintenance",
469
          "schema": {
470
            "$ref": "../definitions.json#/error"
471
          }
472
        }
473
      }
474
    }
475
  },
476
  "/public/biblios/{biblio_id}/items": {
477
    "get": {
478
      "x-mojo-to": "Biblios#get_items_public",
479
      "operationId": "getBiblioItemsPublic",
480
      "tags": [
481
        "biblios",
482
        "items"
483
      ],
484
      "parameters": [
485
        {
486
          "$ref": "../parameters.json#/biblio_id_pp"
487
        },
488
        {
489
          "$ref": "../parameters.json#/match"
490
        },
491
        {
492
          "$ref": "../parameters.json#/order_by"
493
        },
494
        {
495
          "$ref": "../parameters.json#/page"
496
        },
497
        {
498
          "$ref": "../parameters.json#/per_page"
499
        },
500
        {
501
          "$ref": "../parameters.json#/q_param"
502
        },
503
        {
504
          "$ref": "../parameters.json#/q_body"
505
        },
506
        {
507
          "$ref": "../parameters.json#/q_header"
508
        }
509
      ],
510
      "consumes": [
511
        "application/json"
512
      ],
513
      "produces": [
514
        "application/json"
515
      ],
516
      "responses": {
517
        "200": {
518
          "description": "A list of the items attached to the record",
519
          "schema": {
520
            "type": "array",
521
            "items": {
522
              "$ref": "../definitions.json#/item"
523
            }
524
          }
525
        },
526
        "401": {
527
          "description": "Authentication required",
528
          "schema": {
529
            "$ref": "../definitions.json#/error"
530
          }
531
        },
532
        "403": {
533
          "description": "Access forbidden",
534
          "schema": {
535
            "$ref": "../definitions.json#/error"
536
          }
537
        },
538
        "404": {
539
          "description": "Biblio not found",
540
          "schema": {
541
            "$ref": "../definitions.json#/error"
542
          }
543
        },
544
        "406": {
545
          "description": "Not acceptable",
546
          "schema": {
547
            "type": "array",
548
            "description": "Accepted content-types",
549
            "items": {
550
                "type": "string"
551
            }
552
          }
553
        },
554
        "500": {
555
          "description": "Internal server error",
556
          "schema": {
557
            "$ref": "../definitions.json#/error"
558
          }
559
        },
560
        "503": {
561
          "description": "Under maintenance",
562
          "schema": {
563
            "$ref": "../definitions.json#/error"
564
          }
565
        }
566
      }
567
    }
568
  }
569
}
(-)a/api/v1/swagger/paths/biblios.yaml (+349 lines)
Line 0 Link Here
1
---
2
"/biblios/{biblio_id}":
3
  get:
4
    x-mojo-to: Biblios#get
5
    operationId: getBiblio
6
    tags:
7
      - biblios
8
    summary: Get biblio
9
    parameters:
10
      - $ref: ../parameters.yaml#/biblio_id_pp
11
    produces:
12
      - application/json
13
      - application/marcxml+xml
14
      - application/marc-in-json
15
      - application/marc
16
      - text/plain
17
    responses:
18
      "200":
19
        description: A biblio
20
      "401":
21
        description: Authentication required
22
        schema:
23
          $ref: ../definitions.yaml#/error
24
      "403":
25
        description: Access forbidden
26
        schema:
27
          $ref: ../definitions.yaml#/error
28
      "404":
29
        description: Biblio not found
30
        schema:
31
          $ref: ../definitions.yaml#/error
32
      "406":
33
        description: Not acceptable
34
        schema:
35
          type: array
36
          description: Accepted content-types
37
          items:
38
            type: string
39
      "500":
40
        description: Internal server error
41
        schema:
42
          $ref: ../definitions.yaml#/error
43
      "503":
44
        description: Under maintenance
45
        schema:
46
          $ref: ../definitions.yaml#/error
47
    x-koha-authorization:
48
      permissions:
49
        catalogue: "1"
50
  delete:
51
    x-mojo-to: Biblios#delete
52
    operationId: deleteBiblio
53
    tags:
54
      - biblios
55
    summary: Delete biblio
56
    parameters:
57
      - $ref: ../parameters.yaml#/biblio_id_pp
58
    produces:
59
      - application/json
60
    responses:
61
      "204":
62
        description: Biblio deleted
63
        schema:
64
          type: string
65
      "401":
66
        description: Authentication required
67
        schema:
68
          $ref: ../definitions.yaml#/error
69
      "403":
70
        description: Access forbidden
71
        schema:
72
          $ref: ../definitions.yaml#/error
73
      "404":
74
        description: Biblio not found
75
        schema:
76
          $ref: ../definitions.yaml#/error
77
      "409":
78
        description: Unable to perform action on biblio
79
        schema:
80
          $ref: ../definitions.yaml#/error
81
      "500":
82
        description: Internal error
83
        schema:
84
          $ref: ../definitions.yaml#/error
85
      "503":
86
        description: Under maintenance
87
        schema:
88
          $ref: ../definitions.yaml#/error
89
    x-koha-authorization:
90
      permissions:
91
        editcatalogue: edit_catalogue
92
"/biblios/{biblio_id}/checkouts":
93
  get:
94
    x-mojo-to: Biblios#get_checkouts
95
    operationId: listBiblioCheckouts
96
    tags:
97
      - checkouts
98
    summary: List checkouts for a biblio
99
    parameters:
100
      - $ref: ../parameters.yaml#/biblio_id_pp
101
      - $ref: ../parameters.yaml#/page
102
      - $ref: ../parameters.yaml#/per_page
103
      - $ref: ../parameters.yaml#/match
104
      - $ref: ../parameters.yaml#/order_by
105
      - $ref: ../parameters.yaml#/q_param
106
      - $ref: ../parameters.yaml#/q_body
107
      - $ref: ../parameters.yaml#/q_header
108
      - name: checked_in
109
        in: query
110
        description: By default, current checkouts are returned, when this is true then
111
          checked in checkouts are returned as result.
112
        type: boolean
113
    produces:
114
      - application/json
115
    responses:
116
      "200":
117
        description: A list of checkouts
118
        schema:
119
          $ref: ../definitions.yaml#/checkouts
120
      "403":
121
        description: Access forbidden
122
        schema:
123
          $ref: ../definitions.yaml#/error
124
      "404":
125
        description: Biblio not found
126
        schema:
127
          $ref: ../definitions.yaml#/error
128
    x-koha-authorization:
129
      permissions:
130
        circulate: circulate_remaining_permissions
131
    x-koha-embed:
132
      - issuer
133
      - item
134
      - patron
135
      - library
136
"/biblios/{biblio_id}/items":
137
  get:
138
    x-mojo-to: Biblios#get_items
139
    operationId: getBiblioItems
140
    tags:
141
      - biblios
142
    summary: Get items for a biblio
143
    parameters:
144
      - $ref: ../parameters.yaml#/biblio_id_pp
145
      - $ref: ../parameters.yaml#/match
146
      - $ref: ../parameters.yaml#/order_by
147
      - $ref: ../parameters.yaml#/page
148
      - $ref: ../parameters.yaml#/per_page
149
      - $ref: ../parameters.yaml#/q_param
150
      - $ref: ../parameters.yaml#/q_body
151
      - $ref: ../parameters.yaml#/q_header
152
    consumes:
153
      - application/json
154
    produces:
155
      - application/json
156
    responses:
157
      "200":
158
        description: A list of the items attached to the record
159
        schema:
160
          type: array
161
          items:
162
            $ref: ../definitions.yaml#/item
163
      "401":
164
        description: Authentication required
165
        schema:
166
          $ref: ../definitions.yaml#/error
167
      "403":
168
        description: Access forbidden
169
        schema:
170
          $ref: ../definitions.yaml#/error
171
      "404":
172
        description: Biblio not found
173
        schema:
174
          $ref: ../definitions.yaml#/error
175
      "406":
176
        description: Not acceptable
177
        schema:
178
          type: array
179
          description: Accepted content-types
180
          items:
181
            type: string
182
      "500":
183
        description: Internal server error
184
        schema:
185
          $ref: ../definitions.yaml#/error
186
      "503":
187
        description: Under maintenance
188
        schema:
189
          $ref: ../definitions.yaml#/error
190
    x-koha-authorization:
191
      permissions:
192
        catalogue: "1"
193
"/biblios/{biblio_id}/pickup_locations":
194
  get:
195
    x-mojo-to: Biblios#pickup_locations
196
    operationId: getBiblioPickupLocations
197
    tags:
198
      - biblios
199
    summary: Get valid pickup locations for a biblio
200
    parameters:
201
      - $ref: ../parameters.yaml#/biblio_id_pp
202
      - name: patron_id
203
        in: query
204
        description: Internal patron identifier
205
        required: true
206
        type: integer
207
      - $ref: ../parameters.yaml#/match
208
      - $ref: ../parameters.yaml#/order_by
209
      - $ref: ../parameters.yaml#/page
210
      - $ref: ../parameters.yaml#/per_page
211
      - $ref: ../parameters.yaml#/q_param
212
      - $ref: ../parameters.yaml#/q_body
213
      - $ref: ../parameters.yaml#/q_header
214
    consumes:
215
      - application/json
216
    produces:
217
      - application/json
218
    responses:
219
      "200":
220
        description: Biblio pickup locations
221
        schema:
222
          type: array
223
          items:
224
            $ref: ../definitions.yaml#/library
225
      "400":
226
        description: Missing or wrong parameters
227
        schema:
228
          $ref: ../definitions.yaml#/error
229
      "401":
230
        description: Authentication required
231
        schema:
232
          $ref: ../definitions.yaml#/error
233
      "403":
234
        description: Access forbidden
235
        schema:
236
          $ref: ../definitions.yaml#/error
237
      "404":
238
        description: Biblio not found
239
        schema:
240
          $ref: ../definitions.yaml#/error
241
      "500":
242
        description: Internal server error
243
        schema:
244
          $ref: ../definitions.yaml#/error
245
      "503":
246
        description: Under maintenance
247
        schema:
248
          $ref: ../definitions.yaml#/error
249
    x-koha-authorization:
250
      permissions:
251
        reserveforothers: place_holds
252
"/public/biblios/{biblio_id}":
253
  get:
254
    x-mojo-to: Biblios#get_public
255
    operationId: getBiblioPublic
256
    tags:
257
      - biblios
258
    summary: Get biblio (public)
259
    parameters:
260
      - $ref: ../parameters.yaml#/biblio_id_pp
261
    produces:
262
      - application/marcxml+xml
263
      - application/marc-in-json
264
      - application/marc
265
      - text/plain
266
    responses:
267
      "200":
268
        description: A biblio
269
      "401":
270
        description: Authentication required
271
        schema:
272
          $ref: ../definitions.yaml#/error
273
      "403":
274
        description: Access forbidden
275
        schema:
276
          $ref: ../definitions.yaml#/error
277
      "404":
278
        description: Biblio not found
279
        schema:
280
          $ref: ../definitions.yaml#/error
281
      "406":
282
        description: Not acceptable
283
        schema:
284
          type: array
285
          description: Accepted content-types
286
          items:
287
            type: string
288
      "500":
289
        description: Internal server error
290
        schema:
291
          $ref: ../definitions.yaml#/error
292
      "503":
293
        description: Under maintenance
294
        schema:
295
          $ref: ../definitions.yaml#/error
296
"/public/biblios/{biblio_id}/items":
297
  get:
298
    x-mojo-to: Biblios#get_items_public
299
    operationId: getBiblioItemsPublic
300
    tags:
301
      - biblios
302
      - items
303
    parameters:
304
      - $ref: ../parameters.yaml#/biblio_id_pp
305
      - $ref: ../parameters.yaml#/match
306
      - $ref: ../parameters.yaml#/order_by
307
      - $ref: ../parameters.yaml#/page
308
      - $ref: ../parameters.yaml#/per_page
309
      - $ref: ../parameters.yaml#/q_param
310
      - $ref: ../parameters.yaml#/q_body
311
      - $ref: ../parameters.yaml#/q_header
312
    consumes:
313
      - application/json
314
    produces:
315
      - application/json
316
    responses:
317
      "200":
318
        description: A list of the items attached to the record
319
        schema:
320
          type: array
321
          items:
322
            $ref: ../definitions.yaml#/item
323
      "401":
324
        description: Authentication required
325
        schema:
326
          $ref: ../definitions.yaml#/error
327
      "403":
328
        description: Access forbidden
329
        schema:
330
          $ref: ../definitions.yaml#/error
331
      "404":
332
        description: Biblio not found
333
        schema:
334
          $ref: ../definitions.yaml#/error
335
      "406":
336
        description: Not acceptable
337
        schema:
338
          type: array
339
          description: Accepted content-types
340
          items:
341
            type: string
342
      "500":
343
        description: Internal server error
344
        schema:
345
          $ref: ../definitions.yaml#/error
346
      "503":
347
        description: Under maintenance
348
        schema:
349
          $ref: ../definitions.yaml#/error
(-)a/api/v1/swagger/paths/cash_registers.json (-109 lines)
Lines 1-109 Link Here
1
{
2
    "/cash_registers/{cash_register_id}/cashups": {
3
        "get": {
4
            "x-mojo-to": "CashRegisters::Cashups#list",
5
            "operationId": "listCashups",
6
            "tags": ["cashups"],
7
            "summary": "List cashups for the cash register",
8
            "produces": ["application/json"],
9
            "parameters": [{
10
                    "$ref": "../parameters.json#/cash_register_id_pp"
11
                },
12
                {
13
                    "$ref": "../parameters.json#/match"
14
                },
15
                {
16
                    "$ref": "../parameters.json#/order_by"
17
                },
18
                {
19
                    "$ref": "../parameters.json#/page"
20
                },
21
                {
22
                    "$ref": "../parameters.json#/per_page"
23
                },
24
                {
25
                    "$ref": "../parameters.json#/q_param"
26
                },
27
                {
28
                    "$ref": "../parameters.json#/q_body"
29
                },
30
                {
31
                    "$ref": "../parameters.json#/q_header"
32
                }
33
            ],
34
            "responses": {
35
                "200": {
36
                    "description": "Cashups performed on this register",
37
                    "schema": {
38
                        "type": "array",
39
                        "items": {
40
                            "$ref": "../definitions.json#/cashup"
41
                        }
42
                    }
43
                },
44
                "403": {
45
                    "description": "Access forbidden",
46
                    "schema": {
47
                        "$ref": "../definitions.json#/error"
48
                    }
49
                },
50
                "404": {
51
                    "description": "Register not found",
52
                    "schema": {
53
                        "$ref": "../definitions.json#/error"
54
                    }
55
                }
56
            },
57
            "x-koha-authorization": {
58
                "permissions": {
59
                    "cash_management": "cashup"
60
                }
61
            },
62
            "x-koha-embed": [
63
                "manager"
64
            ]
65
        }
66
    },
67
    "/cashups/{cashup_id}": {
68
        "get": {
69
            "x-mojo-to": "CashRegisters::Cashups#get",
70
            "operationId": "getCashup",
71
            "tags": ["cashups"],
72
            "summary": "Get cashup",
73
            "parameters": [{
74
                "$ref": "../parameters.json#/cashup_id_pp"
75
            }],
76
            "produces": [
77
                "application/json"
78
            ],
79
            "responses": {
80
                "200": {
81
                    "description": "A cashup",
82
                    "schema": {
83
                        "$ref": "../definitions.json#/cashup"
84
                    }
85
                },
86
                "403": {
87
                    "description": "Access forbidden",
88
                    "schema": {
89
                        "$ref": "../definitions.json#/error"
90
                    }
91
                },
92
                "404": {
93
                    "description": "Patron not found",
94
                    "schema": {
95
                        "$ref": "../definitions.json#/error"
96
                    }
97
                }
98
            },
99
            "x-koha-authorization": {
100
                "permissions": {
101
                    "cash_management": "cashup"
102
                }
103
            },
104
            "x-koha-embed": [
105
                "summary"
106
            ]
107
        }
108
    }
109
}
(-)a/api/v1/swagger/paths/cash_registers.yaml (+68 lines)
Line 0 Link Here
1
---
2
"/cash_registers/{cash_register_id}/cashups":
3
  get:
4
    x-mojo-to: CashRegisters::Cashups#list
5
    operationId: listCashups
6
    tags:
7
      - cashups
8
    summary: List cashups for the cash register
9
    produces:
10
      - application/json
11
    parameters:
12
      - $ref: ../parameters.yaml#/cash_register_id_pp
13
      - $ref: ../parameters.yaml#/match
14
      - $ref: ../parameters.yaml#/order_by
15
      - $ref: ../parameters.yaml#/page
16
      - $ref: ../parameters.yaml#/per_page
17
      - $ref: ../parameters.yaml#/q_param
18
      - $ref: ../parameters.yaml#/q_body
19
      - $ref: ../parameters.yaml#/q_header
20
    responses:
21
      "200":
22
        description: Cashups performed on this register
23
        schema:
24
          type: array
25
          items:
26
            $ref: ../definitions.yaml#/cashup
27
      "403":
28
        description: Access forbidden
29
        schema:
30
          $ref: ../definitions.yaml#/error
31
      "404":
32
        description: Register not found
33
        schema:
34
          $ref: ../definitions.yaml#/error
35
    x-koha-authorization:
36
      permissions:
37
        cash_management: cashup
38
    x-koha-embed:
39
      - manager
40
"/cashups/{cashup_id}":
41
  get:
42
    x-mojo-to: CashRegisters::Cashups#get
43
    operationId: getCashup
44
    tags:
45
      - cashups
46
    summary: Get cashup
47
    parameters:
48
      - $ref: ../parameters.yaml#/cashup_id_pp
49
    produces:
50
      - application/json
51
    responses:
52
      "200":
53
        description: A cashup
54
        schema:
55
          $ref: ../definitions.yaml#/cashup
56
      "403":
57
        description: Access forbidden
58
        schema:
59
          $ref: ../definitions.yaml#/error
60
      "404":
61
        description: Patron not found
62
        schema:
63
          $ref: ../definitions.yaml#/error
64
    x-koha-authorization:
65
      permissions:
66
        cash_management: cashup
67
    x-koha-embed:
68
      - summary
(-)a/api/v1/swagger/paths/checkouts.json (-156 lines)
Lines 1-156 Link Here
1
{
2
  "/checkouts": {
3
    "get": {
4
      "x-mojo-to": "Checkouts#list",
5
      "operationId": "listCheckouts",
6
      "tags": ["checkouts"],
7
      "summary": "List checkouts",
8
      "parameters": [{
9
        "$ref": "../parameters.json#/patron_id_qp"
10
      }, {
11
        "$ref": "../parameters.json#/page"
12
      }, {
13
        "$ref": "../parameters.json#/per_page"
14
      }, {
15
        "$ref": "../parameters.json#/match"
16
      }, {
17
        "$ref": "../parameters.json#/order_by"
18
      }, {
19
        "$ref": "../parameters.json#/q_param"
20
      }, {
21
        "$ref": "../parameters.json#/q_body"
22
      }, {
23
        "$ref": "../parameters.json#/q_header"
24
      }, {
25
        "name": "checked_in",
26
        "in": "query",
27
        "description": "By default, current checkouts are returned, when this is true then checked in checkouts are returned as result.",
28
        "type": "boolean"
29
      }],
30
      "produces": [
31
        "application/json"
32
      ],
33
      "responses": {
34
        "200": {
35
          "description": "A list of checkouts",
36
          "schema": {
37
            "$ref": "../definitions.json#/checkouts"
38
          }
39
        },
40
        "403": {
41
          "description": "Access forbidden",
42
          "schema": { "$ref": "../definitions.json#/error" }
43
        },
44
        "404": {
45
          "description": "Patron not found",
46
          "schema": { "$ref": "../definitions.json#/error" }
47
        }
48
      },
49
      "x-koha-authorization": {
50
        "permissions": {
51
          "circulate": "circulate_remaining_permissions"
52
        }
53
      },
54
      "x-koha-embed": [
55
        "issuer"
56
      ]
57
    }
58
  },
59
  "/checkouts/{checkout_id}": {
60
    "get": {
61
      "x-mojo-to": "Checkouts#get",
62
      "operationId": "getCheckout",
63
      "tags": ["checkouts"],
64
      "summary": "Get checkout",
65
      "parameters": [{
66
        "$ref": "../parameters.json#/checkout_id_pp"
67
      }],
68
      "produces": ["application/json"],
69
      "responses": {
70
        "200": {
71
          "description": "Updated borrower's checkout",
72
          "schema": { "$ref": "../definitions.json#/checkout" }
73
        },
74
        "403": {
75
          "description": "Access forbidden",
76
          "schema": { "$ref": "../definitions.json#/error" }
77
        },
78
        "404": {
79
          "description": "Checkout not found",
80
          "schema": { "$ref": "../definitions.json#/error" }
81
        }
82
      },
83
      "x-koha-authorization": {
84
        "permissions": {
85
          "circulate": "circulate_remaining_permissions"
86
        }
87
      },
88
      "x-koha-embed": [
89
        "issuer"
90
      ]
91
    }
92
  },
93
  "/checkouts/{checkout_id}/renewal": {
94
    "post": {
95
      "x-mojo-to": "Checkouts#renew",
96
      "operationId": "renewCheckout",
97
      "tags": ["checkouts"],
98
      "summary": "Renew a checkout",
99
      "parameters": [
100
        { "$ref": "../parameters.json#/checkout_id_pp" },
101
        { "$ref": "../parameters.json#/seen_pp" }
102
      ],
103
      "produces": ["application/json"],
104
      "responses": {
105
        "201": {
106
          "description": "Updated borrower's checkout",
107
          "schema": { "$ref": "../definitions.json#/checkout" }
108
        },
109
        "403": {
110
          "description": "Cannot renew checkout",
111
          "schema": { "$ref": "../definitions.json#/error" }
112
        },
113
        "404": {
114
          "description": "Checkout not found",
115
          "schema": { "$ref": "../definitions.json#/error" }
116
        }
117
      },
118
      "x-koha-authorization": {
119
        "permissions": {
120
          "circulate": "circulate_remaining_permissions"
121
        }
122
      }
123
    }
124
  },
125
  "/checkouts/{checkout_id}/allows_renewal": {
126
    "get": {
127
      "x-mojo-to": "Checkouts#allows_renewal",
128
      "operationId": "allows_renewalCheckout",
129
      "tags": ["checkouts"],
130
      "summary": "Get renewability for a checkout",
131
      "parameters": [{
132
        "$ref": "../parameters.json#/checkout_id_pp"
133
      }],
134
      "produces": ["application/json"],
135
      "responses": {
136
        "200": {
137
          "description": "Checkout renewability information",
138
          "schema": { "$ref": "../definitions.json#/allows_renewal" }
139
        },
140
        "403": {
141
          "description": "Forbidden",
142
          "schema": { "$ref": "../definitions.json#/error" }
143
        },
144
        "404": {
145
          "description": "Checkout not found",
146
          "schema": { "$ref": "../definitions.json#/error" }
147
        }
148
      },
149
      "x-koha-authorization": {
150
        "permissions": {
151
          "circulate": "circulate_remaining_permissions"
152
        }
153
      }
154
    }
155
  }
156
}
(-)a/api/v1/swagger/paths/checkouts.yaml (+126 lines)
Line 0 Link Here
1
---
2
/checkouts:
3
  get:
4
    x-mojo-to: Checkouts#list
5
    operationId: listCheckouts
6
    tags:
7
      - checkouts
8
    summary: List checkouts
9
    parameters:
10
      - $ref: ../parameters.yaml#/patron_id_qp
11
      - $ref: ../parameters.yaml#/page
12
      - $ref: ../parameters.yaml#/per_page
13
      - $ref: ../parameters.yaml#/match
14
      - $ref: ../parameters.yaml#/order_by
15
      - $ref: ../parameters.yaml#/q_param
16
      - $ref: ../parameters.yaml#/q_body
17
      - $ref: ../parameters.yaml#/q_header
18
      - name: checked_in
19
        in: query
20
        description: By default, current checkouts are returned, when this is true then
21
          checked in checkouts are returned as result.
22
        type: boolean
23
    produces:
24
      - application/json
25
    responses:
26
      "200":
27
        description: A list of checkouts
28
        schema:
29
          $ref: ../definitions.yaml#/checkouts
30
      "403":
31
        description: Access forbidden
32
        schema:
33
          $ref: ../definitions.yaml#/error
34
      "404":
35
        description: Patron not found
36
        schema:
37
          $ref: ../definitions.yaml#/error
38
    x-koha-authorization:
39
      permissions:
40
        circulate: circulate_remaining_permissions
41
    x-koha-embed:
42
      - issuer
43
"/checkouts/{checkout_id}":
44
  get:
45
    x-mojo-to: Checkouts#get
46
    operationId: getCheckout
47
    tags:
48
      - checkouts
49
    summary: Get checkout
50
    parameters:
51
      - $ref: ../parameters.yaml#/checkout_id_pp
52
    produces:
53
      - application/json
54
    responses:
55
      "200":
56
        description: Updated borrower's checkout
57
        schema:
58
          $ref: ../definitions.yaml#/checkout
59
      "403":
60
        description: Access forbidden
61
        schema:
62
          $ref: ../definitions.yaml#/error
63
      "404":
64
        description: Checkout not found
65
        schema:
66
          $ref: ../definitions.yaml#/error
67
    x-koha-authorization:
68
      permissions:
69
        circulate: circulate_remaining_permissions
70
    x-koha-embed:
71
      - issuer
72
"/checkouts/{checkout_id}/renewal":
73
  post:
74
    x-mojo-to: Checkouts#renew
75
    operationId: renewCheckout
76
    tags:
77
      - checkouts
78
    summary: Renew a checkout
79
    parameters:
80
      - $ref: ../parameters.yaml#/checkout_id_pp
81
      - $ref: ../parameters.yaml#/seen_pp
82
    produces:
83
      - application/json
84
    responses:
85
      "201":
86
        description: Updated borrower's checkout
87
        schema:
88
          $ref: ../definitions.yaml#/checkout
89
      "403":
90
        description: Cannot renew checkout
91
        schema:
92
          $ref: ../definitions.yaml#/error
93
      "404":
94
        description: Checkout not found
95
        schema:
96
          $ref: ../definitions.yaml#/error
97
    x-koha-authorization:
98
      permissions:
99
        circulate: circulate_remaining_permissions
100
"/checkouts/{checkout_id}/allows_renewal":
101
  get:
102
    x-mojo-to: Checkouts#allows_renewal
103
    operationId: allows_renewalCheckout
104
    tags:
105
      - checkouts
106
    summary: Get renewability for a checkout
107
    parameters:
108
      - $ref: ../parameters.yaml#/checkout_id_pp
109
    produces:
110
      - application/json
111
    responses:
112
      "200":
113
        description: Checkout renewability information
114
        schema:
115
          $ref: ../definitions.yaml#/allows_renewal
116
      "403":
117
        description: Forbidden
118
        schema:
119
          $ref: ../definitions.yaml#/error
120
      "404":
121
        description: Checkout not found
122
        schema:
123
          $ref: ../definitions.yaml#/error
124
    x-koha-authorization:
125
      permissions:
126
        circulate: circulate_remaining_permissions
(-)a/api/v1/swagger/paths/circulation-rules.json (-36 lines)
Lines 1-36 Link Here
1
{
2
  "/circulation-rules/kinds": {
3
    "get": {
4
      "x-mojo-to": "CirculationRules#get_kinds",
5
      "operationId": "getCirculationRuleKinds",
6
      "tags": ["circulation_rules"],
7
      "summary": "Get circulation rules kinds",
8
      "produces": [
9
        "application/json"
10
      ],
11
      "responses": {
12
        "200": {
13
          "description": "A map of rule kind information",
14
          "schema": {
15
            "type": "object",
16
            "additionalProperties": {
17
              "$ref": "../definitions.json#/circ-rule-kind"
18
            }
19
          }
20
        },
21
        "403": {
22
          "description": "Access forbidden",
23
          "schema": {
24
            "$ref": "../definitions.json#/error"
25
          }
26
        },
27
        "500": {
28
          "description": "Internal error",
29
          "schema": {
30
            "$ref": "../definitions.json#/error"
31
          }
32
        }
33
      }
34
    }
35
  }
36
}
(-)a/api/v1/swagger/paths/circulation-rules.yaml (+25 lines)
Line 0 Link Here
1
---
2
/circulation-rules/kinds:
3
  get:
4
    x-mojo-to: CirculationRules#get_kinds
5
    operationId: getCirculationRuleKinds
6
    tags:
7
      - circulation_rules
8
    summary: Get circulation rules kinds
9
    produces:
10
      - application/json
11
    responses:
12
      "200":
13
        description: A map of rule kind information
14
        schema:
15
          type: object
16
          additionalProperties:
17
            $ref: ../definitions.yaml#/circ-rule-kind
18
      "403":
19
        description: Access forbidden
20
        schema:
21
          $ref: ../definitions.yaml#/error
22
      "500":
23
        description: Internal error
24
        schema:
25
          $ref: ../definitions.yaml#/error
(-)a/api/v1/swagger/paths/cities.yaml (-36 / +36 lines)
Lines 29-60 Link Here
29
        description: Case Insensative search on city postal code
29
        description: Case Insensative search on city postal code
30
        required: false
30
        required: false
31
        type: string
31
        type: string
32
      - $ref: ../parameters.json#/match
32
      - $ref: ../parameters.yaml#/match
33
      - $ref: ../parameters.json#/order_by
33
      - $ref: ../parameters.yaml#/order_by
34
      - $ref: ../parameters.json#/page
34
      - $ref: ../parameters.yaml#/page
35
      - $ref: ../parameters.json#/per_page
35
      - $ref: ../parameters.yaml#/per_page
36
      - $ref: ../parameters.json#/q_param
36
      - $ref: ../parameters.yaml#/q_param
37
      - $ref: ../parameters.json#/q_body
37
      - $ref: ../parameters.yaml#/q_body
38
      - $ref: ../parameters.json#/q_header
38
      - $ref: ../parameters.yaml#/q_header
39
    responses:
39
    responses:
40
      "200":
40
      "200":
41
        description: A list of cities
41
        description: A list of cities
42
        schema:
42
        schema:
43
          type: array
43
          type: array
44
          items:
44
          items:
45
            $ref: ../definitions.json#/city
45
            $ref: ../definitions.yaml#/city
46
      "403":
46
      "403":
47
        description: Access forbidden
47
        description: Access forbidden
48
        schema:
48
        schema:
49
          $ref: ../definitions.json#/error
49
          $ref: ../definitions.yaml#/error
50
      "500":
50
      "500":
51
        description: Internal error
51
        description: Internal error
52
        schema:
52
        schema:
53
          $ref: ../definitions.json#/error
53
          $ref: ../definitions.yaml#/error
54
      "503":
54
      "503":
55
        description: Under maintenance
55
        description: Under maintenance
56
        schema:
56
        schema:
57
          $ref: ../definitions.json#/error
57
          $ref: ../definitions.yaml#/error
58
    x-koha-authorization:
58
    x-koha-authorization:
59
      permissions:
59
      permissions:
60
        catalogue: "1"
60
        catalogue: "1"
Lines 70-99 Link Here
70
        description: A JSON object containing informations about the new hold
70
        description: A JSON object containing informations about the new hold
71
        required: true
71
        required: true
72
        schema:
72
        schema:
73
          $ref: ../definitions.json#/city
73
          $ref: ../definitions.yaml#/city
74
    produces:
74
    produces:
75
      - application/json
75
      - application/json
76
    responses:
76
    responses:
77
      "201":
77
      "201":
78
        description: City added
78
        description: City added
79
        schema:
79
        schema:
80
          $ref: ../definitions.json#/city
80
          $ref: ../definitions.yaml#/city
81
      "401":
81
      "401":
82
        description: Authentication required
82
        description: Authentication required
83
        schema:
83
        schema:
84
          $ref: ../definitions.json#/error
84
          $ref: ../definitions.yaml#/error
85
      "403":
85
      "403":
86
        description: Access forbidden
86
        description: Access forbidden
87
        schema:
87
        schema:
88
          $ref: ../definitions.json#/error
88
          $ref: ../definitions.yaml#/error
89
      "500":
89
      "500":
90
        description: Internal error
90
        description: Internal error
91
        schema:
91
        schema:
92
          $ref: ../definitions.json#/error
92
          $ref: ../definitions.yaml#/error
93
      "503":
93
      "503":
94
        description: Under maintenance
94
        description: Under maintenance
95
        schema:
95
        schema:
96
          $ref: ../definitions.json#/error
96
          $ref: ../definitions.yaml#/error
97
    x-koha-authorization:
97
    x-koha-authorization:
98
      permissions:
98
      permissions:
99
        parameters: manage_cities
99
        parameters: manage_cities
Lines 105-130 Link Here
105
      - cities
105
      - cities
106
    summary: Get city
106
    summary: Get city
107
    parameters:
107
    parameters:
108
      - $ref: ../parameters.json#/city_id_pp
108
      - $ref: ../parameters.yaml#/city_id_pp
109
    produces:
109
    produces:
110
      - application/json
110
      - application/json
111
    responses:
111
    responses:
112
      "200":
112
      "200":
113
        description: A city
113
        description: A city
114
        schema:
114
        schema:
115
          $ref: ../definitions.json#/city
115
          $ref: ../definitions.yaml#/city
116
      "404":
116
      "404":
117
        description: City not found
117
        description: City not found
118
        schema:
118
        schema:
119
          $ref: ../definitions.json#/error
119
          $ref: ../definitions.yaml#/error
120
      "500":
120
      "500":
121
        description: Internal error
121
        description: Internal error
122
        schema:
122
        schema:
123
          $ref: ../definitions.json#/error
123
          $ref: ../definitions.yaml#/error
124
      "503":
124
      "503":
125
        description: Under maintenance
125
        description: Under maintenance
126
        schema:
126
        schema:
127
          $ref: ../definitions.json#/error
127
          $ref: ../definitions.yaml#/error
128
    x-koha-authorization:
128
    x-koha-authorization:
129
      permissions:
129
      permissions:
130
        catalogue: "1"
130
        catalogue: "1"
Lines 135-174 Link Here
135
      - cities
135
      - cities
136
    summary: Update city
136
    summary: Update city
137
    parameters:
137
    parameters:
138
      - $ref: ../parameters.json#/city_id_pp
138
      - $ref: ../parameters.yaml#/city_id_pp
139
      - name: body
139
      - name: body
140
        in: body
140
        in: body
141
        description: A city object
141
        description: A city object
142
        required: true
142
        required: true
143
        schema:
143
        schema:
144
          $ref: ../definitions.json#/city
144
          $ref: ../definitions.yaml#/city
145
    produces:
145
    produces:
146
      - application/json
146
      - application/json
147
    responses:
147
    responses:
148
      "200":
148
      "200":
149
        description: A city
149
        description: A city
150
        schema:
150
        schema:
151
          $ref: ../definitions.json#/city
151
          $ref: ../definitions.yaml#/city
152
      "401":
152
      "401":
153
        description: Authentication required
153
        description: Authentication required
154
        schema:
154
        schema:
155
          $ref: ../definitions.json#/error
155
          $ref: ../definitions.yaml#/error
156
      "403":
156
      "403":
157
        description: Access forbidden
157
        description: Access forbidden
158
        schema:
158
        schema:
159
          $ref: ../definitions.json#/error
159
          $ref: ../definitions.yaml#/error
160
      "404":
160
      "404":
161
        description: City not found
161
        description: City not found
162
        schema:
162
        schema:
163
          $ref: ../definitions.json#/error
163
          $ref: ../definitions.yaml#/error
164
      "500":
164
      "500":
165
        description: Internal error
165
        description: Internal error
166
        schema:
166
        schema:
167
          $ref: ../definitions.json#/error
167
          $ref: ../definitions.yaml#/error
168
      "503":
168
      "503":
169
        description: Under maintenance
169
        description: Under maintenance
170
        schema:
170
        schema:
171
          $ref: ../definitions.json#/error
171
          $ref: ../definitions.yaml#/error
172
    x-koha-authorization:
172
    x-koha-authorization:
173
      permissions:
173
      permissions:
174
        parameters: manage_cities
174
        parameters: manage_cities
Lines 179-185 Link Here
179
      - cities
179
      - cities
180
    summary: Delete city
180
    summary: Delete city
181
    parameters:
181
    parameters:
182
      - $ref: ../parameters.json#/city_id_pp
182
      - $ref: ../parameters.yaml#/city_id_pp
183
    produces:
183
    produces:
184
      - application/json
184
      - application/json
185
    responses:
185
    responses:
Lines 188-210 Link Here
188
      "401":
188
      "401":
189
        description: Authentication required
189
        description: Authentication required
190
        schema:
190
        schema:
191
          $ref: ../definitions.json#/error
191
          $ref: ../definitions.yaml#/error
192
      "403":
192
      "403":
193
        description: Access forbidden
193
        description: Access forbidden
194
        schema:
194
        schema:
195
          $ref: ../definitions.json#/error
195
          $ref: ../definitions.yaml#/error
196
      "404":
196
      "404":
197
        description: City not found
197
        description: City not found
198
        schema:
198
        schema:
199
          $ref: ../definitions.json#/error
199
          $ref: ../definitions.yaml#/error
200
      "500":
200
      "500":
201
        description: Internal error
201
        description: Internal error
202
        schema:
202
        schema:
203
          $ref: ../definitions.json#/error
203
          $ref: ../definitions.yaml#/error
204
      "503":
204
      "503":
205
        description: Under maintenance
205
        description: Under maintenance
206
        schema:
206
        schema:
207
          $ref: ../definitions.json#/error
207
          $ref: ../definitions.yaml#/error
208
    x-koha-authorization:
208
    x-koha-authorization:
209
      permissions:
209
      permissions:
210
        parameters: manage_cities
210
        parameters: manage_cities
(-)a/api/v1/swagger/paths/clubs.json (-137 lines)
Lines 1-137 Link Here
1
{
2
  "/clubs/{club_id}/holds": {
3
    "post": {
4
      "x-mojo-to": "Clubs::Holds#add",
5
      "operationId": "addClubHold",
6
      "tags": [
7
        "clubs"
8
      ],
9
      "summary": "Add a club hold",
10
      "parameters": [
11
        {
12
          "$ref": "../parameters.json#/club_id_pp"
13
        },
14
        {
15
          "name": "body",
16
          "in": "body",
17
          "description": "A JSON object containing informations about the new hold",
18
          "required": true,
19
          "schema": {
20
            "type": "object",
21
            "properties": {
22
              "biblio_id": {
23
                "description": "Internal biblio identifier",
24
                "type": [
25
                  "integer",
26
                  "null"
27
                ]
28
              },
29
              "item_id": {
30
                "description": "Internal item identifier",
31
                "type": [
32
                  "integer",
33
                  "null"
34
                ]
35
              },
36
              "pickup_library_id": {
37
                "description": "Internal library identifier for the pickup library",
38
                "type": "string"
39
              },
40
              "expiration_date": {
41
                "description": "Hold end date",
42
                "type": [
43
                  "string",
44
                  "null"
45
                ],
46
                "format": "date"
47
              },
48
              "notes": {
49
                "description": "Notes related to this hold",
50
                "type": [
51
                  "string",
52
                  "null"
53
                ]
54
              },
55
              "item_type": {
56
                "description": "Limit hold on one itemtype (ignored for item-level holds)",
57
                "type": [
58
                  "string",
59
                  "null"
60
                ]
61
              },
62
              "default_patron_home": {
63
                "description": "For each patron, set pickup location to patron's home library if possible",
64
                "type": "integer"
65
              }
66
            },
67
            "required": [
68
              "pickup_library_id"
69
            ],
70
            "additionalProperties": false
71
          }
72
        }
73
      ],
74
      "consumes": [
75
        "application/json"
76
      ],
77
      "produces": [
78
        "application/json"
79
      ],
80
      "responses": {
81
        "201": {
82
          "description": "Created club hold",
83
          "schema": {
84
            "$ref": "../definitions/club_hold.json"
85
          }
86
        },
87
        "400": {
88
          "description": "Missing or wrong parameters",
89
          "schema": {
90
            "$ref": "../definitions.json#/error"
91
          }
92
        },
93
        "401": {
94
          "description": "Authentication required",
95
          "schema": {
96
            "$ref": "../definitions.json#/error"
97
          }
98
        },
99
        "403": {
100
          "description": "Hold not allowed",
101
          "schema": {
102
            "$ref": "../definitions.json#/error"
103
          }
104
        },
105
        "404": {
106
          "description": "Club not found",
107
          "schema": {
108
            "$ref": "../definitions.json#/error"
109
          }
110
        },
111
        "409": {
112
          "description": "Hold not allowed",
113
          "schema": {
114
            "$ref": "../definitions.json#/error"
115
          }
116
        },
117
        "500": {
118
          "description": "Internal server error",
119
          "schema": {
120
            "$ref": "../definitions.json#/error"
121
          }
122
        },
123
        "503": {
124
          "description": "Under maintenance",
125
          "schema": {
126
            "$ref": "../definitions.json#/error"
127
          }
128
        }
129
      },
130
      "x-koha-authorization": {
131
        "permissions": {
132
          "reserveforothers": "1"
133
        }
134
      }
135
    }
136
  }
137
}
(-)a/api/v1/swagger/paths/clubs.yaml (+93 lines)
Line 0 Link Here
1
---
2
"/clubs/{club_id}/holds":
3
  post:
4
    x-mojo-to: Clubs::Holds#add
5
    operationId: addClubHold
6
    tags:
7
      - clubs
8
    summary: Add a club hold
9
    parameters:
10
      - $ref: ../parameters.yaml#/club_id_pp
11
      - name: body
12
        in: body
13
        description: A JSON object containing informations about the new hold
14
        required: true
15
        schema:
16
          type: object
17
          properties:
18
            biblio_id:
19
              description: Internal biblio identifier
20
              type:
21
                - integer
22
                - "null"
23
            item_id:
24
              description: Internal item identifier
25
              type:
26
                - integer
27
                - "null"
28
            pickup_library_id:
29
              description: Internal library identifier for the pickup library
30
              type: string
31
            expiration_date:
32
              description: Hold end date
33
              type:
34
                - string
35
                - "null"
36
              format: date
37
            notes:
38
              description: Notes related to this hold
39
              type:
40
                - string
41
                - "null"
42
            item_type:
43
              description: Limit hold on one itemtype (ignored for item-level holds)
44
              type:
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
            - pickup_library_id
53
          additionalProperties: false
54
    consumes:
55
      - application/json
56
    produces:
57
      - application/json
58
    responses:
59
      "201":
60
        description: Created club hold
61
        schema:
62
          $ref: ../definitions/club_hold.yaml
63
      "400":
64
        description: Missing or wrong parameters
65
        schema:
66
          $ref: ../definitions.yaml#/error
67
      "401":
68
        description: Authentication required
69
        schema:
70
          $ref: ../definitions.yaml#/error
71
      "403":
72
        description: Hold not allowed
73
        schema:
74
          $ref: ../definitions.yaml#/error
75
      "404":
76
        description: Club not found
77
        schema:
78
          $ref: ../definitions.yaml#/error
79
      "409":
80
        description: Hold not allowed
81
        schema:
82
          $ref: ../definitions.yaml#/error
83
      "500":
84
        description: Internal server error
85
        schema:
86
          $ref: ../definitions.yaml#/error
87
      "503":
88
        description: Under maintenance
89
        schema:
90
          $ref: ../definitions.yaml#/error
91
    x-koha-authorization:
92
      permissions:
93
        reserveforothers: "1"
(-)a/api/v1/swagger/paths/config_smtp_servers.json (-316 lines)
Lines 1-316 Link Here
1
{
2
  "/config/smtp_servers": {
3
    "get": {
4
      "x-mojo-to": "Config::SMTP::Servers#list",
5
      "operationId": "listSMTPServers",
6
      "tags": [
7
        "smtp_servers"
8
      ],
9
      "summary": "List SMTP servers",
10
      "produces": [
11
        "application/json"
12
      ],
13
      "parameters": [
14
        {
15
          "$ref": "../parameters.json#/match"
16
        },
17
        {
18
          "$ref": "../parameters.json#/order_by"
19
        },
20
        {
21
          "$ref": "../parameters.json#/page"
22
        },
23
        {
24
          "$ref": "../parameters.json#/per_page"
25
        },
26
        {
27
          "$ref": "../parameters.json#/q_param"
28
        },
29
        {
30
          "$ref": "../parameters.json#/q_body"
31
        },
32
        {
33
          "$ref": "../parameters.json#/q_header"
34
        }
35
      ],
36
      "responses": {
37
        "200": {
38
          "description": "A list of SMTP servers",
39
          "schema": {
40
            "type": "array",
41
            "items": {
42
              "$ref": "../definitions.json#/smtp_server"
43
            }
44
          }
45
        },
46
        "403": {
47
          "description": "Access forbidden",
48
          "schema": {
49
            "$ref": "../definitions.json#/error"
50
          }
51
        },
52
        "500": {
53
          "description": "Internal error",
54
          "schema": {
55
            "$ref": "../definitions.json#/error"
56
          }
57
        },
58
        "503": {
59
          "description": "Under maintenance",
60
          "schema": {
61
            "$ref": "../definitions.json#/error"
62
          }
63
        }
64
      },
65
      "x-koha-authorization": {
66
        "permissions": {
67
          "parameters": "manage_smtp_servers"
68
        }
69
      }
70
    },
71
    "post": {
72
      "x-mojo-to": "Config::SMTP::Servers#add",
73
      "operationId": "addSMTPServer",
74
      "tags": [
75
        "smtp_servers"
76
      ],
77
      "summary": "Add SMTP server",
78
      "parameters": [
79
        {
80
          "name": "body",
81
          "in": "body",
82
          "description": "A JSON object representing a new SMTP server configuration",
83
          "required": true,
84
          "schema": {
85
            "$ref": "../definitions.json#/smtp_server"
86
          }
87
        }
88
      ],
89
      "produces": [
90
        "application/json"
91
      ],
92
      "responses": {
93
        "201": {
94
          "description": "An SMTP server object",
95
          "schema": {
96
            "$ref": "../definitions.json#/smtp_server"
97
          }
98
        },
99
        "401": {
100
          "description": "Authentication required",
101
          "schema": {
102
            "$ref": "../definitions.json#/error"
103
          }
104
        },
105
        "403": {
106
          "description": "Access forbidden",
107
          "schema": {
108
            "$ref": "../definitions.json#/error"
109
          }
110
        },
111
        "409": {
112
          "description": "Conflict in creating resource",
113
          "schema": {
114
            "$ref": "../definitions.json#/error"
115
          }
116
        },
117
        "500": {
118
          "description": "Internal error",
119
          "schema": {
120
            "$ref": "../definitions.json#/error"
121
          }
122
        },
123
        "503": {
124
          "description": "Under maintenance",
125
          "schema": {
126
            "$ref": "../definitions.json#/error"
127
          }
128
        }
129
      },
130
      "x-koha-authorization": {
131
        "permissions": {
132
          "parameters": "manage_smtp_servers"
133
        }
134
      }
135
    }
136
  },
137
  "/config/smtp_servers/{smtp_server_id}": {
138
    "get": {
139
      "x-mojo-to": "Config::SMTP::Servers#get",
140
      "operationId": "getSMTPServer",
141
      "tags": [
142
        "smtp_servers"
143
      ],
144
      "summary": "Get SMTP server",
145
      "parameters": [
146
        {
147
          "$ref": "../parameters.json#/smtp_server_id_pp"
148
        }
149
      ],
150
      "produces": [
151
        "application/json"
152
      ],
153
      "responses": {
154
        "200": {
155
          "description": "An SMTP server object",
156
          "schema": {
157
            "$ref": "../definitions.json#/smtp_server"
158
          }
159
        },
160
        "404": {
161
          "description": "Object not found",
162
          "schema": {
163
            "$ref": "../definitions.json#/error"
164
          }
165
        },
166
        "409": {
167
          "description": "Conflict updating resource",
168
          "schema": {
169
            "$ref": "../definitions.json#/error"
170
          }
171
        },
172
        "500": {
173
          "description": "Internal error",
174
          "schema": {
175
            "$ref": "../definitions.json#/error"
176
          }
177
        },
178
        "503": {
179
          "description": "Under maintenance",
180
          "schema": {
181
            "$ref": "../definitions.json#/error"
182
          }
183
        }
184
      },
185
      "x-koha-authorization": {
186
        "permissions": {
187
          "parameters": "manage_smtp_servers"
188
        }
189
      }
190
    },
191
    "put": {
192
      "x-mojo-to": "Config::SMTP::Servers#update",
193
      "operationId": "updateSMTPServer",
194
      "tags": [
195
        "smtp_servers"
196
      ],
197
      "summary": "Update SMTP server",
198
      "parameters": [
199
        {
200
          "$ref": "../parameters.json#/smtp_server_id_pp"
201
        },
202
        {
203
          "name": "body",
204
          "in": "body",
205
          "description": "An SMTP server object",
206
          "required": true,
207
          "schema": {
208
            "$ref": "../definitions.json#/smtp_server"
209
          }
210
        }
211
      ],
212
      "produces": [
213
        "application/json"
214
      ],
215
      "responses": {
216
        "200": {
217
          "description": "An SMTP server object",
218
          "schema": {
219
            "$ref": "../definitions.json#/smtp_server"
220
          }
221
        },
222
        "401": {
223
          "description": "Authentication required",
224
          "schema": {
225
            "$ref": "../definitions.json#/error"
226
          }
227
        },
228
        "403": {
229
          "description": "Access forbidden",
230
          "schema": {
231
            "$ref": "../definitions.json#/error"
232
          }
233
        },
234
        "404": {
235
          "description": "Object not found",
236
          "schema": {
237
            "$ref": "../definitions.json#/error"
238
          }
239
        },
240
        "500": {
241
          "description": "Internal error",
242
          "schema": {
243
            "$ref": "../definitions.json#/error"
244
          }
245
        },
246
        "503": {
247
          "description": "Under maintenance",
248
          "schema": {
249
            "$ref": "../definitions.json#/error"
250
          }
251
        }
252
      },
253
      "x-koha-authorization": {
254
        "permissions": {
255
          "parameters": "manage_smtp_servers"
256
        }
257
      }
258
    },
259
    "delete": {
260
      "x-mojo-to": "Config::SMTP::Servers#delete",
261
      "operationId": "deleteSMTPServer",
262
      "tags": [
263
        "smtp_servers"
264
      ],
265
      "summary": "Delete SMTP server",
266
      "parameters": [
267
        {
268
          "$ref": "../parameters.json#/smtp_server_id_pp"
269
        }
270
      ],
271
      "produces": [
272
        "application/json"
273
      ],
274
      "responses": {
275
        "204": {
276
          "description": "SMTP server deleted"
277
        },
278
        "401": {
279
          "description": "Authentication required",
280
          "schema": {
281
            "$ref": "../definitions.json#/error"
282
          }
283
        },
284
        "403": {
285
          "description": "Access forbidden",
286
          "schema": {
287
            "$ref": "../definitions.json#/error"
288
          }
289
        },
290
        "404": {
291
          "description": "Object not found",
292
          "schema": {
293
            "$ref": "../definitions.json#/error"
294
          }
295
        },
296
        "500": {
297
          "description": "Internal error",
298
          "schema": {
299
            "$ref": "../definitions.json#/error"
300
          }
301
        },
302
        "503": {
303
          "description": "Under maintenance",
304
          "schema": {
305
            "$ref": "../definitions.json#/error"
306
          }
307
        }
308
      },
309
      "x-koha-authorization": {
310
        "permissions": {
311
          "parameters": "manage_smtp_servers"
312
        }
313
      }
314
    }
315
  }
316
}
(-)a/api/v1/swagger/paths/config_smtp_servers.yaml (+198 lines)
Line 0 Link Here
1
---
2
/config/smtp_servers:
3
  get:
4
    x-mojo-to: Config::SMTP::Servers#list
5
    operationId: listSMTPServers
6
    tags:
7
      - smtp_servers
8
    summary: List SMTP servers
9
    produces:
10
      - application/json
11
    parameters:
12
      - $ref: ../parameters.yaml#/match
13
      - $ref: ../parameters.yaml#/order_by
14
      - $ref: ../parameters.yaml#/page
15
      - $ref: ../parameters.yaml#/per_page
16
      - $ref: ../parameters.yaml#/q_param
17
      - $ref: ../parameters.yaml#/q_body
18
      - $ref: ../parameters.yaml#/q_header
19
    responses:
20
      "200":
21
        description: A list of SMTP servers
22
        schema:
23
          type: array
24
          items:
25
            $ref: ../definitions.yaml#/smtp_server
26
      "403":
27
        description: Access forbidden
28
        schema:
29
          $ref: ../definitions.yaml#/error
30
      "500":
31
        description: Internal error
32
        schema:
33
          $ref: ../definitions.yaml#/error
34
      "503":
35
        description: Under maintenance
36
        schema:
37
          $ref: ../definitions.yaml#/error
38
    x-koha-authorization:
39
      permissions:
40
        parameters: manage_smtp_servers
41
  post:
42
    x-mojo-to: Config::SMTP::Servers#add
43
    operationId: addSMTPServer
44
    tags:
45
      - smtp_servers
46
    summary: Add SMTP server
47
    parameters:
48
      - name: body
49
        in: body
50
        description: A JSON object representing a new SMTP server configuration
51
        required: true
52
        schema:
53
          $ref: ../definitions.yaml#/smtp_server
54
    produces:
55
      - application/json
56
    responses:
57
      "201":
58
        description: An SMTP server object
59
        schema:
60
          $ref: ../definitions.yaml#/smtp_server
61
      "401":
62
        description: Authentication required
63
        schema:
64
          $ref: ../definitions.yaml#/error
65
      "403":
66
        description: Access forbidden
67
        schema:
68
          $ref: ../definitions.yaml#/error
69
      "409":
70
        description: Conflict in creating resource
71
        schema:
72
          $ref: ../definitions.yaml#/error
73
      "500":
74
        description: Internal error
75
        schema:
76
          $ref: ../definitions.yaml#/error
77
      "503":
78
        description: Under maintenance
79
        schema:
80
          $ref: ../definitions.yaml#/error
81
    x-koha-authorization:
82
      permissions:
83
        parameters: manage_smtp_servers
84
"/config/smtp_servers/{smtp_server_id}":
85
  get:
86
    x-mojo-to: Config::SMTP::Servers#get
87
    operationId: getSMTPServer
88
    tags:
89
      - smtp_servers
90
    summary: Get SMTP server
91
    parameters:
92
      - $ref: ../parameters.yaml#/smtp_server_id_pp
93
    produces:
94
      - application/json
95
    responses:
96
      "200":
97
        description: An SMTP server object
98
        schema:
99
          $ref: ../definitions.yaml#/smtp_server
100
      "404":
101
        description: Object not found
102
        schema:
103
          $ref: ../definitions.yaml#/error
104
      "409":
105
        description: Conflict updating resource
106
        schema:
107
          $ref: ../definitions.yaml#/error
108
      "500":
109
        description: Internal error
110
        schema:
111
          $ref: ../definitions.yaml#/error
112
      "503":
113
        description: Under maintenance
114
        schema:
115
          $ref: ../definitions.yaml#/error
116
    x-koha-authorization:
117
      permissions:
118
        parameters: manage_smtp_servers
119
  put:
120
    x-mojo-to: Config::SMTP::Servers#update
121
    operationId: updateSMTPServer
122
    tags:
123
      - smtp_servers
124
    summary: Update SMTP server
125
    parameters:
126
      - $ref: ../parameters.yaml#/smtp_server_id_pp
127
      - name: body
128
        in: body
129
        description: An SMTP server object
130
        required: true
131
        schema:
132
          $ref: ../definitions.yaml#/smtp_server
133
    produces:
134
      - application/json
135
    responses:
136
      "200":
137
        description: An SMTP server object
138
        schema:
139
          $ref: ../definitions.yaml#/smtp_server
140
      "401":
141
        description: Authentication required
142
        schema:
143
          $ref: ../definitions.yaml#/error
144
      "403":
145
        description: Access forbidden
146
        schema:
147
          $ref: ../definitions.yaml#/error
148
      "404":
149
        description: Object not found
150
        schema:
151
          $ref: ../definitions.yaml#/error
152
      "500":
153
        description: Internal error
154
        schema:
155
          $ref: ../definitions.yaml#/error
156
      "503":
157
        description: Under maintenance
158
        schema:
159
          $ref: ../definitions.yaml#/error
160
    x-koha-authorization:
161
      permissions:
162
        parameters: manage_smtp_servers
163
  delete:
164
    x-mojo-to: Config::SMTP::Servers#delete
165
    operationId: deleteSMTPServer
166
    tags:
167
      - smtp_servers
168
    summary: Delete SMTP server
169
    parameters:
170
      - $ref: ../parameters.yaml#/smtp_server_id_pp
171
    produces:
172
      - application/json
173
    responses:
174
      "204":
175
        description: SMTP server deleted
176
      "401":
177
        description: Authentication required
178
        schema:
179
          $ref: ../definitions.yaml#/error
180
      "403":
181
        description: Access forbidden
182
        schema:
183
          $ref: ../definitions.yaml#/error
184
      "404":
185
        description: Object not found
186
        schema:
187
          $ref: ../definitions.yaml#/error
188
      "500":
189
        description: Internal error
190
        schema:
191
          $ref: ../definitions.yaml#/error
192
      "503":
193
        description: Under maintenance
194
        schema:
195
          $ref: ../definitions.yaml#/error
196
    x-koha-authorization:
197
      permissions:
198
        parameters: manage_smtp_servers
(-)a/api/v1/swagger/paths/holds.json (-924 lines)
Lines 1-924 Link Here
1
{
2
  "/holds": {
3
    "get": {
4
      "x-mojo-to": "Holds#list",
5
      "operationId": "listHolds",
6
      "tags": ["holds"],
7
      "summary": "List holds",
8
      "parameters": [
9
        {
10
          "name": "hold_id",
11
          "in": "query",
12
          "description": "Internal hold identifier",
13
          "type": "integer"
14
        },
15
        {
16
          "name": "patron_id",
17
          "in": "query",
18
          "description": "Internal patron identifier",
19
          "type": "integer"
20
        },
21
        {
22
          "name": "hold_date",
23
          "in": "query",
24
          "description": "Hold",
25
          "type": "string",
26
          "format": "date"
27
        },
28
        {
29
          "name": "biblio_id",
30
          "in": "query",
31
          "description": "Internal biblio identifier",
32
          "type": "integer"
33
        },
34
        {
35
          "name": "pickup_library_id",
36
          "in": "query",
37
          "description": "Internal library identifier for the pickup library",
38
          "type": "string"
39
        },
40
        {
41
          "name": "cancellation_date",
42
          "in": "query",
43
          "description": "The date the hold was cancelled",
44
          "type": "string",
45
          "format": "date"
46
        },
47
        {
48
          "name": "notes",
49
          "in": "query",
50
          "description": "Notes related to this hold",
51
          "type": "string"
52
        },
53
        {
54
          "name": "priority",
55
          "in": "query",
56
          "description": "Where in the queue the patron sits",
57
          "type": "integer"
58
        },
59
        {
60
          "name": "status",
61
          "in": "query",
62
          "description": "Found status",
63
          "type": "string"
64
        },
65
        {
66
          "name": "timestamp",
67
          "in": "query",
68
          "description": "Time of latest update",
69
          "type": "string"
70
        },
71
        {
72
          "name": "item_id",
73
          "in": "query",
74
          "description": "Internal item identifier",
75
          "type": "integer"
76
        },
77
        {
78
          "name": "waiting_date",
79
          "in": "query",
80
          "description": "Date the item was marked as waiting for the patron",
81
          "type": "string"
82
        },
83
        {
84
          "name": "expiration_date",
85
          "in": "query",
86
          "description": "Date the hold expires",
87
          "type": "string"
88
        },
89
        {
90
          "name": "lowest_priority",
91
          "in": "query",
92
          "description": "Lowest priority",
93
          "type": "boolean"
94
        },
95
        {
96
          "name": "suspended",
97
          "in": "query",
98
          "description": "Suspended",
99
          "type": "boolean"
100
        },
101
        {
102
          "name": "suspended_until",
103
          "in": "query",
104
          "description": "Suspended until",
105
          "type": "string"
106
        },
107
        {
108
          "name": "non_priority",
109
          "in": "query",
110
          "description": "Non priority hold",
111
          "type": "boolean"
112
        },
113
        {
114
            "$ref": "../parameters.json#/match"
115
        },
116
        {
117
            "$ref": "../parameters.json#/order_by"
118
        },
119
        {
120
            "$ref": "../parameters.json#/page"
121
        },
122
        {
123
            "$ref": "../parameters.json#/per_page"
124
        },
125
        {
126
          "$ref": "../parameters.json#/q_param"
127
        },
128
        {
129
          "$ref": "../parameters.json#/q_body"
130
        },
131
        {
132
          "$ref": "../parameters.json#/q_header"
133
        }
134
      ],
135
      "produces": ["application/json"],
136
      "responses": {
137
        "200": {
138
          "description": "A list of holds",
139
          "schema": {
140
            "$ref": "../definitions.json#/holds"
141
          }
142
        },
143
        "401": {
144
          "description": "Authentication required",
145
          "schema": {
146
            "$ref": "../definitions.json#/error"
147
          }
148
        },
149
        "403": {
150
          "description": "Hold not allowed",
151
          "schema": {
152
            "$ref": "../definitions.json#/error"
153
          }
154
        },
155
        "404": {
156
          "description": "Borrower not found",
157
          "schema": {
158
            "$ref": "../definitions.json#/error"
159
          }
160
        },
161
        "500": {
162
          "description": "Internal server error",
163
          "schema": {
164
            "$ref": "../definitions.json#/error"
165
          }
166
        },
167
        "503": {
168
          "description": "Under maintenance",
169
          "schema": {
170
            "$ref": "../definitions.json#/error"
171
          }
172
        }
173
      },
174
      "x-koha-authorization": {
175
        "permissions": {
176
          "borrowers": "edit_borrowers"
177
        }
178
      }
179
    },
180
    "post": {
181
      "x-mojo-to": "Holds#add",
182
      "operationId": "addHold",
183
      "tags": ["holds"],
184
      "summary": "Place hold",
185
      "parameters": [
186
        {
187
          "name": "body",
188
          "in": "body",
189
          "description": "A JSON object containing informations about the new hold",
190
          "required": true,
191
          "schema": {
192
            "type": "object",
193
            "properties": {
194
              "patron_id": {
195
                "description": "Internal patron identifier",
196
                "type": "integer"
197
              },
198
              "biblio_id": {
199
                "description": "Internal biblio identifier",
200
                "type": [ "integer", "null" ]
201
              },
202
              "hold_date": {
203
                "description": "The date the hold was placed",
204
                "type": [ "string", "null" ],
205
                "format": "date"
206
              },
207
              "item_id": {
208
                "description": "Internal item identifier",
209
                "type": [ "integer", "null" ]
210
              },
211
              "pickup_library_id": {
212
                "description": "Internal library identifier for the pickup library",
213
                "type": "string"
214
              },
215
              "expiration_date": {
216
                "description": "Hold end date",
217
                "type": ["string", "null"],
218
                "format": "date"
219
              },
220
              "notes": {
221
                "description": "Notes related to this hold",
222
                "type": [ "string", "null" ]
223
              },
224
              "item_type": {
225
                "description": "Limit hold on one itemtype (ignored for item-level holds)",
226
                "type": [ "string", "null" ]
227
              },
228
              "non_priority": {
229
                "description": "Set this hold as non priority",
230
                "type": [ "boolean", "null" ]
231
              }
232
            },
233
            "required": [ "patron_id", "pickup_library_id" ],
234
            "additionalProperties": false
235
          }
236
        },
237
        {
238
          "name": "x-koha-override",
239
          "description": "Comma-separated list of overrides (valid values: any)",
240
          "in": "header",
241
          "type": "string",
242
          "required": false
243
        }
244
      ],
245
      "consumes": ["application/json"],
246
      "produces": ["application/json"],
247
      "responses": {
248
        "201": {
249
          "description": "Created hold",
250
          "schema": {
251
            "$ref": "../definitions.json#/hold"
252
          }
253
        },
254
        "400": {
255
          "description": "Missing or wrong parameters",
256
          "schema": {
257
            "$ref": "../definitions.json#/error"
258
          }
259
        },
260
        "401": {
261
          "description": "Authentication required",
262
          "schema": {
263
            "$ref": "../definitions.json#/error"
264
          }
265
        },
266
        "403": {
267
          "description": "Hold not allowed",
268
          "schema": {
269
            "$ref": "../definitions.json#/error"
270
          }
271
        },
272
        "404": {
273
          "description": "Borrower not found",
274
          "schema": {
275
            "$ref": "../definitions.json#/error"
276
          }
277
        },
278
        "500": {
279
          "description": "Internal server error",
280
          "schema": {
281
            "$ref": "../definitions.json#/error"
282
          }
283
        },
284
        "503": {
285
          "description": "Under maintenance",
286
          "schema": {
287
            "$ref": "../definitions.json#/error"
288
          }
289
        }
290
      },
291
      "x-koha-authorization": {
292
        "permissions": {
293
          "reserveforothers": "1"
294
        }
295
      }
296
    }
297
  },
298
  "/holds/{hold_id}": {
299
    "patch": {
300
      "x-mojo-to": "Holds#edit",
301
      "operationId": "editHold",
302
      "tags": ["holds"],
303
      "summary": "Update hold",
304
      "parameters": [{
305
          "$ref": "../parameters.json#/hold_id_pp"
306
        }, {
307
          "name": "body",
308
          "in": "body",
309
          "description": "A JSON object containing fields to modify",
310
          "required": true,
311
          "schema": {
312
            "type": "object",
313
            "properties": {
314
              "priority": {
315
                "description": "Position in waiting queue",
316
                "type": "integer",
317
                "minimum": 1
318
              },
319
              "pickup_library_id": {
320
                "description": "Internal library identifier for the pickup library",
321
                "type": "string"
322
              },
323
              "suspended_until": {
324
                "description": "Date until which the hold has been suspended",
325
                "type": "string",
326
                "format": "date-time"
327
              }
328
            },
329
            "additionalProperties": false
330
          }
331
        }
332
      ],
333
      "consumes": ["application/json"],
334
      "produces": ["application/json"],
335
      "responses": {
336
        "200": {
337
          "description": "Updated hold",
338
          "schema": {
339
            "$ref": "../definitions.json#/hold"
340
          }
341
        },
342
        "400": {
343
          "description": "Missing or wrong parameters",
344
          "schema": {
345
            "$ref": "../definitions.json#/error"
346
          }
347
        },
348
        "401": {
349
          "description": "Authentication required",
350
          "schema": {
351
            "$ref": "../definitions.json#/error"
352
          }
353
        },
354
        "403": {
355
          "description": "Hold not allowed",
356
          "schema": {
357
            "$ref": "../definitions.json#/error"
358
          }
359
        },
360
        "404": {
361
          "description": "Hold not found",
362
          "schema": {
363
            "$ref": "../definitions.json#/error"
364
          }
365
        },
366
        "500": {
367
          "description": "Internal server error",
368
          "schema": {
369
            "$ref": "../definitions.json#/error"
370
          }
371
        },
372
        "503": {
373
          "description": "Under maintenance",
374
          "schema": {
375
            "$ref": "../definitions.json#/error"
376
          }
377
        }
378
      },
379
      "x-koha-authorization": {
380
        "permissions": {
381
          "reserveforothers": "1"
382
        }
383
      }
384
    },
385
    "put": {
386
      "x-mojo-to": "Holds#edit",
387
      "operationId": "overwriteHold",
388
      "tags": ["holds"],
389
      "summary": "Update hold",
390
      "description": "This route is being deprecated and will be removed in future releases. Please migrate your project to use PATCH /holds/{hold_id} instead.",
391
      "parameters": [{
392
          "$ref": "../parameters.json#/hold_id_pp"
393
        }, {
394
          "name": "body",
395
          "in": "body",
396
          "description": "A JSON object containing fields to modify",
397
          "required": true,
398
          "schema": {
399
            "type": "object",
400
            "properties": {
401
              "priority": {
402
                "description": "Position in waiting queue",
403
                "type": "integer",
404
                "minimum": 1
405
              },
406
              "pickup_library_id": {
407
                "description": "Internal library identifier for the pickup library",
408
                "type": "string"
409
              },
410
              "suspended_until": {
411
                "description": "Date until which the hold has been suspended",
412
                "type": "string",
413
                "format": "date-time"
414
              }
415
            },
416
            "additionalProperties": false
417
          }
418
        }
419
      ],
420
      "consumes": ["application/json"],
421
      "produces": ["application/json"],
422
      "responses": {
423
        "200": {
424
          "description": "Updated hold",
425
          "schema": {
426
            "$ref": "../definitions.json#/hold"
427
          }
428
        },
429
        "400": {
430
          "description": "Missing or wrong parameters",
431
          "schema": {
432
            "$ref": "../definitions.json#/error"
433
          }
434
        },
435
        "401": {
436
          "description": "Authentication required",
437
          "schema": {
438
            "$ref": "../definitions.json#/error"
439
          }
440
        },
441
        "403": {
442
          "description": "Hold not allowed",
443
          "schema": {
444
            "$ref": "../definitions.json#/error"
445
          }
446
        },
447
        "404": {
448
          "description": "Hold not found",
449
          "schema": {
450
            "$ref": "../definitions.json#/error"
451
          }
452
        },
453
        "500": {
454
          "description": "Internal server error",
455
          "schema": {
456
            "$ref": "../definitions.json#/error"
457
          }
458
        },
459
        "503": {
460
          "description": "Under maintenance",
461
          "schema": {
462
            "$ref": "../definitions.json#/error"
463
          }
464
        }
465
      },
466
      "x-koha-authorization": {
467
        "permissions": {
468
          "reserveforothers": "1"
469
        }
470
      }
471
    },
472
    "delete": {
473
      "x-mojo-to": "Holds#delete",
474
      "operationId": "deleteHold",
475
      "tags": ["holds"],
476
      "summary": "Cancel hold",
477
      "parameters": [{
478
          "$ref": "../parameters.json#/hold_id_pp"
479
        }
480
      ],
481
      "produces": ["application/json"],
482
      "responses": {
483
        "204": {
484
          "description": "Hold deleted"
485
        },
486
        "401": {
487
          "description": "Authentication required",
488
          "schema": {
489
            "$ref": "../definitions.json#/error"
490
          }
491
        },
492
        "403": {
493
          "description": "Hold not allowed",
494
          "schema": {
495
            "$ref": "../definitions.json#/error"
496
          }
497
        },
498
        "404": {
499
          "description": "Hold not found",
500
          "schema": {
501
            "$ref": "../definitions.json#/error"
502
          }
503
        },
504
        "500": {
505
          "description": "Internal server error",
506
          "schema": {
507
            "$ref": "../definitions.json#/error"
508
          }
509
        },
510
        "503": {
511
          "description": "Under maintenance",
512
          "schema": {
513
            "$ref": "../definitions.json#/error"
514
          }
515
        }
516
      },
517
      "x-koha-authorization": {
518
        "permissions": {
519
          "reserveforothers": "1"
520
        }
521
      }
522
    }
523
  },
524
  "/holds/{hold_id}/priority": {
525
    "put": {
526
      "x-mojo-to": "Holds#update_priority",
527
      "operationId": "updateHoldPriority",
528
      "tags": [
529
        "holds"
530
      ],
531
      "summary": "Update priority for the hold",
532
      "parameters": [
533
        {
534
          "$ref": "../parameters.json#/hold_id_pp"
535
        },
536
        {
537
          "name": "body",
538
          "in": "body",
539
          "description": "An integer representing the new priority to be set for the hold",
540
          "required": true,
541
          "schema": {
542
            "type": "integer"
543
          }
544
        }
545
      ],
546
      "produces": [
547
        "application/json"
548
      ],
549
      "responses": {
550
        "200": {
551
          "description": "The new priority value for the hold",
552
          "schema": {
553
            "type": "integer"
554
          }
555
        },
556
        "401": {
557
          "description": "Authentication required",
558
          "schema": {
559
            "$ref": "../definitions.json#/error"
560
          }
561
        },
562
        "403": {
563
          "description": "Access forbidden",
564
          "schema": {
565
            "$ref": "../definitions.json#/error"
566
          }
567
        },
568
        "404": {
569
          "description": "Biblio not found",
570
          "schema": {
571
            "$ref": "../definitions.json#/error"
572
          }
573
        },
574
        "409": {
575
          "description": "Unable to perform action on biblio",
576
          "schema": {
577
            "$ref": "../definitions.json#/error"
578
          }
579
        },
580
        "500": {
581
          "description": "Internal error",
582
          "schema": {
583
            "$ref": "../definitions.json#/error"
584
          }
585
        },
586
        "503": {
587
          "description": "Under maintenance",
588
          "schema": {
589
            "$ref": "../definitions.json#/error"
590
          }
591
        }
592
      },
593
      "x-koha-authorization": {
594
        "permissions": {
595
          "reserveforothers": "modify_holds_priority"
596
        }
597
      }
598
    }
599
  },
600
  "/holds/{hold_id}/suspension": {
601
    "post": {
602
      "x-mojo-to": "Holds#suspend",
603
      "operationId": "suspendHold",
604
      "tags": ["holds"],
605
      "summary": "Suspend the hold",
606
      "parameters": [{
607
          "$ref": "../parameters.json#/hold_id_pp"
608
        }, {
609
          "name": "body",
610
          "in": "body",
611
          "description": "A JSON object containing fields to modify",
612
          "required": false,
613
          "schema": {
614
            "type": "object",
615
            "properties": {
616
              "end_date": {
617
                "description": "Date the hold suspension expires",
618
                "type": "string",
619
                "format": "date"
620
              }
621
            },
622
            "additionalProperties": false
623
          }
624
        }
625
      ],
626
      "consumes": ["application/json"],
627
      "produces": ["application/json"],
628
      "responses": {
629
        "201": {
630
          "description": "Hold suspended"
631
        },
632
        "400": {
633
          "description": "Missing or wrong parameters",
634
          "schema": {
635
            "$ref": "../definitions.json#/error"
636
          }
637
        },
638
        "401": {
639
          "description": "Authentication required",
640
          "schema": {
641
            "$ref": "../definitions.json#/error"
642
          }
643
        },
644
        "403": {
645
          "description": "Hold not allowed",
646
          "schema": {
647
            "$ref": "../definitions.json#/error"
648
          }
649
        },
650
        "404": {
651
          "description": "Hold not found",
652
          "schema": {
653
            "$ref": "../definitions.json#/error"
654
          }
655
        },
656
        "500": {
657
          "description": "Internal server error",
658
          "schema": {
659
            "$ref": "../definitions.json#/error"
660
          }
661
        },
662
        "503": {
663
          "description": "Under maintenance",
664
          "schema": {
665
            "$ref": "../definitions.json#/error"
666
          }
667
        }
668
      },
669
      "x-koha-authorization": {
670
        "permissions": {
671
          "reserveforothers": "1"
672
        }
673
      }
674
    },
675
    "delete": {
676
      "x-mojo-to": "Holds#resume",
677
      "operationId": "resumeHold",
678
      "tags": ["holds"],
679
      "summary": "Resume hold",
680
      "parameters": [
681
        {
682
          "$ref": "../parameters.json#/hold_id_pp"
683
        }
684
      ],
685
      "consumes": ["application/json"],
686
      "produces": ["application/json"],
687
      "responses": {
688
        "204": {
689
          "description": "Hold resumed"
690
        },
691
        "400": {
692
          "description": "Missing or wrong parameters",
693
          "schema": {
694
            "$ref": "../definitions.json#/error"
695
          }
696
        },
697
        "401": {
698
          "description": "Authentication required",
699
          "schema": {
700
            "$ref": "../definitions.json#/error"
701
          }
702
        },
703
        "403": {
704
          "description": "Hold not allowed",
705
          "schema": {
706
            "$ref": "../definitions.json#/error"
707
          }
708
        },
709
        "404": {
710
          "description": "Hold not found",
711
          "schema": {
712
            "$ref": "../definitions.json#/error"
713
          }
714
        },
715
        "500": {
716
          "description": "Internal server error",
717
          "schema": {
718
            "$ref": "../definitions.json#/error"
719
          }
720
        },
721
        "503": {
722
          "description": "Under maintenance",
723
          "schema": {
724
            "$ref": "../definitions.json#/error"
725
          }
726
        }
727
      },
728
      "x-koha-authorization": {
729
        "permissions": {
730
          "reserveforothers": "1"
731
        }
732
      }
733
    }
734
  },
735
  "/holds/{hold_id}/pickup_locations": {
736
    "get": {
737
      "x-mojo-to": "Holds#pickup_locations",
738
      "operationId": "getHoldPickupLocations",
739
      "tags": ["holds"],
740
      "summary": "Get valid pickup locations for hold",
741
      "parameters": [
742
        {
743
          "name": "x-koha-override",
744
          "description": "Comma-separated list of overrides (valid values: any)",
745
          "in": "header",
746
          "type": "string",
747
          "required": false
748
        },
749
        {
750
          "$ref": "../parameters.json#/hold_id_pp"
751
        },
752
        {
753
          "$ref": "../parameters.json#/match"
754
        },
755
        {
756
          "$ref": "../parameters.json#/order_by"
757
        },
758
        {
759
          "$ref": "../parameters.json#/page"
760
        },
761
        {
762
          "$ref": "../parameters.json#/per_page"
763
        },
764
        {
765
          "$ref": "../parameters.json#/q_param"
766
        },
767
        {
768
          "$ref": "../parameters.json#/q_body"
769
        },
770
        {
771
          "$ref": "../parameters.json#/q_header"
772
        }
773
      ],
774
      "produces": ["application/json"],
775
      "responses": {
776
        "200": {
777
          "description": "Hold pickup location",
778
          "schema": {
779
            "type": "array",
780
            "items": {
781
              "$ref": "../definitions.json#/library"
782
            }
783
          }
784
        },
785
        "400": {
786
          "description": "Missing or wrong parameters",
787
          "schema": {
788
            "$ref": "../definitions.json#/error"
789
          }
790
        },
791
        "401": {
792
          "description": "Authentication required",
793
          "schema": {
794
            "$ref": "../definitions.json#/error"
795
          }
796
        },
797
        "403": {
798
          "description": "Hold pickup location list not allowed",
799
          "schema": {
800
            "$ref": "../definitions.json#/error"
801
          }
802
        },
803
        "404": {
804
          "description": "Hold not found",
805
          "schema": {
806
            "$ref": "../definitions.json#/error"
807
          }
808
        },
809
        "500": {
810
          "description": "Internal server error",
811
          "schema": {
812
            "$ref": "../definitions.json#/error"
813
          }
814
        },
815
        "503": {
816
          "description": "Under maintenance",
817
          "schema": {
818
            "$ref": "../definitions.json#/error"
819
          }
820
        }
821
      },
822
      "x-koha-authorization": {
823
        "permissions": {
824
          "reserveforothers": "place_holds"
825
        }
826
      }
827
    }
828
  },
829
  "/holds/{hold_id}/pickup_location": {
830
    "put": {
831
      "x-mojo-to": "Holds#update_pickup_location",
832
      "operationId": "updateHoldPickupLocation",
833
      "tags": ["holds"],
834
      "summary": "Update pickup location for the hold",
835
      "description": "Set a new pickup location for the hold",
836
      "parameters": [
837
        {
838
          "$ref": "../parameters.json#/hold_id_pp"
839
        },
840
        {
841
          "name": "body",
842
          "in": "body",
843
          "description": "Pickup location",
844
          "required": true,
845
          "schema": {
846
            "type": "object",
847
            "properties": {
848
              "pickup_library_id": {
849
                "type": "string",
850
                "description": "Internal identifier for the pickup library"
851
              }
852
            },
853
            "additionalProperties": false
854
          }
855
        }
856
      ],
857
      "produces": [
858
        "application/json"
859
      ],
860
      "responses": {
861
        "200": {
862
          "description": "The new pickup location value for the hold",
863
          "schema": {
864
            "type": "object",
865
            "properties": {
866
              "pickup_library_id": {
867
                "type": "string",
868
                "description": "Internal identifier for the pickup library"
869
              }
870
            },
871
            "additionalProperties": false
872
          }
873
        },
874
        "400": {
875
          "description": "Missing or wrong parameters",
876
          "schema": {
877
            "$ref": "../definitions.json#/error"
878
          }
879
        },
880
        "401": {
881
          "description": "Authentication required",
882
          "schema": {
883
            "$ref": "../definitions.json#/error"
884
          }
885
        },
886
        "403": {
887
          "description": "Access forbidden",
888
          "schema": {
889
            "$ref": "../definitions.json#/error"
890
          }
891
        },
892
        "404": {
893
          "description": "Hold not found",
894
          "schema": {
895
            "$ref": "../definitions.json#/error"
896
          }
897
        },
898
        "409": {
899
          "description": "Unable to perform action on hold",
900
          "schema": {
901
            "$ref": "../definitions.json#/error"
902
          }
903
        },
904
        "500": {
905
          "description": "Internal error",
906
          "schema": {
907
            "$ref": "../definitions.json#/error"
908
          }
909
        },
910
        "503": {
911
          "description": "Under maintenance",
912
          "schema": {
913
            "$ref": "../definitions.json#/error"
914
          }
915
        }
916
      },
917
      "x-koha-authorization": {
918
        "permissions": {
919
          "reserveforothers": "place_holds"
920
        }
921
      }
922
    }
923
  }
924
}
(-)a/api/v1/swagger/paths/holds.yaml (+650 lines)
Line 0 Link Here
1
---
2
/holds:
3
  get:
4
    x-mojo-to: Holds#list
5
    operationId: listHolds
6
    tags:
7
      - holds
8
    summary: List holds
9
    parameters:
10
      - name: hold_id
11
        in: query
12
        description: Internal hold identifier
13
        type: integer
14
      - name: patron_id
15
        in: query
16
        description: Internal patron identifier
17
        type: integer
18
      - name: hold_date
19
        in: query
20
        description: Hold
21
        type: string
22
        format: date
23
      - name: biblio_id
24
        in: query
25
        description: Internal biblio identifier
26
        type: integer
27
      - name: pickup_library_id
28
        in: query
29
        description: Internal library identifier for the pickup library
30
        type: string
31
      - name: cancellation_date
32
        in: query
33
        description: The date the hold was cancelled
34
        type: string
35
        format: date
36
      - name: notes
37
        in: query
38
        description: Notes related to this hold
39
        type: string
40
      - name: priority
41
        in: query
42
        description: Where in the queue the patron sits
43
        type: integer
44
      - name: status
45
        in: query
46
        description: Found status
47
        type: string
48
      - name: timestamp
49
        in: query
50
        description: Time of latest update
51
        type: string
52
      - name: item_id
53
        in: query
54
        description: Internal item identifier
55
        type: integer
56
      - name: waiting_date
57
        in: query
58
        description: Date the item was marked as waiting for the patron
59
        type: string
60
      - name: expiration_date
61
        in: query
62
        description: Date the hold expires
63
        type: string
64
      - name: lowest_priority
65
        in: query
66
        description: Lowest priority
67
        type: boolean
68
      - name: suspended
69
        in: query
70
        description: Suspended
71
        type: boolean
72
      - name: suspended_until
73
        in: query
74
        description: Suspended until
75
        type: string
76
      - name: non_priority
77
        in: query
78
        description: Non priority hold
79
        type: boolean
80
      - $ref: ../parameters.yaml#/match
81
      - $ref: ../parameters.yaml#/order_by
82
      - $ref: ../parameters.yaml#/page
83
      - $ref: ../parameters.yaml#/per_page
84
      - $ref: ../parameters.yaml#/q_param
85
      - $ref: ../parameters.yaml#/q_body
86
      - $ref: ../parameters.yaml#/q_header
87
    produces:
88
      - application/json
89
    responses:
90
      "200":
91
        description: A list of holds
92
        schema:
93
          $ref: ../definitions.yaml#/holds
94
      "401":
95
        description: Authentication required
96
        schema:
97
          $ref: ../definitions.yaml#/error
98
      "403":
99
        description: Hold not allowed
100
        schema:
101
          $ref: ../definitions.yaml#/error
102
      "404":
103
        description: Borrower not found
104
        schema:
105
          $ref: ../definitions.yaml#/error
106
      "500":
107
        description: Internal server error
108
        schema:
109
          $ref: ../definitions.yaml#/error
110
      "503":
111
        description: Under maintenance
112
        schema:
113
          $ref: ../definitions.yaml#/error
114
    x-koha-authorization:
115
      permissions:
116
        borrowers: edit_borrowers
117
  post:
118
    x-mojo-to: Holds#add
119
    operationId: addHold
120
    tags:
121
      - holds
122
    summary: Place hold
123
    parameters:
124
      - name: body
125
        in: body
126
        description: A JSON object containing informations about the new hold
127
        required: true
128
        schema:
129
          type: object
130
          properties:
131
            patron_id:
132
              description: Internal patron identifier
133
              type: integer
134
            biblio_id:
135
              description: Internal biblio identifier
136
              type:
137
                - integer
138
                - "null"
139
            hold_date:
140
              description: The date the hold was placed
141
              type:
142
                - string
143
                - "null"
144
              format: date
145
            item_id:
146
              description: Internal item identifier
147
              type:
148
                - integer
149
                - "null"
150
            pickup_library_id:
151
              description: Internal library identifier for the pickup library
152
              type: string
153
            expiration_date:
154
              description: Hold end date
155
              type:
156
                - string
157
                - "null"
158
              format: date
159
            notes:
160
              description: Notes related to this hold
161
              type:
162
                - string
163
                - "null"
164
            item_type:
165
              description: Limit hold on one itemtype (ignored for item-level holds)
166
              type:
167
                - string
168
                - "null"
169
            non_priority:
170
              description: Set this hold as non priority
171
              type:
172
                - boolean
173
                - "null"
174
          required:
175
            - patron_id
176
            - pickup_library_id
177
          additionalProperties: false
178
      - name: x-koha-override
179
        description: "Comma-separated list of overrides (valid values: any)"
180
        in: header
181
        type: string
182
        required: false
183
    consumes:
184
      - application/json
185
    produces:
186
      - application/json
187
    responses:
188
      "201":
189
        description: Created hold
190
        schema:
191
          $ref: ../definitions.yaml#/hold
192
      "400":
193
        description: Missing or wrong parameters
194
        schema:
195
          $ref: ../definitions.yaml#/error
196
      "401":
197
        description: Authentication required
198
        schema:
199
          $ref: ../definitions.yaml#/error
200
      "403":
201
        description: Hold not allowed
202
        schema:
203
          $ref: ../definitions.yaml#/error
204
      "404":
205
        description: Borrower not found
206
        schema:
207
          $ref: ../definitions.yaml#/error
208
      "500":
209
        description: Internal server error
210
        schema:
211
          $ref: ../definitions.yaml#/error
212
      "503":
213
        description: Under maintenance
214
        schema:
215
          $ref: ../definitions.yaml#/error
216
    x-koha-authorization:
217
      permissions:
218
        reserveforothers: "1"
219
"/holds/{hold_id}":
220
  patch:
221
    x-mojo-to: Holds#edit
222
    operationId: editHold
223
    tags:
224
      - holds
225
    summary: Update hold
226
    parameters:
227
      - $ref: ../parameters.yaml#/hold_id_pp
228
      - name: body
229
        in: body
230
        description: A JSON object containing fields to modify
231
        required: true
232
        schema:
233
          type: object
234
          properties:
235
            priority:
236
              description: Position in waiting queue
237
              type: integer
238
              minimum: 1
239
            pickup_library_id:
240
              description: Internal library identifier for the pickup library
241
              type: string
242
            suspended_until:
243
              description: Date until which the hold has been suspended
244
              type: string
245
              format: date-time
246
          additionalProperties: false
247
    consumes:
248
      - application/json
249
    produces:
250
      - application/json
251
    responses:
252
      "200":
253
        description: Updated hold
254
        schema:
255
          $ref: ../definitions.yaml#/hold
256
      "400":
257
        description: Missing or wrong parameters
258
        schema:
259
          $ref: ../definitions.yaml#/error
260
      "401":
261
        description: Authentication required
262
        schema:
263
          $ref: ../definitions.yaml#/error
264
      "403":
265
        description: Hold not allowed
266
        schema:
267
          $ref: ../definitions.yaml#/error
268
      "404":
269
        description: Hold not found
270
        schema:
271
          $ref: ../definitions.yaml#/error
272
      "500":
273
        description: Internal server error
274
        schema:
275
          $ref: ../definitions.yaml#/error
276
      "503":
277
        description: Under maintenance
278
        schema:
279
          $ref: ../definitions.yaml#/error
280
    x-koha-authorization:
281
      permissions:
282
        reserveforothers: "1"
283
  put:
284
    x-mojo-to: Holds#edit
285
    operationId: overwriteHold
286
    tags:
287
      - holds
288
    summary: Update hold
289
    description: This route is being deprecated and will be removed in future releases.
290
      Please migrate your project to use PATCH /holds/{hold_id} instead.
291
    parameters:
292
      - $ref: ../parameters.yaml#/hold_id_pp
293
      - name: body
294
        in: body
295
        description: A JSON object containing fields to modify
296
        required: true
297
        schema:
298
          type: object
299
          properties:
300
            priority:
301
              description: Position in waiting queue
302
              type: integer
303
              minimum: 1
304
            pickup_library_id:
305
              description: Internal library identifier for the pickup library
306
              type: string
307
            suspended_until:
308
              description: Date until which the hold has been suspended
309
              type: string
310
              format: date-time
311
          additionalProperties: false
312
    consumes:
313
      - application/json
314
    produces:
315
      - application/json
316
    responses:
317
      "200":
318
        description: Updated hold
319
        schema:
320
          $ref: ../definitions.yaml#/hold
321
      "400":
322
        description: Missing or wrong parameters
323
        schema:
324
          $ref: ../definitions.yaml#/error
325
      "401":
326
        description: Authentication required
327
        schema:
328
          $ref: ../definitions.yaml#/error
329
      "403":
330
        description: Hold not allowed
331
        schema:
332
          $ref: ../definitions.yaml#/error
333
      "404":
334
        description: Hold not found
335
        schema:
336
          $ref: ../definitions.yaml#/error
337
      "500":
338
        description: Internal server error
339
        schema:
340
          $ref: ../definitions.yaml#/error
341
      "503":
342
        description: Under maintenance
343
        schema:
344
          $ref: ../definitions.yaml#/error
345
    x-koha-authorization:
346
      permissions:
347
        reserveforothers: "1"
348
  delete:
349
    x-mojo-to: Holds#delete
350
    operationId: deleteHold
351
    tags:
352
      - holds
353
    summary: Cancel hold
354
    parameters:
355
      - $ref: ../parameters.yaml#/hold_id_pp
356
    produces:
357
      - application/json
358
    responses:
359
      "204":
360
        description: Hold deleted
361
      "401":
362
        description: Authentication required
363
        schema:
364
          $ref: ../definitions.yaml#/error
365
      "403":
366
        description: Hold not allowed
367
        schema:
368
          $ref: ../definitions.yaml#/error
369
      "404":
370
        description: Hold not found
371
        schema:
372
          $ref: ../definitions.yaml#/error
373
      "500":
374
        description: Internal server error
375
        schema:
376
          $ref: ../definitions.yaml#/error
377
      "503":
378
        description: Under maintenance
379
        schema:
380
          $ref: ../definitions.yaml#/error
381
    x-koha-authorization:
382
      permissions:
383
        reserveforothers: "1"
384
"/holds/{hold_id}/priority":
385
  put:
386
    x-mojo-to: Holds#update_priority
387
    operationId: updateHoldPriority
388
    tags:
389
      - holds
390
    summary: Update priority for the hold
391
    parameters:
392
      - $ref: ../parameters.yaml#/hold_id_pp
393
      - name: body
394
        in: body
395
        description: An integer representing the new priority to be set for the hold
396
        required: true
397
        schema:
398
          type: integer
399
    produces:
400
      - application/json
401
    responses:
402
      "200":
403
        description: The new priority value for the hold
404
        schema:
405
          type: integer
406
      "401":
407
        description: Authentication required
408
        schema:
409
          $ref: ../definitions.yaml#/error
410
      "403":
411
        description: Access forbidden
412
        schema:
413
          $ref: ../definitions.yaml#/error
414
      "404":
415
        description: Biblio not found
416
        schema:
417
          $ref: ../definitions.yaml#/error
418
      "409":
419
        description: Unable to perform action on biblio
420
        schema:
421
          $ref: ../definitions.yaml#/error
422
      "500":
423
        description: Internal error
424
        schema:
425
          $ref: ../definitions.yaml#/error
426
      "503":
427
        description: Under maintenance
428
        schema:
429
          $ref: ../definitions.yaml#/error
430
    x-koha-authorization:
431
      permissions:
432
        reserveforothers: modify_holds_priority
433
"/holds/{hold_id}/suspension":
434
  post:
435
    x-mojo-to: Holds#suspend
436
    operationId: suspendHold
437
    tags:
438
      - holds
439
    summary: Suspend the hold
440
    parameters:
441
      - $ref: ../parameters.yaml#/hold_id_pp
442
      - name: body
443
        in: body
444
        description: A JSON object containing fields to modify
445
        required: false
446
        schema:
447
          type: object
448
          properties:
449
            end_date:
450
              description: Date the hold suspension expires
451
              type: string
452
              format: date
453
          additionalProperties: false
454
    consumes:
455
      - application/json
456
    produces:
457
      - application/json
458
    responses:
459
      "201":
460
        description: Hold suspended
461
      "400":
462
        description: Missing or wrong parameters
463
        schema:
464
          $ref: ../definitions.yaml#/error
465
      "401":
466
        description: Authentication required
467
        schema:
468
          $ref: ../definitions.yaml#/error
469
      "403":
470
        description: Hold not allowed
471
        schema:
472
          $ref: ../definitions.yaml#/error
473
      "404":
474
        description: Hold not found
475
        schema:
476
          $ref: ../definitions.yaml#/error
477
      "500":
478
        description: Internal server error
479
        schema:
480
          $ref: ../definitions.yaml#/error
481
      "503":
482
        description: Under maintenance
483
        schema:
484
          $ref: ../definitions.yaml#/error
485
    x-koha-authorization:
486
      permissions:
487
        reserveforothers: "1"
488
  delete:
489
    x-mojo-to: Holds#resume
490
    operationId: resumeHold
491
    tags:
492
      - holds
493
    summary: Resume hold
494
    parameters:
495
      - $ref: ../parameters.yaml#/hold_id_pp
496
    consumes:
497
      - application/json
498
    produces:
499
      - application/json
500
    responses:
501
      "204":
502
        description: Hold resumed
503
      "400":
504
        description: Missing or wrong parameters
505
        schema:
506
          $ref: ../definitions.yaml#/error
507
      "401":
508
        description: Authentication required
509
        schema:
510
          $ref: ../definitions.yaml#/error
511
      "403":
512
        description: Hold not allowed
513
        schema:
514
          $ref: ../definitions.yaml#/error
515
      "404":
516
        description: Hold not found
517
        schema:
518
          $ref: ../definitions.yaml#/error
519
      "500":
520
        description: Internal server error
521
        schema:
522
          $ref: ../definitions.yaml#/error
523
      "503":
524
        description: Under maintenance
525
        schema:
526
          $ref: ../definitions.yaml#/error
527
    x-koha-authorization:
528
      permissions:
529
        reserveforothers: "1"
530
"/holds/{hold_id}/pickup_locations":
531
  get:
532
    x-mojo-to: Holds#pickup_locations
533
    operationId: getHoldPickupLocations
534
    tags:
535
      - holds
536
    summary: Get valid pickup locations for hold
537
    parameters:
538
      - name: x-koha-override
539
        description: "Comma-separated list of overrides (valid values: any)"
540
        in: header
541
        type: string
542
        required: false
543
      - $ref: ../parameters.yaml#/hold_id_pp
544
      - $ref: ../parameters.yaml#/match
545
      - $ref: ../parameters.yaml#/order_by
546
      - $ref: ../parameters.yaml#/page
547
      - $ref: ../parameters.yaml#/per_page
548
      - $ref: ../parameters.yaml#/q_param
549
      - $ref: ../parameters.yaml#/q_body
550
      - $ref: ../parameters.yaml#/q_header
551
    produces:
552
      - application/json
553
    responses:
554
      "200":
555
        description: Hold pickup location
556
        schema:
557
          type: array
558
          items:
559
            $ref: ../definitions.yaml#/library
560
      "400":
561
        description: Missing or wrong parameters
562
        schema:
563
          $ref: ../definitions.yaml#/error
564
      "401":
565
        description: Authentication required
566
        schema:
567
          $ref: ../definitions.yaml#/error
568
      "403":
569
        description: Hold pickup location list not allowed
570
        schema:
571
          $ref: ../definitions.yaml#/error
572
      "404":
573
        description: Hold not found
574
        schema:
575
          $ref: ../definitions.yaml#/error
576
      "500":
577
        description: Internal server error
578
        schema:
579
          $ref: ../definitions.yaml#/error
580
      "503":
581
        description: Under maintenance
582
        schema:
583
          $ref: ../definitions.yaml#/error
584
    x-koha-authorization:
585
      permissions:
586
        reserveforothers: place_holds
587
"/holds/{hold_id}/pickup_location":
588
  put:
589
    x-mojo-to: Holds#update_pickup_location
590
    operationId: updateHoldPickupLocation
591
    tags:
592
      - holds
593
    summary: Update pickup location for the hold
594
    description: Set a new pickup location for the hold
595
    parameters:
596
      - $ref: ../parameters.yaml#/hold_id_pp
597
      - name: body
598
        in: body
599
        description: Pickup location
600
        required: true
601
        schema:
602
          type: object
603
          properties:
604
            pickup_library_id:
605
              type: string
606
              description: Internal identifier for the pickup library
607
          additionalProperties: false
608
    produces:
609
      - application/json
610
    responses:
611
      "200":
612
        description: The new pickup location value for the hold
613
        schema:
614
          type: object
615
          properties:
616
            pickup_library_id:
617
              type: string
618
              description: Internal identifier for the pickup library
619
          additionalProperties: false
620
      "400":
621
        description: Missing or wrong parameters
622
        schema:
623
          $ref: ../definitions.yaml#/error
624
      "401":
625
        description: Authentication required
626
        schema:
627
          $ref: ../definitions.yaml#/error
628
      "403":
629
        description: Access forbidden
630
        schema:
631
          $ref: ../definitions.yaml#/error
632
      "404":
633
        description: Hold not found
634
        schema:
635
          $ref: ../definitions.yaml#/error
636
      "409":
637
        description: Unable to perform action on hold
638
        schema:
639
          $ref: ../definitions.yaml#/error
640
      "500":
641
        description: Internal error
642
        schema:
643
          $ref: ../definitions.yaml#/error
644
      "503":
645
        description: Under maintenance
646
        schema:
647
          $ref: ../definitions.yaml#/error
648
    x-koha-authorization:
649
      permissions:
650
        reserveforothers: place_holds
(-)a/api/v1/swagger/paths/ill_backends.json (-120 lines)
Lines 1-120 Link Here
1
{
2
    "/ill_backends": {
3
        "get": {
4
            "x-mojo-to": "Illbackends#list",
5
            "operationId": "listIllbackends",
6
            "tags": ["illbackends"],
7
            "summary": "List ILL backends",
8
            "parameters": [],
9
            "produces": [
10
                "application/json"
11
            ],
12
            "responses": {
13
                "200": {
14
                    "description": "A list of ILL backends",
15
                    "schema": {
16
                        "$ref": "../definitions.json#/ill_backends"
17
                    }
18
                },
19
                "401": {
20
                  "description": "Authentication required",
21
                  "schema": {
22
                    "$ref": "../definitions.json#/error"
23
                  }
24
                },
25
                "403": {
26
                  "description": "Access forbidden",
27
                  "schema": {
28
                    "$ref": "../definitions.json#/error"
29
                  }
30
                },
31
                "404": {
32
                  "description": "ILL backends not found",
33
                  "schema": {
34
                    "$ref": "../definitions.json#/error"
35
                  }
36
                },
37
                "500": {
38
                  "description": "Internal server error",
39
                  "schema": {
40
                    "$ref": "../definitions.json#/error"
41
                  }
42
                },
43
                "503": {
44
                  "description": "Under maintenance",
45
                  "schema": {
46
                    "$ref": "../definitions.json#/error"
47
                  }
48
                }
49
            },
50
            "x-koha-authorization": {
51
                "permissions": {
52
                    "ill": "1"
53
                }
54
            }
55
        }
56
    },
57
    "/ill_backends/{ill_backend_id}": {
58
        "get": {
59
            "x-mojo-to": "Illbackends#get",
60
            "operationId": "getIllbackends",
61
            "tags": ["illbackends"],
62
            "summary": "Get ILL backend",
63
            "parameters": [
64
                {
65
                    "name": "ill_backend_id",
66
                    "in": "path",
67
                    "description": "ILL backend id/name",
68
                    "required": true,
69
                    "type": "string"
70
                }
71
            ],
72
            "produces": [
73
                "application/json"
74
            ],
75
            "responses": {
76
                "200": {
77
                    "description": "An ILL backends",
78
                    "schema": {
79
                        "$ref": "../definitions.json#/ill_backend"
80
                    }
81
                },
82
                "401": {
83
                  "description": "Authentication required",
84
                  "schema": {
85
                    "$ref": "../definitions.json#/error"
86
                  }
87
                },
88
                "403": {
89
                  "description": "Access forbidden",
90
                  "schema": {
91
                    "$ref": "../definitions.json#/error"
92
                  }
93
                },
94
                "404": {
95
                  "description": "ILL backends not found",
96
                  "schema": {
97
                    "$ref": "../definitions.json#/error"
98
                  }
99
                },
100
                "500": {
101
                  "description": "Internal server error",
102
                  "schema": {
103
                    "$ref": "../definitions.json#/error"
104
                  }
105
                },
106
                "503": {
107
                  "description": "Under maintenance",
108
                  "schema": {
109
                    "$ref": "../definitions.json#/error"
110
                  }
111
                }
112
            },
113
            "x-koha-authorization": {
114
                "permissions": {
115
                    "ill": "1"
116
                }
117
            }
118
        }
119
    }
120
}
(-)a/api/v1/swagger/paths/ill_backends.yaml (+82 lines)
Line 0 Link Here
1
---
2
/ill_backends:
3
  get:
4
    x-mojo-to: Illbackends#list
5
    operationId: listIllbackends
6
    tags:
7
      - illbackends
8
    summary: List ILL backends
9
    parameters: []
10
    produces:
11
      - application/json
12
    responses:
13
      "200":
14
        description: A list of ILL backends
15
        schema:
16
          $ref: ../definitions.yaml#/ill_backends
17
      "401":
18
        description: Authentication required
19
        schema:
20
          $ref: ../definitions.yaml#/error
21
      "403":
22
        description: Access forbidden
23
        schema:
24
          $ref: ../definitions.yaml#/error
25
      "404":
26
        description: ILL backends not found
27
        schema:
28
          $ref: ../definitions.yaml#/error
29
      "500":
30
        description: Internal server error
31
        schema:
32
          $ref: ../definitions.yaml#/error
33
      "503":
34
        description: Under maintenance
35
        schema:
36
          $ref: ../definitions.yaml#/error
37
    x-koha-authorization:
38
      permissions:
39
        ill: "1"
40
"/ill_backends/{ill_backend_id}":
41
  get:
42
    x-mojo-to: Illbackends#get
43
    operationId: getIllbackends
44
    tags:
45
      - illbackends
46
    summary: Get ILL backend
47
    parameters:
48
      - name: ill_backend_id
49
        in: path
50
        description: ILL backend id/name
51
        required: true
52
        type: string
53
    produces:
54
      - application/json
55
    responses:
56
      "200":
57
        description: An ILL backends
58
        schema:
59
          $ref: ../definitions.yaml#/ill_backend
60
      "401":
61
        description: Authentication required
62
        schema:
63
          $ref: ../definitions.yaml#/error
64
      "403":
65
        description: Access forbidden
66
        schema:
67
          $ref: ../definitions.yaml#/error
68
      "404":
69
        description: ILL backends not found
70
        schema:
71
          $ref: ../definitions.yaml#/error
72
      "500":
73
        description: Internal server error
74
        schema:
75
          $ref: ../definitions.yaml#/error
76
      "503":
77
        description: Under maintenance
78
        schema:
79
          $ref: ../definitions.yaml#/error
80
    x-koha-authorization:
81
      permissions:
82
        ill: "1"
(-)a/api/v1/swagger/paths/illrequests.json (-163 lines)
Lines 1-163 Link Here
1
{
2
    "/illrequests": {
3
        "get": {
4
            "x-mojo-to": "Illrequests#list",
5
            "operationId": "listIllrequests",
6
            "tags": ["illrequests"],
7
            "summary": "List ILL requests",
8
            "parameters": [{
9
                "name": "embed",
10
                "in": "query",
11
                "description": "Additional objects that should be embedded in the response",
12
                "required": false,
13
                "type": "array",
14
                "collectionFormat": "csv",
15
                "items": {
16
                    "type": "string",
17
                    "enum": [
18
                        "patron",
19
                        "library",
20
                        "capabilities",
21
                        "metadata",
22
                        "requested_partners",
23
                        "comments",
24
                        "status_alias"
25
                    ]
26
                }
27
            }, {
28
                "name": "backend",
29
                "in": "query",
30
                "description": "The name of a ILL backend",
31
                "required": false,
32
                "type": "string"
33
            }, {
34
                "name": "orderid",
35
                "in": "query",
36
                "description": "The order ID of a request",
37
                "required": false,
38
                "type": "string"
39
            }, {
40
                "name": "biblionumber",
41
                "in": "query",
42
                "description": "Internal biblio identifier",
43
                "required": false,
44
                "type": "integer"
45
            }, {
46
                "name": "borrowernumber",
47
                "in": "query",
48
                "description": "Internal patron identifier",
49
                "required": false,
50
                "type": "integer"
51
            }, {
52
                "name": "completed",
53
                "in": "query",
54
                "description": "The date the request was considered completed",
55
                "required": false,
56
                "type": "string"
57
            }, {
58
                "name": "completed_formatted",
59
                "in": "query",
60
                "description": "The date the request was considered complete formatted",
61
                "required": false,
62
                "type": "string"
63
            }, {
64
                "name": "status",
65
                "in": "query",
66
                "description": "A full status string e.g. REQREV",
67
                "required": false,
68
                "type": "string"
69
            }, {
70
                "name": "cost",
71
                "in": "query",
72
                "description": "The quoted cost of the request",
73
                "required": false,
74
                "type": "number"
75
            }, {
76
                "name": "price_paid",
77
                "in": "query",
78
                "description": "The final cost of the request",
79
                "required": false,
80
                "type": "number"
81
            }, {
82
                "name": "medium",
83
                "in": "query",
84
                "description": "The medium of the requested item",
85
                "required": false,
86
                "type": "string"
87
            }, {
88
                "name": "updated",
89
                "in": "query",
90
                "description": "The last updated date of the request",
91
                "required": false,
92
                "type": "string"
93
            }, {
94
                "name": "updated_formatted",
95
                "in": "query",
96
                "description": "The last updated date of the request formatted",
97
                "required": false,
98
                "type": "string"
99
            }, {
100
                "name": "placed",
101
                "in": "query",
102
                "description": "The date the request was placed",
103
                "required": false,
104
                "type": "string"
105
            }, {
106
                "name": "placed_formatted",
107
                "in": "query",
108
                "description": "The date the request was placed formatted",
109
                "required": false,
110
                "type": "string"
111
            }, {
112
                "name": "branchcode",
113
                "in": "query",
114
                "description": "Library ID",
115
                "required": false,
116
                "type": "string"
117
            }],
118
            "produces": [
119
                "application/json"
120
            ],
121
            "responses": {
122
                "200": {
123
                    "description": "A list of ILL requests"
124
                },
125
                "401": {
126
                  "description": "Authentication required",
127
                  "schema": {
128
                    "$ref": "../definitions.json#/error"
129
                  }
130
                },
131
                "403": {
132
                  "description": "Access forbidden",
133
                  "schema": {
134
                    "$ref": "../definitions.json#/error"
135
                  }
136
                },
137
                "404": {
138
                  "description": "ILL requests not found",
139
                  "schema": {
140
                    "$ref": "../definitions.json#/error"
141
                  }
142
                },
143
                "500": {
144
                  "description": "Internal server error",
145
                  "schema": {
146
                    "$ref": "../definitions.json#/error"
147
                  }
148
                },
149
                "503": {
150
                  "description": "Under maintenance",
151
                  "schema": {
152
                    "$ref": "../definitions.json#/error"
153
                  }
154
                }
155
            },
156
            "x-koha-authorization": {
157
                "permissions": {
158
                    "ill": "1"
159
                }
160
            }
161
        }
162
    }
163
}
(-)a/api/v1/swagger/paths/illrequests.yaml (+128 lines)
Line 0 Link Here
1
---
2
/illrequests:
3
  get:
4
    x-mojo-to: Illrequests#list
5
    operationId: listIllrequests
6
    tags:
7
      - illrequests
8
    summary: List ILL requests
9
    parameters:
10
      - name: embed
11
        in: query
12
        description: Additional objects that should be embedded in the response
13
        required: false
14
        type: array
15
        collectionFormat: csv
16
        items:
17
          type: string
18
          enum:
19
            - patron
20
            - library
21
            - capabilities
22
            - metadata
23
            - requested_partners
24
            - comments
25
            - status_alias
26
      - name: backend
27
        in: query
28
        description: The name of a ILL backend
29
        required: false
30
        type: string
31
      - name: orderid
32
        in: query
33
        description: The order ID of a request
34
        required: false
35
        type: string
36
      - name: biblionumber
37
        in: query
38
        description: Internal biblio identifier
39
        required: false
40
        type: integer
41
      - name: borrowernumber
42
        in: query
43
        description: Internal patron identifier
44
        required: false
45
        type: integer
46
      - name: completed
47
        in: query
48
        description: The date the request was considered completed
49
        required: false
50
        type: string
51
      - name: completed_formatted
52
        in: query
53
        description: The date the request was considered complete formatted
54
        required: false
55
        type: string
56
      - name: status
57
        in: query
58
        description: A full status string e.g. REQREV
59
        required: false
60
        type: string
61
      - name: cost
62
        in: query
63
        description: The quoted cost of the request
64
        required: false
65
        type: number
66
      - name: price_paid
67
        in: query
68
        description: The final cost of the request
69
        required: false
70
        type: number
71
      - name: medium
72
        in: query
73
        description: The medium of the requested item
74
        required: false
75
        type: string
76
      - name: updated
77
        in: query
78
        description: The last updated date of the request
79
        required: false
80
        type: string
81
      - name: updated_formatted
82
        in: query
83
        description: The last updated date of the request formatted
84
        required: false
85
        type: string
86
      - name: placed
87
        in: query
88
        description: The date the request was placed
89
        required: false
90
        type: string
91
      - name: placed_formatted
92
        in: query
93
        description: The date the request was placed formatted
94
        required: false
95
        type: string
96
      - name: branchcode
97
        in: query
98
        description: Library ID
99
        required: false
100
        type: string
101
    produces:
102
      - application/json
103
    responses:
104
      "200":
105
        description: A list of ILL requests
106
      "401":
107
        description: Authentication required
108
        schema:
109
          $ref: ../definitions.yaml#/error
110
      "403":
111
        description: Access forbidden
112
        schema:
113
          $ref: ../definitions.yaml#/error
114
      "404":
115
        description: ILL requests not found
116
        schema:
117
          $ref: ../definitions.yaml#/error
118
      "500":
119
        description: Internal server error
120
        schema:
121
          $ref: ../definitions.yaml#/error
122
      "503":
123
        description: Under maintenance
124
        schema:
125
          $ref: ../definitions.yaml#/error
126
    x-koha-authorization:
127
      permissions:
128
        ill: "1"
(-)a/api/v1/swagger/paths/import_batch_profiles.json (-375 lines)
Lines 1-375 Link Here
1
{
2
  "/import_batch_profiles": {
3
    "get": {
4
      "x-mojo-to": "ImportBatchProfiles#list",
5
      "operationId": "listImportBatchProfiles",
6
      "tags": [
7
        "batch_import_profiles"
8
      ],
9
      "summary": "List batch import profiles",
10
      "parameters": [
11
        {
12
          "name": "name",
13
          "in": "query",
14
          "description": "Search on profile's name",
15
          "required": false,
16
          "type": "string"
17
        },
18
        {
19
          "$ref": "../parameters.json#/match"
20
        },
21
        {
22
          "$ref": "../parameters.json#/order_by"
23
        },
24
        {
25
          "$ref": "../parameters.json#/page"
26
        },
27
        {
28
          "$ref": "../parameters.json#/per_page"
29
        },
30
        {
31
          "$ref": "../parameters.json#/q_param"
32
        },
33
        {
34
          "$ref": "../parameters.json#/q_body"
35
        },
36
        {
37
          "$ref": "../parameters.json#/q_header"
38
        }
39
      ],
40
      "consumes": [
41
        "application/json"
42
      ],
43
      "produces": [
44
        "application/json"
45
      ],
46
      "responses": {
47
        "200": {
48
          "description": "A list of import batch profiles",
49
          "schema": {
50
            "$ref": "../definitions.json#/import_batch_profiles"
51
          }
52
        },
53
        "401": {
54
          "description": "Authentication required",
55
          "schema": {
56
            "$ref": "../definitions.json#/error"
57
          }
58
        },
59
        "403": {
60
          "description": "Access forbidden",
61
          "schema": {
62
            "$ref": "../definitions.json#/error"
63
          }
64
        },
65
        "500": {
66
          "description": "Internal server error",
67
          "schema": {
68
            "$ref": "../definitions.json#/error"
69
          }
70
        },
71
        "503": {
72
          "description": "Under maintenance",
73
          "schema": {
74
            "$ref": "../definitions.json#/error"
75
          }
76
        }
77
      },
78
      "x-koha-authorization": {
79
        "permissions": {
80
          "tools": "stage_marc_import"
81
        }
82
      }
83
    },
84
    "post": {
85
      "x-mojo-to": "ImportBatchProfiles#add",
86
      "operationId": "addImportBatchProfiles",
87
      "tags": [
88
        "batch_import_profiles"
89
      ],
90
      "summary": "Add batch import profile",
91
      "parameters": [
92
        {
93
          "name": "body",
94
          "in": "body",
95
          "description": "A JSON object containing a import batch profile",
96
          "required": true,
97
          "schema": {
98
            "type": "object",
99
            "properties": {
100
              "name": {
101
                "description": "name of this profile",
102
                "type": "string"
103
              },
104
              "matcher_id": {
105
                "description": "the id of the match rule used (matchpoints.matcher_id)",
106
                "type": ["integer", "null"]
107
              },
108
              "template_id": {
109
                "description": "the id of the marc modification template",
110
                "type": ["integer", "null"]
111
              },
112
              "overlay_action": {
113
                "description": "how to handle duplicate records",
114
                "type": ["string", "null"]
115
              },
116
              "nomatch_action": {
117
                "description": "how to handle records where no match is found",
118
                "type": ["string", "null"]
119
              },
120
              "item_action": {
121
                "description": "what to do with item records",
122
                "type": ["string", "null"]
123
              },
124
              "parse_items": {
125
                "description": "should items be parsed",
126
                "type": ["boolean", "null"]
127
              },
128
              "record_type": {
129
                "description": "type of record in the batch",
130
                "type": ["string", "null"]
131
              },
132
              "encoding": {
133
                "description": "file encoding",
134
                "type": ["string", "null"]
135
              },
136
              "format": {
137
                "description": "marc format",
138
                "type": ["string", "null"]
139
              },
140
              "comments": {
141
                "description": "any comments added when the file was uploaded",
142
                "type": ["string", "null"]
143
              }
144
            },
145
            "additionalProperties": false
146
          }
147
        }
148
      ],
149
      "consumes": ["application/json"],
150
      "produces": ["application/json"],
151
      "responses": {
152
        "201": {
153
          "description": "Created Profile",
154
          "schema": {
155
            "$ref": "../definitions.json#/import_batch_profile"
156
          }
157
        },
158
        "400": {
159
          "description": "Missing or wrong parameters",
160
          "schema": {
161
            "$ref": "../definitions.json#/error"
162
          }
163
        },
164
        "401": {
165
          "description": "Authentication required",
166
          "schema": {
167
            "$ref": "../definitions.json#/error"
168
          }
169
        },
170
        "403": {
171
          "description": "Hold not allowed",
172
          "schema": {
173
            "$ref": "../definitions.json#/error"
174
          }
175
        },
176
        "404": {
177
          "description": "Borrower not found",
178
          "schema": {
179
            "$ref": "../definitions.json#/error"
180
          }
181
        },
182
        "500": {
183
          "description": "Internal server error",
184
          "schema": {
185
            "$ref": "../definitions.json#/error"
186
          }
187
        },
188
        "503": {
189
          "description": "Under maintenance",
190
          "schema": {
191
            "$ref": "../definitions.json#/error"
192
          }
193
        }
194
      },
195
      "x-koha-authorization": {
196
        "permissions": {
197
          "tools": "stage_marc_import"
198
        }
199
      }
200
    }
201
  },
202
  "/import_batch_profiles/{import_batch_profile_id}": {
203
    "put": {
204
      "x-mojo-to": "ImportBatchProfiles#edit",
205
      "operationId": "editImportBatchProfiles",
206
      "tags": [
207
        "batch_import_profiles"
208
      ],
209
      "summary": "Update batch import profile",
210
      "parameters": [
211
        {
212
          "$ref": "../parameters.json#/import_batch_profile_id_pp"
213
        },
214
        {
215
          "name": "body",
216
          "in": "body",
217
          "description": "A JSON object containing a import batch profile",
218
          "required": true,
219
          "schema": {
220
            "type": "object",
221
            "properties": {
222
              "name": {
223
                "description": "name of this profile",
224
                "type": "string"
225
              },
226
              "matcher_id": {
227
                "description": "the id of the match rule used (matchpoints.matcher_id)",
228
                "type": ["integer", "null"]
229
              },
230
              "template_id": {
231
                "description": "the id of the marc modification template",
232
                "type": ["integer", "null"]
233
              },
234
              "overlay_action": {
235
                "description": "how to handle duplicate records",
236
                "type": ["string", "null"]
237
              },
238
              "nomatch_action": {
239
                "description": "how to handle records where no match is found",
240
                "type": ["string", "null"]
241
              },
242
              "item_action": {
243
                "description": "what to do with item records",
244
                "type": ["string", "null"]
245
              },
246
              "parse_items": {
247
                "description": "should items be parsed",
248
                "type": ["boolean", "null"]
249
              },
250
              "record_type": {
251
                "description": "type of record in the batch",
252
                "type": ["string", "null"]
253
              },
254
              "encoding": {
255
                "description": "file encoding",
256
                "type": ["string", "null"]
257
              },
258
              "format": {
259
                "description": "marc format",
260
                "type": ["string", "null"]
261
              },
262
              "comments": {
263
                "description": "any comments added when the file was uploaded",
264
                "type": ["string", "null"]
265
              }
266
            },
267
            "additionalProperties": false
268
          }
269
        }
270
      ],
271
      "consumes": ["application/json"],
272
      "produces": ["application/json"],
273
      "responses": {
274
        "200": {
275
          "description": "Updated profile",
276
          "schema": {
277
            "$ref": "../definitions.json#/import_batch_profile"
278
          }
279
        },
280
        "400": {
281
          "description": "Missing or wrong parameters",
282
          "schema": {
283
            "$ref": "../definitions.json#/error"
284
          }
285
        },
286
        "401": {
287
          "description": "Authentication required",
288
          "schema": {
289
            "$ref": "../definitions.json#/error"
290
          }
291
        },
292
        "403": {
293
          "description": "Hold not allowed",
294
          "schema": {
295
            "$ref": "../definitions.json#/error"
296
          }
297
        },
298
        "404": {
299
          "description": "Borrower not found",
300
          "schema": {
301
            "$ref": "../definitions.json#/error"
302
          }
303
        },
304
        "500": {
305
          "description": "Internal server error",
306
          "schema": {
307
            "$ref": "../definitions.json#/error"
308
          }
309
        },
310
        "503": {
311
          "description": "Under maintenance",
312
          "schema": {
313
            "$ref": "../definitions.json#/error"
314
          }
315
        }
316
      },
317
      "x-koha-authorization": {
318
        "permissions": {
319
          "tools": "stage_marc_import"
320
        }
321
      }
322
    },
323
    "delete": {
324
      "x-mojo-to": "ImportBatchProfiles#delete",
325
      "operationId": "deleteImportBatchProfiles",
326
      "tags": ["batch_import_profiles"],
327
      "summary": "Delete batch import profile",
328
      "parameters": [{
329
          "$ref": "../parameters.json#/import_batch_profile_id_pp"
330
        }
331
      ],
332
      "produces": ["application/json"],
333
      "responses": {
334
        "204": {
335
          "description": "Profile deleted"
336
        },
337
        "401": {
338
          "description": "Authentication required",
339
          "schema": {
340
            "$ref": "../definitions.json#/error"
341
          }
342
        },
343
        "403": {
344
          "description": "Hold not allowed",
345
          "schema": {
346
            "$ref": "../definitions.json#/error"
347
          }
348
        },
349
        "404": {
350
          "description": "Hold not found",
351
          "schema": {
352
            "$ref": "../definitions.json#/error"
353
          }
354
        },
355
        "500": {
356
          "description": "Internal server error",
357
          "schema": {
358
            "$ref": "../definitions.json#/error"
359
          }
360
        },
361
        "503": {
362
          "description": "Under maintenance",
363
          "schema": {
364
            "$ref": "../definitions.json#/error"
365
          }
366
        }
367
      },
368
      "x-koha-authorization": {
369
        "permissions": {
370
          "tools": "stage_marc_import"
371
        }
372
      }
373
    }
374
  }
375
}
(-)a/api/v1/swagger/paths/import_batch_profiles.yaml (+295 lines)
Line 0 Link Here
1
---
2
/import_batch_profiles:
3
  get:
4
    x-mojo-to: ImportBatchProfiles#list
5
    operationId: listImportBatchProfiles
6
    tags:
7
      - batch_import_profiles
8
    summary: List batch import profiles
9
    parameters:
10
      - name: name
11
        in: query
12
        description: Search on profile's name
13
        required: false
14
        type: string
15
      - $ref: ../parameters.yaml#/match
16
      - $ref: ../parameters.yaml#/order_by
17
      - $ref: ../parameters.yaml#/page
18
      - $ref: ../parameters.yaml#/per_page
19
      - $ref: ../parameters.yaml#/q_param
20
      - $ref: ../parameters.yaml#/q_body
21
      - $ref: ../parameters.yaml#/q_header
22
    consumes:
23
      - application/json
24
    produces:
25
      - application/json
26
    responses:
27
      "200":
28
        description: A list of import batch profiles
29
        schema:
30
          $ref: ../definitions.yaml#/import_batch_profiles
31
      "401":
32
        description: Authentication required
33
        schema:
34
          $ref: ../definitions.yaml#/error
35
      "403":
36
        description: Access forbidden
37
        schema:
38
          $ref: ../definitions.yaml#/error
39
      "500":
40
        description: Internal server error
41
        schema:
42
          $ref: ../definitions.yaml#/error
43
      "503":
44
        description: Under maintenance
45
        schema:
46
          $ref: ../definitions.yaml#/error
47
    x-koha-authorization:
48
      permissions:
49
        tools: stage_marc_import
50
  post:
51
    x-mojo-to: ImportBatchProfiles#add
52
    operationId: addImportBatchProfiles
53
    tags:
54
      - batch_import_profiles
55
    summary: Add batch import profile
56
    parameters:
57
      - name: body
58
        in: body
59
        description: A JSON object containing a import batch profile
60
        required: true
61
        schema:
62
          type: object
63
          properties:
64
            name:
65
              description: name of this profile
66
              type: string
67
            matcher_id:
68
              description: the id of the match rule used (matchpoints.matcher_id)
69
              type:
70
                - integer
71
                - "null"
72
            template_id:
73
              description: the id of the marc modification template
74
              type:
75
                - integer
76
                - "null"
77
            overlay_action:
78
              description: how to handle duplicate records
79
              type:
80
                - string
81
                - "null"
82
            nomatch_action:
83
              description: how to handle records where no match is found
84
              type:
85
                - string
86
                - "null"
87
            item_action:
88
              description: what to do with item records
89
              type:
90
                - string
91
                - "null"
92
            parse_items:
93
              description: should items be parsed
94
              type:
95
                - boolean
96
                - "null"
97
            record_type:
98
              description: type of record in the batch
99
              type:
100
                - string
101
                - "null"
102
            encoding:
103
              description: file encoding
104
              type:
105
                - string
106
                - "null"
107
            format:
108
              description: marc format
109
              type:
110
                - string
111
                - "null"
112
            comments:
113
              description: any comments added when the file was uploaded
114
              type:
115
                - string
116
                - "null"
117
          additionalProperties: false
118
    consumes:
119
      - application/json
120
    produces:
121
      - application/json
122
    responses:
123
      "201":
124
        description: Created Profile
125
        schema:
126
          $ref: ../definitions.yaml#/import_batch_profile
127
      "400":
128
        description: Missing or wrong parameters
129
        schema:
130
          $ref: ../definitions.yaml#/error
131
      "401":
132
        description: Authentication required
133
        schema:
134
          $ref: ../definitions.yaml#/error
135
      "403":
136
        description: Hold not allowed
137
        schema:
138
          $ref: ../definitions.yaml#/error
139
      "404":
140
        description: Borrower not found
141
        schema:
142
          $ref: ../definitions.yaml#/error
143
      "500":
144
        description: Internal server error
145
        schema:
146
          $ref: ../definitions.yaml#/error
147
      "503":
148
        description: Under maintenance
149
        schema:
150
          $ref: ../definitions.yaml#/error
151
    x-koha-authorization:
152
      permissions:
153
        tools: stage_marc_import
154
"/import_batch_profiles/{import_batch_profile_id}":
155
  put:
156
    x-mojo-to: ImportBatchProfiles#edit
157
    operationId: editImportBatchProfiles
158
    tags:
159
      - batch_import_profiles
160
    summary: Update batch import profile
161
    parameters:
162
      - $ref: ../parameters.yaml#/import_batch_profile_id_pp
163
      - name: body
164
        in: body
165
        description: A JSON object containing a import batch profile
166
        required: true
167
        schema:
168
          type: object
169
          properties:
170
            name:
171
              description: name of this profile
172
              type: string
173
            matcher_id:
174
              description: the id of the match rule used (matchpoints.matcher_id)
175
              type:
176
                - integer
177
                - "null"
178
            template_id:
179
              description: the id of the marc modification template
180
              type:
181
                - integer
182
                - "null"
183
            overlay_action:
184
              description: how to handle duplicate records
185
              type:
186
                - string
187
                - "null"
188
            nomatch_action:
189
              description: how to handle records where no match is found
190
              type:
191
                - string
192
                - "null"
193
            item_action:
194
              description: what to do with item records
195
              type:
196
                - string
197
                - "null"
198
            parse_items:
199
              description: should items be parsed
200
              type:
201
                - boolean
202
                - "null"
203
            record_type:
204
              description: type of record in the batch
205
              type:
206
                - string
207
                - "null"
208
            encoding:
209
              description: file encoding
210
              type:
211
                - string
212
                - "null"
213
            format:
214
              description: marc format
215
              type:
216
                - string
217
                - "null"
218
            comments:
219
              description: any comments added when the file was uploaded
220
              type:
221
                - string
222
                - "null"
223
          additionalProperties: false
224
    consumes:
225
      - application/json
226
    produces:
227
      - application/json
228
    responses:
229
      "200":
230
        description: Updated profile
231
        schema:
232
          $ref: ../definitions.yaml#/import_batch_profile
233
      "400":
234
        description: Missing or wrong parameters
235
        schema:
236
          $ref: ../definitions.yaml#/error
237
      "401":
238
        description: Authentication required
239
        schema:
240
          $ref: ../definitions.yaml#/error
241
      "403":
242
        description: Hold not allowed
243
        schema:
244
          $ref: ../definitions.yaml#/error
245
      "404":
246
        description: Borrower not found
247
        schema:
248
          $ref: ../definitions.yaml#/error
249
      "500":
250
        description: Internal server error
251
        schema:
252
          $ref: ../definitions.yaml#/error
253
      "503":
254
        description: Under maintenance
255
        schema:
256
          $ref: ../definitions.yaml#/error
257
    x-koha-authorization:
258
      permissions:
259
        tools: stage_marc_import
260
  delete:
261
    x-mojo-to: ImportBatchProfiles#delete
262
    operationId: deleteImportBatchProfiles
263
    tags:
264
      - batch_import_profiles
265
    summary: Delete batch import profile
266
    parameters:
267
      - $ref: ../parameters.yaml#/import_batch_profile_id_pp
268
    produces:
269
      - application/json
270
    responses:
271
      "204":
272
        description: Profile deleted
273
      "401":
274
        description: Authentication required
275
        schema:
276
          $ref: ../definitions.yaml#/error
277
      "403":
278
        description: Hold not allowed
279
        schema:
280
          $ref: ../definitions.yaml#/error
281
      "404":
282
        description: Hold not found
283
        schema:
284
          $ref: ../definitions.yaml#/error
285
      "500":
286
        description: Internal server error
287
        schema:
288
          $ref: ../definitions.yaml#/error
289
      "503":
290
        description: Under maintenance
291
        schema:
292
          $ref: ../definitions.yaml#/error
293
    x-koha-authorization:
294
      permissions:
295
        tools: stage_marc_import
(-)a/api/v1/swagger/paths/items.yaml (-33 / +33 lines)
Lines 12-24 Link Here
12
        description: Search on the item's barcode
12
        description: Search on the item's barcode
13
        required: false
13
        required: false
14
        type: string
14
        type: string
15
      - $ref: ../parameters.json#/match
15
      - $ref: ../parameters.yaml#/match
16
      - $ref: ../parameters.json#/order_by
16
      - $ref: ../parameters.yaml#/order_by
17
      - $ref: ../parameters.json#/page
17
      - $ref: ../parameters.yaml#/page
18
      - $ref: ../parameters.json#/per_page
18
      - $ref: ../parameters.yaml#/per_page
19
      - $ref: ../parameters.json#/q_param
19
      - $ref: ../parameters.yaml#/q_param
20
      - $ref: ../parameters.json#/q_body
20
      - $ref: ../parameters.yaml#/q_body
21
      - $ref: ../parameters.json#/q_header
21
      - $ref: ../parameters.yaml#/q_header
22
    consumes:
22
    consumes:
23
      - application/json
23
      - application/json
24
    produces:
24
    produces:
Lines 29-51 Link Here
29
        schema:
29
        schema:
30
          type: array
30
          type: array
31
          items:
31
          items:
32
            $ref: ../definitions.json#/item
32
            $ref: ../definitions.yaml#/item
33
      "401":
33
      "401":
34
        description: Authentication required
34
        description: Authentication required
35
        schema:
35
        schema:
36
          $ref: ../definitions.json#/error
36
          $ref: ../definitions.yaml#/error
37
      "403":
37
      "403":
38
        description: Access forbidden
38
        description: Access forbidden
39
        schema:
39
        schema:
40
          $ref: ../definitions.json#/error
40
          $ref: ../definitions.yaml#/error
41
      "500":
41
      "500":
42
        description: Internal server error
42
        description: Internal server error
43
        schema:
43
        schema:
44
          $ref: ../definitions.json#/error
44
          $ref: ../definitions.yaml#/error
45
      "503":
45
      "503":
46
        description: Under maintenance
46
        description: Under maintenance
47
        schema:
47
        schema:
48
          $ref: ../definitions.json#/error
48
          $ref: ../definitions.yaml#/error
49
    x-koha-authorization:
49
    x-koha-authorization:
50
      permissions:
50
      permissions:
51
        catalogue: "1"
51
        catalogue: "1"
Lines 57-63 Link Here
57
      - items
57
      - items
58
    summary: Get item
58
    summary: Get item
59
    parameters:
59
    parameters:
60
      - $ref: ../parameters.json#/item_id_pp
60
      - $ref: ../parameters.yaml#/item_id_pp
61
    consumes:
61
    consumes:
62
      - application/json
62
      - application/json
63
    produces:
63
    produces:
Lines 66-88 Link Here
66
      "200":
66
      "200":
67
        description: An item
67
        description: An item
68
        schema:
68
        schema:
69
          $ref: ../definitions.json#/item
69
          $ref: ../definitions.yaml#/item
70
      "400":
70
      "400":
71
        description: Missing or wrong parameters
71
        description: Missing or wrong parameters
72
        schema:
72
        schema:
73
          $ref: ../definitions.json#/error
73
          $ref: ../definitions.yaml#/error
74
      "404":
74
      "404":
75
        description: Item not found
75
        description: Item not found
76
        schema:
76
        schema:
77
          $ref: ../definitions.json#/error
77
          $ref: ../definitions.yaml#/error
78
      "500":
78
      "500":
79
        description: Internal server error
79
        description: Internal server error
80
        schema:
80
        schema:
81
          $ref: ../definitions.json#/error
81
          $ref: ../definitions.yaml#/error
82
      "503":
82
      "503":
83
        description: Under maintenance
83
        description: Under maintenance
84
        schema:
84
        schema:
85
          $ref: ../definitions.json#/error
85
          $ref: ../definitions.yaml#/error
86
    x-koha-authorization:
86
    x-koha-authorization:
87
      permissions:
87
      permissions:
88
        catalogue: "1"
88
        catalogue: "1"
Lines 94-112 Link Here
94
    tags:
94
    tags:
95
      - items
95
      - items
96
    parameters:
96
    parameters:
97
      - $ref: ../parameters.json#/item_id_pp
97
      - $ref: ../parameters.yaml#/item_id_pp
98
      - name: patron_id
98
      - name: patron_id
99
        in: query
99
        in: query
100
        description: Internal patron identifier
100
        description: Internal patron identifier
101
        required: true
101
        required: true
102
        type: integer
102
        type: integer
103
      - $ref: ../parameters.json#/match
103
      - $ref: ../parameters.yaml#/match
104
      - $ref: ../parameters.json#/order_by
104
      - $ref: ../parameters.yaml#/order_by
105
      - $ref: ../parameters.json#/page
105
      - $ref: ../parameters.yaml#/page
106
      - $ref: ../parameters.json#/per_page
106
      - $ref: ../parameters.yaml#/per_page
107
      - $ref: ../parameters.json#/q_param
107
      - $ref: ../parameters.yaml#/q_param
108
      - $ref: ../parameters.json#/q_body
108
      - $ref: ../parameters.yaml#/q_body
109
      - $ref: ../parameters.json#/q_header
109
      - $ref: ../parameters.yaml#/q_header
110
    consumes:
110
    consumes:
111
      - application/json
111
      - application/json
112
    produces:
112
    produces:
Lines 117-147 Link Here
117
        schema:
117
        schema:
118
          type: array
118
          type: array
119
          items:
119
          items:
120
            $ref: ../definitions.json#/library
120
            $ref: ../definitions.yaml#/library
121
      "400":
121
      "400":
122
        description: Missing or wrong parameters
122
        description: Missing or wrong parameters
123
        schema:
123
        schema:
124
          $ref: ../definitions.json#/error
124
          $ref: ../definitions.yaml#/error
125
      "401":
125
      "401":
126
        description: Authentication required
126
        description: Authentication required
127
        schema:
127
        schema:
128
          $ref: ../definitions.json#/error
128
          $ref: ../definitions.yaml#/error
129
      "403":
129
      "403":
130
        description: Access forbidden
130
        description: Access forbidden
131
        schema:
131
        schema:
132
          $ref: ../definitions.json#/error
132
          $ref: ../definitions.yaml#/error
133
      "404":
133
      "404":
134
        description: Biblio not found
134
        description: Biblio not found
135
        schema:
135
        schema:
136
          $ref: ../definitions.json#/error
136
          $ref: ../definitions.yaml#/error
137
      "500":
137
      "500":
138
        description: Internal server error
138
        description: Internal server error
139
        schema:
139
        schema:
140
          $ref: ../definitions.json#/error
140
          $ref: ../definitions.yaml#/error
141
      "503":
141
      "503":
142
        description: Under maintenance
142
        description: Under maintenance
143
        schema:
143
        schema:
144
          $ref: ../definitions.json#/error
144
          $ref: ../definitions.yaml#/error
145
    x-koha-authorization:
145
    x-koha-authorization:
146
      permissions:
146
      permissions:
147
        reserveforothers: place_holds
147
        reserveforothers: place_holds
(-)a/api/v1/swagger/paths/libraries.json (-557 lines)
Lines 1-557 Link Here
1
{
2
  "/libraries": {
3
    "get": {
4
      "x-mojo-to": "Libraries#list",
5
      "operationId": "listLibraries",
6
      "tags": [
7
        "libraries"
8
      ],
9
      "summary": "List libraries",
10
      "parameters": [
11
        {
12
          "name": "name",
13
          "in": "query",
14
          "description": "Case insensitive 'starts-with' search on name",
15
          "required": false,
16
          "type": "string"
17
        },
18
        {
19
          "name": "address1",
20
          "in": "query",
21
          "description": "Case insensitive 'starts-with' search on address1",
22
          "required": false,
23
          "type": "string"
24
        },
25
        {
26
          "name": "address2",
27
          "in": "query",
28
          "description": "Case insensitive 'starts-with' search on address2",
29
          "required": false,
30
          "type": "string"
31
        },
32
        {
33
          "name": "address3",
34
          "in": "query",
35
          "description": "Case insensitive 'starts-with' search on address3",
36
          "required": false,
37
          "type": "string"
38
        },
39
        {
40
          "name": "postal_code",
41
          "in": "query",
42
          "description": "Case insensitive 'starts-with' search on postal code",
43
          "required": false,
44
          "type": "string"
45
        },
46
        {
47
          "name": "city",
48
          "in": "query",
49
          "description": "Case insensitive 'starts-with' search on city",
50
          "required": false,
51
          "type": "string"
52
        },
53
        {
54
          "name": "state",
55
          "in": "query",
56
          "description": "Case insensitive 'starts-with' search on state",
57
          "required": false,
58
          "type": "string"
59
        },
60
        {
61
          "name": "country",
62
          "in": "query",
63
          "description": "Case insensitive 'starts_with' search on country",
64
          "required": false,
65
          "type": "string"
66
        },
67
        {
68
          "name": "phone",
69
          "in": "query",
70
          "description": "Case insensitive 'starts_with' search on phone number",
71
          "required": false,
72
          "type": "string"
73
        },
74
        {
75
          "name": "fax",
76
          "in": "query",
77
          "description": "Case insensitive 'starts_with' search on fax number",
78
          "required": false,
79
          "type": "string"
80
        },
81
        {
82
          "name": "email",
83
          "in": "query",
84
          "description": "Case insensitive 'starts_with' search on email address",
85
          "required": false,
86
          "type": "string"
87
        },
88
        {
89
          "name": "reply_to_email",
90
          "in": "query",
91
          "description": "Case insensitive 'starts_with' search on Reply-To email address",
92
          "required": false,
93
          "type": "string"
94
        },
95
        {
96
          "name": "return_path_email",
97
          "in": "query",
98
          "description": "Case insensitive 'starts_with' search on Return-Path email address",
99
          "required": false,
100
          "type": "string"
101
        },
102
        {
103
          "name": "url",
104
          "in": "query",
105
          "description": "Case insensitive 'starts_with' search on website URL",
106
          "required": false,
107
          "type": "string"
108
        },
109
        {
110
          "name": "ip",
111
          "in": "query",
112
          "description": "Case insensitive 'starts_with' search on IP address",
113
          "required": false,
114
          "type": "string"
115
        },
116
        {
117
          "name": "notes",
118
          "in": "query",
119
          "description": "Case insensitive 'starts_with' search on notes",
120
          "required": false,
121
          "type": "string"
122
        },
123
        {
124
          "name": "opac_info",
125
          "in": "query",
126
          "description": "Case insensitive 'starts-with' search on OPAC info",
127
          "required": false,
128
          "type": "string"
129
        },
130
        {
131
          "$ref": "../parameters.json#/match"
132
        },
133
        {
134
          "$ref": "../parameters.json#/order_by"
135
        },
136
        {
137
          "$ref": "../parameters.json#/page"
138
        },
139
        {
140
          "$ref": "../parameters.json#/per_page"
141
        },
142
        {
143
          "$ref": "../parameters.json#/q_param"
144
        },
145
        {
146
          "$ref": "../parameters.json#/q_body"
147
        },
148
        {
149
          "$ref": "../parameters.json#/q_header"
150
        }
151
      ],
152
      "produces": [
153
        "application/json"
154
      ],
155
      "responses": {
156
        "200": {
157
          "description": "A list of libraries",
158
          "schema": {
159
            "type": "array",
160
            "items": {
161
              "$ref": "../definitions.json#/library"
162
            }
163
          }
164
        },
165
        "500": {
166
          "description": "Internal error",
167
          "schema": {
168
            "$ref": "../definitions.json#/error"
169
          }
170
        },
171
        "503": {
172
          "description": "Under maintenance",
173
          "schema": {
174
            "$ref": "../definitions.json#/error"
175
          }
176
        }
177
      },
178
      "x-koha-authorization": {
179
        "permissions": {
180
          "catalogue": "1"
181
        }
182
      },
183
      "x-koha-embed": [
184
        "smtp_server"
185
      ]
186
    },
187
    "post": {
188
      "x-mojo-to": "Libraries#add",
189
      "operationId": "addLibrary",
190
      "tags": [
191
        "libraries"
192
      ],
193
      "summary": "Add library",
194
      "parameters": [
195
        {
196
          "name": "body",
197
          "in": "body",
198
          "description": "A JSON object containing informations about the new library",
199
          "required": true,
200
          "schema": {
201
            "$ref": "../definitions.json#/library"
202
          }
203
        }
204
      ],
205
      "produces": [
206
        "application/json"
207
      ],
208
      "responses": {
209
        "201": {
210
          "description": "Library added",
211
          "schema": {
212
            "$ref": "../definitions.json#/library"
213
          }
214
        },
215
        "400": {
216
          "description": "Bad request",
217
          "schema": {
218
            "$ref": "../definitions.json#/error"
219
          }
220
        },
221
        "401": {
222
          "description": "Authentication required",
223
          "schema": {
224
            "$ref": "../definitions.json#/error"
225
          }
226
        },
227
        "403": {
228
          "description": "Access forbidden",
229
          "schema": {
230
            "$ref": "../definitions.json#/error"
231
          }
232
        },
233
        "409": {
234
          "description": "Conflict in creating resource",
235
          "schema": {
236
            "$ref": "../definitions.json#/error"
237
          }
238
        },
239
        "500": {
240
          "description": "Internal error",
241
          "schema": {
242
            "$ref": "../definitions.json#/error"
243
          }
244
        },
245
        "503": {
246
          "description": "Under maintenance",
247
          "schema": {
248
            "$ref": "../definitions.json#/error"
249
          }
250
        }
251
      },
252
      "x-koha-authorization": {
253
        "permissions": {
254
          "parameters": "manage_libraries"
255
        }
256
      }
257
    }
258
  },
259
  "/libraries/{library_id}": {
260
    "get": {
261
      "x-mojo-to": "Libraries#get",
262
      "operationId": "getLibrary",
263
      "tags": [
264
        "libraries"
265
      ],
266
      "summary": "Get library",
267
      "parameters": [
268
        {
269
          "$ref": "../parameters.json#/library_id_pp"
270
        }
271
      ],
272
      "produces": [
273
        "application/json"
274
      ],
275
      "responses": {
276
        "200": {
277
          "description": "A library",
278
          "schema": {
279
            "$ref": "../definitions.json#/library"
280
          }
281
        },
282
        "404": {
283
          "description": "Library not found",
284
          "schema": {
285
            "$ref": "../definitions.json#/error"
286
          }
287
        }
288
      },
289
      "x-koha-authorization": {
290
        "permissions": {
291
          "catalogue": "1"
292
        }
293
      },
294
      "x-koha-embed": [
295
        "smtp_server"
296
      ]
297
    },
298
    "put": {
299
      "x-mojo-to": "Libraries#update",
300
      "operationId": "updateLibrary",
301
      "tags": [
302
        "libraries"
303
      ],
304
      "summary": "Update library",
305
      "parameters": [
306
        {
307
          "$ref": "../parameters.json#/library_id_pp"
308
        },
309
        {
310
          "name": "body",
311
          "in": "body",
312
          "description": "A JSON object containing information on the library",
313
          "required": true,
314
          "schema": {
315
            "$ref": "../definitions.json#/library"
316
          }
317
        }
318
      ],
319
      "consumes": [
320
        "application/json"
321
      ],
322
      "produces": [
323
        "application/json"
324
      ],
325
      "responses": {
326
        "200": {
327
          "description": "A library",
328
          "schema": {
329
            "$ref": "../definitions.json#/library"
330
          }
331
        },
332
        "400": {
333
          "description": "Bad request",
334
          "schema": {
335
            "$ref": "../definitions.json#/error"
336
          }
337
        },
338
        "401": {
339
          "description": "Authentication required",
340
          "schema": {
341
            "$ref": "../definitions.json#/error"
342
          }
343
        },
344
        "403": {
345
          "description": "Access forbidden",
346
          "schema": {
347
            "$ref": "../definitions.json#/error"
348
          }
349
        },
350
        "404": {
351
          "description": "Library not found",
352
          "schema": {
353
            "$ref": "../definitions.json#/error"
354
          }
355
        },
356
        "500": {
357
          "description": "Internal error",
358
          "schema": {
359
            "$ref": "../definitions.json#/error"
360
          }
361
        },
362
        "503": {
363
          "description": "Under maintenance",
364
          "schema": {
365
            "$ref": "../definitions.json#/error"
366
          }
367
        }
368
      },
369
      "x-koha-authorization": {
370
        "permissions": {
371
          "parameters": "manage_libraries"
372
        }
373
      }
374
    },
375
    "delete": {
376
      "x-mojo-to": "Libraries#delete",
377
      "operationId": "deleteLibrary",
378
      "tags": [
379
        "libraries"
380
      ],
381
      "summary": "Delete library",
382
      "parameters": [
383
        {
384
          "$ref": "../parameters.json#/library_id_pp"
385
        }
386
      ],
387
      "produces": [
388
        "application/json"
389
      ],
390
      "responses": {
391
        "204": {
392
          "description": "Library deleted",
393
          "schema": {
394
            "type": "string"
395
          }
396
        },
397
        "401": {
398
          "description": "Authentication required",
399
          "schema": {
400
            "$ref": "../definitions.json#/error"
401
          }
402
        },
403
        "403": {
404
          "description": "Access forbidden",
405
          "schema": {
406
            "$ref": "../definitions.json#/error"
407
          }
408
        },
409
        "404": {
410
          "description": "Library not found",
411
          "schema": {
412
            "$ref": "../definitions.json#/error"
413
          }
414
        },
415
        "500": {
416
          "description": "Internal error",
417
          "schema": {
418
            "$ref": "../definitions.json#/error"
419
          }
420
        },
421
        "503": {
422
          "description": "Under maintenance",
423
          "schema": {
424
            "$ref": "../definitions.json#/error"
425
          }
426
        }
427
      },
428
      "x-koha-authorization": {
429
        "permissions": {
430
          "parameters": "manage_libraries"
431
        }
432
      }
433
    }
434
  },
435
  "/public/libraries": {
436
    "get": {
437
      "x-mojo-to": "Libraries#list",
438
      "operationId": "listLibrariesPublic",
439
      "tags": [
440
        "libraries"
441
      ],
442
      "summary": "List libraries",
443
      "parameters": [
444
        {
445
          "$ref": "../parameters.json#/match"
446
        },
447
        {
448
          "$ref": "../parameters.json#/order_by"
449
        },
450
        {
451
          "$ref": "../parameters.json#/page"
452
        },
453
        {
454
          "$ref": "../parameters.json#/per_page"
455
        },
456
        {
457
          "$ref": "../parameters.json#/q_param"
458
        },
459
        {
460
          "$ref": "../parameters.json#/q_body"
461
        },
462
        {
463
          "$ref": "../parameters.json#/q_header"
464
        }
465
      ],
466
      "produces": [
467
        "application/json"
468
      ],
469
      "responses": {
470
        "200": {
471
          "description": "A list of libraries",
472
          "schema": {
473
            "type": "array",
474
            "items": {
475
              "$ref": "../definitions.json#/library"
476
            }
477
          }
478
        },
479
        "500": {
480
          "description": "Internal error",
481
          "schema": {
482
            "$ref": "../definitions.json#/error"
483
          }
484
        },
485
        "503": {
486
          "description": "Under maintenance",
487
          "schema": {
488
            "$ref": "../definitions.json#/error"
489
          }
490
        }
491
      }
492
    }
493
  },
494
  "/public/libraries/{library_id}": {
495
    "get": {
496
      "x-mojo-to": "Libraries#get",
497
      "operationId": "getLibraryPublic",
498
      "tags": [
499
        "libraries"
500
      ],
501
      "summary": "Get library (public)",
502
      "parameters": [
503
        {
504
          "$ref": "../parameters.json#/library_id_pp"
505
        }
506
      ],
507
      "produces": [
508
        "application/json"
509
      ],
510
      "responses": {
511
        "200": {
512
          "description": "A library"
513
        },
514
        "401": {
515
          "description": "Authentication required",
516
          "schema": {
517
            "$ref": "../definitions.json#/error"
518
          }
519
        },
520
        "403": {
521
          "description": "Access forbidden",
522
          "schema": {
523
            "$ref": "../definitions.json#/error"
524
          }
525
        },
526
        "404": {
527
          "description": "Library not found",
528
          "schema": {
529
            "$ref": "../definitions.json#/error"
530
          }
531
        },
532
        "406": {
533
          "description": "Not acceptable",
534
          "schema": {
535
            "type": "array",
536
            "description": "Accepted content-types",
537
            "items": {
538
                "type": "string"
539
            }
540
          }
541
        },
542
        "500": {
543
          "description": "Internal server error",
544
          "schema": {
545
            "$ref": "../definitions.json#/error"
546
          }
547
        },
548
        "503": {
549
          "description": "Under maintenance",
550
          "schema": {
551
            "$ref": "../definitions.json#/error"
552
          }
553
        }
554
      }
555
    }
556
  }
557
}
(-)a/api/v1/swagger/paths/libraries.yaml (+356 lines)
Line 0 Link Here
1
---
2
/libraries:
3
  get:
4
    x-mojo-to: Libraries#list
5
    operationId: listLibraries
6
    tags:
7
      - libraries
8
    summary: List libraries
9
    parameters:
10
      - name: name
11
        in: query
12
        description: Case insensitive 'starts-with' search on name
13
        required: false
14
        type: string
15
      - name: address1
16
        in: query
17
        description: Case insensitive 'starts-with' search on address1
18
        required: false
19
        type: string
20
      - name: address2
21
        in: query
22
        description: Case insensitive 'starts-with' search on address2
23
        required: false
24
        type: string
25
      - name: address3
26
        in: query
27
        description: Case insensitive 'starts-with' search on address3
28
        required: false
29
        type: string
30
      - name: postal_code
31
        in: query
32
        description: Case insensitive 'starts-with' search on postal code
33
        required: false
34
        type: string
35
      - name: city
36
        in: query
37
        description: Case insensitive 'starts-with' search on city
38
        required: false
39
        type: string
40
      - name: state
41
        in: query
42
        description: Case insensitive 'starts-with' search on state
43
        required: false
44
        type: string
45
      - name: country
46
        in: query
47
        description: Case insensitive 'starts_with' search on country
48
        required: false
49
        type: string
50
      - name: phone
51
        in: query
52
        description: Case insensitive 'starts_with' search on phone number
53
        required: false
54
        type: string
55
      - name: fax
56
        in: query
57
        description: Case insensitive 'starts_with' search on fax number
58
        required: false
59
        type: string
60
      - name: email
61
        in: query
62
        description: Case insensitive 'starts_with' search on email address
63
        required: false
64
        type: string
65
      - name: reply_to_email
66
        in: query
67
        description: Case insensitive 'starts_with' search on Reply-To email address
68
        required: false
69
        type: string
70
      - name: return_path_email
71
        in: query
72
        description: Case insensitive 'starts_with' search on Return-Path email address
73
        required: false
74
        type: string
75
      - name: url
76
        in: query
77
        description: Case insensitive 'starts_with' search on website URL
78
        required: false
79
        type: string
80
      - name: ip
81
        in: query
82
        description: Case insensitive 'starts_with' search on IP address
83
        required: false
84
        type: string
85
      - name: notes
86
        in: query
87
        description: Case insensitive 'starts_with' search on notes
88
        required: false
89
        type: string
90
      - name: opac_info
91
        in: query
92
        description: Case insensitive 'starts-with' search on OPAC info
93
        required: false
94
        type: string
95
      - $ref: ../parameters.yaml#/match
96
      - $ref: ../parameters.yaml#/order_by
97
      - $ref: ../parameters.yaml#/page
98
      - $ref: ../parameters.yaml#/per_page
99
      - $ref: ../parameters.yaml#/q_param
100
      - $ref: ../parameters.yaml#/q_body
101
      - $ref: ../parameters.yaml#/q_header
102
    produces:
103
      - application/json
104
    responses:
105
      "200":
106
        description: A list of libraries
107
        schema:
108
          type: array
109
          items:
110
            $ref: ../definitions.yaml#/library
111
      "500":
112
        description: Internal error
113
        schema:
114
          $ref: ../definitions.yaml#/error
115
      "503":
116
        description: Under maintenance
117
        schema:
118
          $ref: ../definitions.yaml#/error
119
    x-koha-authorization:
120
      permissions:
121
        catalogue: "1"
122
    x-koha-embed:
123
      - smtp_server
124
  post:
125
    x-mojo-to: Libraries#add
126
    operationId: addLibrary
127
    tags:
128
      - libraries
129
    summary: Add library
130
    parameters:
131
      - name: body
132
        in: body
133
        description: A JSON object containing informations about the new library
134
        required: true
135
        schema:
136
          $ref: ../definitions.yaml#/library
137
    produces:
138
      - application/json
139
    responses:
140
      "201":
141
        description: Library added
142
        schema:
143
          $ref: ../definitions.yaml#/library
144
      "400":
145
        description: Bad request
146
        schema:
147
          $ref: ../definitions.yaml#/error
148
      "401":
149
        description: Authentication required
150
        schema:
151
          $ref: ../definitions.yaml#/error
152
      "403":
153
        description: Access forbidden
154
        schema:
155
          $ref: ../definitions.yaml#/error
156
      "409":
157
        description: Conflict in creating resource
158
        schema:
159
          $ref: ../definitions.yaml#/error
160
      "500":
161
        description: Internal error
162
        schema:
163
          $ref: ../definitions.yaml#/error
164
      "503":
165
        description: Under maintenance
166
        schema:
167
          $ref: ../definitions.yaml#/error
168
    x-koha-authorization:
169
      permissions:
170
        parameters: manage_libraries
171
"/libraries/{library_id}":
172
  get:
173
    x-mojo-to: Libraries#get
174
    operationId: getLibrary
175
    tags:
176
      - libraries
177
    summary: Get library
178
    parameters:
179
      - $ref: ../parameters.yaml#/library_id_pp
180
    produces:
181
      - application/json
182
    responses:
183
      "200":
184
        description: A library
185
        schema:
186
          $ref: ../definitions.yaml#/library
187
      "404":
188
        description: Library not found
189
        schema:
190
          $ref: ../definitions.yaml#/error
191
    x-koha-authorization:
192
      permissions:
193
        catalogue: "1"
194
    x-koha-embed:
195
      - smtp_server
196
  put:
197
    x-mojo-to: Libraries#update
198
    operationId: updateLibrary
199
    tags:
200
      - libraries
201
    summary: Update library
202
    parameters:
203
      - $ref: ../parameters.yaml#/library_id_pp
204
      - name: body
205
        in: body
206
        description: A JSON object containing information on the library
207
        required: true
208
        schema:
209
          $ref: ../definitions.yaml#/library
210
    consumes:
211
      - application/json
212
    produces:
213
      - application/json
214
    responses:
215
      "200":
216
        description: A library
217
        schema:
218
          $ref: ../definitions.yaml#/library
219
      "400":
220
        description: Bad request
221
        schema:
222
          $ref: ../definitions.yaml#/error
223
      "401":
224
        description: Authentication required
225
        schema:
226
          $ref: ../definitions.yaml#/error
227
      "403":
228
        description: Access forbidden
229
        schema:
230
          $ref: ../definitions.yaml#/error
231
      "404":
232
        description: Library not found
233
        schema:
234
          $ref: ../definitions.yaml#/error
235
      "500":
236
        description: Internal error
237
        schema:
238
          $ref: ../definitions.yaml#/error
239
      "503":
240
        description: Under maintenance
241
        schema:
242
          $ref: ../definitions.yaml#/error
243
    x-koha-authorization:
244
      permissions:
245
        parameters: manage_libraries
246
  delete:
247
    x-mojo-to: Libraries#delete
248
    operationId: deleteLibrary
249
    tags:
250
      - libraries
251
    summary: Delete library
252
    parameters:
253
      - $ref: ../parameters.yaml#/library_id_pp
254
    produces:
255
      - application/json
256
    responses:
257
      "204":
258
        description: Library deleted
259
        schema:
260
          type: string
261
      "401":
262
        description: Authentication required
263
        schema:
264
          $ref: ../definitions.yaml#/error
265
      "403":
266
        description: Access forbidden
267
        schema:
268
          $ref: ../definitions.yaml#/error
269
      "404":
270
        description: Library not found
271
        schema:
272
          $ref: ../definitions.yaml#/error
273
      "500":
274
        description: Internal error
275
        schema:
276
          $ref: ../definitions.yaml#/error
277
      "503":
278
        description: Under maintenance
279
        schema:
280
          $ref: ../definitions.yaml#/error
281
    x-koha-authorization:
282
      permissions:
283
        parameters: manage_libraries
284
/public/libraries:
285
  get:
286
    x-mojo-to: Libraries#list
287
    operationId: listLibrariesPublic
288
    tags:
289
      - libraries
290
    summary: List libraries
291
    parameters:
292
      - $ref: ../parameters.yaml#/match
293
      - $ref: ../parameters.yaml#/order_by
294
      - $ref: ../parameters.yaml#/page
295
      - $ref: ../parameters.yaml#/per_page
296
      - $ref: ../parameters.yaml#/q_param
297
      - $ref: ../parameters.yaml#/q_body
298
      - $ref: ../parameters.yaml#/q_header
299
    produces:
300
      - application/json
301
    responses:
302
      "200":
303
        description: A list of libraries
304
        schema:
305
          type: array
306
          items:
307
            $ref: ../definitions.yaml#/library
308
      "500":
309
        description: Internal error
310
        schema:
311
          $ref: ../definitions.yaml#/error
312
      "503":
313
        description: Under maintenance
314
        schema:
315
          $ref: ../definitions.yaml#/error
316
"/public/libraries/{library_id}":
317
  get:
318
    x-mojo-to: Libraries#get
319
    operationId: getLibraryPublic
320
    tags:
321
      - libraries
322
    summary: Get library (public)
323
    parameters:
324
      - $ref: ../parameters.yaml#/library_id_pp
325
    produces:
326
      - application/json
327
    responses:
328
      "200":
329
        description: A library
330
      "401":
331
        description: Authentication required
332
        schema:
333
          $ref: ../definitions.yaml#/error
334
      "403":
335
        description: Access forbidden
336
        schema:
337
          $ref: ../definitions.yaml#/error
338
      "404":
339
        description: Library not found
340
        schema:
341
          $ref: ../definitions.yaml#/error
342
      "406":
343
        description: Not acceptable
344
        schema:
345
          type: array
346
          description: Accepted content-types
347
          items:
348
            type: string
349
      "500":
350
        description: Internal server error
351
        schema:
352
          $ref: ../definitions.yaml#/error
353
      "503":
354
        description: Under maintenance
355
        schema:
356
          $ref: ../definitions.yaml#/error
(-)a/api/v1/swagger/paths/oauth.json (-66 lines)
Lines 1-66 Link Here
1
{
2
    "/oauth/token": {
3
        "post": {
4
            "x-mojo-to": "OAuth#token",
5
            "operationId": "tokenOAuth",
6
            "tags": ["oauth"],
7
            "summary": "Get access token",
8
            "produces": [
9
                "application/json"
10
            ],
11
            "parameters": [
12
                {
13
                    "name": "grant_type",
14
                    "in": "formData",
15
                    "description": "grant type (client_credentials)",
16
                    "required": true,
17
                    "type": "string"
18
                },
19
                {
20
                    "name": "client_id",
21
                    "in": "formData",
22
                    "description": "client id",
23
                    "type": "string"
24
                },
25
                {
26
                    "name": "client_secret",
27
                    "in": "formData",
28
                    "description": "client secret",
29
                    "type": "string"
30
                }
31
            ],
32
            "responses": {
33
                "200": {
34
                    "description": "OK",
35
                    "schema": {
36
                        "type": "object",
37
                        "properties": {
38
                            "access_token": {
39
                                "type": "string"
40
                            },
41
                            "token_type": {
42
                                "type": "string"
43
                            },
44
                            "expires_in": {
45
                                "type": "integer"
46
                            }
47
                        },
48
                        "additionalProperties": false
49
                    }
50
                },
51
                "400": {
52
                    "description": "Bad Request",
53
                    "schema": {
54
                        "$ref": "../definitions.json#/error"
55
                    }
56
                },
57
                "403": {
58
                    "description": "Access forbidden",
59
                    "schema": {
60
                        "$ref": "../definitions.json#/error"
61
                    }
62
                }
63
            }
64
        }
65
    }
66
}
(-)a/api/v1/swagger/paths/oauth.yaml (+45 lines)
Line 0 Link Here
1
---
2
/oauth/token:
3
  post:
4
    x-mojo-to: OAuth#token
5
    operationId: tokenOAuth
6
    tags:
7
      - oauth
8
    summary: Get access token
9
    produces:
10
      - application/json
11
    parameters:
12
      - name: grant_type
13
        in: formData
14
        description: grant type (client_credentials)
15
        required: true
16
        type: string
17
      - name: client_id
18
        in: formData
19
        description: client id
20
        type: string
21
      - name: client_secret
22
        in: formData
23
        description: client secret
24
        type: string
25
    responses:
26
      "200":
27
        description: OK
28
        schema:
29
          type: object
30
          properties:
31
            access_token:
32
              type: string
33
            token_type:
34
              type: string
35
            expires_in:
36
              type: integer
37
          additionalProperties: false
38
      "400":
39
        description: Bad Request
40
        schema:
41
          $ref: ../definitions.yaml#/error
42
      "403":
43
        description: Access forbidden
44
        schema:
45
          $ref: ../definitions.yaml#/error
(-)a/api/v1/swagger/paths/patrons.json (-712 lines)
Lines 1-712 Link Here
1
{
2
  "/patrons": {
3
    "get": {
4
      "x-mojo-to": "Patrons#list",
5
      "operationId": "listPatrons",
6
      "tags": ["patrons"],
7
      "summary": "List patrons",
8
      "produces": [
9
          "application/json"
10
      ],
11
      "parameters": [{
12
        "name": "patron_id",
13
        "in": "query",
14
        "description": "Search on patron_id",
15
        "required": false,
16
        "type": "string"
17
      }, {
18
        "name": "cardnumber",
19
        "in": "query",
20
        "description": "Case insensitive search on cardnumber",
21
        "required": false,
22
        "type": "string"
23
      }, {
24
        "name": "surname",
25
        "in": "query",
26
        "description": "Case insensitive search on surname",
27
        "required": false,
28
        "type": "string"
29
      }, {
30
        "name": "firstname",
31
        "in": "query",
32
        "description": "Case insensitive search on firstname",
33
        "required": false,
34
        "type": "string"
35
      }, {
36
        "name": "title",
37
        "in": "query",
38
        "description": "Case insensitive search on title",
39
        "required": false,
40
        "type": "string"
41
      }, {
42
        "name": "other_name",
43
        "in": "query",
44
        "description": "Case insensitive search on othernames",
45
        "required": false,
46
        "type": "string"
47
      }, {
48
        "name": "initials",
49
        "in": "query",
50
        "description": "Case insensitive search on initials",
51
        "required": false,
52
        "type": "string"
53
      }, {
54
        "name": "street_number",
55
        "in": "query",
56
        "description": "Case insensitive search on streetnumber",
57
        "required": false,
58
        "type": "string"
59
      }, {
60
        "name": "street_type",
61
        "in": "query",
62
        "description": "Case insensitive search on streettype",
63
        "required": false,
64
        "type": "string"
65
      }, {
66
        "name": "address",
67
        "in": "query",
68
        "description": "Case insensitive search on address",
69
        "required": false,
70
        "type": "string"
71
      }, {
72
        "name": "address2",
73
        "in": "query",
74
        "description": "Case insensitive search on address2",
75
        "required": false,
76
        "type": "string"
77
      }, {
78
        "name": "city",
79
        "in": "query",
80
        "description": "Case insensitive search on city",
81
        "required": false,
82
        "type": "string"
83
      }, {
84
        "name": "state",
85
        "in": "query",
86
        "description": "Case insensitive search on state",
87
        "required": false,
88
        "type": "string"
89
      }, {
90
        "name": "postal_code",
91
        "in": "query",
92
        "description": "Case insensitive search on zipcode",
93
        "required": false,
94
        "type": "string"
95
      }, {
96
        "name": "country",
97
        "in": "query",
98
        "description": "Case insensitive search on country",
99
        "required": false,
100
        "type": "string"
101
      }, {
102
        "name": "email",
103
        "in": "query",
104
        "description": "Case insensitive search on email",
105
        "required": false,
106
        "type": "string"
107
      }, {
108
        "name": "phone",
109
        "in": "query",
110
        "description": "Case insensitive search on phone",
111
        "required": false,
112
        "type": "string"
113
      }, {
114
        "name": "mobile",
115
        "in": "query",
116
        "description": "Case insensitive search on mobile",
117
        "required": false,
118
        "type": "string"
119
      }, {
120
        "name": "fax",
121
        "in": "query",
122
        "description": "Case insensitive search on fax",
123
        "required": false,
124
        "type": "string"
125
      }, {
126
        "name": "secondary_email",
127
        "in": "query",
128
        "description": "Case insensitive search on secondary_email",
129
        "required": false,
130
        "type": "string"
131
      }, {
132
        "name": "secondary_phone",
133
        "in": "query",
134
        "description": "Case insensitive search on secondary_phone",
135
        "required": false,
136
        "type": "string"
137
      }, {
138
        "name": "altaddress_street_number",
139
        "in": "query",
140
        "description": "Case insensitive search on altaddress_street_number",
141
        "required": false,
142
        "type": "string"
143
      }, {
144
        "name": "altaddress_street_type",
145
        "in": "query",
146
        "description": "Case insensitive search on altaddress_street_type",
147
        "required": false,
148
        "type": "string"
149
      }, {
150
        "name": "altaddress_address",
151
        "in": "query",
152
        "description": "Case insensitive search on altaddress_address",
153
        "required": false,
154
        "type": "string"
155
      }, {
156
        "name": "altaddress_address2",
157
        "in": "query",
158
        "description": "Case insensitive search on altaddress_address2",
159
        "required": false,
160
        "type": "string"
161
      }, {
162
        "name": "altaddress_city",
163
        "in": "query",
164
        "description": "Case insensitive search on altaddress_city",
165
        "required": false,
166
        "type": "string"
167
      }, {
168
        "name": "altaddress_state",
169
        "in": "query",
170
        "description": "Case insensitive search on altaddress_state",
171
        "required": false,
172
        "type": "string"
173
      }, {
174
        "name": "altaddress_postal_code",
175
        "in": "query",
176
        "description": "Case insensitive search on altaddress_postal_code",
177
        "required": false,
178
        "type": "string"
179
      }, {
180
        "name": "altaddress_country",
181
        "in": "query",
182
        "description": "Case insensitive search on altaddress_country",
183
        "required": false,
184
        "type": "string"
185
      }, {
186
        "name": "altaddress_email",
187
        "in": "query",
188
        "description": "Case insensitive search on altaddress_email",
189
        "required": false,
190
        "type": "string"
191
      }, {
192
        "name": "altaddress_phone",
193
        "in": "query",
194
        "description": "Case insensitive search on altaddress_phone",
195
        "required": false,
196
        "type": "string"
197
      }, {
198
        "name": "date_of_birth",
199
        "in": "query",
200
        "description": "Case insensitive search on date_of_birth",
201
        "required": false,
202
        "type": "string"
203
      }, {
204
        "name": "library_id",
205
        "in": "query",
206
        "description": "Case insensitive search on library_id",
207
        "required": false,
208
        "type": "string"
209
      }, {
210
        "name": "category_id",
211
        "in": "query",
212
        "description": "Case insensitive search on category_id",
213
        "required": false,
214
        "type": "string"
215
      }, {
216
        "name": "date_enrolled",
217
        "in": "query",
218
        "description": "Case insensitive search on date_enrolled",
219
        "required": false,
220
        "type": "string"
221
      }, {
222
        "name": "expiry_date",
223
        "in": "query",
224
        "description": "Case insensitive search on expiry_date",
225
        "required": false,
226
        "type": "string"
227
      }, {
228
        "name": "incorrect_address",
229
        "in": "query",
230
        "description": "Search on incorrect_address",
231
        "required": false,
232
        "type": "boolean"
233
      }, {
234
        "name": "patron_card_lost",
235
        "in": "query",
236
        "description": "Search on patron_card_lost",
237
        "required": false,
238
        "type": "boolean"
239
      }, {
240
        "name": "restricted",
241
        "in": "query",
242
        "description": "Filter search by restricted",
243
        "required": false,
244
        "type": "boolean"
245
      }, {
246
        "name": "guarantor_id",
247
        "in": "query",
248
        "description": "Search on guarantor_id",
249
        "required": false,
250
        "type": "string"
251
      }, {
252
        "name": "staff_notes",
253
        "in": "query",
254
        "description": "Case insensitive search on staff_notes",
255
        "required": false,
256
        "type": "string"
257
      }, {
258
        "name": "relationship_type",
259
        "in": "query",
260
        "description": "Case insensitive search on relationship_type",
261
        "required": false,
262
        "type": "string"
263
      }, {
264
        "name": "gender",
265
        "in": "query",
266
        "description": "Case insensitive search on gender",
267
        "required": false,
268
        "type": "string"
269
      }, {
270
        "name": "userid",
271
        "in": "query",
272
        "description": "Case insensitive search on userid",
273
        "required": false,
274
        "type": "string"
275
      }, {
276
        "name": "opac_notes",
277
        "in": "query",
278
        "description": "Case insensitive search on opac_notes",
279
        "required": false,
280
        "type": "string"
281
      }, {
282
        "name": "altaddress_notes",
283
        "in": "query",
284
        "description": "Case insensitive search on altaddress_notes",
285
        "required": false,
286
        "type": "string"
287
      }, {
288
        "name": "statistics_1",
289
        "in": "query",
290
        "description": "Case insensitive search on statistics_1",
291
        "required": false,
292
        "type": "string"
293
      }, {
294
        "name": "statistics_2",
295
        "in": "query",
296
        "description": "Case insensitive search on statistics_2",
297
        "required": false,
298
        "type": "string"
299
      }, {
300
        "name": "autorenew_checkouts",
301
        "in": "query",
302
        "description": "Search on autorenew_checkouts",
303
        "required": false,
304
        "type": "boolean"
305
      }, {
306
        "name": "altcontact_firstname",
307
        "in": "query",
308
        "description": "Case insensitive search on altcontact_firstname",
309
        "required": false,
310
        "type": "string"
311
      }, {
312
        "name": "altcontact_surname",
313
        "in": "query",
314
        "description": "Case insensitive search on altcontact_surname",
315
        "required": false,
316
        "type": "string"
317
      }, {
318
        "name": "altcontact_address",
319
        "in": "query",
320
        "description": "Case insensitive search on altcontact_address",
321
        "required": false,
322
        "type": "string"
323
      }, {
324
        "name": "altcontact_address2",
325
        "in": "query",
326
        "description": "Case insensitive search on altcontact_address2",
327
        "required": false,
328
        "type": "string"
329
      }, {
330
        "name": "altcontact_city",
331
        "in": "query",
332
        "description": "Case insensitive search on altcontact_city",
333
        "required": false,
334
        "type": "string"
335
      }, {
336
        "name": "altcontact_state",
337
        "in": "query",
338
        "description": "Case insensitive search on altcontact_state",
339
        "required": false,
340
        "type": "string"
341
      }, {
342
        "name": "altcontact_postal_code",
343
        "in": "query",
344
        "description": "Case insensitive search on altcontact_postal_code",
345
        "required": false,
346
        "type": "string"
347
      }, {
348
        "name": "altcontact_country",
349
        "in": "query",
350
        "description": "Case insensitive search on altcontact_country",
351
        "required": false,
352
        "type": "string"
353
      }, {
354
        "name": "altcontact_phone",
355
        "in": "query",
356
        "description": "Case insensitive search on altcontact_phone",
357
        "required": false,
358
        "type": "string"
359
      }, {
360
        "name": "sms_number",
361
        "in": "query",
362
        "description": "Case insensitive search on sms_number",
363
        "required": false,
364
        "type": "string"
365
      }, {
366
        "name": "sms_provider_id",
367
        "in": "query",
368
        "description": "Case insensitive search on sms_provider_id",
369
        "required": false,
370
        "type": "string"
371
      }, {
372
        "name": "privacy",
373
        "in": "query",
374
        "description": "Search on privacy",
375
        "required": false,
376
        "type": "string"
377
      }, {
378
        "name": "privacy_guarantor_checkouts",
379
        "in": "query",
380
        "description": "Search on privacy_guarantor_checkouts",
381
        "required": false,
382
        "type": "string"
383
      }, {
384
        "name": "check_previous_checkout",
385
        "in": "query",
386
        "description": "Case insensitive search on check_previous_checkout",
387
        "required": false,
388
        "type": "string"
389
      }, {
390
        "name": "updated_on",
391
        "in": "query",
392
        "description": "Search on updated_on",
393
        "required": false,
394
        "type": "string"
395
      }, {
396
        "name": "last_seen",
397
        "in": "query",
398
        "description": "Case insensitive search on last_seen",
399
        "required": false,
400
        "type": "string"
401
      }, {
402
        "name": "lang",
403
        "in": "query",
404
        "description": "Case insensitive search on lang",
405
        "required": false,
406
        "type": "string"
407
      }, {
408
        "name": "login_attempts",
409
        "in": "query",
410
        "description": "Search on login_attempts",
411
        "required": false,
412
        "type": "string"
413
      }, {
414
        "$ref": "../parameters.json#/match"
415
      }, {
416
        "$ref": "../parameters.json#/order_by"
417
      }, {
418
        "$ref": "../parameters.json#/page"
419
      }, {
420
        "$ref": "../parameters.json#/per_page"
421
      }, {
422
        "$ref": "../parameters.json#/q_param"
423
      }, {
424
        "$ref": "../parameters.json#/q_body"
425
      }, {
426
        "$ref": "../parameters.json#/q_header"
427
      }],
428
      "responses": {
429
        "200": {
430
          "description": "A list of patrons",
431
          "schema": {
432
            "type": "array",
433
            "items": {
434
              "$ref": "../definitions.json#/patron"
435
            }
436
          }
437
        },
438
        "401": {
439
          "description": "Authentication required",
440
          "schema": {
441
            "$ref": "../definitions.json#/error"
442
          }
443
        },
444
        "403": {
445
          "description": "Access forbidden",
446
          "schema": {
447
            "$ref": "../definitions.json#/error"
448
          }
449
        },
450
        "500": {
451
          "description": "Internal server error",
452
          "schema": {
453
            "$ref": "../definitions.json#/error"
454
          }
455
        }
456
      },
457
      "x-koha-authorization": {
458
        "permissions": {
459
          "borrowers": "1"
460
        }
461
      },
462
      "x-koha-embed": [
463
        "extended_attributes"
464
      ]
465
    },
466
    "post": {
467
      "x-mojo-to": "Patrons#add",
468
      "operationId": "addPatron",
469
      "tags": ["patrons"],
470
      "summary": "Add patron",
471
      "parameters": [{
472
        "name": "body",
473
        "in": "body",
474
        "description": "A JSON object containing information about the new patron",
475
        "required": true,
476
        "schema": {
477
          "$ref": "../definitions.json#/patron"
478
        }
479
      }],
480
      "consumes": ["application/json"],
481
      "produces": ["application/json"],
482
      "responses": {
483
        "201": {
484
          "description": "A successfully created patron",
485
          "schema": {
486
            "items": {
487
              "$ref": "../definitions.json#/patron"
488
            }
489
          }
490
        },
491
        "400": {
492
          "description": "Bad parameter",
493
          "schema": {
494
            "$ref": "../definitions.json#/error"
495
          }
496
        },
497
        "401": {
498
          "description": "Authentication required",
499
          "schema": {
500
            "$ref": "../definitions.json#/error"
501
          }
502
        },
503
        "403": {
504
          "description": "Access forbidden",
505
          "schema": {
506
            "$ref": "../definitions.json#/error"
507
          }
508
        },
509
        "404": {
510
          "description": "Resource not found",
511
          "schema": {
512
            "$ref": "../definitions.json#/error"
513
          }
514
        },
515
        "409": {
516
          "description": "Conflict in creating resource",
517
          "schema": {
518
            "$ref": "../definitions.json#/error"
519
          }
520
        },
521
        "500": {
522
          "description": "Internal server error",
523
          "schema": {
524
            "$ref": "../definitions.json#/error"
525
          }
526
        },
527
        "503": {
528
          "description": "Under maintenance",
529
          "schema": {
530
            "$ref": "../definitions.json#/error"
531
          }
532
        }
533
      },
534
      "x-koha-authorization": {
535
        "permissions": {
536
          "borrowers": "edit_borrowers"
537
        }
538
      }
539
    }
540
  },
541
  "/patrons/{patron_id}": {
542
    "get": {
543
      "x-mojo-to": "Patrons#get",
544
      "operationId": "getPatron",
545
      "tags": ["patrons"],
546
      "summary": "Get patron",
547
      "parameters": [{
548
          "$ref": "../parameters.json#/patron_id_pp"
549
      }],
550
      "produces": [
551
        "application/json"
552
      ],
553
      "responses": {
554
        "200": {
555
          "description": "A patron",
556
          "schema": {
557
            "$ref": "../definitions.json#/patron"
558
          }
559
        },
560
        "401": {
561
          "description": "Authentication required",
562
          "schema": {
563
            "$ref": "../definitions.json#/error"
564
          }
565
        },
566
        "403": {
567
          "description": "Access forbidden",
568
          "schema": {
569
            "$ref": "../definitions.json#/error"
570
          }
571
        },
572
        "404": {
573
          "description": "Patron not found",
574
          "schema": {
575
            "$ref": "../definitions.json#/error"
576
          }
577
        },
578
        "500": {
579
          "description": "Internal server error",
580
          "schema": {
581
            "$ref": "../definitions.json#/error"
582
          }
583
        },
584
        "503": {
585
          "description": "Under maintenance",
586
          "schema": {
587
            "$ref": "../definitions.json#/error"
588
          }
589
        }
590
      },
591
      "x-koha-authorization": {
592
        "permissions": {
593
          "borrowers": "edit_borrowers"
594
        }
595
      },
596
      "x-koha-embed": [
597
        "extended_attributes"
598
      ]
599
    },
600
    "put": {
601
      "x-mojo-to": "Patrons#update",
602
      "operationId": "updatePatron",
603
      "tags": ["patrons"],
604
      "summary": "Update patron",
605
      "parameters": [
606
        {
607
          "$ref": "../parameters.json#/patron_id_pp"
608
        },
609
        {
610
          "name": "body",
611
          "in": "body",
612
          "description": "A JSON object containing new information about existing patron",
613
          "required": true,
614
          "schema": {
615
            "$ref": "../definitions.json#/patron"
616
          }
617
        }
618
      ],
619
      "consumes": ["application/json"],
620
      "produces": ["application/json"],
621
      "responses": {
622
        "200": {
623
          "description": "A successfully updated patron",
624
          "schema": {
625
            "items": {
626
              "$ref": "../definitions.json#/patron"
627
            }
628
          }
629
        },
630
        "400": {
631
          "description": "Bad parameter",
632
          "schema": {
633
            "$ref": "../definitions.json#/error"
634
          }
635
        },
636
        "403": {
637
          "description": "Access forbidden",
638
          "schema": {
639
            "$ref": "../definitions.json#/error"
640
          }
641
        },
642
        "404": {
643
          "description": "Resource not found",
644
          "schema": {
645
            "$ref": "../definitions.json#/error"
646
          }
647
        },
648
        "409": {
649
          "description": "Conflict in updating resource",
650
          "schema": {
651
            "$ref": "../definitions.json#/error"
652
          }
653
        },
654
        "500": {
655
          "description": "Internal server error",
656
          "schema": {
657
            "$ref": "../definitions.json#/error"
658
          }
659
        }
660
      },
661
      "x-koha-authorization": {
662
        "permissions": {
663
          "borrowers": "1"
664
        }
665
      }
666
    },
667
    "delete": {
668
      "x-mojo-to": "Patrons#delete",
669
      "operationId": "deletePatron",
670
      "tags": ["patrons"],
671
      "summary": "Delete patron",
672
      "parameters": [{
673
        "$ref": "../parameters.json#/patron_id_pp"
674
      }],
675
      "produces": ["application/json"],
676
      "responses": {
677
        "204": {
678
          "description": "Patron deleted"
679
        },
680
        "400": {
681
          "description": "Patron deletion failed",
682
          "schema": {
683
            "$ref": "../definitions.json#/error"
684
          }
685
        },
686
        "401": {
687
          "description": "Authentication required",
688
          "schema": {
689
            "$ref": "../definitions.json#/error"
690
          }
691
        },
692
        "403": {
693
          "description": "Access forbidden",
694
          "schema": {
695
            "$ref": "../definitions.json#/error"
696
          }
697
        },
698
        "404": {
699
          "description": "Patron not found",
700
          "schema": {
701
            "$ref": "../definitions.json#/error"
702
          }
703
        }
704
      },
705
      "x-koha-authorization": {
706
        "permissions": {
707
          "borrowers": "delete_borrowers"
708
        }
709
      }
710
    }
711
  }
712
}
(-)a/api/v1/swagger/paths/patrons.yaml (+551 lines)
Line 0 Link Here
1
---
2
/patrons:
3
  get:
4
    x-mojo-to: Patrons#list
5
    operationId: listPatrons
6
    tags:
7
      - patrons
8
    summary: List patrons
9
    produces:
10
      - application/json
11
    parameters:
12
      - name: patron_id
13
        in: query
14
        description: Search on patron_id
15
        required: false
16
        type: string
17
      - name: cardnumber
18
        in: query
19
        description: Case insensitive search on cardnumber
20
        required: false
21
        type: string
22
      - name: surname
23
        in: query
24
        description: Case insensitive search on surname
25
        required: false
26
        type: string
27
      - name: firstname
28
        in: query
29
        description: Case insensitive search on firstname
30
        required: false
31
        type: string
32
      - name: title
33
        in: query
34
        description: Case insensitive search on title
35
        required: false
36
        type: string
37
      - name: other_name
38
        in: query
39
        description: Case insensitive search on othernames
40
        required: false
41
        type: string
42
      - name: initials
43
        in: query
44
        description: Case insensitive search on initials
45
        required: false
46
        type: string
47
      - name: street_number
48
        in: query
49
        description: Case insensitive search on streetnumber
50
        required: false
51
        type: string
52
      - name: street_type
53
        in: query
54
        description: Case insensitive search on streettype
55
        required: false
56
        type: string
57
      - name: address
58
        in: query
59
        description: Case insensitive search on address
60
        required: false
61
        type: string
62
      - name: address2
63
        in: query
64
        description: Case insensitive search on address2
65
        required: false
66
        type: string
67
      - name: city
68
        in: query
69
        description: Case insensitive search on city
70
        required: false
71
        type: string
72
      - name: state
73
        in: query
74
        description: Case insensitive search on state
75
        required: false
76
        type: string
77
      - name: postal_code
78
        in: query
79
        description: Case insensitive search on zipcode
80
        required: false
81
        type: string
82
      - name: country
83
        in: query
84
        description: Case insensitive search on country
85
        required: false
86
        type: string
87
      - name: email
88
        in: query
89
        description: Case insensitive search on email
90
        required: false
91
        type: string
92
      - name: phone
93
        in: query
94
        description: Case insensitive search on phone
95
        required: false
96
        type: string
97
      - name: mobile
98
        in: query
99
        description: Case insensitive search on mobile
100
        required: false
101
        type: string
102
      - name: fax
103
        in: query
104
        description: Case insensitive search on fax
105
        required: false
106
        type: string
107
      - name: secondary_email
108
        in: query
109
        description: Case insensitive search on secondary_email
110
        required: false
111
        type: string
112
      - name: secondary_phone
113
        in: query
114
        description: Case insensitive search on secondary_phone
115
        required: false
116
        type: string
117
      - name: altaddress_street_number
118
        in: query
119
        description: Case insensitive search on altaddress_street_number
120
        required: false
121
        type: string
122
      - name: altaddress_street_type
123
        in: query
124
        description: Case insensitive search on altaddress_street_type
125
        required: false
126
        type: string
127
      - name: altaddress_address
128
        in: query
129
        description: Case insensitive search on altaddress_address
130
        required: false
131
        type: string
132
      - name: altaddress_address2
133
        in: query
134
        description: Case insensitive search on altaddress_address2
135
        required: false
136
        type: string
137
      - name: altaddress_city
138
        in: query
139
        description: Case insensitive search on altaddress_city
140
        required: false
141
        type: string
142
      - name: altaddress_state
143
        in: query
144
        description: Case insensitive search on altaddress_state
145
        required: false
146
        type: string
147
      - name: altaddress_postal_code
148
        in: query
149
        description: Case insensitive search on altaddress_postal_code
150
        required: false
151
        type: string
152
      - name: altaddress_country
153
        in: query
154
        description: Case insensitive search on altaddress_country
155
        required: false
156
        type: string
157
      - name: altaddress_email
158
        in: query
159
        description: Case insensitive search on altaddress_email
160
        required: false
161
        type: string
162
      - name: altaddress_phone
163
        in: query
164
        description: Case insensitive search on altaddress_phone
165
        required: false
166
        type: string
167
      - name: date_of_birth
168
        in: query
169
        description: Case insensitive search on date_of_birth
170
        required: false
171
        type: string
172
      - name: library_id
173
        in: query
174
        description: Case insensitive search on library_id
175
        required: false
176
        type: string
177
      - name: category_id
178
        in: query
179
        description: Case insensitive search on category_id
180
        required: false
181
        type: string
182
      - name: date_enrolled
183
        in: query
184
        description: Case insensitive search on date_enrolled
185
        required: false
186
        type: string
187
      - name: expiry_date
188
        in: query
189
        description: Case insensitive search on expiry_date
190
        required: false
191
        type: string
192
      - name: incorrect_address
193
        in: query
194
        description: Search on incorrect_address
195
        required: false
196
        type: boolean
197
      - name: patron_card_lost
198
        in: query
199
        description: Search on patron_card_lost
200
        required: false
201
        type: boolean
202
      - name: restricted
203
        in: query
204
        description: Filter search by restricted
205
        required: false
206
        type: boolean
207
      - name: guarantor_id
208
        in: query
209
        description: Search on guarantor_id
210
        required: false
211
        type: string
212
      - name: staff_notes
213
        in: query
214
        description: Case insensitive search on staff_notes
215
        required: false
216
        type: string
217
      - name: relationship_type
218
        in: query
219
        description: Case insensitive search on relationship_type
220
        required: false
221
        type: string
222
      - name: gender
223
        in: query
224
        description: Case insensitive search on gender
225
        required: false
226
        type: string
227
      - name: userid
228
        in: query
229
        description: Case insensitive search on userid
230
        required: false
231
        type: string
232
      - name: opac_notes
233
        in: query
234
        description: Case insensitive search on opac_notes
235
        required: false
236
        type: string
237
      - name: altaddress_notes
238
        in: query
239
        description: Case insensitive search on altaddress_notes
240
        required: false
241
        type: string
242
      - name: statistics_1
243
        in: query
244
        description: Case insensitive search on statistics_1
245
        required: false
246
        type: string
247
      - name: statistics_2
248
        in: query
249
        description: Case insensitive search on statistics_2
250
        required: false
251
        type: string
252
      - name: autorenew_checkouts
253
        in: query
254
        description: Search on autorenew_checkouts
255
        required: false
256
        type: boolean
257
      - name: altcontact_firstname
258
        in: query
259
        description: Case insensitive search on altcontact_firstname
260
        required: false
261
        type: string
262
      - name: altcontact_surname
263
        in: query
264
        description: Case insensitive search on altcontact_surname
265
        required: false
266
        type: string
267
      - name: altcontact_address
268
        in: query
269
        description: Case insensitive search on altcontact_address
270
        required: false
271
        type: string
272
      - name: altcontact_address2
273
        in: query
274
        description: Case insensitive search on altcontact_address2
275
        required: false
276
        type: string
277
      - name: altcontact_city
278
        in: query
279
        description: Case insensitive search on altcontact_city
280
        required: false
281
        type: string
282
      - name: altcontact_state
283
        in: query
284
        description: Case insensitive search on altcontact_state
285
        required: false
286
        type: string
287
      - name: altcontact_postal_code
288
        in: query
289
        description: Case insensitive search on altcontact_postal_code
290
        required: false
291
        type: string
292
      - name: altcontact_country
293
        in: query
294
        description: Case insensitive search on altcontact_country
295
        required: false
296
        type: string
297
      - name: altcontact_phone
298
        in: query
299
        description: Case insensitive search on altcontact_phone
300
        required: false
301
        type: string
302
      - name: sms_number
303
        in: query
304
        description: Case insensitive search on sms_number
305
        required: false
306
        type: string
307
      - name: sms_provider_id
308
        in: query
309
        description: Case insensitive search on sms_provider_id
310
        required: false
311
        type: string
312
      - name: privacy
313
        in: query
314
        description: Search on privacy
315
        required: false
316
        type: string
317
      - name: privacy_guarantor_checkouts
318
        in: query
319
        description: Search on privacy_guarantor_checkouts
320
        required: false
321
        type: string
322
      - name: check_previous_checkout
323
        in: query
324
        description: Case insensitive search on check_previous_checkout
325
        required: false
326
        type: string
327
      - name: updated_on
328
        in: query
329
        description: Search on updated_on
330
        required: false
331
        type: string
332
      - name: last_seen
333
        in: query
334
        description: Case insensitive search on last_seen
335
        required: false
336
        type: string
337
      - name: lang
338
        in: query
339
        description: Case insensitive search on lang
340
        required: false
341
        type: string
342
      - name: login_attempts
343
        in: query
344
        description: Search on login_attempts
345
        required: false
346
        type: string
347
      - $ref: ../parameters.yaml#/match
348
      - $ref: ../parameters.yaml#/order_by
349
      - $ref: ../parameters.yaml#/page
350
      - $ref: ../parameters.yaml#/per_page
351
      - $ref: ../parameters.yaml#/q_param
352
      - $ref: ../parameters.yaml#/q_body
353
      - $ref: ../parameters.yaml#/q_header
354
    responses:
355
      "200":
356
        description: A list of patrons
357
        schema:
358
          type: array
359
          items:
360
            $ref: ../definitions.yaml#/patron
361
      "401":
362
        description: Authentication required
363
        schema:
364
          $ref: ../definitions.yaml#/error
365
      "403":
366
        description: Access forbidden
367
        schema:
368
          $ref: ../definitions.yaml#/error
369
      "500":
370
        description: Internal server error
371
        schema:
372
          $ref: ../definitions.yaml#/error
373
    x-koha-authorization:
374
      permissions:
375
        borrowers: "1"
376
    x-koha-embed:
377
      - extended_attributes
378
  post:
379
    x-mojo-to: Patrons#add
380
    operationId: addPatron
381
    tags:
382
      - patrons
383
    summary: Add patron
384
    parameters:
385
      - name: body
386
        in: body
387
        description: A JSON object containing information about the new patron
388
        required: true
389
        schema:
390
          $ref: ../definitions.yaml#/patron
391
    consumes:
392
      - application/json
393
    produces:
394
      - application/json
395
    responses:
396
      "201":
397
        description: A successfully created patron
398
        schema:
399
          items:
400
            $ref: ../definitions.yaml#/patron
401
      "400":
402
        description: Bad parameter
403
        schema:
404
          $ref: ../definitions.yaml#/error
405
      "401":
406
        description: Authentication required
407
        schema:
408
          $ref: ../definitions.yaml#/error
409
      "403":
410
        description: Access forbidden
411
        schema:
412
          $ref: ../definitions.yaml#/error
413
      "404":
414
        description: Resource not found
415
        schema:
416
          $ref: ../definitions.yaml#/error
417
      "409":
418
        description: Conflict in creating resource
419
        schema:
420
          $ref: ../definitions.yaml#/error
421
      "500":
422
        description: Internal server error
423
        schema:
424
          $ref: ../definitions.yaml#/error
425
      "503":
426
        description: Under maintenance
427
        schema:
428
          $ref: ../definitions.yaml#/error
429
    x-koha-authorization:
430
      permissions:
431
        borrowers: edit_borrowers
432
"/patrons/{patron_id}":
433
  get:
434
    x-mojo-to: Patrons#get
435
    operationId: getPatron
436
    tags:
437
      - patrons
438
    summary: Get patron
439
    parameters:
440
      - $ref: ../parameters.yaml#/patron_id_pp
441
    produces:
442
      - application/json
443
    responses:
444
      "200":
445
        description: A patron
446
        schema:
447
          $ref: ../definitions.yaml#/patron
448
      "401":
449
        description: Authentication required
450
        schema:
451
          $ref: ../definitions.yaml#/error
452
      "403":
453
        description: Access forbidden
454
        schema:
455
          $ref: ../definitions.yaml#/error
456
      "404":
457
        description: Patron not found
458
        schema:
459
          $ref: ../definitions.yaml#/error
460
      "500":
461
        description: Internal server error
462
        schema:
463
          $ref: ../definitions.yaml#/error
464
      "503":
465
        description: Under maintenance
466
        schema:
467
          $ref: ../definitions.yaml#/error
468
    x-koha-authorization:
469
      permissions:
470
        borrowers: edit_borrowers
471
    x-koha-embed:
472
      - extended_attributes
473
  put:
474
    x-mojo-to: Patrons#update
475
    operationId: updatePatron
476
    tags:
477
      - patrons
478
    summary: Update patron
479
    parameters:
480
      - $ref: ../parameters.yaml#/patron_id_pp
481
      - name: body
482
        in: body
483
        description: A JSON object containing new information about existing patron
484
        required: true
485
        schema:
486
          $ref: ../definitions.yaml#/patron
487
    consumes:
488
      - application/json
489
    produces:
490
      - application/json
491
    responses:
492
      "200":
493
        description: A successfully updated patron
494
        schema:
495
          items:
496
            $ref: ../definitions.yaml#/patron
497
      "400":
498
        description: Bad parameter
499
        schema:
500
          $ref: ../definitions.yaml#/error
501
      "403":
502
        description: Access forbidden
503
        schema:
504
          $ref: ../definitions.yaml#/error
505
      "404":
506
        description: Resource not found
507
        schema:
508
          $ref: ../definitions.yaml#/error
509
      "409":
510
        description: Conflict in updating resource
511
        schema:
512
          $ref: ../definitions.yaml#/error
513
      "500":
514
        description: Internal server error
515
        schema:
516
          $ref: ../definitions.yaml#/error
517
    x-koha-authorization:
518
      permissions:
519
        borrowers: "1"
520
  delete:
521
    x-mojo-to: Patrons#delete
522
    operationId: deletePatron
523
    tags:
524
      - patrons
525
    summary: Delete patron
526
    parameters:
527
      - $ref: ../parameters.yaml#/patron_id_pp
528
    produces:
529
      - application/json
530
    responses:
531
      "204":
532
        description: Patron deleted
533
      "400":
534
        description: Patron deletion failed
535
        schema:
536
          $ref: ../definitions.yaml#/error
537
      "401":
538
        description: Authentication required
539
        schema:
540
          $ref: ../definitions.yaml#/error
541
      "403":
542
        description: Access forbidden
543
        schema:
544
          $ref: ../definitions.yaml#/error
545
      "404":
546
        description: Patron not found
547
        schema:
548
          $ref: ../definitions.yaml#/error
549
    x-koha-authorization:
550
      permissions:
551
        borrowers: delete_borrowers
(-)a/api/v1/swagger/paths/patrons_account.json (-134 lines)
Lines 1-134 Link Here
1
{
2
  "/patrons/{patron_id}/account": {
3
    "get": {
4
      "x-mojo-to": "Patrons::Account#get",
5
      "operationId": "getPatronAccount",
6
      "tags": [
7
        "patrons"
8
      ],
9
      "summary": "Get account information for a patron",
10
      "parameters": [
11
        {
12
          "$ref": "../parameters.json#/patron_id_pp"
13
        }
14
      ],
15
      "produces": [
16
        "application/json"
17
      ],
18
      "responses": {
19
        "200": {
20
          "description": "Patron's account balance",
21
          "schema": {
22
            "$ref": "../definitions.json#/patron_balance"
23
          }
24
        },
25
        "401": {
26
          "description": "Authentication required",
27
          "schema": {
28
            "$ref": "../definitions.json#/error"
29
          }
30
        },
31
        "403": {
32
          "description": "Access forbidden",
33
          "schema": {
34
            "$ref": "../definitions.json#/error"
35
          }
36
        },
37
        "404": {
38
          "description": "Patron not found",
39
          "schema": {
40
            "$ref": "../definitions.json#/error"
41
          }
42
        },
43
        "500": {
44
          "description": "Internal server error",
45
          "schema": {
46
            "$ref": "../definitions.json#/error"
47
          }
48
        },
49
        "503": {
50
          "description": "Under maintenance",
51
          "schema": {
52
            "$ref": "../definitions.json#/error"
53
          }
54
        }
55
      },
56
      "x-koha-authorization": {
57
        "permissions": {
58
          "borrowers": "edit_borrowers",
59
          "updatecharges": "remaining_permissions"
60
        }
61
      }
62
    }
63
  },
64
  "/patrons/{patron_id}/account/credits": {
65
    "post": {
66
      "x-mojo-to": "Patrons::Account#add_credit",
67
      "operationId": "addPatronCredit",
68
      "tags": [
69
        "patrons"
70
      ],
71
      "summary": "Add credit to a patron's account",
72
      "parameters": [
73
        {
74
          "$ref": "../parameters.json#/patron_id_pp"
75
        },
76
        {
77
          "name": "body",
78
          "in": "body",
79
          "description": "A JSON object containing credit information",
80
          "required": true,
81
          "schema": {
82
            "$ref": "../definitions.json#/patron_account_credit"
83
          }
84
        }
85
      ],
86
      "produces": [
87
        "application/json"
88
      ],
89
      "responses": {
90
        "201": {
91
          "description": "Credit added",
92
          "schema": {
93
            "$ref": "../definitions.json#/account_line"
94
          }
95
        },
96
        "401": {
97
          "description": "Authentication required",
98
          "schema": {
99
            "$ref": "../definitions.json#/error"
100
          }
101
        },
102
        "403": {
103
          "description": "Access forbidden",
104
          "schema": {
105
            "$ref": "../definitions.json#/error"
106
          }
107
        },
108
        "404": {
109
          "description": "Patron not found",
110
          "schema": {
111
            "$ref": "../definitions.json#/error"
112
          }
113
        },
114
        "500": {
115
          "description": "Internal server error",
116
          "schema": {
117
            "$ref": "../definitions.json#/error"
118
          }
119
        },
120
        "503": {
121
          "description": "Under maintenance",
122
          "schema": {
123
            "$ref": "../definitions.json#/error"
124
          }
125
        }
126
      },
127
      "x-koha-authorization": {
128
        "permissions": {
129
          "updatecharges": "remaining_permissions"
130
        }
131
      }
132
    }
133
  }
134
}
(-)a/api/v1/swagger/paths/patrons_account.yaml (+86 lines)
Line 0 Link Here
1
---
2
"/patrons/{patron_id}/account":
3
  get:
4
    x-mojo-to: Patrons::Account#get
5
    operationId: getPatronAccount
6
    tags:
7
      - patrons
8
    summary: Get account information for a patron
9
    parameters:
10
      - $ref: ../parameters.yaml#/patron_id_pp
11
    produces:
12
      - application/json
13
    responses:
14
      "200":
15
        description: Patron's account balance
16
        schema:
17
          $ref: ../definitions.yaml#/patron_balance
18
      "401":
19
        description: Authentication required
20
        schema:
21
          $ref: ../definitions.yaml#/error
22
      "403":
23
        description: Access forbidden
24
        schema:
25
          $ref: ../definitions.yaml#/error
26
      "404":
27
        description: Patron not found
28
        schema:
29
          $ref: ../definitions.yaml#/error
30
      "500":
31
        description: Internal server error
32
        schema:
33
          $ref: ../definitions.yaml#/error
34
      "503":
35
        description: Under maintenance
36
        schema:
37
          $ref: ../definitions.yaml#/error
38
    x-koha-authorization:
39
      permissions:
40
        borrowers: edit_borrowers
41
        updatecharges: remaining_permissions
42
"/patrons/{patron_id}/account/credits":
43
  post:
44
    x-mojo-to: Patrons::Account#add_credit
45
    operationId: addPatronCredit
46
    tags:
47
      - patrons
48
    summary: Add credit to a patron's account
49
    parameters:
50
      - $ref: ../parameters.yaml#/patron_id_pp
51
      - name: body
52
        in: body
53
        description: A JSON object containing credit information
54
        required: true
55
        schema:
56
          $ref: ../definitions.yaml#/patron_account_credit
57
    produces:
58
      - application/json
59
    responses:
60
      "201":
61
        description: Credit added
62
        schema:
63
          $ref: ../definitions.yaml#/account_line
64
      "401":
65
        description: Authentication required
66
        schema:
67
          $ref: ../definitions.yaml#/error
68
      "403":
69
        description: Access forbidden
70
        schema:
71
          $ref: ../definitions.yaml#/error
72
      "404":
73
        description: Patron not found
74
        schema:
75
          $ref: ../definitions.yaml#/error
76
      "500":
77
        description: Internal server error
78
        schema:
79
          $ref: ../definitions.yaml#/error
80
      "503":
81
        description: Under maintenance
82
        schema:
83
          $ref: ../definitions.yaml#/error
84
    x-koha-authorization:
85
      permissions:
86
        updatecharges: remaining_permissions
(-)a/api/v1/swagger/paths/patrons_extended_attributes.json (-412 lines)
Lines 1-412 Link Here
1
{
2
  "/patrons/{patron_id}/extended_attributes": {
3
    "get": {
4
      "x-mojo-to": "Patrons::Attributes#list_patron_attributes",
5
      "operationId": "getPatronAttributes",
6
      "tags": [
7
        "patrons"
8
      ],
9
      "summary": "List extended attributes for a patron",
10
      "parameters": [
11
        {
12
          "$ref": "../parameters.json#/patron_id_pp"
13
        },
14
        {
15
          "$ref": "../parameters.json#/match"
16
        },
17
        {
18
          "$ref": "../parameters.json#/order_by"
19
        },
20
        {
21
          "$ref": "../parameters.json#/page"
22
        },
23
        {
24
          "$ref": "../parameters.json#/per_page"
25
        },
26
        {
27
          "$ref": "../parameters.json#/q_param"
28
        },
29
        {
30
          "$ref": "../parameters.json#/q_body"
31
        },
32
        {
33
          "$ref": "../parameters.json#/q_header"
34
        }
35
      ],
36
      "produces": [
37
        "application/json"
38
      ],
39
      "responses": {
40
        "200": {
41
          "description": "The patron extended attributes",
42
          "schema": {
43
            "type": "array",
44
            "items": {
45
              "$ref": "../definitions.json#/patron_extended_attribute"
46
            }
47
          }
48
        },
49
        "401": {
50
          "description": "Authentication required",
51
          "schema": {
52
            "$ref": "../definitions.json#/error"
53
          }
54
        },
55
        "403": {
56
          "description": "Access forbidden",
57
          "schema": {
58
            "$ref": "../definitions.json#/error"
59
          }
60
        },
61
        "404": {
62
          "description": "Patron not found",
63
          "schema": {
64
            "$ref": "../definitions.json#/error"
65
          }
66
        },
67
        "500": {
68
          "description": "Internal server error",
69
          "schema": {
70
            "$ref": "../definitions.json#/error"
71
          }
72
        },
73
        "503": {
74
          "description": "Under maintenance",
75
          "schema": {
76
            "$ref": "../definitions.json#/error"
77
          }
78
        }
79
      },
80
      "x-koha-authorization": {
81
        "permissions": {
82
          "borrowers": "edit_borrowers"
83
        }
84
      }
85
    },
86
    "post": {
87
      "x-mojo-to": "Patrons::Attributes#add",
88
      "operationId": "addPatronAttribute",
89
      "tags": [
90
        "patrons"
91
      ],
92
      "summary": "Add extended attribute for a patron",
93
      "parameters": [
94
        {
95
          "$ref": "../parameters.json#/patron_id_pp"
96
        },
97
        {
98
          "name": "body",
99
          "in": "body",
100
          "description": "A JSON representation of the patron extended attribute",
101
          "required": true,
102
          "schema": {
103
            "$ref": "../definitions.json#/patron_extended_attribute"
104
          }
105
        }
106
      ],
107
      "produces": [
108
        "application/json"
109
      ],
110
      "responses": {
111
        "201": {
112
          "description": "A successfully created patron extended attribute",
113
          "schema": {
114
            "$ref": "../definitions.json#/patron_extended_attribute"
115
          }
116
        },
117
        "400": {
118
          "description": "Bad parameter",
119
          "schema": {
120
            "$ref": "../definitions.json#/error"
121
          }
122
        },
123
        "401": {
124
          "description": "Authentication required",
125
          "schema": {
126
            "$ref": "../definitions.json#/error"
127
          }
128
        },
129
        "403": {
130
          "description": "Access forbidden",
131
          "schema": {
132
            "$ref": "../definitions.json#/error"
133
          }
134
        },
135
        "404": {
136
          "description": "Patron not found",
137
          "schema": {
138
            "$ref": "../definitions.json#/error"
139
          }
140
        },
141
        "409": {
142
          "description": "Conflict in creating resource",
143
          "schema": {
144
            "$ref": "../definitions.json#/error"
145
          }
146
        },
147
        "500": {
148
          "description": "Internal server error",
149
          "schema": {
150
            "$ref": "../definitions.json#/error"
151
          }
152
        },
153
        "503": {
154
          "description": "Under maintenance",
155
          "schema": {
156
            "$ref": "../definitions.json#/error"
157
          }
158
        }
159
      },
160
      "x-koha-authorization": {
161
        "permissions": {
162
          "borrowers": "edit_borrowers"
163
        }
164
      }
165
    },
166
    "put": {
167
      "x-mojo-to": "Patrons::Attributes#overwrite",
168
      "operationId": "overwritePatronAttributes",
169
      "tags": [
170
        "patrons"
171
      ],
172
      "summary": "Overwrite extended attributes for a patron",
173
      "parameters": [
174
        {
175
          "$ref": "../parameters.json#/patron_id_pp"
176
        },
177
        {
178
          "name": "body",
179
          "in": "body",
180
          "description": "A JSON representation of the patron extended attribute",
181
          "required": true,
182
          "schema": {
183
            "type": "array",
184
            "items": {
185
              "$ref": "../definitions.json#/patron_extended_attribute"
186
            }
187
          }
188
        }
189
      ],
190
      "produces": [
191
        "application/json"
192
      ],
193
      "responses": {
194
        "200": {
195
          "description": "The successfully created patron extended attributes",
196
          "schema": {
197
            "type": "array",
198
            "items": {
199
              "$ref": "../definitions.json#/patron_extended_attribute"
200
            }
201
          }
202
        },
203
        "400": {
204
          "description": "Bad parameters",
205
          "schema": {
206
            "$ref": "../definitions.json#/error"
207
          }
208
        },
209
        "401": {
210
          "description": "Authentication required",
211
          "schema": {
212
            "$ref": "../definitions.json#/error"
213
          }
214
        },
215
        "403": {
216
          "description": "Access forbidden",
217
          "schema": {
218
            "$ref": "../definitions.json#/error"
219
          }
220
        },
221
        "404": {
222
          "description": "Patron not found",
223
          "schema": {
224
            "$ref": "../definitions.json#/error"
225
          }
226
        },
227
        "409": {
228
          "description": "Conflict in creating resource",
229
          "schema": {
230
            "$ref": "../definitions.json#/error"
231
          }
232
        },
233
        "500": {
234
          "description": "Internal server error",
235
          "schema": {
236
            "$ref": "../definitions.json#/error"
237
          }
238
        },
239
        "503": {
240
          "description": "Under maintenance",
241
          "schema": {
242
            "$ref": "../definitions.json#/error"
243
          }
244
        }
245
      },
246
      "x-koha-authorization": {
247
        "permissions": {
248
          "borrowers": "edit_borrowers"
249
        }
250
      }
251
    }
252
  },
253
  "/patrons/{patron_id}/extended_attributes/{extended_attribute_id}": {
254
    "patch": {
255
      "x-mojo-to": "Patrons::Attributes#update",
256
      "operationId": "updatePatronAttribute",
257
      "tags": [
258
        "patrons"
259
      ],
260
      "summary": "Update extended attribute",
261
      "parameters": [
262
        {
263
          "$ref": "../parameters.json#/patron_id_pp"
264
        },
265
        {
266
          "name": "extended_attribute_id",
267
          "in": "path",
268
          "description": "Internal patron extended attribute identifier",
269
          "type": "integer",
270
          "required": true
271
        },
272
        {
273
          "name": "body",
274
          "in": "body",
275
          "description": "An object containing the updated values for the patron extended attribute",
276
          "required": true,
277
          "schema": {
278
            "type": "object",
279
            "properties": {
280
              "value": {
281
                "description": "Extended attribute value",
282
                "type": "string"
283
              }
284
            },
285
            "additionalProperties": false
286
          }
287
        }
288
      ],
289
      "produces": [
290
        "application/json"
291
      ],
292
      "responses": {
293
        "200": {
294
          "description": "A successfully updated patron extended attribute",
295
          "schema": {
296
            "$ref": "../definitions.json#/patron_extended_attribute"
297
          }
298
        },
299
        "400": {
300
          "description": "Bad parameter",
301
          "schema": {
302
            "$ref": "../definitions.json#/error"
303
          }
304
        },
305
        "401": {
306
          "description": "Authentication required",
307
          "schema": {
308
            "$ref": "../definitions.json#/error"
309
          }
310
        },
311
        "403": {
312
          "description": "Access forbidden",
313
          "schema": {
314
            "$ref": "../definitions.json#/error"
315
          }
316
        },
317
        "404": {
318
          "description": "Object not found",
319
          "schema": {
320
            "$ref": "../definitions.json#/error"
321
          }
322
        },
323
        "409": {
324
          "description": "Conflict in updating resource",
325
          "schema": {
326
            "$ref": "../definitions.json#/error"
327
          }
328
        },
329
        "500": {
330
          "description": "Internal server error",
331
          "schema": {
332
            "$ref": "../definitions.json#/error"
333
          }
334
        },
335
        "503": {
336
          "description": "Under maintenance",
337
          "schema": {
338
            "$ref": "../definitions.json#/error"
339
          }
340
        }
341
      },
342
      "x-koha-authorization": {
343
        "permissions": {
344
          "borrowers": "edit_borrowers"
345
        }
346
      }
347
    },
348
    "delete": {
349
      "x-mojo-to": "Patrons::Attributes#delete",
350
      "operationId": "deletePatronAttribute",
351
      "tags": [
352
        "patrons"
353
      ],
354
      "summary": "Delete extended attribute",
355
      "parameters": [
356
        {
357
          "$ref": "../parameters.json#/patron_id_pp"
358
        },
359
        {
360
          "name": "extended_attribute_id",
361
          "in": "path",
362
          "description": "Internal patron extended attribute identifier",
363
          "type": "integer",
364
          "required": true
365
        }
366
      ],
367
      "produces": [
368
        "application/json"
369
      ],
370
      "responses": {
371
        "204": {
372
          "description": "Extended patron attribute deleted"
373
        },
374
        "401": {
375
          "description": "Authentication required",
376
          "schema": {
377
            "$ref": "../definitions.json#/error"
378
          }
379
        },
380
        "403": {
381
          "description": "Access forbidden",
382
          "schema": {
383
            "$ref": "../definitions.json#/error"
384
          }
385
        },
386
        "404": {
387
          "description": "Patron not found",
388
          "schema": {
389
            "$ref": "../definitions.json#/error"
390
          }
391
        },
392
        "500": {
393
          "description": "Internal server error",
394
          "schema": {
395
            "$ref": "../definitions.json#/error"
396
          }
397
        },
398
        "503": {
399
          "description": "Under maintenance",
400
          "schema": {
401
            "$ref": "../definitions.json#/error"
402
          }
403
        }
404
      },
405
      "x-koha-authorization": {
406
        "permissions": {
407
          "borrowers": "edit_borrowers"
408
        }
409
      }
410
    }
411
  }
412
}
(-)a/api/v1/swagger/paths/patrons_extended_attributes.yaml (+262 lines)
Line 0 Link Here
1
---
2
"/patrons/{patron_id}/extended_attributes":
3
  get:
4
    x-mojo-to: Patrons::Attributes#list_patron_attributes
5
    operationId: getPatronAttributes
6
    tags:
7
      - patrons
8
    summary: List extended attributes for a patron
9
    parameters:
10
      - $ref: ../parameters.yaml#/patron_id_pp
11
      - $ref: ../parameters.yaml#/match
12
      - $ref: ../parameters.yaml#/order_by
13
      - $ref: ../parameters.yaml#/page
14
      - $ref: ../parameters.yaml#/per_page
15
      - $ref: ../parameters.yaml#/q_param
16
      - $ref: ../parameters.yaml#/q_body
17
      - $ref: ../parameters.yaml#/q_header
18
    produces:
19
      - application/json
20
    responses:
21
      "200":
22
        description: The patron extended attributes
23
        schema:
24
          type: array
25
          items:
26
            $ref: ../definitions.yaml#/patron_extended_attribute
27
      "401":
28
        description: Authentication required
29
        schema:
30
          $ref: ../definitions.yaml#/error
31
      "403":
32
        description: Access forbidden
33
        schema:
34
          $ref: ../definitions.yaml#/error
35
      "404":
36
        description: Patron not found
37
        schema:
38
          $ref: ../definitions.yaml#/error
39
      "500":
40
        description: Internal server error
41
        schema:
42
          $ref: ../definitions.yaml#/error
43
      "503":
44
        description: Under maintenance
45
        schema:
46
          $ref: ../definitions.yaml#/error
47
    x-koha-authorization:
48
      permissions:
49
        borrowers: edit_borrowers
50
  post:
51
    x-mojo-to: Patrons::Attributes#add
52
    operationId: addPatronAttribute
53
    tags:
54
      - patrons
55
    summary: Add extended attribute for a patron
56
    parameters:
57
      - $ref: ../parameters.yaml#/patron_id_pp
58
      - name: body
59
        in: body
60
        description: A JSON representation of the patron extended attribute
61
        required: true
62
        schema:
63
          $ref: ../definitions.yaml#/patron_extended_attribute
64
    produces:
65
      - application/json
66
    responses:
67
      "201":
68
        description: A successfully created patron extended attribute
69
        schema:
70
          $ref: ../definitions.yaml#/patron_extended_attribute
71
      "400":
72
        description: Bad parameter
73
        schema:
74
          $ref: ../definitions.yaml#/error
75
      "401":
76
        description: Authentication required
77
        schema:
78
          $ref: ../definitions.yaml#/error
79
      "403":
80
        description: Access forbidden
81
        schema:
82
          $ref: ../definitions.yaml#/error
83
      "404":
84
        description: Patron not found
85
        schema:
86
          $ref: ../definitions.yaml#/error
87
      "409":
88
        description: Conflict in creating resource
89
        schema:
90
          $ref: ../definitions.yaml#/error
91
      "500":
92
        description: Internal server error
93
        schema:
94
          $ref: ../definitions.yaml#/error
95
      "503":
96
        description: Under maintenance
97
        schema:
98
          $ref: ../definitions.yaml#/error
99
    x-koha-authorization:
100
      permissions:
101
        borrowers: edit_borrowers
102
  put:
103
    x-mojo-to: Patrons::Attributes#overwrite
104
    operationId: overwritePatronAttributes
105
    tags:
106
      - patrons
107
    summary: Overwrite extended attributes for a patron
108
    parameters:
109
      - $ref: ../parameters.yaml#/patron_id_pp
110
      - name: body
111
        in: body
112
        description: A JSON representation of the patron extended attribute
113
        required: true
114
        schema:
115
          type: array
116
          items:
117
            $ref: ../definitions.yaml#/patron_extended_attribute
118
    produces:
119
      - application/json
120
    responses:
121
      "200":
122
        description: The successfully created patron extended attributes
123
        schema:
124
          type: array
125
          items:
126
            $ref: ../definitions.yaml#/patron_extended_attribute
127
      "400":
128
        description: Bad parameters
129
        schema:
130
          $ref: ../definitions.yaml#/error
131
      "401":
132
        description: Authentication required
133
        schema:
134
          $ref: ../definitions.yaml#/error
135
      "403":
136
        description: Access forbidden
137
        schema:
138
          $ref: ../definitions.yaml#/error
139
      "404":
140
        description: Patron not found
141
        schema:
142
          $ref: ../definitions.yaml#/error
143
      "409":
144
        description: Conflict in creating resource
145
        schema:
146
          $ref: ../definitions.yaml#/error
147
      "500":
148
        description: Internal server error
149
        schema:
150
          $ref: ../definitions.yaml#/error
151
      "503":
152
        description: Under maintenance
153
        schema:
154
          $ref: ../definitions.yaml#/error
155
    x-koha-authorization:
156
      permissions:
157
        borrowers: edit_borrowers
158
"/patrons/{patron_id}/extended_attributes/{extended_attribute_id}":
159
  patch:
160
    x-mojo-to: Patrons::Attributes#update
161
    operationId: updatePatronAttribute
162
    tags:
163
      - patrons
164
    summary: Update extended attribute
165
    parameters:
166
      - $ref: ../parameters.yaml#/patron_id_pp
167
      - name: extended_attribute_id
168
        in: path
169
        description: Internal patron extended attribute identifier
170
        type: integer
171
        required: true
172
      - name: body
173
        in: body
174
        description: An object containing the updated values for the patron extended
175
          attribute
176
        required: true
177
        schema:
178
          type: object
179
          properties:
180
            value:
181
              description: Extended attribute value
182
              type: string
183
          additionalProperties: false
184
    produces:
185
      - application/json
186
    responses:
187
      "200":
188
        description: A successfully updated patron extended attribute
189
        schema:
190
          $ref: ../definitions.yaml#/patron_extended_attribute
191
      "400":
192
        description: Bad parameter
193
        schema:
194
          $ref: ../definitions.yaml#/error
195
      "401":
196
        description: Authentication required
197
        schema:
198
          $ref: ../definitions.yaml#/error
199
      "403":
200
        description: Access forbidden
201
        schema:
202
          $ref: ../definitions.yaml#/error
203
      "404":
204
        description: Object not found
205
        schema:
206
          $ref: ../definitions.yaml#/error
207
      "409":
208
        description: Conflict in updating resource
209
        schema:
210
          $ref: ../definitions.yaml#/error
211
      "500":
212
        description: Internal server error
213
        schema:
214
          $ref: ../definitions.yaml#/error
215
      "503":
216
        description: Under maintenance
217
        schema:
218
          $ref: ../definitions.yaml#/error
219
    x-koha-authorization:
220
      permissions:
221
        borrowers: edit_borrowers
222
  delete:
223
    x-mojo-to: Patrons::Attributes#delete
224
    operationId: deletePatronAttribute
225
    tags:
226
      - patrons
227
    summary: Delete extended attribute
228
    parameters:
229
      - $ref: ../parameters.yaml#/patron_id_pp
230
      - name: extended_attribute_id
231
        in: path
232
        description: Internal patron extended attribute identifier
233
        type: integer
234
        required: true
235
    produces:
236
      - application/json
237
    responses:
238
      "204":
239
        description: Extended patron attribute deleted
240
      "401":
241
        description: Authentication required
242
        schema:
243
          $ref: ../definitions.yaml#/error
244
      "403":
245
        description: Access forbidden
246
        schema:
247
          $ref: ../definitions.yaml#/error
248
      "404":
249
        description: Patron not found
250
        schema:
251
          $ref: ../definitions.yaml#/error
252
      "500":
253
        description: Internal server error
254
        schema:
255
          $ref: ../definitions.yaml#/error
256
      "503":
257
        description: Under maintenance
258
        schema:
259
          $ref: ../definitions.yaml#/error
260
    x-koha-authorization:
261
      permissions:
262
        borrowers: edit_borrowers
(-)a/api/v1/swagger/paths/patrons_holds.json (-87 lines)
Lines 1-87 Link Here
1
{
2
  "/patrons/{patron_id}/holds": {
3
    "get": {
4
      "x-mojo-to": "Patrons::Holds#list",
5
      "operationId": "getPatronHolds",
6
      "tags": [
7
        "holds"
8
      ],
9
      "summary": "List holds for a patron",
10
      "parameters": [
11
        {
12
          "$ref": "../parameters.json#/patron_id_pp"
13
        },
14
        {
15
          "$ref": "../parameters.json#/match"
16
        },
17
        {
18
          "$ref": "../parameters.json#/order_by"
19
        },
20
        {
21
          "$ref": "../parameters.json#/page"
22
        },
23
        {
24
          "$ref": "../parameters.json#/per_page"
25
        },
26
        {
27
          "$ref": "../parameters.json#/q_param"
28
        },
29
        {
30
          "$ref": "../parameters.json#/q_body"
31
        },
32
        {
33
          "$ref": "../parameters.json#/q_header"
34
        }
35
      ],
36
      "produces": [
37
        "application/json"
38
      ],
39
      "responses": {
40
        "200": {
41
          "description": "The patron holds",
42
          "schema": {
43
            "type": "array",
44
            "items": {
45
              "$ref": "../definitions.json#/hold"
46
            }
47
          }
48
        },
49
        "401": {
50
          "description": "Authentication required",
51
          "schema": {
52
            "$ref": "../definitions.json#/error"
53
          }
54
        },
55
        "403": {
56
          "description": "Access forbidden",
57
          "schema": {
58
            "$ref": "../definitions.json#/error"
59
          }
60
        },
61
        "404": {
62
          "description": "Patron not found",
63
          "schema": {
64
            "$ref": "../definitions.json#/error"
65
          }
66
        },
67
        "500": {
68
          "description": "Internal server error",
69
          "schema": {
70
            "$ref": "../definitions.json#/error"
71
          }
72
        },
73
        "503": {
74
          "description": "Under maintenance",
75
          "schema": {
76
            "$ref": "../definitions.json#/error"
77
          }
78
        }
79
      },
80
      "x-koha-authorization": {
81
        "permissions": {
82
          "borrowers": "edit_borrowers"
83
        }
84
      }
85
    }
86
  }
87
}
(-)a/api/v1/swagger/paths/patrons_holds.yaml (+49 lines)
Line 0 Link Here
1
---
2
"/patrons/{patron_id}/holds":
3
  get:
4
    x-mojo-to: Patrons::Holds#list
5
    operationId: getPatronHolds
6
    tags:
7
      - holds
8
    summary: List holds for a patron
9
    parameters:
10
      - $ref: ../parameters.yaml#/patron_id_pp
11
      - $ref: ../parameters.yaml#/match
12
      - $ref: ../parameters.yaml#/order_by
13
      - $ref: ../parameters.yaml#/page
14
      - $ref: ../parameters.yaml#/per_page
15
      - $ref: ../parameters.yaml#/q_param
16
      - $ref: ../parameters.yaml#/q_body
17
      - $ref: ../parameters.yaml#/q_header
18
    produces:
19
      - application/json
20
    responses:
21
      "200":
22
        description: The patron holds
23
        schema:
24
          type: array
25
          items:
26
            $ref: ../definitions.yaml#/hold
27
      "401":
28
        description: Authentication required
29
        schema:
30
          $ref: ../definitions.yaml#/error
31
      "403":
32
        description: Access forbidden
33
        schema:
34
          $ref: ../definitions.yaml#/error
35
      "404":
36
        description: Patron not found
37
        schema:
38
          $ref: ../definitions.yaml#/error
39
      "500":
40
        description: Internal server error
41
        schema:
42
          $ref: ../definitions.yaml#/error
43
      "503":
44
        description: Under maintenance
45
        schema:
46
          $ref: ../definitions.yaml#/error
47
    x-koha-authorization:
48
      permissions:
49
        borrowers: edit_borrowers
(-)a/api/v1/swagger/paths/patrons_password.json (-86 lines)
Lines 1-86 Link Here
1
{
2
  "/patrons/{patron_id}/password": {
3
    "post": {
4
      "x-mojo-to": "Patrons::Password#set",
5
      "operationId": "setPatronPassword",
6
      "tags": [
7
        "patrons"
8
      ],
9
      "summary": "Set password for a patron",
10
      "parameters": [
11
        {
12
          "$ref": "../parameters.json#/patron_id_pp"
13
        },
14
        {
15
          "name": "body",
16
          "in": "body",
17
          "description": "A JSON object containing password information",
18
          "schema": {
19
            "type": "object",
20
            "properties": {
21
              "password": {
22
                "description": "New password (plain text)",
23
                "type": "string"
24
              },
25
              "password_2": {
26
                "description": "Repeated new password (plain text)",
27
                "type": "string"
28
              }
29
            },
30
            "required": ["password", "password_2"],
31
            "additionalProperties": false
32
          }
33
        }
34
      ],
35
      "produces": [
36
        "application/json"
37
      ],
38
      "responses": {
39
        "200": {
40
          "description": "Password changed"
41
        },
42
        "400": {
43
          "description": "Bad request",
44
          "schema": {
45
            "$ref": "../definitions.json#/error"
46
          }
47
        },
48
        "401": {
49
          "description": "Authentication required",
50
          "schema": {
51
            "$ref": "../definitions.json#/error"
52
          }
53
        },
54
        "403": {
55
          "description": "Access forbidden",
56
          "schema": {
57
            "$ref": "../definitions.json#/error"
58
          }
59
        },
60
        "404": {
61
          "description": "Patron not found",
62
          "schema": {
63
            "$ref": "../definitions.json#/error"
64
          }
65
        },
66
        "500": {
67
          "description": "Internal server error",
68
          "schema": {
69
            "$ref": "../definitions.json#/error"
70
          }
71
        },
72
        "503": {
73
          "description": "Under maintenance",
74
          "schema": {
75
            "$ref": "../definitions.json#/error"
76
          }
77
        }
78
      },
79
      "x-koha-authorization": {
80
        "permissions": {
81
          "borrowers": "1"
82
        }
83
      }
84
    }
85
  }
86
}
(-)a/api/v1/swagger/paths/patrons_password.yaml (+58 lines)
Line 0 Link Here
1
---
2
"/patrons/{patron_id}/password":
3
  post:
4
    x-mojo-to: Patrons::Password#set
5
    operationId: setPatronPassword
6
    tags:
7
      - patrons
8
    summary: Set password for a patron
9
    parameters:
10
      - $ref: ../parameters.yaml#/patron_id_pp
11
      - name: body
12
        in: body
13
        description: A JSON object containing password information
14
        schema:
15
          type: object
16
          properties:
17
            password:
18
              description: New password (plain text)
19
              type: string
20
            password_2:
21
              description: Repeated new password (plain text)
22
              type: string
23
          required:
24
            - password
25
            - password_2
26
          additionalProperties: false
27
    produces:
28
      - application/json
29
    responses:
30
      "200":
31
        description: Password changed
32
      "400":
33
        description: Bad request
34
        schema:
35
          $ref: ../definitions.yaml#/error
36
      "401":
37
        description: Authentication required
38
        schema:
39
          $ref: ../definitions.yaml#/error
40
      "403":
41
        description: Access forbidden
42
        schema:
43
          $ref: ../definitions.yaml#/error
44
      "404":
45
        description: Patron not found
46
        schema:
47
          $ref: ../definitions.yaml#/error
48
      "500":
49
        description: Internal server error
50
        schema:
51
          $ref: ../definitions.yaml#/error
52
      "503":
53
        description: Under maintenance
54
        schema:
55
          $ref: ../definitions.yaml#/error
56
    x-koha-authorization:
57
      permissions:
58
        borrowers: "1"
(-)a/api/v1/swagger/paths/public_patrons.json (-246 lines)
Lines 1-246 Link Here
1
{
2
    "/public/patrons/{patron_id}/password": {
3
        "post": {
4
            "x-mojo-to": "Patrons::Password#set_public",
5
            "operationId": "setPatronPasswordPublic",
6
            "tags": [
7
                "patrons"
8
            ],
9
            "summary": "Set password for a patron (public)",
10
            "parameters": [
11
                {
12
                    "$ref": "../parameters.json#/patron_id_pp"
13
                },
14
                {
15
                    "name": "body",
16
                    "in": "body",
17
                    "description": "A JSON object containing password information",
18
                    "schema": {
19
                        "type": "object",
20
                        "properties": {
21
                            "password": {
22
                                "description": "New password (plain text)",
23
                                "type": "string"
24
                            },
25
                            "password_repeated": {
26
                                "description": "Repeated new password (plain text)",
27
                                "type": "string"
28
                            },
29
                            "old_password": {
30
                                "description": "Patron's original password",
31
                                "type": "string"
32
                            }
33
                        },
34
                        "required": [
35
                            "password",
36
                            "password_repeated",
37
                            "old_password"
38
                        ],
39
                        "additionalProperties": false
40
                    }
41
                }
42
            ],
43
            "produces": [
44
                "application/json"
45
            ],
46
            "responses": {
47
                "200": {
48
                    "description": "Password changed"
49
                },
50
                "400": {
51
                    "description": "Bad request",
52
                    "schema": {
53
                        "$ref": "../definitions.json#/error"
54
                    }
55
                },
56
                "401": {
57
                    "description": "Authentication required",
58
                    "schema": {
59
                        "$ref": "../definitions.json#/error"
60
                    }
61
                },
62
                "403": {
63
                    "description": "Access forbidden",
64
                    "schema": {
65
                        "$ref": "../definitions.json#/error"
66
                    }
67
                },
68
                "404": {
69
                    "description": "Patron not found",
70
                    "schema": {
71
                        "$ref": "../definitions.json#/error"
72
                    }
73
                },
74
                "500": {
75
                    "description": "Internal server error",
76
                    "schema": {
77
                        "$ref": "../definitions.json#/error"
78
                    }
79
                },
80
                "503": {
81
                    "description": "Under maintenance",
82
                    "schema": {
83
                        "$ref": "../definitions.json#/error"
84
                    }
85
                }
86
            },
87
            "x-koha-authorization": {
88
                "allow-owner": true
89
            }
90
        }
91
    },
92
    "/public/patrons/{patron_id}/guarantors/can_see_charges": {
93
        "put": {
94
            "x-mojo-to": "Patrons#guarantors_can_see_charges",
95
            "operationId": "setPatronGuarantorsCanSeeCharges",
96
            "tags": [
97
                "patrons"
98
            ],
99
            "summary": "Set if guarantors can see charges (public)",
100
            "parameters": [
101
                {
102
                    "$ref": "../parameters.json#/patron_id_pp"
103
                },
104
                {
105
                    "name": "body",
106
                    "in": "body",
107
                    "description": "A boolean representing if guarantors should be able to see the patron's charges",
108
                    "required": true,
109
                    "schema": {
110
                        "type": "object",
111
                        "properties": {
112
                            "allowed": {
113
                                "type": "boolean"
114
                            }
115
                        },
116
                        "additionalProperties": false
117
                    }
118
                }
119
            ],
120
            "produces": [
121
                "application/json"
122
            ],
123
            "responses": {
124
                "200": {
125
                    "description": "Charges view policy for guarantors changed"
126
                },
127
                "400": {
128
                    "description": "Bad request",
129
                    "schema": {
130
                        "$ref": "../definitions.json#/error"
131
                    }
132
                },
133
                "401": {
134
                    "description": "Authentication required",
135
                    "schema": {
136
                        "$ref": "../definitions.json#/error"
137
                    }
138
                },
139
                "403": {
140
                    "description": "Access forbidden",
141
                    "schema": {
142
                        "$ref": "../definitions.json#/error"
143
                    }
144
                },
145
                "404": {
146
                    "description": "Patron not found",
147
                    "schema": {
148
                        "$ref": "../definitions.json#/error"
149
                    }
150
                },
151
                "500": {
152
                    "description": "Internal server error",
153
                    "schema": {
154
                        "$ref": "../definitions.json#/error"
155
                    }
156
                },
157
                "503": {
158
                    "description": "Under maintenance",
159
                    "schema": {
160
                        "$ref": "../definitions.json#/error"
161
                    }
162
                }
163
            },
164
            "x-koha-authorization": {
165
                "allow-owner": true
166
            }
167
        }
168
    },
169
    "/public/patrons/{patron_id}/guarantors/can_see_checkouts": {
170
        "put": {
171
            "x-mojo-to": "Patrons#guarantors_can_see_checkouts",
172
            "operationId": "setPatronGuarantorsCanSeeCheckouts",
173
            "tags": [
174
                "patrons"
175
            ],
176
            "summary": "Set if guarantors can see checkouts",
177
            "parameters": [
178
                {
179
                    "$ref": "../parameters.json#/patron_id_pp"
180
                },
181
                {
182
                    "name": "body",
183
                    "in": "body",
184
                    "description": "A boolean representing if guarantors should be able to see the patron's checkouts",
185
                    "required": true,
186
                    "schema": {
187
                        "type": "object",
188
                        "properties": {
189
                            "allowed": {
190
                                "type": "boolean"
191
                            }
192
                        },
193
                        "additionalProperties": false
194
                    }
195
                }
196
            ],
197
            "produces": [
198
                "application/json"
199
            ],
200
            "responses": {
201
                "200": {
202
                    "description": "Check-out view policy for guarantors changed"
203
                },
204
                "400": {
205
                    "description": "Bad request",
206
                    "schema": {
207
                        "$ref": "../definitions.json#/error"
208
                    }
209
                },
210
                "401": {
211
                    "description": "Authentication required",
212
                    "schema": {
213
                        "$ref": "../definitions.json#/error"
214
                    }
215
                },
216
                "403": {
217
                    "description": "Access forbidden",
218
                    "schema": {
219
                        "$ref": "../definitions.json#/error"
220
                    }
221
                },
222
                "404": {
223
                    "description": "Patron not found",
224
                    "schema": {
225
                        "$ref": "../definitions.json#/error"
226
                    }
227
                },
228
                "500": {
229
                    "description": "Internal server error",
230
                    "schema": {
231
                        "$ref": "../definitions.json#/error"
232
                    }
233
                },
234
                "503": {
235
                    "description": "Under maintenance",
236
                    "schema": {
237
                        "$ref": "../definitions.json#/error"
238
                    }
239
                }
240
            },
241
            "x-koha-authorization": {
242
                "allow-owner": true
243
            }
244
        }
245
    }
246
}
(-)a/api/v1/swagger/paths/public_patrons.yaml (+163 lines)
Line 0 Link Here
1
---
2
"/public/patrons/{patron_id}/password":
3
  post:
4
    x-mojo-to: Patrons::Password#set_public
5
    operationId: setPatronPasswordPublic
6
    tags:
7
      - patrons
8
    summary: Set password for a patron (public)
9
    parameters:
10
      - $ref: ../parameters.yaml#/patron_id_pp
11
      - name: body
12
        in: body
13
        description: A JSON object containing password information
14
        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
31
    produces:
32
      - application/json
33
    responses:
34
      "200":
35
        description: Password changed
36
      "400":
37
        description: Bad request
38
        schema:
39
          $ref: ../definitions.yaml#/error
40
      "401":
41
        description: Authentication required
42
        schema:
43
          $ref: ../definitions.yaml#/error
44
      "403":
45
        description: Access forbidden
46
        schema:
47
          $ref: ../definitions.yaml#/error
48
      "404":
49
        description: Patron not found
50
        schema:
51
          $ref: ../definitions.yaml#/error
52
      "500":
53
        description: Internal server error
54
        schema:
55
          $ref: ../definitions.yaml#/error
56
      "503":
57
        description: Under maintenance
58
        schema:
59
          $ref: ../definitions.yaml#/error
60
    x-koha-authorization:
61
      allow-owner: true
62
"/public/patrons/{patron_id}/guarantors/can_see_charges":
63
  put:
64
    x-mojo-to: Patrons#guarantors_can_see_charges
65
    operationId: setPatronGuarantorsCanSeeCharges
66
    tags:
67
      - patrons
68
    summary: Set if guarantors can see charges (public)
69
    parameters:
70
      - $ref: ../parameters.yaml#/patron_id_pp
71
      - name: body
72
        in: body
73
        description: A boolean representing if guarantors should be able to see the
74
          patron's charges
75
        required: true
76
        schema:
77
          type: object
78
          properties:
79
            allowed:
80
              type: boolean
81
          additionalProperties: false
82
    produces:
83
      - application/json
84
    responses:
85
      "200":
86
        description: Charges view policy for guarantors changed
87
      "400":
88
        description: Bad request
89
        schema:
90
          $ref: ../definitions.yaml#/error
91
      "401":
92
        description: Authentication required
93
        schema:
94
          $ref: ../definitions.yaml#/error
95
      "403":
96
        description: Access forbidden
97
        schema:
98
          $ref: ../definitions.yaml#/error
99
      "404":
100
        description: Patron not found
101
        schema:
102
          $ref: ../definitions.yaml#/error
103
      "500":
104
        description: Internal server error
105
        schema:
106
          $ref: ../definitions.yaml#/error
107
      "503":
108
        description: Under maintenance
109
        schema:
110
          $ref: ../definitions.yaml#/error
111
    x-koha-authorization:
112
      allow-owner: true
113
"/public/patrons/{patron_id}/guarantors/can_see_checkouts":
114
  put:
115
    x-mojo-to: Patrons#guarantors_can_see_checkouts
116
    operationId: setPatronGuarantorsCanSeeCheckouts
117
    tags:
118
      - patrons
119
    summary: Set if guarantors can see checkouts
120
    parameters:
121
      - $ref: ../parameters.yaml#/patron_id_pp
122
      - name: body
123
        in: body
124
        description: A boolean representing if guarantors should be able to see the
125
          patron's checkouts
126
        required: true
127
        schema:
128
          type: object
129
          properties:
130
            allowed:
131
              type: boolean
132
          additionalProperties: false
133
    produces:
134
      - application/json
135
    responses:
136
      "200":
137
        description: Check-out view policy for guarantors changed
138
      "400":
139
        description: Bad request
140
        schema:
141
          $ref: ../definitions.yaml#/error
142
      "401":
143
        description: Authentication required
144
        schema:
145
          $ref: ../definitions.yaml#/error
146
      "403":
147
        description: Access forbidden
148
        schema:
149
          $ref: ../definitions.yaml#/error
150
      "404":
151
        description: Patron not found
152
        schema:
153
          $ref: ../definitions.yaml#/error
154
      "500":
155
        description: Internal server error
156
        schema:
157
          $ref: ../definitions.yaml#/error
158
      "503":
159
        description: Under maintenance
160
        schema:
161
          $ref: ../definitions.yaml#/error
162
    x-koha-authorization:
163
      allow-owner: true
(-)a/api/v1/swagger/paths/quotes.json (-332 lines)
Lines 1-332 Link Here
1
{
2
  "/quotes": {
3
    "get": {
4
      "x-mojo-to": "Quotes#list",
5
      "operationId": "listQuotes",
6
      "tags": [
7
        "quotes"
8
      ],
9
      "summary": "List quotes",
10
      "produces": [
11
        "application/json"
12
      ],
13
      "parameters": [
14
        {
15
          "name": "quote_id",
16
          "in": "query",
17
          "description": "Case insensitive search on quote id",
18
          "required": false,
19
          "type": "string"
20
        },
21
        {
22
          "name": "source",
23
          "in": "query",
24
          "description": "Case insensitive search on source",
25
          "required": false,
26
          "type": "string"
27
        },
28
        {
29
          "name": "text",
30
          "in": "query",
31
          "description": "Case insensitive search on text",
32
          "required": false,
33
          "type": "string"
34
        },
35
        {
36
          "name": "displayed_on",
37
          "in": "query",
38
          "description": "Case Insensative search on last displayed date",
39
          "required": false,
40
          "type": "string"
41
        },
42
        {
43
          "$ref": "../parameters.json#/match"
44
        },
45
        {
46
          "$ref": "../parameters.json#/order_by"
47
        },
48
        {
49
          "$ref": "../parameters.json#/page"
50
        },
51
        {
52
          "$ref": "../parameters.json#/per_page"
53
        },
54
        {
55
          "$ref": "../parameters.json#/q_param"
56
        },
57
        {
58
          "$ref": "../parameters.json#/q_body"
59
        },
60
        {
61
          "$ref": "../parameters.json#/q_header"
62
        }
63
      ],
64
      "responses": {
65
        "200": {
66
          "description": "A list of quotes",
67
          "schema": {
68
            "type": "array",
69
            "items": {
70
              "$ref": "../definitions.json#/quote"
71
            }
72
          }
73
        },
74
        "403": {
75
          "description": "Access forbidden",
76
          "schema": {
77
            "$ref": "../definitions.json#/error"
78
          }
79
        },
80
        "500": {
81
          "description": "Internal error",
82
          "schema": {
83
            "$ref": "../definitions.json#/error"
84
          }
85
        },
86
        "503": {
87
          "description": "Under maintenance",
88
          "schema": {
89
            "$ref": "../definitions.json#/error"
90
          }
91
        }
92
      },
93
      "x-koha-authorization": {
94
        "permissions": {
95
          "catalogue": "1"
96
        }
97
      }
98
    },
99
    "post": {
100
      "x-mojo-to": "Quotes#add",
101
      "operationId": "addQuote",
102
      "tags": [
103
        "quotes"
104
      ],
105
      "summary": "Add quote",
106
      "parameters": [
107
        {
108
          "name": "body",
109
          "in": "body",
110
          "description": "A JSON object containing informations about the new quote",
111
          "required": true,
112
          "schema": {
113
            "$ref": "../definitions.json#/quote"
114
          }
115
        }
116
      ],
117
      "produces": [
118
        "application/json"
119
      ],
120
      "responses": {
121
        "201": {
122
          "description": "Quote added",
123
          "schema": {
124
            "$ref": "../definitions.json#/quote"
125
          }
126
        },
127
        "401": {
128
          "description": "Authentication required",
129
          "schema": {
130
            "$ref": "../definitions.json#/error"
131
          }
132
        },
133
        "403": {
134
          "description": "Access forbidden",
135
          "schema": {
136
            "$ref": "../definitions.json#/error"
137
          }
138
        },
139
        "500": {
140
          "description": "Internal error",
141
          "schema": {
142
            "$ref": "../definitions.json#/error"
143
          }
144
        },
145
        "503": {
146
          "description": "Under maintenance",
147
          "schema": {
148
            "$ref": "../definitions.json#/error"
149
          }
150
        }
151
      },
152
      "x-koha-authorization": {
153
        "permissions": {
154
          "tools": "edit_quotes"
155
        }
156
      }
157
    }
158
  },
159
  "/quotes/{quote_id}": {
160
    "get": {
161
      "x-mojo-to": "Quotes#get",
162
      "operationId": "getQuote",
163
      "tags": [
164
        "quotes"
165
      ],
166
      "summary": "Get quote",
167
      "parameters": [
168
        {
169
          "$ref": "../parameters.json#/quote_id_pp"
170
        }
171
      ],
172
      "produces": [
173
        "application/json"
174
      ],
175
      "responses": {
176
        "200": {
177
          "description": "A Quote",
178
          "schema": {
179
            "$ref": "../definitions.json#/quote"
180
          }
181
        },
182
        "404": {
183
          "description": "Quote not found",
184
          "schema": {
185
            "$ref": "../definitions.json#/error"
186
          }
187
        },
188
        "500": {
189
          "description": "Internal error",
190
          "schema": {
191
            "$ref": "../definitions.json#/error"
192
          }
193
        },
194
        "503": {
195
          "description": "Under maintenance",
196
          "schema": {
197
            "$ref": "../definitions.json#/error"
198
          }
199
        }
200
      },
201
      "x-koha-authorization": {
202
        "permissions": {
203
          "catalogue": "1"
204
        }
205
      }
206
    },
207
    "put": {
208
      "x-mojo-to": "Quotes#update",
209
      "operationId": "updateQuote",
210
      "tags": [
211
        "quotes"
212
      ],
213
      "summary": "Update quote",
214
      "parameters": [
215
        {
216
          "$ref": "../parameters.json#/quote_id_pp"
217
        },
218
        {
219
          "name": "body",
220
          "in": "body",
221
          "description": "a quote object",
222
          "required": true,
223
          "schema": {
224
            "$ref": "../definitions.json#/quote"
225
          }
226
        }
227
      ],
228
      "produces": [
229
        "application/json"
230
      ],
231
      "responses": {
232
        "200": {
233
          "description": "A quote",
234
          "schema": {
235
            "$ref": "../definitions.json#/quote"
236
          }
237
        },
238
        "401": {
239
          "description": "Authentication required",
240
          "schema": {
241
            "$ref": "../definitions.json#/error"
242
          }
243
        },
244
        "403": {
245
          "description": "Access forbidden",
246
          "schema": {
247
            "$ref": "../definitions.json#/error"
248
          }
249
        },
250
        "404": {
251
          "description": "Quote not found",
252
          "schema": {
253
            "$ref": "../definitions.json#/error"
254
          }
255
        },
256
        "500": {
257
          "description": "Internal error",
258
          "schema": {
259
            "$ref": "../definitions.json#/error"
260
          }
261
        },
262
        "503": {
263
          "description": "Under maintenance",
264
          "schema": {
265
            "$ref": "../definitions.json#/error"
266
          }
267
        }
268
      },
269
      "x-koha-authorization": {
270
        "permissions": {
271
          "tools": "edit_quotes"
272
        }
273
      }
274
    },
275
    "delete": {
276
      "x-mojo-to": "Quotes#delete",
277
      "operationId": "deleteQuote",
278
      "tags": [
279
        "quotes"
280
      ],
281
      "summary": "Delete quote",
282
      "parameters": [
283
        {
284
          "$ref": "../parameters.json#/quote_id_pp"
285
        }
286
      ],
287
      "produces": [
288
        "application/json"
289
      ],
290
      "responses": {
291
        "204": {
292
          "description": "Quote deleted"
293
        },
294
        "401": {
295
          "description": "Authentication required",
296
          "schema": {
297
            "$ref": "../definitions.json#/error"
298
          }
299
        },
300
        "403": {
301
          "description": "Access forbidden",
302
          "schema": {
303
            "$ref": "../definitions.json#/error"
304
          }
305
        },
306
        "404": {
307
          "description": "Quote not found",
308
          "schema": {
309
            "$ref": "../definitions.json#/error"
310
          }
311
        },
312
        "500": {
313
          "description": "Internal error",
314
          "schema": {
315
            "$ref": "../definitions.json#/error"
316
          }
317
        },
318
        "503": {
319
          "description": "Under maintenance",
320
          "schema": {
321
            "$ref": "../definitions.json#/error"
322
          }
323
        }
324
      },
325
      "x-koha-authorization": {
326
        "permissions": {
327
          "tools": "edit_quotes"
328
        }
329
      }
330
    }
331
  }
332
}
(-)a/api/v1/swagger/paths/quotes.yaml (+210 lines)
Line 0 Link Here
1
---
2
/quotes:
3
  get:
4
    x-mojo-to: Quotes#list
5
    operationId: listQuotes
6
    tags:
7
      - quotes
8
    summary: List quotes
9
    produces:
10
      - application/json
11
    parameters:
12
      - name: quote_id
13
        in: query
14
        description: Case insensitive search on quote id
15
        required: false
16
        type: string
17
      - name: source
18
        in: query
19
        description: Case insensitive search on source
20
        required: false
21
        type: string
22
      - name: text
23
        in: query
24
        description: Case insensitive search on text
25
        required: false
26
        type: string
27
      - name: displayed_on
28
        in: query
29
        description: Case Insensative search on last displayed date
30
        required: false
31
        type: string
32
      - $ref: ../parameters.yaml#/match
33
      - $ref: ../parameters.yaml#/order_by
34
      - $ref: ../parameters.yaml#/page
35
      - $ref: ../parameters.yaml#/per_page
36
      - $ref: ../parameters.yaml#/q_param
37
      - $ref: ../parameters.yaml#/q_body
38
      - $ref: ../parameters.yaml#/q_header
39
    responses:
40
      "200":
41
        description: A list of quotes
42
        schema:
43
          type: array
44
          items:
45
            $ref: ../definitions.yaml#/quote
46
      "403":
47
        description: Access forbidden
48
        schema:
49
          $ref: ../definitions.yaml#/error
50
      "500":
51
        description: Internal error
52
        schema:
53
          $ref: ../definitions.yaml#/error
54
      "503":
55
        description: Under maintenance
56
        schema:
57
          $ref: ../definitions.yaml#/error
58
    x-koha-authorization:
59
      permissions:
60
        catalogue: "1"
61
  post:
62
    x-mojo-to: Quotes#add
63
    operationId: addQuote
64
    tags:
65
      - quotes
66
    summary: Add quote
67
    parameters:
68
      - name: body
69
        in: body
70
        description: A JSON object containing informations about the new quote
71
        required: true
72
        schema:
73
          $ref: ../definitions.yaml#/quote
74
    produces:
75
      - application/json
76
    responses:
77
      "201":
78
        description: Quote added
79
        schema:
80
          $ref: ../definitions.yaml#/quote
81
      "401":
82
        description: Authentication required
83
        schema:
84
          $ref: ../definitions.yaml#/error
85
      "403":
86
        description: Access forbidden
87
        schema:
88
          $ref: ../definitions.yaml#/error
89
      "500":
90
        description: Internal error
91
        schema:
92
          $ref: ../definitions.yaml#/error
93
      "503":
94
        description: Under maintenance
95
        schema:
96
          $ref: ../definitions.yaml#/error
97
    x-koha-authorization:
98
      permissions:
99
        tools: edit_quotes
100
"/quotes/{quote_id}":
101
  get:
102
    x-mojo-to: Quotes#get
103
    operationId: getQuote
104
    tags:
105
      - quotes
106
    summary: Get quote
107
    parameters:
108
      - $ref: ../parameters.yaml#/quote_id_pp
109
    produces:
110
      - application/json
111
    responses:
112
      "200":
113
        description: A Quote
114
        schema:
115
          $ref: ../definitions.yaml#/quote
116
      "404":
117
        description: Quote not found
118
        schema:
119
          $ref: ../definitions.yaml#/error
120
      "500":
121
        description: Internal error
122
        schema:
123
          $ref: ../definitions.yaml#/error
124
      "503":
125
        description: Under maintenance
126
        schema:
127
          $ref: ../definitions.yaml#/error
128
    x-koha-authorization:
129
      permissions:
130
        catalogue: "1"
131
  put:
132
    x-mojo-to: Quotes#update
133
    operationId: updateQuote
134
    tags:
135
      - quotes
136
    summary: Update quote
137
    parameters:
138
      - $ref: ../parameters.yaml#/quote_id_pp
139
      - name: body
140
        in: body
141
        description: a quote object
142
        required: true
143
        schema:
144
          $ref: ../definitions.yaml#/quote
145
    produces:
146
      - application/json
147
    responses:
148
      "200":
149
        description: A quote
150
        schema:
151
          $ref: ../definitions.yaml#/quote
152
      "401":
153
        description: Authentication required
154
        schema:
155
          $ref: ../definitions.yaml#/error
156
      "403":
157
        description: Access forbidden
158
        schema:
159
          $ref: ../definitions.yaml#/error
160
      "404":
161
        description: Quote not found
162
        schema:
163
          $ref: ../definitions.yaml#/error
164
      "500":
165
        description: Internal error
166
        schema:
167
          $ref: ../definitions.yaml#/error
168
      "503":
169
        description: Under maintenance
170
        schema:
171
          $ref: ../definitions.yaml#/error
172
    x-koha-authorization:
173
      permissions:
174
        tools: edit_quotes
175
  delete:
176
    x-mojo-to: Quotes#delete
177
    operationId: deleteQuote
178
    tags:
179
      - quotes
180
    summary: Delete quote
181
    parameters:
182
      - $ref: ../parameters.yaml#/quote_id_pp
183
    produces:
184
      - application/json
185
    responses:
186
      "204":
187
        description: Quote deleted
188
      "401":
189
        description: Authentication required
190
        schema:
191
          $ref: ../definitions.yaml#/error
192
      "403":
193
        description: Access forbidden
194
        schema:
195
          $ref: ../definitions.yaml#/error
196
      "404":
197
        description: Quote not found
198
        schema:
199
          $ref: ../definitions.yaml#/error
200
      "500":
201
        description: Internal error
202
        schema:
203
          $ref: ../definitions.yaml#/error
204
      "503":
205
        description: Under maintenance
206
        schema:
207
          $ref: ../definitions.yaml#/error
208
    x-koha-authorization:
209
      permissions:
210
        tools: edit_quotes
(-)a/api/v1/swagger/paths/return_claims.json (-353 lines)
Lines 1-353 Link Here
1
{
2
  "/return_claims": {
3
    "post": {
4
      "x-mojo-to": "ReturnClaims#claim_returned",
5
      "operationId": "claimReturned",
6
      "summary": "Add a return claim",
7
      "tags": [
8
        "return_claims"
9
      ],
10
      "parameters": [
11
        {
12
          "name": "body",
13
          "in": "body",
14
          "description": "A JSON object containing fields to modify",
15
          "required": true,
16
          "schema": {
17
            "type": "object",
18
            "properties": {
19
              "item_id" : {
20
                "description": "Internal item id to claim as returned",
21
                "type": "integer"
22
              },
23
              "notes": {
24
                "description": "Notes about this return claim",
25
                "type": "string"
26
              },
27
              "created_by": {
28
                "description": "User id for the librarian submitting this claim",
29
                "type": "string"
30
              },
31
              "charge_lost_fee": {
32
                "description": "Charge a lost fee if true and Koha is set to allow a choice. Ignored otherwise.",
33
                "type": "boolean"
34
              }
35
            },
36
            "additionalProperties": false
37
          }
38
        }
39
      ],
40
      "produces": [
41
        "application/json"
42
      ],
43
      "responses": {
44
        "201": {
45
          "description": "Created claim",
46
          "schema": {
47
            "$ref": "../definitions.json#/return_claim"
48
          }
49
        },
50
        "400": {
51
          "description": "Bad request",
52
          "schema": {
53
            "$ref": "../definitions.json#/error"
54
          }
55
        },
56
        "401": {
57
          "description": "Authentication required",
58
          "schema": {
59
            "$ref": "../definitions.json#/error"
60
          }
61
        },
62
        "403": {
63
          "description": "Access forbidden",
64
          "schema": {
65
            "$ref": "../definitions.json#/error"
66
          }
67
        },
68
        "404": {
69
            "description": "Checkout not found",
70
            "schema": {
71
                "$ref": "../definitions.json#/error"
72
            }
73
        },
74
        "409": {
75
            "description": "Conflict creating the resource",
76
            "schema": {
77
                "$ref": "../definitions.json#/error"
78
            }
79
        },
80
        "500": {
81
          "description": "Internal server error",
82
          "schema": {
83
            "$ref": "../definitions.json#/error"
84
          }
85
        },
86
        "503": {
87
          "description": "Under maintenance",
88
          "schema": {
89
            "$ref": "../definitions.json#/error"
90
          }
91
        }
92
      },
93
      "x-koha-authorization": {
94
        "permissions": {
95
          "circulate": "circulate_remaining_permissions"
96
        }
97
      }
98
    }
99
  },
100
  "/return_claims/{claim_id}/notes": {
101
    "put": {
102
      "x-mojo-to": "ReturnClaims#update_notes",
103
      "operationId": "updateClaimNotes",
104
      "summary": "Update notes",
105
      "tags": [
106
        "return_claims"
107
      ],
108
      "parameters": [
109
        {
110
          "name": "claim_id",
111
          "in": "path",
112
          "required": true,
113
          "description": "Unique identifier for the claim whose notes are to be updated",
114
          "type": "integer"
115
        },
116
        {
117
          "name": "body",
118
          "in": "body",
119
          "description": "A JSON object containing fields to modify",
120
          "required": true,
121
          "schema": {
122
            "type": "object",
123
            "properties": {
124
              "notes": {
125
                "description": "Notes about this return claim",
126
                "type": "string"
127
              },
128
              "updated_by": {
129
                "description": "Interal identifier for the librarian updating the claim notes",
130
                "type": "string"
131
              }
132
            },
133
            "additionalProperties": false
134
          }
135
        }
136
      ],
137
      "produces": [
138
        "application/json"
139
      ],
140
      "responses": {
141
        "200": {
142
          "description": "Claim notes updated",
143
          "schema": {
144
            "$ref": "../definitions.json#/return_claim"
145
          }
146
        },
147
        "400": {
148
          "description": "Bad request",
149
          "schema": {
150
            "$ref": "../definitions.json#/error"
151
          }
152
        },
153
        "401": {
154
          "description": "Authentication required",
155
          "schema": {
156
            "$ref": "../definitions.json#/error"
157
          }
158
        },
159
        "403": {
160
          "description": "Access forbidden",
161
          "schema": {
162
            "$ref": "../definitions.json#/error"
163
          }
164
        },
165
        "404": {
166
          "description": "Claim not found",
167
          "schema": {
168
            "$ref": "../definitions.json#/error"
169
          }
170
        },
171
        "500": {
172
          "description": "Internal server error",
173
          "schema": {
174
            "$ref": "../definitions.json#/error"
175
          }
176
        },
177
        "503": {
178
          "description": "Under maintenance",
179
          "schema": {
180
            "$ref": "../definitions.json#/error"
181
          }
182
        }
183
      },
184
      "x-koha-authorization": {
185
        "permissions": {
186
          "circulate": "circulate_remaining_permissions"
187
        }
188
      }
189
    }
190
  },
191
  "/return_claims/{claim_id}": {
192
    "delete": {
193
      "x-mojo-to": "ReturnClaims#delete_claim",
194
      "operationId": "deletedClaim",
195
      "summary": "Delete claim",
196
      "tags": [ "return_claims" ],
197
      "parameters": [
198
        {
199
          "name": "claim_id",
200
          "in": "path",
201
          "required": true,
202
          "description": "Unique identifier for the claim to be deleted",
203
          "type": "integer"
204
        }
205
      ],
206
      "produces": [
207
        "application/json"
208
      ],
209
      "responses": {
210
        "204": {
211
          "description": "Claim deleted",
212
          "schema": {
213
            "$ref": "../definitions.json#/return_claim"
214
          }
215
        },
216
        "400": {
217
          "description": "Bad request",
218
          "schema": {
219
            "$ref": "../definitions.json#/error"
220
          }
221
        },
222
        "401": {
223
          "description": "Authentication required",
224
          "schema": {
225
            "$ref": "../definitions.json#/error"
226
          }
227
        },
228
        "403": {
229
          "description": "Access forbidden",
230
          "schema": {
231
            "$ref": "../definitions.json#/error"
232
          }
233
        },
234
        "404": {
235
          "description": "Claim not found",
236
          "schema": {
237
            "$ref": "../definitions.json#/error"
238
          }
239
        },
240
        "500": {
241
          "description": "Internal server error",
242
          "schema": {
243
            "$ref": "../definitions.json#/error"
244
          }
245
        },
246
        "503": {
247
          "description": "Under maintenance",
248
          "schema": {
249
            "$ref": "../definitions.json#/error"
250
          }
251
        }
252
      },
253
      "x-koha-authorization": {
254
        "permissions": {
255
          "circulate": "circulate_remaining_permissions"
256
        }
257
      }
258
    }
259
  },
260
  "/return_claims/{claim_id}/resolve": {
261
    "put": {
262
      "x-mojo-to": "ReturnClaims#resolve_claim",
263
      "operationId": "updateClaimResolve",
264
      "summary": "Resolve claim",
265
      "tags": [ "return_claims" ],
266
      "parameters": [
267
        {
268
          "name": "claim_id",
269
          "in": "path",
270
          "required": true,
271
          "description": "Unique identifier for the claim to be resolved",
272
          "type": "integer"
273
        },
274
        {
275
          "name": "body",
276
          "in": "body",
277
          "description": "A JSON object containing fields to modify",
278
          "required": true,
279
          "schema": {
280
            "type": "object",
281
            "properties": {
282
              "resolution": {
283
                "description": "The RETURN_CLAIM_RESOLUTION code to be used to resolve the calim",
284
                "type": "string"
285
              },
286
              "resolved_by": {
287
                "description": "User id for the librarian resolving the claim",
288
                "type": "string"
289
              },
290
              "new_lost_status": {
291
                "description": "New lost status to set to the item",
292
                "type": "string"
293
              }
294
            },
295
            "additionalProperties": false
296
          }
297
        }
298
      ],
299
      "produces": [
300
        "application/json"
301
      ],
302
      "responses": {
303
        "200": {
304
          "description": "Claim resolved",
305
          "schema": {
306
            "$ref": "../definitions.json#/return_claim"
307
          }
308
        },
309
        "400": {
310
          "description": "Bad request",
311
          "schema": {
312
            "$ref": "../definitions.json#/error"
313
          }
314
        },
315
        "401": {
316
          "description": "Authentication required",
317
          "schema": {
318
            "$ref": "../definitions.json#/error"
319
          }
320
        },
321
        "403": {
322
          "description": "Access forbidden",
323
          "schema": {
324
            "$ref": "../definitions.json#/error"
325
          }
326
        },
327
        "404": {
328
          "description": "Claim not found",
329
          "schema": {
330
            "$ref": "../definitions.json#/error"
331
          }
332
        },
333
        "500": {
334
          "description": "Internal server error",
335
          "schema": {
336
            "$ref": "../definitions.json#/error"
337
          }
338
        },
339
        "503": {
340
          "description": "Under maintenance",
341
          "schema": {
342
            "$ref": "../definitions.json#/error"
343
          }
344
        }
345
      },
346
      "x-koha-authorization": {
347
        "permissions": {
348
          "circulate": "circulate_remaining_permissions"
349
        }
350
      }
351
    }
352
  }
353
}
(-)a/api/v1/swagger/paths/return_claims.yaml (+240 lines)
Line 0 Link Here
1
---
2
/return_claims:
3
  post:
4
    x-mojo-to: ReturnClaims#claim_returned
5
    operationId: claimReturned
6
    summary: Add a return claim
7
    tags:
8
      - return_claims
9
    parameters:
10
      - name: body
11
        in: body
12
        description: A JSON object containing fields to modify
13
        required: true
14
        schema:
15
          type: object
16
          properties:
17
            item_id:
18
              description: Internal item id to claim as returned
19
              type: integer
20
            notes:
21
              description: Notes about this return claim
22
              type: string
23
            created_by:
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:
34
      "201":
35
        description: Created claim
36
        schema:
37
          $ref: ../definitions.yaml#/return_claim
38
      "400":
39
        description: Bad request
40
        schema:
41
          $ref: ../definitions.yaml#/error
42
      "401":
43
        description: Authentication required
44
        schema:
45
          $ref: ../definitions.yaml#/error
46
      "403":
47
        description: Access forbidden
48
        schema:
49
          $ref: ../definitions.yaml#/error
50
      "404":
51
        description: Checkout not found
52
        schema:
53
          $ref: ../definitions.yaml#/error
54
      "409":
55
        description: Conflict creating the resource
56
        schema:
57
          $ref: ../definitions.yaml#/error
58
      "500":
59
        description: Internal server error
60
        schema:
61
          $ref: ../definitions.yaml#/error
62
      "503":
63
        description: Under maintenance
64
        schema:
65
          $ref: ../definitions.yaml#/error
66
    x-koha-authorization:
67
      permissions:
68
        circulate: circulate_remaining_permissions
69
"/return_claims/{claim_id}/notes":
70
  put:
71
    x-mojo-to: ReturnClaims#update_notes
72
    operationId: updateClaimNotes
73
    summary: Update notes
74
    tags:
75
      - return_claims
76
    parameters:
77
      - name: claim_id
78
        in: path
79
        required: true
80
        description: Unique identifier for the claim whose notes are to be updated
81
        type: integer
82
      - name: body
83
        in: body
84
        description: A JSON object containing fields to modify
85
        required: true
86
        schema:
87
          type: object
88
          properties:
89
            notes:
90
              description: Notes about this return claim
91
              type: string
92
            updated_by:
93
              description: Interal identifier for the librarian updating the claim notes
94
              type: string
95
          additionalProperties: false
96
    produces:
97
      - application/json
98
    responses:
99
      "200":
100
        description: Claim notes updated
101
        schema:
102
          $ref: ../definitions.yaml#/return_claim
103
      "400":
104
        description: Bad request
105
        schema:
106
          $ref: ../definitions.yaml#/error
107
      "401":
108
        description: Authentication required
109
        schema:
110
          $ref: ../definitions.yaml#/error
111
      "403":
112
        description: Access forbidden
113
        schema:
114
          $ref: ../definitions.yaml#/error
115
      "404":
116
        description: Claim not found
117
        schema:
118
          $ref: ../definitions.yaml#/error
119
      "500":
120
        description: Internal server error
121
        schema:
122
          $ref: ../definitions.yaml#/error
123
      "503":
124
        description: Under maintenance
125
        schema:
126
          $ref: ../definitions.yaml#/error
127
    x-koha-authorization:
128
      permissions:
129
        circulate: circulate_remaining_permissions
130
"/return_claims/{claim_id}":
131
  delete:
132
    x-mojo-to: ReturnClaims#delete_claim
133
    operationId: deletedClaim
134
    summary: Delete claim
135
    tags:
136
      - return_claims
137
    parameters:
138
      - name: claim_id
139
        in: path
140
        required: true
141
        description: Unique identifier for the claim to be deleted
142
        type: integer
143
    produces:
144
      - application/json
145
    responses:
146
      "204":
147
        description: Claim deleted
148
        schema:
149
          $ref: ../definitions.yaml#/return_claim
150
      "400":
151
        description: Bad request
152
        schema:
153
          $ref: ../definitions.yaml#/error
154
      "401":
155
        description: Authentication required
156
        schema:
157
          $ref: ../definitions.yaml#/error
158
      "403":
159
        description: Access forbidden
160
        schema:
161
          $ref: ../definitions.yaml#/error
162
      "404":
163
        description: Claim not found
164
        schema:
165
          $ref: ../definitions.yaml#/error
166
      "500":
167
        description: Internal server error
168
        schema:
169
          $ref: ../definitions.yaml#/error
170
      "503":
171
        description: Under maintenance
172
        schema:
173
          $ref: ../definitions.yaml#/error
174
    x-koha-authorization:
175
      permissions:
176
        circulate: circulate_remaining_permissions
177
"/return_claims/{claim_id}/resolve":
178
  put:
179
    x-mojo-to: ReturnClaims#resolve_claim
180
    operationId: updateClaimResolve
181
    summary: Resolve claim
182
    tags:
183
      - return_claims
184
    parameters:
185
      - name: claim_id
186
        in: path
187
        required: true
188
        description: Unique identifier for the claim to be resolved
189
        type: integer
190
      - name: body
191
        in: body
192
        description: A JSON object containing fields to modify
193
        required: true
194
        schema:
195
          type: object
196
          properties:
197
            resolution:
198
              description: The RETURN_CLAIM_RESOLUTION code to be used to resolve the calim
199
              type: string
200
            resolved_by:
201
              description: User id for the librarian resolving the claim
202
              type: string
203
            new_lost_status:
204
              description: New lost status to set to the item
205
              type: string
206
          additionalProperties: false
207
    produces:
208
      - application/json
209
    responses:
210
      "200":
211
        description: Claim resolved
212
        schema:
213
          $ref: ../definitions.yaml#/return_claim
214
      "400":
215
        description: Bad request
216
        schema:
217
          $ref: ../definitions.yaml#/error
218
      "401":
219
        description: Authentication required
220
        schema:
221
          $ref: ../definitions.yaml#/error
222
      "403":
223
        description: Access forbidden
224
        schema:
225
          $ref: ../definitions.yaml#/error
226
      "404":
227
        description: Claim not found
228
        schema:
229
          $ref: ../definitions.yaml#/error
230
      "500":
231
        description: Internal server error
232
        schema:
233
          $ref: ../definitions.yaml#/error
234
      "503":
235
        description: Under maintenance
236
        schema:
237
          $ref: ../definitions.yaml#/error
238
    x-koha-authorization:
239
      permissions:
240
        circulate: circulate_remaining_permissions
(-)a/api/v1/swagger/paths/rotas.json (-80 lines)
Lines 1-80 Link Here
1
{
2
    "/rotas/{rota_id}/stages/{stage_id}/position": {
3
        "put": {
4
            "x-mojo-to": "Stage#move",
5
            "operationId": "moveStage",
6
            "summary": "Update stage",
7
            "tags": ["rotas"],
8
            "parameters": [{
9
                "name": "rota_id",
10
                "in": "path",
11
                "required": true,
12
                "description": "A rotas ID",
13
                "type": "integer"
14
            }, {
15
                "name": "stage_id",
16
                "in": "path",
17
                "required": true,
18
                "description": "A stages ID",
19
                "type": "integer"
20
            }, {
21
                "name": "position",
22
                "in": "body",
23
                "required": true,
24
                "description": "A stages position in the rota",
25
                "schema": {
26
                    "type": "integer"
27
                }
28
            }],
29
            "produces": [
30
                "application/json"
31
            ],
32
            "responses": {
33
                "200": {
34
                    "description": "OK"
35
                },
36
                "400": {
37
                    "description": "Bad request",
38
                    "schema": {
39
                        "$ref": "../definitions.json#/error"
40
                    }
41
                },
42
                "401": {
43
                    "description": "Authentication required",
44
                    "schema": {
45
                        "$ref": "../definitions.json#/error"
46
                    }
47
                },
48
                "403": {
49
                    "description": "Access forbidden",
50
                    "schema": {
51
                        "$ref": "../definitions.json#/error"
52
                    }
53
                },
54
                "404": {
55
                    "description": "Position not found",
56
                    "schema": {
57
                        "$ref": "../definitions.json#/error"
58
                    }
59
                },
60
                "500": {
61
                    "description": "Internal server error",
62
                    "schema": {
63
                        "$ref": "../definitions.json#/error"
64
                    }
65
                },
66
                "503": {
67
                    "description": "Under maintenance",
68
                    "schema": {
69
                        "$ref": "../definitions.json#/error"
70
                    }
71
                }
72
            },
73
            "x-koha-authorization": {
74
                "permissions": {
75
                    "stockrotation": "1"
76
                }
77
            }
78
        }
79
    }
80
}
(-)a/api/v1/swagger/paths/rotas.yaml (+57 lines)
Line 0 Link Here
1
---
2
"/rotas/{rota_id}/stages/{stage_id}/position":
3
  put:
4
    x-mojo-to: Stage#move
5
    operationId: moveStage
6
    summary: Update stage
7
    tags:
8
      - rotas
9
    parameters:
10
      - name: rota_id
11
        in: path
12
        required: true
13
        description: A rotas ID
14
        type: integer
15
      - name: stage_id
16
        in: path
17
        required: true
18
        description: A stages ID
19
        type: integer
20
      - name: position
21
        in: body
22
        required: true
23
        description: A stages position in the rota
24
        schema:
25
          type: integer
26
    produces:
27
      - application/json
28
    responses:
29
      "200":
30
        description: OK
31
      "400":
32
        description: Bad request
33
        schema:
34
          $ref: ../definitions.yaml#/error
35
      "401":
36
        description: Authentication required
37
        schema:
38
          $ref: ../definitions.yaml#/error
39
      "403":
40
        description: Access forbidden
41
        schema:
42
          $ref: ../definitions.yaml#/error
43
      "404":
44
        description: Position not found
45
        schema:
46
          $ref: ../definitions.yaml#/error
47
      "500":
48
        description: Internal server error
49
        schema:
50
          $ref: ../definitions.yaml#/error
51
      "503":
52
        description: Under maintenance
53
        schema:
54
          $ref: ../definitions.yaml#/error
55
    x-koha-authorization:
56
      permissions:
57
        stockrotation: "1"
(-)a/api/v1/swagger/paths/suggestions.yaml (-37 / +37 lines)
Lines 8-20 Link Here
8
    tags:
8
    tags:
9
      - suggestions
9
      - suggestions
10
    parameters:
10
    parameters:
11
      - $ref: ../parameters.json#/match
11
      - $ref: ../parameters.yaml#/match
12
      - $ref: ../parameters.json#/order_by
12
      - $ref: ../parameters.yaml#/order_by
13
      - $ref: ../parameters.json#/page
13
      - $ref: ../parameters.yaml#/page
14
      - $ref: ../parameters.json#/per_page
14
      - $ref: ../parameters.yaml#/per_page
15
      - $ref: ../parameters.json#/q_param
15
      - $ref: ../parameters.yaml#/q_param
16
      - $ref: ../parameters.json#/q_body
16
      - $ref: ../parameters.yaml#/q_body
17
      - $ref: ../parameters.json#/q_header
17
      - $ref: ../parameters.yaml#/q_header
18
    produces:
18
    produces:
19
      - application/json
19
      - application/json
20
    responses:
20
    responses:
Lines 23-41 Link Here
23
        schema:
23
        schema:
24
          type: array
24
          type: array
25
          items:
25
          items:
26
            $ref: ../definitions.json#/suggestion
26
            $ref: ../definitions.yaml#/suggestion
27
      "403":
27
      "403":
28
        description: Access forbidden
28
        description: Access forbidden
29
        schema:
29
        schema:
30
          $ref: ../definitions.json#/error
30
          $ref: ../definitions.yaml#/error
31
      "500":
31
      "500":
32
        description: Internal error
32
        description: Internal error
33
        schema:
33
        schema:
34
          $ref: ../definitions.json#/error
34
          $ref: ../definitions.yaml#/error
35
      "503":
35
      "503":
36
        description: Under maintenance
36
        description: Under maintenance
37
        schema:
37
        schema:
38
          $ref: ../definitions.json#/error
38
          $ref: ../definitions.yaml#/error
39
    x-koha-authorization:
39
    x-koha-authorization:
40
      permissions:
40
      permissions:
41
        suggestions: suggestions_manage
41
        suggestions: suggestions_manage
Lines 52-81 Link Here
52
        description: A JSON object containing informations about the new suggestion
52
        description: A JSON object containing informations about the new suggestion
53
        required: true
53
        required: true
54
        schema:
54
        schema:
55
          $ref: ../definitions.json#/suggestion
55
          $ref: ../definitions.yaml#/suggestion
56
    produces:
56
    produces:
57
      - application/json
57
      - application/json
58
    responses:
58
    responses:
59
      "201":
59
      "201":
60
        description: Suggestion added
60
        description: Suggestion added
61
        schema:
61
        schema:
62
          $ref: ../definitions.json#/suggestion
62
          $ref: ../definitions.yaml#/suggestion
63
      "400":
63
      "400":
64
        description: Bad request
64
        description: Bad request
65
        schema:
65
        schema:
66
          $ref: ../definitions.json#/error
66
          $ref: ../definitions.yaml#/error
67
      "403":
67
      "403":
68
        description: Access forbidden
68
        description: Access forbidden
69
        schema:
69
        schema:
70
          $ref: ../definitions.json#/error
70
          $ref: ../definitions.yaml#/error
71
      "500":
71
      "500":
72
        description: Internal error
72
        description: Internal error
73
        schema:
73
        schema:
74
          $ref: ../definitions.json#/error
74
          $ref: ../definitions.yaml#/error
75
      "503":
75
      "503":
76
        description: Under maintenance
76
        description: Under maintenance
77
        schema:
77
        schema:
78
          $ref: ../definitions.json#/error
78
          $ref: ../definitions.yaml#/error
79
    x-koha-authorization:
79
    x-koha-authorization:
80
      permissions:
80
      permissions:
81
        suggestions: suggestions_manage
81
        suggestions: suggestions_manage
Lines 88-117 Link Here
88
    tags:
88
    tags:
89
      - suggestions
89
      - suggestions
90
    parameters:
90
    parameters:
91
      - $ref: ../parameters.json#/suggestion_id_pp
91
      - $ref: ../parameters.yaml#/suggestion_id_pp
92
    produces:
92
    produces:
93
      - application/json
93
      - application/json
94
    responses:
94
    responses:
95
      "200":
95
      "200":
96
        description: A suggestion
96
        description: A suggestion
97
        schema:
97
        schema:
98
          $ref: ../definitions.json#/suggestion
98
          $ref: ../definitions.yaml#/suggestion
99
      "403":
99
      "403":
100
        description: Access forbidden
100
        description: Access forbidden
101
        schema:
101
        schema:
102
          $ref: ../definitions.json#/error
102
          $ref: ../definitions.yaml#/error
103
      "404":
103
      "404":
104
        description: Suggestion not found
104
        description: Suggestion not found
105
        schema:
105
        schema:
106
          $ref: ../definitions.json#/error
106
          $ref: ../definitions.yaml#/error
107
      "500":
107
      "500":
108
        description: Internal error
108
        description: Internal error
109
        schema:
109
        schema:
110
          $ref: ../definitions.json#/error
110
          $ref: ../definitions.yaml#/error
111
      "503":
111
      "503":
112
        description: Under maintenance
112
        description: Under maintenance
113
        schema:
113
        schema:
114
          $ref: ../definitions.json#/error
114
          $ref: ../definitions.yaml#/error
115
    x-koha-authorization:
115
    x-koha-authorization:
116
      permissions:
116
      permissions:
117
        suggestions: suggestions_manage
117
        suggestions: suggestions_manage
Lines 123-162 Link Here
123
    tags:
123
    tags:
124
      - suggestions
124
      - suggestions
125
    parameters:
125
    parameters:
126
      - $ref: ../parameters.json#/suggestion_id_pp
126
      - $ref: ../parameters.yaml#/suggestion_id_pp
127
      - name: body
127
      - name: body
128
        in: body
128
        in: body
129
        description: A JSON object containing informations about the new hold
129
        description: A JSON object containing informations about the new hold
130
        required: true
130
        required: true
131
        schema:
131
        schema:
132
          $ref: ../definitions.json#/suggestion
132
          $ref: ../definitions.yaml#/suggestion
133
    produces:
133
    produces:
134
      - application/json
134
      - application/json
135
    responses:
135
    responses:
136
      "200":
136
      "200":
137
        description: A suggestion
137
        description: A suggestion
138
        schema:
138
        schema:
139
          $ref: ../definitions.json#/suggestion
139
          $ref: ../definitions.yaml#/suggestion
140
      "400":
140
      "400":
141
        description: Bad request
141
        description: Bad request
142
        schema:
142
        schema:
143
          $ref: ../definitions.json#/error
143
          $ref: ../definitions.yaml#/error
144
      "403":
144
      "403":
145
        description: Access forbidden
145
        description: Access forbidden
146
        schema:
146
        schema:
147
          $ref: ../definitions.json#/error
147
          $ref: ../definitions.yaml#/error
148
      "404":
148
      "404":
149
        description: Suggestion not found
149
        description: Suggestion not found
150
        schema:
150
        schema:
151
          $ref: ../definitions.json#/error
151
          $ref: ../definitions.yaml#/error
152
      "500":
152
      "500":
153
        description: Internal error
153
        description: Internal error
154
        schema:
154
        schema:
155
          $ref: ../definitions.json#/error
155
          $ref: ../definitions.yaml#/error
156
      "503":
156
      "503":
157
        description: Under maintenance
157
        description: Under maintenance
158
        schema:
158
        schema:
159
          $ref: ../definitions.json#/error
159
          $ref: ../definitions.yaml#/error
160
    x-koha-authorization:
160
    x-koha-authorization:
161
      permissions:
161
      permissions:
162
        suggestions: suggestions_manage
162
        suggestions: suggestions_manage
Lines 168-174 Link Here
168
    tags:
168
    tags:
169
      - suggestions
169
      - suggestions
170
    parameters:
170
    parameters:
171
      - $ref: ../parameters.json#/suggestion_id_pp
171
      - $ref: ../parameters.yaml#/suggestion_id_pp
172
    produces:
172
    produces:
173
      - application/json
173
      - application/json
174
    responses:
174
    responses:
Lines 179-201 Link Here
179
      "401":
179
      "401":
180
        description: Authentication required
180
        description: Authentication required
181
        schema:
181
        schema:
182
          $ref: ../definitions.json#/error
182
          $ref: ../definitions.yaml#/error
183
      "403":
183
      "403":
184
        description: Access forbidden
184
        description: Access forbidden
185
        schema:
185
        schema:
186
          $ref: ../definitions.json#/error
186
          $ref: ../definitions.yaml#/error
187
      "404":
187
      "404":
188
        description: Suggestion not found
188
        description: Suggestion not found
189
        schema:
189
        schema:
190
          $ref: ../definitions.json#/error
190
          $ref: ../definitions.yaml#/error
191
      "500":
191
      "500":
192
        description: Internal error
192
        description: Internal error
193
        schema:
193
        schema:
194
          $ref: ../definitions.json#/error
194
          $ref: ../definitions.yaml#/error
195
      "503":
195
      "503":
196
        description: Under maintenance
196
        description: Under maintenance
197
        schema:
197
        schema:
198
          $ref: ../definitions.json#/error
198
          $ref: ../definitions.yaml#/error
199
    x-koha-authorization:
199
    x-koha-authorization:
200
      permissions:
200
      permissions:
201
        suggestions: suggestions_manage
201
        suggestions: suggestions_manage
(-)a/api/v1/swagger/paths/transfer_limits.yaml (-175 / +178 lines)
Lines 1-105 Link Here
1
---
1
/transfer_limits:
2
"/transfer_limits":
3
  get:
2
  get:
4
    x-mojo-to: TransferLimits#list
3
    x-mojo-to: TransferLimits#list
5
    operationId: listTransferLimits
4
    operationId: listTransferLimits
6
    description: "This resource returns a list of existing transfer limits."
5
    description: This resource returns a list of existing transfer limits.
7
    summary: List transfer limits
6
    summary: List transfer limits
8
    tags:
7
    tags:
9
    - transfer
8
      - transfer
10
    parameters:
9
    parameters:
11
    - name: to_library_id
10
      - name: to_library_id
12
      in: query
11
        in: query
13
      description: Search on to_library_id
12
        description: Search on to_library_id
14
      required: false
13
        required: false
15
      type: string
14
        type: string
16
    - name: from_library_id
15
      - name: from_library_id
17
      in: query
16
        in: query
18
      description: Search on from_library_id
17
        description: Search on from_library_id
19
      required: false
18
        required: false
20
      type: string
19
        type: string
21
    - name: item_type
20
      - name: item_type
22
      in: query
21
        in: query
23
      description: Search on item_type
22
        description: Search on item_type
24
      required: false
23
        required: false
25
      type: string
24
        type: string
26
    - name: collection_code
25
      - name: collection_code
27
      in: query
26
        in: query
28
      description: Search on collection_code
27
        description: Search on collection_code
29
      required: false
28
        required: false
30
      type: string
29
        type: string
31
    - "$ref": "../parameters.json#/match"
30
      - $ref: ../parameters.yaml#/match
32
    - "$ref": "../parameters.json#/order_by"
31
      - $ref: ../parameters.yaml#/order_by
33
    - "$ref": "../parameters.json#/page"
32
      - $ref: ../parameters.yaml#/page
34
    - "$ref": "../parameters.json#/per_page"
33
      - $ref: ../parameters.yaml#/per_page
35
    - "$ref": "../parameters.json#/q_param"
34
      - $ref: ../parameters.yaml#/q_param
36
    - "$ref": "../parameters.json#/q_body"
35
      - $ref: ../parameters.yaml#/q_body
37
    - "$ref": "../parameters.json#/q_header"
36
      - $ref: ../parameters.yaml#/q_header
38
    produces:
37
    produces:
39
    - application/json
38
      - application/json
40
    responses:
39
    responses:
41
      '200':
40
      "200":
42
        description: A list of transfer limits
41
        description: A list of transfer limits
43
        schema:
42
        schema:
44
          type: array
43
          type: array
45
          items:
44
          items:
46
            "$ref": "../definitions.json#/transfer_limit"
45
            $ref: ../definitions.yaml#/transfer_limit
47
      '500':
46
      "500":
48
        description: Internal error
47
        description: Internal error
49
        schema:
48
        schema:
50
          "$ref": "../definitions.json#/error"
49
          $ref: ../definitions.yaml#/error
51
      '503':
50
      "503":
52
        description: Under maintenance
51
        description: Under maintenance
53
        schema:
52
        schema:
54
          "$ref": "../definitions.json#/error"
53
          $ref: ../definitions.yaml#/error
55
    x-koha-authorization:
54
    x-koha-authorization:
56
      permissions:
55
      permissions:
57
        parameters: manage_transfers
56
        parameters: manage_transfers
58
  post:
57
  post:
59
    x-mojo-to: TransferLimits#add
58
    x-mojo-to: TransferLimits#add
60
    operationId: addTransferLimit
59
    operationId: addTransferLimit
61
    description: "This resource accepts a new transfer limit and creates it if it does not already exist."
60
    description: This resource accepts a new transfer limit and creates it if it does not
61
      already exist.
62
    tags:
62
    tags:
63
    - transfer
63
      - transfer
64
    summary: Add a transfer limit
64
    summary: Add a transfer limit
65
    parameters:
65
    parameters:
66
    - name: body
66
      - name: body
67
      in: body
67
        in: body
68
      description: A JSON object containing information about a new transfer limit
68
        description: A JSON object containing information about a new transfer limit
69
      required: true
69
        required: true
70
      schema:
70
        schema:
71
        "$ref": "../definitions.json#/transfer_limit"
71
          $ref: ../definitions.yaml#/transfer_limit
72
    produces:
72
    produces:
73
    - application/json
73
      - application/json
74
    responses:
74
    responses:
75
      '201':
75
      "201":
76
        description: Transfer limit added
76
        description: Transfer limit added
77
        schema:
77
        schema:
78
          "$ref": "../definitions.json#/transfer_limit"
78
          $ref: ../definitions.yaml#/transfer_limit
79
      '400':
79
      "400":
80
        description: Bad request
80
        description: Bad request
81
        schema:
81
        schema:
82
          "$ref": "../definitions.json#/error"
82
          $ref: ../definitions.yaml#/error
83
      '401':
83
      "401":
84
        description: Authentication required
84
        description: Authentication required
85
        schema:
85
        schema:
86
          "$ref": "../definitions.json#/error"
86
          $ref: ../definitions.yaml#/error
87
      '403':
87
      "403":
88
        description: Access forbidden
88
        description: Access forbidden
89
        schema:
89
        schema:
90
          "$ref": "../definitions.json#/error"
90
          $ref: ../definitions.yaml#/error
91
      '409':
91
      "409":
92
        description: Conflict in creating resource
92
        description: Conflict in creating resource
93
        schema:
93
        schema:
94
          "$ref": "../definitions.json#/error"
94
          $ref: ../definitions.yaml#/error
95
      '500':
95
      "500":
96
        description: Internal error
96
        description: Internal error
97
        schema:
97
        schema:
98
          "$ref": "../definitions.json#/error"
98
          $ref: ../definitions.yaml#/error
99
      '503':
99
      "503":
100
        description: Under maintenance
100
        description: Under maintenance
101
        schema:
101
        schema:
102
          "$ref": "../definitions.json#/error"
102
          $ref: ../definitions.yaml#/error
103
    x-koha-authorization:
103
    x-koha-authorization:
104
      permissions:
104
      permissions:
105
        parameters: manage_transfers
105
        parameters: manage_transfers
Lines 107-297 Link Here
107
  delete:
107
  delete:
108
    x-mojo-to: TransferLimits#delete
108
    x-mojo-to: TransferLimits#delete
109
    operationId: deleteTransferLimit
109
    operationId: deleteTransferLimit
110
    description: "This resource deletes a transfer limit for the given limit id"
110
    description: This resource deletes a transfer limit for the given limit id
111
    tags:
111
    tags:
112
    - transfer
112
      - transfer
113
    summary: Delete transfer limit
113
    summary: Delete transfer limit
114
    parameters:
114
    parameters:
115
    - "$ref": "../parameters.json#/transfer_limit_id_pp"
115
      - $ref: ../parameters.yaml#/transfer_limit_id_pp
116
    produces:
116
    produces:
117
    - application/json
117
      - application/json
118
    responses:
118
    responses:
119
      '204':
119
      "204":
120
        description: Transfer limit deleted
120
        description: Transfer limit deleted
121
        schema:
121
        schema:
122
          type: string
122
          type: string
123
      '401':
123
      "401":
124
        description: Authentication required
124
        description: Authentication required
125
        schema:
125
        schema:
126
          "$ref": "../definitions.json#/error"
126
          $ref: ../definitions.yaml#/error
127
      '403':
127
      "403":
128
        description: Access forbidden
128
        description: Access forbidden
129
        schema:
129
        schema:
130
          "$ref": "../definitions.json#/error"
130
          $ref: ../definitions.yaml#/error
131
      '404':
131
      "404":
132
        description: Library not found
132
        description: Library not found
133
        schema:
133
        schema:
134
          "$ref": "../definitions.json#/error"
134
          $ref: ../definitions.yaml#/error
135
      '500':
135
      "500":
136
        description: Internal error
136
        description: Internal error
137
        schema:
137
        schema:
138
          "$ref": "../definitions.json#/error"
138
          $ref: ../definitions.yaml#/error
139
      '503':
139
      "503":
140
        description: Under maintenance
140
        description: Under maintenance
141
        schema:
141
        schema:
142
          "$ref": "../definitions.json#/error"
142
          $ref: ../definitions.yaml#/error
143
    x-koha-authorization:
143
    x-koha-authorization:
144
      permissions:
144
      permissions:
145
        parameters: manage_transfers
145
        parameters: manage_transfers
146
"/transfer_limits/batch":
146
/transfer_limits/batch:
147
  post:
147
  post:
148
    x-mojo-to: TransferLimits#batch_add
148
    x-mojo-to: TransferLimits#batch_add
149
    operationId: batchAddTransferLimits
149
    operationId: batchAddTransferLimits
150
    description: "This resource batch creates new transfer limits based on the given data.
150
    description: >
151
      
152
      This resource batch creates new transfer limits based on the given data.
153
154
      For example, if the paramters `to_library_id: 'BranchA'` and `item_type: 'BOOK'` are passed in
155
      new transfer limits for `BOOK`s will be created, with one transfer limit each for all the
156
      branches defined in Koha. Given 4 branches, 3 limits would be created:
157
158
      * to_library_id: 'BranchA', from_library_id: 'BranchB', item_type: 'BOOK'
159
      * to_library_id: 'BranchA', from_library_id: 'BranchC', item_type: 'BOOK'
160
      * to_library_id: 'BranchA', from_library_id: 'BranchD', item_type: 'BOOK'
151
161
152
    For example, if the paramters `to_library_id: 'BranchA'` and `item_type: 'BOOK'` are passed in
153
    new transfer limits for `BOOK`s will be created, with one transfer limit each for all the
154
    branches defined in Koha. Given 4 branches, 3 limits would be created:
155
162
163
      The body of the query would look like
156
164
157
    * to_library_id: 'BranchA', from_library_id: 'BranchB', item_type: 'BOOK'
165
      ```
158
166
159
    * to_library_id: 'BranchA', from_library_id: 'BranchC', item_type: 'BOOK'
167
      {
168
          'to_library_id': 'BranchA',
169
          'item_type': 'BOOK'
160
170
161
    * to_library_id: 'BranchA', from_library_id: 'BranchD', item_type: 'BOOK'
171
      }
162
172
173
      ```
163
174
164
    The body of the query would look like
175
      As another example, imagine we have an itemtype that is never supposed to be transferred to another library.
165
    ```
176
      If we call that itemtype `LOCAL_ONLY` we would need to just pass `item_type: 'LOCAL_ONLY'`, which would create transfer
166
    {
177
      limits for all libraries, meaning those items would never be allowed to transfer to another
167
        'to_library_id': 'BranchA',
178
      library. The body of the query would look like
168
        'item_type': 'BOOK'
169
179
170
    }
180
      ```
171
    ```
172
181
182
      {
183
          'item_type': 'LOCAL_ONLY'
184
      }
173
185
174
    As another example, imagine we have an itemtype that is never supposed to be transferred to another library.
186
      ```
175
    If we call that itemtype `LOCAL_ONLY` we would need to just pass `item_type: 'LOCAL_ONLY'`, which would create transfer
176
    limits for all libraries, meaning those items would never be allowed to transfer to another
177
    library. The body of the query would look like
178
    ```
179
    {
180
        'item_type': 'LOCAL_ONLY'
181
    }
182
    ```"
183
    tags:
187
    tags:
184
    - transfer
188
      - transfer
185
    summary: Batch add transfer limits
189
    summary: Batch add transfer limits
186
    parameters:
190
    parameters:
187
    - name: body
191
      - name: body
188
      in: body
192
        in: body
189
      description: A JSON object containing information about new transfer limits.
193
        description: A JSON object containing information about new transfer limits.
190
      required: true
194
        required: true
191
      schema:
195
        schema:
192
        type: object
196
          type: object
193
        properties:
197
          properties:
194
          to_library_id:
198
            to_library_id:
195
            type: string
199
              type: string
196
            description: Internal library id for which library the item is going to
200
              description: Internal library id for which library the item is going to
197
          from_library_id:
201
            from_library_id:
198
            type: string
202
              type: string
199
            description: Internal library id for which library the item is coming
203
              description: Internal library id for which library the item is coming from
200
              from
204
            item_type:
201
          item_type:
205
              type:
202
            type:
206
                - string
203
            - string
207
                - "null"
204
            - 'null'
208
              description: Itemtype defining the type for this limi
205
            description: Itemtype defining the type for this limi
209
            collection_code:
206
          collection_code:
210
              type:
207
            type:
211
                - string
208
            - string
212
                - "null"
209
            - 'null'
213
              description: Authorized value for the collection code associated with this
210
            description: Authorized value for the collection code associated with
214
                limit
211
              this limit
215
          additionalProperties: false
212
        additionalProperties: false
213
    produces:
216
    produces:
214
    - application/json
217
      - application/json
215
    responses:
218
    responses:
216
      '201':
219
      "201":
217
        description: A list of transfer limits
220
        description: A list of transfer limits
218
        schema:
221
        schema:
219
          type: array
222
          type: array
220
          items:
223
          items:
221
            "$ref": "../definitions.json#/transfer_limit"
224
            $ref: ../definitions.yaml#/transfer_limit
222
      '500':
225
      "500":
223
        description: Internal error
226
        description: Internal error
224
        schema:
227
        schema:
225
          "$ref": "../definitions.json#/error"
228
          $ref: ../definitions.yaml#/error
226
      '503':
229
      "503":
227
        description: Under maintenance
230
        description: Under maintenance
228
        schema:
231
        schema:
229
          "$ref": "../definitions.json#/error"
232
          $ref: ../definitions.yaml#/error
230
    x-koha-authorization:
233
    x-koha-authorization:
231
      permissions:
234
      permissions:
232
        parameters: manage_transfers
235
        parameters: manage_transfers
233
  delete:
236
  delete:
234
    x-mojo-to: TransferLimits#batch_delete
237
    x-mojo-to: TransferLimits#batch_delete
235
    operationId: batchDeleteTransferLimits
238
    operationId: batchDeleteTransferLimits
236
    description: 'This endpoint works just like [the POST version](#op-post-transfer_limits-batch), except it deletes transfer in batch
239
    description: This endpoint works just like [the POST
237
      rather than creating them.'
240
      version](#op-post-transfer_limits-batch), except it deletes transfer in
241
      batch rather than creating them.
238
    tags:
242
    tags:
239
    - transfer
243
      - transfer
240
    summary: Batch delete transfer limits
244
    summary: Batch delete transfer limits
241
    parameters:
245
    parameters:
242
    - name: body
246
      - name: body
243
      in: body
247
        in: body
244
      description: A JSON object containing information about new transfer limits.
248
        description: A JSON object containing information about new transfer limits.
245
      required: true
249
        required: true
246
      schema:
250
        schema:
247
        type: object
251
          type: object
248
        properties:
252
          properties:
249
          to_library_id:
253
            to_library_id:
250
            type: string
254
              type: string
251
            description: Internal library id for which library the item is going to
255
              description: Internal library id for which library the item is going to
252
          from_library_id:
256
            from_library_id:
253
            type: string
257
              type: string
254
            description: Internal library id for which library the item is coming
258
              description: Internal library id for which library the item is coming from
255
              from
259
            item_type:
256
          item_type:
260
              type:
257
            type:
261
                - string
258
            - string
262
                - "null"
259
            - 'null'
263
              description: Itemtype defining the type for this limi
260
            description: Itemtype defining the type for this limi
264
            collection_code:
261
          collection_code:
265
              type:
262
            type:
266
                - string
263
            - string
267
                - "null"
264
            - 'null'
268
              description: Authorized value for the collection code associated with this
265
            description: Authorized value for the collection code associated with
269
                limit
266
              this limit
270
          additionalProperties: false
267
        additionalProperties: false
268
    produces:
271
    produces:
269
    - application/json
272
      - application/json
270
    responses:
273
    responses:
271
      '204':
274
      "204":
272
        description: Transfer limits deleted
275
        description: Transfer limits deleted
273
        schema:
276
        schema:
274
          type: string
277
          type: string
275
      '401':
278
      "401":
276
        description: Authentication required
279
        description: Authentication required
277
        schema:
280
        schema:
278
          "$ref": "../definitions.json#/error"
281
          $ref: ../definitions.yaml#/error
279
      '403':
282
      "403":
280
        description: Access forbidden
283
        description: Access forbidden
281
        schema:
284
        schema:
282
          "$ref": "../definitions.json#/error"
285
          $ref: ../definitions.yaml#/error
283
      '404':
286
      "404":
284
        description: Library not found
287
        description: Library not found
285
        schema:
288
        schema:
286
          "$ref": "../definitions.json#/error"
289
          $ref: ../definitions.yaml#/error
287
      '500':
290
      "500":
288
        description: Internal error
291
        description: Internal error
289
        schema:
292
        schema:
290
          "$ref": "../definitions.json#/error"
293
          $ref: ../definitions.yaml#/error
291
      '503':
294
      "503":
292
        description: Under maintenance
295
        description: Under maintenance
293
        schema:
296
        schema:
294
          "$ref": "../definitions.json#/error"
297
          $ref: ../definitions.yaml#/error
295
    x-koha-authorization:
298
    x-koha-authorization:
296
      permissions:
299
      permissions:
297
        parameters: manage_transfers
300
        parameters: manage_transfers
(-)a/api/v1/swagger/swagger.yaml (-4 / +4 lines)
Lines 2-14 Link Here
2
swagger: "2.0"
2
swagger: "2.0"
3
basePath: /api/v1
3
basePath: /api/v1
4
paths:
4
paths:
5
  $ref: paths.json
5
  $ref: paths.yaml
6
definitions:
6
definitions:
7
  $ref: definitions.json
7
  $ref: definitions.yaml
8
parameters:
8
parameters:
9
  $ref: parameters.json
9
  $ref: parameters.yaml
10
x-primitives:
10
x-primitives:
11
  $ref: x-primitives.json
11
  $ref: x-primitives.yaml
12
info:
12
info:
13
  title: Koha REST API
13
  title: Koha REST API
14
  version: "1"
14
  version: "1"
(-)a/api/v1/swagger/x-primitives.json (-65 lines)
Lines 1-65 Link Here
1
{
2
  "biblio_id": {
3
    "type": "integer",
4
    "description": "Internal biblio identifier"
5
  },
6
  "advancededitormacro_id": {
7
    "type": "integer",
8
    "description": "Internal advanced editor macro identifier",
9
    "readOnly": true
10
  },
11
  "patron_id": {
12
    "type": "integer",
13
    "description": "Internal patron identifier"
14
  },
15
  "library_id": {
16
    "type": "string",
17
    "description": "internally assigned library identifier",
18
    "maxLength": 10,
19
    "minLength": 1
20
  },
21
  "limit_id": {
22
    "type": "integer",
23
    "description": "Internal transfer limit identifier"
24
  },
25
  "cardnumber": {
26
    "type": ["string", "null"],
27
    "description": "library assigned user identifier"
28
  },
29
  "city_id": {
30
    "type": "integer",
31
    "description": "internally assigned city identifier",
32
    "readOnly": true
33
  },
34
  "email": {
35
    "type": ["string", "null"],
36
    "description": "primary email address for patron's primary address"
37
  },
38
  "firstname": {
39
    "type": ["string", "null"],
40
    "description": "patron's first name"
41
  },
42
  "phone": {
43
    "type": ["string", "null"],
44
    "description": "primary phone number for patron's primary address"
45
  },
46
  "surname": {
47
    "type": ["string", "null"],
48
    "description": "patron's last name"
49
  },
50
  "vendor_id": {
51
    "type": "integer",
52
    "description": "internally assigned vendor identifier",
53
    "readOnly": true
54
  },
55
  "fund_id": {
56
    "type": "integer",
57
    "description": "internally assigned fund identifier",
58
    "readOnly": true
59
  },
60
  "quote_id": {
61
    "type": "integer",
62
    "description": "internally assigned quote identifier",
63
    "readOnly": true
64
  }
65
}
(-)a/api/v1/swagger/x-primitives.yaml (-1 / +60 lines)
Line 0 Link Here
0
- 
1
---
2
biblio_id:
3
  type: integer
4
  description: Internal biblio identifier
5
advancededitormacro_id:
6
  type: integer
7
  description: Internal advanced editor macro identifier
8
  readOnly: true
9
patron_id:
10
  type: integer
11
  description: Internal patron identifier
12
library_id:
13
  type: string
14
  description: internally assigned library identifier
15
  maxLength: 10
16
  minLength: 1
17
limit_id:
18
  type: integer
19
  description: Internal transfer limit identifier
20
cardnumber:
21
  type:
22
    - string
23
    - "null"
24
  description: library assigned user identifier
25
city_id:
26
  type: integer
27
  description: internally assigned city identifier
28
  readOnly: true
29
email:
30
  type:
31
    - string
32
    - "null"
33
  description: primary email address for patron's primary address
34
firstname:
35
  type:
36
    - string
37
    - "null"
38
  description: patron's first name
39
phone:
40
  type:
41
    - string
42
    - "null"
43
  description: primary phone number for patron's primary address
44
surname:
45
  type:
46
    - string
47
    - "null"
48
  description: patron's last name
49
vendor_id:
50
  type: integer
51
  description: internally assigned vendor identifier
52
  readOnly: true
53
fund_id:
54
  type: integer
55
  description: internally assigned fund identifier
56
  readOnly: true
57
quote_id:
58
  type: integer
59
  description: internally assigned quote identifier
60
  readOnly: true

Return to bug 29620