|
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 |
} |