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

(-)a/api/v1/swagger/definitions/hold.json (-36 / +37 lines)
Lines 1-76 Link Here
1
{
1
{
2
  "type": "object",
2
  "type": "object",
3
  "properties": {
3
  "properties": {
4
    "reserve_id": {
4
    "hold_id": {
5
      "$ref": "../x-primitives.json#/reserve_id"
5
      "type": "integer",
6
      "description": "Internal hold identifier"
6
    },
7
    },
7
    "borrowernumber": {
8
    "patron_id": {
8
      "type": "integer",
9
      "type": "integer",
9
      "description": "Internal patron identifier"
10
      "description": "Internal patron identifier"
10
    },
11
    },
11
    "reservedate": {
12
    "hold_date": {
12
      "type": ["string", "null"],
13
      "description": "the date the hold was placed"
14
    },
15
    "biblionumber": {
16
      "$ref": "../x-primitives.json#/biblionumber"
17
    },
18
    "branchcode": {
19
      "type": ["string", "null"],
13
      "type": ["string", "null"],
20
      "description": "code of patron's home branch"
14
      "format": "date",
15
      "description": "The date the hold was placed"
21
    },
16
    },
22
    "notificationdate": {
17
    "biblio_id": {
23
      "type": ["string", "null"],
18
      "type": "integer",
24
      "description": "currently unused"
19
      "description": "Internal biblio identifier"
25
    },
20
    },
26
    "reminderdate": {
21
    "pickup_library_id": {
27
      "type": ["string", "null"],
22
      "type": ["string", "null"],
28
      "description": "currently unused"
23
      "description": "Internal library identifier for the pickup library"
29
    },
24
    },
30
    "cancellationdate": {
25
    "cancelation_date": {
31
      "type": ["string", "null"],
26
      "type": ["string", "null"],
32
      "description": "the date the hold was cancelled"
27
      "format": "date",
28
      "description": "The date the hold was cancelled"
33
    },
29
    },
34
    "reservenotes": {
30
    "notes": {
35
      "type": ["string", "null"],
31
      "type": ["string", "null"],
36
      "description": "notes related to this hold"
32
      "description": "Notes related to this hold"
37
    },
33
    },
38
    "priority": {
34
    "priority": {
39
      "type": ["integer", "null"],
35
      "type": ["integer", "null"],
40
      "description": "where in the queue the patron sits"
36
      "description": "Where in the queue the patron sits"
41
    },
37
    },
42
    "found": {
38
    "status": {
43
      "type": ["string", "null"],
39
      "type": ["string", "null"],
44
      "description": "a one letter code defining what the status of the hold is after it has been confirmed"
40
      "description": "A one letter code defining what the status of the hold is after it has been confirmed"
45
    },
41
    },
46
    "timestamp": {
42
    "timestamp": {
47
      "type": ["string", "null"],
43
      "type": "string",
48
      "description": "date and time the hold was last updated"
44
      "format": "date-time",
45
      "description": "Timestamp for the latest hold update"
49
    },
46
    },
50
    "itemnumber": {
47
    "item_id": {
51
      "$ref": "../x-primitives.json#/itemnumber"
48
      "type": ["string", "null"],
49
      "description": "Internal item identifier"
52
    },
50
    },
53
    "waitingdate": {
51
    "waiting_date": {
54
      "type": ["string", "null"],
52
      "type": ["string", "null"],
55
      "description": "the date the item was marked as waiting for the patron at the library"
53
      "format": "date",
54
      "description": "The date the item was marked as waiting for the patron at the library"
56
    },
55
    },
57
    "expirationdate": {
56
    "expiration_date": {
58
      "type": ["string", "null"],
57
      "type": ["string", "null"],
59
      "description": "the date the hold expires"
58
      "format": "date",
59
      "description": "The date the hold expires"
60
    },
60
    },
61
    "lowestPriority": {
61
    "lowest_priority": {
62
      "type": "boolean",
62
      "type": "boolean",
63
      "description": "Controls if the hold is given the lowest priority on the queue"
63
      "description": "Controls if the hold is given the lowest priority on the queue"
64
    },
64
    },
65
    "suspend": {
65
    "suspended": {
66
      "type": "boolean",
66
      "type": "boolean",
67
      "description": "Controls if the hold is suspended"
67
      "description": "Controls if the hold is suspended"
68
    },
68
    },
69
    "suspend_until": {
69
    "suspended_until": {
70
      "type": ["string", "null"],
70
      "type": ["string", "null"],
71
      "format": "date-time",
71
      "description": "Date until which the hold has been suspended"
72
      "description": "Date until which the hold has been suspended"
72
    },
73
    },
73
    "itemtype": {
74
    "item_type": {
74
      "type": ["string", "null"],
75
      "type": ["string", "null"],
75
      "description": "If record level hold, the optional itemtype of the item the patron is requesting"
76
      "description": "If record level hold, the optional itemtype of the item the patron is requesting"
76
    }
77
    }
(-)a/api/v1/swagger/parameters.json (-2 / +2 lines)
Lines 8-15 Link Here
8
  "city_id_pp": {
8
  "city_id_pp": {
9
    "$ref": "parameters/city.json#/city_id_pp"
9
    "$ref": "parameters/city.json#/city_id_pp"
10
  },
10
  },
11
  "holdIdPathParam": {
11
  "hold_id_pp": {
12
    "$ref": "parameters/hold.json#/holdIdPathParam"
12
    "$ref": "parameters/hold.json#/hold_id_pp"
13
  },
13
  },
14
  "vendoridPathParam": {
14
  "vendoridPathParam": {
15
    "$ref": "parameters/vendor.json#/vendoridPathParam"
15
    "$ref": "parameters/vendor.json#/vendoridPathParam"
(-)a/api/v1/swagger/parameters/hold.json (-2 / +2 lines)
Lines 1-6 Link Here
1
{
1
{
2
  "holdIdPathParam": {
2
  "hold_id_pp": {
3
    "name": "reserve_id",
3
    "name": "hold_id",
4
    "in": "path",
4
    "in": "path",
5
    "description": "Internal hold identifier",
5
    "description": "Internal hold identifier",
6
    "required": true,
6
    "required": true,
(-)a/api/v1/swagger/paths.json (-2 / +2 lines)
Lines 17-24 Link Here
17
  "/holds": {
17
  "/holds": {
18
    "$ref": "paths/holds.json#/~1holds"
18
    "$ref": "paths/holds.json#/~1holds"
19
  },
19
  },
20
  "/holds/{reserve_id}": {
20
  "/holds/{hold_id}": {
21
    "$ref": "paths/holds.json#/~1holds~1{reserve_id}"
21
    "$ref": "paths/holds.json#/~1holds~1{hold_id}"
22
  },
22
  },
23
  "/patrons": {
23
  "/patrons": {
24
    "$ref": "paths/patrons.json#/~1patrons"
24
    "$ref": "paths/patrons.json#/~1patrons"
(-)a/api/v1/swagger/paths/holds.json (-57 / +47 lines)
Lines 6-72 Link Here
6
      "tags": ["patrons", "holds"],
6
      "tags": ["patrons", "holds"],
7
      "parameters": [
7
      "parameters": [
8
        {
8
        {
9
          "name": "reserve_id",
9
          "name": "hold_id",
10
          "in": "query",
10
          "in": "query",
11
          "description": "Internal reserve identifier",
11
          "description": "Internal reserve identifier",
12
          "type": "integer"
12
          "type": "integer"
13
        },
13
        },
14
        {
14
        {
15
          "name": "borrowernumber",
15
          "name": "patron_id",
16
          "in": "query",
16
          "in": "query",
17
          "description": "Internal patron identifier",
17
          "description": "Internal patron identifier",
18
          "type": "integer"
18
          "type": "integer"
19
        },
19
        },
20
        {
20
        {
21
          "name": "reservedate",
21
          "name": "hold_date",
22
          "in": "query",
22
          "in": "query",
23
          "description": "Reserve date",
23
          "description": "Hold",
24
          "type": "string"
24
          "type": "string",
25
          "format": "date"
25
        },
26
        },
26
        {
27
        {
27
          "name": "biblionumber",
28
          "name": "biblio_id",
28
          "in": "query",
29
          "in": "query",
29
          "description": "Internal biblio identifier",
30
          "description": "Internal biblio identifier",
30
          "type": "integer"
31
          "type": "integer"
31
        },
32
        },
32
        {
33
        {
33
          "name": "branchcode",
34
          "name": "pickup_library_id",
34
          "in": "query",
35
          "description": "Branch code",
36
          "type": "string"
37
        },
38
        {
39
          "name": "notificationdate",
40
          "in": "query",
35
          "in": "query",
41
          "description": "Notification date",
36
          "description": "Internal library identifier for the pickup library",
42
          "type": "string"
37
          "type": "string"
43
        },
38
        },
44
        {
39
        {
45
          "name": "reminderdate",
40
          "name": "cancelation_date",
46
          "in": "query",
41
          "in": "query",
47
          "description": "Reminder date",
42
          "description": "The date the hold was cancelled",
48
          "type": "string"
43
          "type": "string",
49
        },
44
          "format": "date"
50
        {
51
          "name": "cancellationdate",
52
          "in": "query",
53
          "description": "Cancellation date",
54
          "type": "string"
55
        },
45
        },
56
        {
46
        {
57
          "name": "reservenotes",
47
          "name": "notes",
58
          "in": "query",
48
          "in": "query",
59
          "description": "Reserve notes",
49
          "description": "Notes related to this hold",
60
          "type": "string"
50
          "type": "string"
61
        },
51
        },
62
        {
52
        {
63
          "name": "priority",
53
          "name": "priority",
64
          "in": "query",
54
          "in": "query",
65
          "description": "Priority",
55
          "description": "Where in the queue the patron sits",
66
          "type": "integer"
56
          "type": "integer"
67
        },
57
        },
68
        {
58
        {
69
          "name": "found",
59
          "name": "status",
70
          "in": "query",
60
          "in": "query",
71
          "description": "Found status",
61
          "description": "Found status",
72
          "type": "string"
62
          "type": "string"
Lines 78-114 Link Here
78
          "type": "string"
68
          "type": "string"
79
        },
69
        },
80
        {
70
        {
81
          "name": "itemnumber",
71
          "name": "item_id",
82
          "in": "query",
72
          "in": "query",
83
          "description": "Internal item identifier",
73
          "description": "Internal item identifier",
84
          "type": "integer"
74
          "type": "integer"
85
        },
75
        },
86
        {
76
        {
87
          "name": "waitingdate",
77
          "name": "waiting_date",
88
          "in": "query",
78
          "in": "query",
89
          "description": "Date the item was marked as waiting for the patron",
79
          "description": "Date the item was marked as waiting for the patron",
90
          "type": "string"
80
          "type": "string"
91
        },
81
        },
92
        {
82
        {
93
          "name": "expirationdate",
83
          "name": "expiration_date",
94
          "in": "query",
84
          "in": "query",
95
          "description": "Date the hold expires",
85
          "description": "Date the hold expires",
96
          "type": "string"
86
          "type": "string"
97
        },
87
        },
98
        {
88
        {
99
          "name": "lowestPriority",
89
          "name": "lowest_priority",
100
          "in": "query",
90
          "in": "query",
101
          "description": "Lowest priority",
91
          "description": "Lowest priority",
102
          "type": "integer"
92
          "type": "boolean"
103
        },
93
        },
104
        {
94
        {
105
          "name": "suspend",
95
          "name": "suspended",
106
          "in": "query",
96
          "in": "query",
107
          "description": "Suspended",
97
          "description": "Suspended",
108
          "type": "integer"
98
          "type": "boolean"
109
        },
99
        },
110
        {
100
        {
111
          "name": "suspend_until",
101
          "name": "suspended_until",
112
          "in": "query",
102
          "in": "query",
113
          "description": "Suspended until",
103
          "description": "Suspended until",
114
          "type": "string"
104
          "type": "string"
Lines 154-161 Link Here
154
        }
144
        }
155
      },
145
      },
156
      "x-koha-authorization": {
146
      "x-koha-authorization": {
157
        "allow-owner": true,
158
        "allow-guarantor": true,
159
        "permissions": {
147
        "permissions": {
160
          "borrowers": "edit_borrowers"
148
          "borrowers": "edit_borrowers"
161
        }
149
        }
Lines 173-204 Link Here
173
          "schema": {
161
          "schema": {
174
            "type": "object",
162
            "type": "object",
175
            "properties": {
163
            "properties": {
176
              "borrowernumber": {
164
              "patron_id": {
177
                "description": "Internal patron identifier",
165
                "description": "Internal patron identifier",
178
                "type": "integer"
166
                "type": "integer"
179
              },
167
              },
180
              "biblionumber": {
168
              "biblio_id": {
181
                "description": "Biblio internal identifier",
169
                "description": "Internal biblio identifier",
182
                "type": "integer"
170
                "type": [ "integer", "null" ]
183
              },
171
              },
184
              "itemnumber": {
172
              "item_id": {
185
                "description": "Item internal identifier",
173
                "description": "Internal item identifier",
186
                "type": "integer"
174
                "type": [ "integer", "null" ]
187
              },
175
              },
188
              "branchcode": {
176
              "pickup_library_id": {
189
                "description": "Pickup location",
177
                "description": "Internal library identifier for the pickup library",
190
                "type": "string"
178
                "type": "string"
191
              },
179
              },
192
              "expirationdate": {
180
              "expiration_date": {
193
                "description": "Hold end date",
181
                "description": "Hold end date",
194
                "type": "string",
182
                "type": ["string", "null"],
195
                "format": "date"
183
                "format": "date"
196
              },
184
              },
197
              "itemtype": {
185
              "notes": {
186
                "description": "Notes related to this hold",
187
                "type": [ "string", "null" ]
188
              },
189
              "item_type": {
198
                "description": "Limit hold on one itemtype (ignored for item-level holds)",
190
                "description": "Limit hold on one itemtype (ignored for item-level holds)",
199
                "type": "string"
191
                "type": [ "string", "null" ]
200
              }
192
              }
201
            }
193
            },
194
            "required": [ "patron_id", "pickup_library_id" ]
202
          }
195
          }
203
        }
196
        }
204
      ],
197
      ],
Lines 249-268 Link Here
249
        }
242
        }
250
      },
243
      },
251
      "x-koha-authorization": {
244
      "x-koha-authorization": {
252
        "allow-owner": true,
253
        "permissions": {
245
        "permissions": {
254
          "reserveforothers": "1"
246
          "reserveforothers": "1"
255
        }
247
        }
256
      }
248
      }
257
    }
249
    }
258
  },
250
  },
259
  "/holds/{reserve_id}": {
251
  "/holds/{hold_id}": {
260
    "put": {
252
    "put": {
261
      "x-mojo-to": "Hold#edit",
253
      "x-mojo-to": "Hold#edit",
262
      "operationId": "editHold",
254
      "operationId": "editHold",
263
      "tags": ["holds"],
255
      "tags": ["holds"],
264
      "parameters": [{
256
      "parameters": [{
265
          "$ref": "../parameters.json#/holdIdPathParam"
257
          "$ref": "../parameters.json#/hold_id_pp"
266
        }, {
258
        }, {
267
          "name": "body",
259
          "name": "body",
268
          "in": "body",
260
          "in": "body",
Lines 336-343 Link Here
336
        }
328
        }
337
      },
329
      },
338
      "x-koha-authorization": {
330
      "x-koha-authorization": {
339
        "allow-owner": true,
340
        "allow-guarantor": true,
341
        "permissions": {
331
        "permissions": {
342
          "reserveforothers": "1"
332
          "reserveforothers": "1"
343
        }
333
        }
Lines 348-354 Link Here
348
      "operationId": "deleteHold",
338
      "operationId": "deleteHold",
349
      "tags": ["holds"],
339
      "tags": ["holds"],
350
      "parameters": [{
340
      "parameters": [{
351
          "$ref": "../parameters.json#/holdIdPathParam"
341
          "$ref": "../parameters.json#/hold_id_pp"
352
        }
342
        }
353
      ],
343
      ],
354
      "produces": ["application/json"],
344
      "produces": ["application/json"],
(-)a/api/v1/swagger/x-primitives.json (-11 / +2 lines)
Lines 1-7 Link Here
1
{
1
{
2
  "biblionumber": {
2
  "biblio_id": {
3
    "type": "integer",
3
    "type": "integer",
4
    "description": "internally assigned biblio identifier"
4
    "description": "Internal biblio identifier"
5
  },
5
  },
6
  "patron_id": {
6
  "patron_id": {
7
    "type": "integer",
7
    "type": "integer",
Lines 24-41 Link Here
24
    "type": ["string", "null"],
24
    "type": ["string", "null"],
25
    "description": "patron's first name"
25
    "description": "patron's first name"
26
  },
26
  },
27
  "itemnumber": {
28
    "type": ["integer", "null"],
29
    "description": "internally assigned item identifier"
30
  },
31
  "phone": {
27
  "phone": {
32
    "type": ["string", "null"],
28
    "type": ["string", "null"],
33
    "description": "primary phone number for patron's primary address"
29
    "description": "primary phone number for patron's primary address"
34
  },
30
  },
35
  "reserve_id": {
36
    "type": "integer",
37
    "description": "Internal hold identifier"
38
  },
39
  "surname": {
31
  "surname": {
40
    "type": "string",
32
    "type": "string",
41
    "description": "patron's last name"
33
    "description": "patron's last name"
42
- 

Return to bug 20006