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

(-)a/api/v1/swagger/definitions.json (-3 / +3 lines)
Lines 26-31 Link Here
26
  "invoice": {
26
  "invoice": {
27
    "$ref": "definitions/invoice.json"
27
    "$ref": "definitions/invoice.json"
28
  },
28
  },
29
  "item": {
30
    "$ref": "definitions/item.yaml"
31
  },
29
  "checkouts": {
32
  "checkouts": {
30
    "$ref": "definitions/checkouts.json"
33
    "$ref": "definitions/checkouts.json"
31
  },
34
  },
Lines 53-61 Link Here
53
  "transfer_limit": {
56
  "transfer_limit": {
54
    "$ref": "definitions/transfer_limit.json"
57
    "$ref": "definitions/transfer_limit.json"
55
  },
58
  },
56
  "item": {
57
    "$ref": "definitions/item.json"
58
  },
59
  "order": {
59
  "order": {
60
    "$ref": "definitions/order.json"
60
    "$ref": "definitions/order.json"
61
  },
61
  },
(-)a/api/v1/swagger/definitions/item.json (-187 lines)
Lines 1-187 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "item_id": {
5
      "type": "integer",
6
      "description": "Internal item identifier"
7
    },
8
    "biblio_id": {
9
      "type": "integer",
10
      "description": "Internal identifier for the parent bibliographic record"
11
    },
12
    "external_id": {
13
      "type": ["string", "null"],
14
      "description": "The item's barcode"
15
    },
16
    "acquisition_date": {
17
      "type": ["string", "null"],
18
      "format": "date",
19
      "description": "The date the item was acquired"
20
    },
21
    "acquisition_source": {
22
      "type": ["string", "null"],
23
      "description": "Information about the acquisition source (it is not really a vendor id)"
24
    },
25
    "home_library_id": {
26
      "type": ["string", "null"],
27
      "description": "Internal library id for the library the item belongs to"
28
    },
29
    "purchase_price": {
30
      "type": ["number", "null"],
31
      "description": "Purchase price"
32
    },
33
    "replacement_price": {
34
      "type": ["number", "null"],
35
      "description": "Cost the library charges to replace the item (e.g. if lost)"
36
    },
37
    "replacement_price_date": {
38
      "type": ["string", "null"],
39
      "format": "date",
40
      "description": "The date the replacement price is effective from"
41
    },
42
    "last_checkout_date": {
43
      "type": ["string", "null"],
44
      "format": "date",
45
      "description": "The date the item was last checked out"
46
    },
47
    "last_seen_date": {
48
      "type": ["string", "null"],
49
      "format": "date",
50
      "description": "The date the item barcode was last scanned"
51
    },
52
    "not_for_loan_status": {
53
      "type": "integer",
54
      "description": "Authorized value defining why this item is not for loan"
55
    },
56
    "damaged_status": {
57
      "type": "integer",
58
      "description": "Authorized value defining this item as damaged"
59
    },
60
    "damaged_date": {
61
      "type": ["string", "null"],
62
      "description": "The date and time an item was last marked as damaged, NULL if not damaged"
63
    },
64
    "lost_status": {
65
      "type": "integer",
66
      "description": "Authorized value defining this item as lost"
67
    },
68
    "lost_date": {
69
      "type": ["string", "null"],
70
      "format": "date-time",
71
      "description": "The date and time an item was last marked as lost, NULL if not lost"
72
    },
73
    "withdrawn": {
74
      "type": "integer",
75
      "description": "Authorized value defining this item as withdrawn"
76
    },
77
    "withdrawn_date": {
78
      "type": ["string", "null"],
79
      "format": "date-time",
80
      "description": "The date and time an item was last marked as withdrawn, NULL if not withdrawn"
81
    },
82
    "callnumber": {
83
      "type": ["string", "null"],
84
      "description": "Call number for this item"
85
    },
86
    "coded_location_qualifier": {
87
      "type": ["string", "null"],
88
      "description": "Coded location qualifier"
89
    },
90
    "checkouts_count": {
91
      "type": ["integer", "null"],
92
      "description": "Number of times this item has been checked out/issued"
93
    },
94
    "renewals_count": {
95
      "type": ["integer", "null"],
96
      "description": "Number of times this item has been renewed"
97
    },
98
    "holds_count": {
99
      "type": ["integer", "null"],
100
      "description": "Number of times this item has been placed on hold/reserved"
101
    },
102
    "restricted_status": {
103
      "type": ["integer", "null"],
104
      "description": "Authorized value defining use restrictions for this item"
105
    },
106
    "public_notes": {
107
      "type": ["string", "null"],
108
      "description": "Public notes on this item"
109
    },
110
    "internal_notes": {
111
      "type": ["string", "null"],
112
      "description": "Non-public notes on this item"
113
    },
114
    "holding_library_id": {
115
      "type": ["string", "null"],
116
      "description": "Library that is currently in possession item"
117
    },
118
    "timestamp": {
119
      "type": "string",
120
      "format": "date-time",
121
      "description": "Date and time this item was last altered"
122
    },
123
    "location": {
124
      "type": ["string", "null"],
125
      "description": "Authorized value for the shelving location for this item"
126
    },
127
    "permanent_location": {
128
      "type": ["string", "null"],
129
      "description": "Linked to the CART and PROC temporary locations feature, stores the permanent shelving location"
130
    },
131
    "checked_out_date": {
132
      "type": ["string", "null"],
133
      "format": "date",
134
      "description": "Defines if item is checked out (NULL for not checked out, and checkout date for checked out)"
135
    },
136
    "call_number_source": {
137
      "type": ["string", "null"],
138
      "description": "Classification source used on this item"
139
    },
140
    "call_number_sort": {
141
      "type": ["string", "null"],
142
      "description": "?"
143
    },
144
    "collection_code": {
145
      "type": ["string", "null"],
146
      "description": "Authorized value for the collection code associated with this item"
147
    },
148
    "materials_notes": {
149
      "type": ["string", "null"],
150
      "description": "Materials specified"
151
    },
152
    "uri": {
153
      "type": ["string", "null"],
154
      "description": "URL for the item"
155
    },
156
    "item_type_id": {
157
      "type": ["string", "null"],
158
      "description": "Itemtype defining the type for this item"
159
    },
160
    "extended_subfields": {
161
      "type": ["string", "null"],
162
      "description": "Additional 952 subfields in XML format"
163
    },
164
    "serial_issue_number": {
165
      "type": ["string", "null"],
166
      "description": "serial enumeration/chronology for the item"
167
    },
168
    "copy_number": {
169
      "type": ["string", "null"],
170
      "description": "Copy number"
171
    },
172
    "inventory_number": {
173
      "type": ["string", "null"],
174
      "description": "Inventory number"
175
    },
176
    "new_status": {
177
      "type": ["string", "null"],
178
      "description": "'new' value, whatever free-text information."
179
    },
180
    "exclude_from_local_holds_priority": {
181
      "type": "boolean",
182
      "description": "Exclude this item from local holds priority."
183
    }
184
  },
185
  "additionalProperties": false,
186
  "required": ["item_id", "biblio_id", "not_for_loan_status", "damaged_status", "lost_status", "withdrawn"]
187
}
(-)a/api/v1/swagger/definitions/item.yaml (+221 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  item_id:
5
    type: integer
6
    description: Internal item identifier
7
  biblio_id:
8
    type: integer
9
    description: Internal identifier for the parent bibliographic record
10
  external_id:
11
    type:
12
      - string
13
      - "null"
14
    description: The item's barcode
15
  acquisition_date:
16
    type:
17
      - string
18
      - "null"
19
    format: date
20
    description: The date the item was acquired
21
  acquisition_source:
22
    type:
23
      - string
24
      - "null"
25
    description: Information about the acquisition source (it is not really a vendor id)
26
  home_library_id:
27
    type:
28
      - string
29
      - "null"
30
    description: Internal library id for the library the item belongs to
31
  purchase_price:
32
    type:
33
      - number
34
      - "null"
35
    description: Purchase price
36
  replacement_price:
37
    type:
38
      - number
39
      - "null"
40
    description: Cost the library charges to replace the item (e.g. if lost)
41
  replacement_price_date:
42
    type:
43
      - string
44
      - "null"
45
    format: date
46
    description: The date the replacement price is effective from
47
  last_checkout_date:
48
    type:
49
      - string
50
      - "null"
51
    format: date
52
    description: The date the item was last checked out
53
  last_seen_date:
54
    type:
55
      - string
56
      - "null"
57
    format: date
58
    description: The date the item barcode was last scanned
59
  not_for_loan_status:
60
    type: integer
61
    description: Authorized value defining why this item is not for loan
62
  damaged_status:
63
    type: integer
64
    description: Authorized value defining this item as damaged
65
  damaged_date:
66
    type:
67
      - string
68
      - "null"
69
    description: The date and time an item was last marked as damaged, NULL if not damaged
70
  lost_status:
71
    type: integer
72
    description: Authorized value defining this item as lost
73
  lost_date:
74
    type:
75
      - string
76
      - "null"
77
    format: date-time
78
    description: The date and time an item was last marked as lost, NULL if not lost
79
  withdrawn:
80
    type: integer
81
    description: Authorized value defining this item as withdrawn
82
  withdrawn_date:
83
    type:
84
      - string
85
      - "null"
86
    format: date-time
87
    description: The date and time an item was last marked as withdrawn, NULL if not
88
      withdrawn
89
  callnumber:
90
    type:
91
      - string
92
      - "null"
93
    description: Call number for this item
94
  coded_location_qualifier:
95
    type:
96
      - string
97
      - "null"
98
    description: Coded location qualifier
99
  checkouts_count:
100
    type:
101
      - integer
102
      - "null"
103
    description: Number of times this item has been checked out/issued
104
  renewals_count:
105
    type:
106
      - integer
107
      - "null"
108
    description: Number of times this item has been renewed
109
  holds_count:
110
    type:
111
      - integer
112
      - "null"
113
    description: Number of times this item has been placed on hold/reserved
114
  restricted_status:
115
    type:
116
      - integer
117
      - "null"
118
    description: Authorized value defining use restrictions for this item
119
  public_notes:
120
    type:
121
      - string
122
      - "null"
123
    description: Public notes on this item
124
  internal_notes:
125
    type:
126
      - string
127
      - "null"
128
    description: Non-public notes on this item
129
  holding_library_id:
130
    type:
131
      - string
132
      - "null"
133
    description: Library that is currently in possession item
134
  timestamp:
135
    type: string
136
    format: date-time
137
    description: Date and time this item was last altered
138
  location:
139
    type:
140
      - string
141
      - "null"
142
    description: Authorized value for the shelving location for this item
143
  permanent_location:
144
    type:
145
      - string
146
      - "null"
147
    description: Linked to the CART and PROC temporary locations feature, stores the
148
      permanent shelving location
149
  checked_out_date:
150
    type:
151
      - string
152
      - "null"
153
    format: date
154
    description: Defines if item is checked out (NULL for not checked out, and checkout
155
      date for checked out)
156
  call_number_source:
157
    type:
158
      - string
159
      - "null"
160
    description: Classification source used on this item
161
  call_number_sort:
162
    type:
163
      - string
164
      - "null"
165
    description: "?"
166
  collection_code:
167
    type:
168
      - string
169
      - "null"
170
    description: Authorized value for the collection code associated with this item
171
  materials_notes:
172
    type:
173
      - string
174
      - "null"
175
    description: Materials specified
176
  uri:
177
    type:
178
      - string
179
      - "null"
180
    description: URL for the item
181
  item_type_id:
182
    type:
183
      - string
184
      - "null"
185
    description: Itemtype defining the type for this item
186
  extended_subfields:
187
    type:
188
      - string
189
      - "null"
190
    description: Additional 952 subfields in XML format
191
  serial_issue_number:
192
    type:
193
      - string
194
      - "null"
195
    description: serial enumeration/chronology for the item
196
  copy_number:
197
    type:
198
      - string
199
      - "null"
200
    description: Copy number
201
  inventory_number:
202
    type:
203
      - string
204
      - "null"
205
    description: Inventory number
206
  new_status:
207
    type:
208
      - string
209
      - "null"
210
    description: "'new' value, whatever free-text information."
211
  exclude_from_local_holds_priority:
212
    type: boolean
213
    description: Exclude this item from local holds priority.
214
additionalProperties: false
215
required:
216
  - item_id
217
  - biblio_id
218
  - not_for_loan_status
219
  - damaged_status
220
  - lost_status
221
  - withdrawn
(-)a/api/v1/swagger/paths.json (-3 / +3 lines)
Lines 78-90 Link Here
78
    "$ref": "paths/holds.json#/~1holds~1{hold_id}~1pickup_location"
78
    "$ref": "paths/holds.json#/~1holds~1{hold_id}~1pickup_location"
79
  },
79
  },
80
  "/items": {
80
  "/items": {
81
    "$ref": "paths/items.json#/~1items"
81
    "$ref": "paths/items.yaml#/~1items"
82
  },
82
  },
83
  "/items/{item_id}": {
83
  "/items/{item_id}": {
84
    "$ref": "paths/items.json#/~1items~1{item_id}"
84
    "$ref": "paths/items.yaml#/~1items~1{item_id}"
85
  },
85
  },
86
  "/items/{item_id}/pickup_locations": {
86
  "/items/{item_id}/pickup_locations": {
87
    "$ref": "paths/items.json#/~1items~1{item_id}~1pickup_locations"
87
    "$ref": "paths/items.yaml#/~1items~1{item_id}~1pickup_locations"
88
  },
88
  },
89
  "/libraries": {
89
  "/libraries": {
90
    "$ref": "paths/libraries.json#/~1libraries"
90
    "$ref": "paths/libraries.json#/~1libraries"
(-)a/api/v1/swagger/paths/items.json (-229 lines)
Lines 1-229 Link Here
1
{
2
  "/items": {
3
    "get": {
4
      "x-mojo-to": "Items#list",
5
      "operationId": "listItems",
6
      "tags": [
7
        "items"
8
      ],
9
      "summary": "List items",
10
      "parameters": [
11
        {
12
          "name": "external_id",
13
          "in": "query",
14
          "description": "Search on the item's barcode",
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
      "consumes": [
32
        "application/json"
33
      ],
34
      "produces": [
35
        "application/json"
36
      ],
37
      "responses": {
38
        "200": {
39
          "description": "A list of item",
40
          "schema": {
41
            "type": "array",
42
            "items": {
43
              "$ref": "../definitions.json#/item"
44
            }
45
          }
46
        },
47
        "401": {
48
          "description": "Authentication required",
49
          "schema": {
50
            "$ref": "../definitions.json#/error"
51
          }
52
        },
53
        "403": {
54
          "description": "Access forbidden",
55
          "schema": {
56
            "$ref": "../definitions.json#/error"
57
          }
58
        },
59
        "500": {
60
          "description": "Internal server error",
61
          "schema": {
62
            "$ref": "../definitions.json#/error"
63
          }
64
        },
65
        "503": {
66
          "description": "Under maintenance",
67
          "schema": {
68
            "$ref": "../definitions.json#/error"
69
          }
70
        }
71
      },
72
      "x-koha-authorization": {
73
        "permissions": {
74
          "catalogue": "1"
75
        }
76
      }
77
    }
78
  },
79
  "/items/{item_id}": {
80
    "get": {
81
      "x-mojo-to": "Items#get",
82
      "operationId": "getItem",
83
      "tags": ["items"],
84
      "summary": "Get item",
85
      "parameters": [{
86
          "$ref": "../parameters.json#/item_id_pp"
87
        }
88
      ],
89
      "consumes": ["application/json"],
90
      "produces": ["application/json"],
91
      "responses": {
92
        "200": {
93
          "description": "An item",
94
          "schema": {
95
            "$ref": "../definitions.json#/item"
96
          }
97
        },
98
        "400": {
99
          "description": "Missing or wrong parameters",
100
          "schema": {
101
            "$ref": "../definitions.json#/error"
102
          }
103
        },
104
        "404": {
105
          "description": "Item not found",
106
          "schema": {
107
            "$ref": "../definitions.json#/error"
108
          }
109
        },
110
        "500": {
111
          "description": "Internal server error",
112
          "schema": {
113
            "$ref": "../definitions.json#/error"
114
          }
115
        },
116
        "503": {
117
          "description": "Under maintenance",
118
          "schema": {
119
            "$ref": "../definitions.json#/error"
120
          }
121
        }
122
      },
123
      "x-koha-authorization": {
124
        "permissions": {
125
          "catalogue": "1"
126
        }
127
      }
128
    }
129
  },
130
  "/items/{item_id}/pickup_locations": {
131
    "get": {
132
      "x-mojo-to": "Items#pickup_locations",
133
      "operationId": "getItemPickupLocations",
134
      "summary": "Get valid pickup locations for an item",
135
      "tags": ["items"],
136
      "parameters": [
137
        {
138
          "$ref": "../parameters.json#/item_id_pp"
139
        },
140
        {
141
          "name": "patron_id",
142
          "in": "query",
143
          "description": "Internal patron identifier",
144
          "required": true,
145
          "type": "integer"
146
        },
147
        {
148
          "$ref": "../parameters.json#/match"
149
        },
150
        {
151
          "$ref": "../parameters.json#/order_by"
152
        },
153
        {
154
          "$ref": "../parameters.json#/page"
155
        },
156
        {
157
          "$ref": "../parameters.json#/per_page"
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
      "consumes": [
170
        "application/json"
171
      ],
172
      "produces": [
173
        "application/json"
174
      ],
175
      "responses": {
176
        "200": {
177
          "description": "Item pickup locations",
178
          "schema": {
179
            "type": "array",
180
            "items": {
181
              "$ref": "../definitions.json#/library"
182
            }
183
          }
184
        },
185
        "400": {
186
          "description": "Missing or wrong parameters",
187
          "schema": {
188
            "$ref": "../definitions.json#/error"
189
          }
190
        },
191
        "401": {
192
          "description": "Authentication required",
193
          "schema": {
194
            "$ref": "../definitions.json#/error"
195
          }
196
        },
197
        "403": {
198
          "description": "Access forbidden",
199
          "schema": {
200
            "$ref": "../definitions.json#/error"
201
          }
202
        },
203
        "404": {
204
          "description": "Biblio not found",
205
          "schema": {
206
            "$ref": "../definitions.json#/error"
207
          }
208
        },
209
        "500": {
210
          "description": "Internal server error",
211
          "schema": {
212
            "$ref": "../definitions.json#/error"
213
          }
214
        },
215
        "503": {
216
          "description": "Under maintenance",
217
          "schema": {
218
            "$ref": "../definitions.json#/error"
219
          }
220
        }
221
      },
222
      "x-koha-authorization": {
223
        "permissions": {
224
          "reserveforothers": "place_holds"
225
        }
226
      }
227
    }
228
  }
229
}
(-)a/api/v1/swagger/paths/items.yaml (-1 / +147 lines)
Line 0 Link Here
0
- 
1
---
2
/items:
3
  get:
4
    x-mojo-to: Items#list
5
    operationId: listItems
6
    tags:
7
      - items
8
    summary: List items
9
    parameters:
10
      - name: external_id
11
        in: query
12
        description: Search on the item's barcode
13
        required: false
14
        type: string
15
      - $ref: ../parameters.json#/match
16
      - $ref: ../parameters.json#/order_by
17
      - $ref: ../parameters.json#/page
18
      - $ref: ../parameters.json#/per_page
19
      - $ref: ../parameters.json#/q_param
20
      - $ref: ../parameters.json#/q_body
21
      - $ref: ../parameters.json#/q_header
22
    consumes:
23
      - application/json
24
    produces:
25
      - application/json
26
    responses:
27
      "200":
28
        description: A list of item
29
        schema:
30
          type: array
31
          items:
32
            $ref: ../definitions.json#/item
33
      "401":
34
        description: Authentication required
35
        schema:
36
          $ref: ../definitions.json#/error
37
      "403":
38
        description: Access forbidden
39
        schema:
40
          $ref: ../definitions.json#/error
41
      "500":
42
        description: Internal server error
43
        schema:
44
          $ref: ../definitions.json#/error
45
      "503":
46
        description: Under maintenance
47
        schema:
48
          $ref: ../definitions.json#/error
49
    x-koha-authorization:
50
      permissions:
51
        catalogue: "1"
52
"/items/{item_id}":
53
  get:
54
    x-mojo-to: Items#get
55
    operationId: getItem
56
    tags:
57
      - items
58
    summary: Get item
59
    parameters:
60
      - $ref: ../parameters.json#/item_id_pp
61
    consumes:
62
      - application/json
63
    produces:
64
      - application/json
65
    responses:
66
      "200":
67
        description: An item
68
        schema:
69
          $ref: ../definitions.json#/item
70
      "400":
71
        description: Missing or wrong parameters
72
        schema:
73
          $ref: ../definitions.json#/error
74
      "404":
75
        description: Item not found
76
        schema:
77
          $ref: ../definitions.json#/error
78
      "500":
79
        description: Internal server error
80
        schema:
81
          $ref: ../definitions.json#/error
82
      "503":
83
        description: Under maintenance
84
        schema:
85
          $ref: ../definitions.json#/error
86
    x-koha-authorization:
87
      permissions:
88
        catalogue: "1"
89
"/items/{item_id}/pickup_locations":
90
  get:
91
    x-mojo-to: Items#pickup_locations
92
    operationId: getItemPickupLocations
93
    summary: Get valid pickup locations for an item
94
    tags:
95
      - items
96
    parameters:
97
      - $ref: ../parameters.json#/item_id_pp
98
      - name: patron_id
99
        in: query
100
        description: Internal patron identifier
101
        required: true
102
        type: integer
103
      - $ref: ../parameters.json#/match
104
      - $ref: ../parameters.json#/order_by
105
      - $ref: ../parameters.json#/page
106
      - $ref: ../parameters.json#/per_page
107
      - $ref: ../parameters.json#/q_param
108
      - $ref: ../parameters.json#/q_body
109
      - $ref: ../parameters.json#/q_header
110
    consumes:
111
      - application/json
112
    produces:
113
      - application/json
114
    responses:
115
      "200":
116
        description: Item pickup locations
117
        schema:
118
          type: array
119
          items:
120
            $ref: ../definitions.json#/library
121
      "400":
122
        description: Missing or wrong parameters
123
        schema:
124
          $ref: ../definitions.json#/error
125
      "401":
126
        description: Authentication required
127
        schema:
128
          $ref: ../definitions.json#/error
129
      "403":
130
        description: Access forbidden
131
        schema:
132
          $ref: ../definitions.json#/error
133
      "404":
134
        description: Biblio not found
135
        schema:
136
          $ref: ../definitions.json#/error
137
      "500":
138
        description: Internal server error
139
        schema:
140
          $ref: ../definitions.json#/error
141
      "503":
142
        description: Under maintenance
143
        schema:
144
          $ref: ../definitions.json#/error
145
    x-koha-authorization:
146
      permissions:
147
        reserveforothers: place_holds

Return to bug 29108