|
Lines 14-19
Link Here
|
| 14 |
}, |
14 |
}, |
| 15 |
"basePath": "/api/v1", |
15 |
"basePath": "/api/v1", |
| 16 |
"paths": { |
16 |
"paths": { |
|
|
17 |
"/availability/items": { |
| 18 |
"get": { |
| 19 |
"operationId": "itemsAvailability", |
| 20 |
"tags": ["items", "availability"], |
| 21 |
"parameters": [ |
| 22 |
{ "$ref": "#/parameters/itemnumbersQueryParam" }, |
| 23 |
{ "$ref": "#/parameters/biblionumbersQueryParam" } |
| 24 |
], |
| 25 |
"consumes": ["application/json"], |
| 26 |
"produces": ["application/json"], |
| 27 |
"responses": { |
| 28 |
"200": { |
| 29 |
"description": "Availability information on item(s)", |
| 30 |
"schema": { |
| 31 |
"$ref": "#/definitions/availabilities" |
| 32 |
} |
| 33 |
}, |
| 34 |
"400": { |
| 35 |
"description": "Missing or wrong parameters", |
| 36 |
"schema": { "$ref": "#/definitions/error" } |
| 37 |
}, |
| 38 |
"404": { |
| 39 |
"description": "No item(s) found", |
| 40 |
"schema": { "$ref": "#/definitions/error" } |
| 41 |
} |
| 42 |
} |
| 43 |
} |
| 44 |
}, |
| 45 |
"/auth/session": { |
| 46 |
"post": { |
| 47 |
"operationId": "loginAuth", |
| 48 |
"tags": ["auth"], |
| 49 |
"summary": "Login to Koha and get a session cookie", |
| 50 |
"description": "Makes a 'normal' username + password login to Koha, and returns the sessionid you need put to the CGISESSID-cookie. Koha uses this cookie to track a session.\nBe aware that the authenticated session most probably is IP-locked so authenticating from one IP and passing the session to another wont work.", |
| 51 |
"parameters": [ |
| 52 |
{ "$ref": "#/parameters/cardnumberPostParam" }, |
| 53 |
{ "$ref": "#/parameters/useridPostParam" }, |
| 54 |
{ "$ref": "#/parameters/passwordPostParam" } |
| 55 |
], |
| 56 |
"produces": [ |
| 57 |
"application/json" |
| 58 |
], |
| 59 |
"responses": { |
| 60 |
"201": { |
| 61 |
"description": "A borrower with SSO-relevant fields", |
| 62 |
"schema": { |
| 63 |
"$ref": "#/definitions/session" |
| 64 |
} |
| 65 |
}, |
| 66 |
"401": { |
| 67 |
"description": "Bad username/cardnumber and/or password", |
| 68 |
"schema": { |
| 69 |
"$ref": "#/definitions/error" |
| 70 |
} |
| 71 |
} |
| 72 |
} |
| 73 |
}, |
| 74 |
"delete": { |
| 75 |
"operationId": "logoutAuth", |
| 76 |
"tags": ["auth"], |
| 77 |
"summary": "Logout from Koha.", |
| 78 |
"description": "Logouts user from Koha by marking session as expired. sessionid is optional, if not given, logs out currently logged in user", |
| 79 |
"parameters": [ |
| 80 |
{ "$ref": "#/parameters/sessionidBodyParam" } |
| 81 |
], |
| 82 |
"produces": [ |
| 83 |
"application/json" |
| 84 |
], |
| 85 |
"responses": { |
| 86 |
"200": { |
| 87 |
"description": "Successfully logged out", |
| 88 |
"schema": { |
| 89 |
"type": "object" |
| 90 |
} |
| 91 |
}, |
| 92 |
"401": { |
| 93 |
"description": "Bad session id", |
| 94 |
"schema": { |
| 95 |
"$ref": "#/definitions/error" |
| 96 |
} |
| 97 |
} |
| 98 |
} |
| 99 |
} |
| 100 |
}, |
| 17 |
"/patrons": { |
101 |
"/patrons": { |
| 18 |
"get": { |
102 |
"get": { |
| 19 |
"operationId": "listPatrons", |
103 |
"operationId": "listPatrons", |
|
Lines 38-43
Link Here
|
| 38 |
} |
122 |
} |
| 39 |
} |
123 |
} |
| 40 |
} |
124 |
} |
|
|
125 |
}, |
| 126 |
"post": { |
| 127 |
"operationId": "addPatron", |
| 128 |
"tags": ["patrons"], |
| 129 |
"parameters": [{ |
| 130 |
"name": "body", |
| 131 |
"in": "body", |
| 132 |
"description": "A JSON object containing information about the new patron", |
| 133 |
"required": true, |
| 134 |
"schema": { |
| 135 |
"$ref": "#/definitions/patron" |
| 136 |
} |
| 137 |
}], |
| 138 |
"consumes": ["application/json"], |
| 139 |
"produces": ["application/json"], |
| 140 |
"responses": { |
| 141 |
"201": { |
| 142 |
"description": "A successfully created patron", |
| 143 |
"schema": { |
| 144 |
"items": { |
| 145 |
"$ref": "#/definitions/patron" |
| 146 |
} |
| 147 |
} |
| 148 |
}, |
| 149 |
"403": { |
| 150 |
"description": "Access forbidden", |
| 151 |
"schema": { |
| 152 |
"$ref": "#/definitions/error" |
| 153 |
} |
| 154 |
}, |
| 155 |
"404": { |
| 156 |
"description": "Resource not found", |
| 157 |
"schema": { |
| 158 |
"$ref": "#/definitions/error" |
| 159 |
} |
| 160 |
}, |
| 161 |
"409": { |
| 162 |
"description": "Conflict in creating resource", |
| 163 |
"schema": { |
| 164 |
"$ref": "#/definitions/error" |
| 165 |
} |
| 166 |
}, |
| 167 |
"500": { |
| 168 |
"description": "Internal error", |
| 169 |
"schema": { |
| 170 |
"$ref": "#/definitions/error" |
| 171 |
} |
| 172 |
} |
| 173 |
} |
| 41 |
} |
174 |
} |
| 42 |
}, |
175 |
}, |
| 43 |
"/patrons/{borrowernumber}": { |
176 |
"/patrons/{borrowernumber}": { |
|
Lines 72-83
Link Here
|
| 72 |
} |
205 |
} |
| 73 |
} |
206 |
} |
| 74 |
} |
207 |
} |
|
|
208 |
}, |
| 209 |
"put": { |
| 210 |
"operationId": "editPatron", |
| 211 |
"tags": ["patrons"], |
| 212 |
"parameters": [ |
| 213 |
{ "$ref": "#/parameters/borrowernumberPathParam" }, |
| 214 |
{ |
| 215 |
"name": "body", |
| 216 |
"in": "body", |
| 217 |
"description": "A JSON object containing new information about existing patron", |
| 218 |
"required": true, |
| 219 |
"schema": { |
| 220 |
"$ref": "#/definitions/patron" |
| 221 |
} |
| 222 |
} |
| 223 |
], |
| 224 |
"consumes": ["application/json"], |
| 225 |
"produces": ["application/json"], |
| 226 |
"responses": { |
| 227 |
"200": { |
| 228 |
"description": "A successfully updated patron", |
| 229 |
"schema": { |
| 230 |
"items": { |
| 231 |
"$ref": "#/definitions/patron" |
| 232 |
} |
| 233 |
} |
| 234 |
}, |
| 235 |
"204": { |
| 236 |
"description": "No Content", |
| 237 |
"schema": { |
| 238 |
"type": "object" |
| 239 |
} |
| 240 |
}, |
| 241 |
"403": { |
| 242 |
"description": "Access forbidden", |
| 243 |
"schema": { |
| 244 |
"$ref": "#/definitions/error" |
| 245 |
} |
| 246 |
}, |
| 247 |
"404": { |
| 248 |
"description": "Resource not found", |
| 249 |
"schema": { |
| 250 |
"$ref": "#/definitions/error" |
| 251 |
} |
| 252 |
}, |
| 253 |
"409": { |
| 254 |
"description": "Conflict in updating resource", |
| 255 |
"schema": { |
| 256 |
"$ref": "#/definitions/error" |
| 257 |
} |
| 258 |
}, |
| 259 |
"500": { |
| 260 |
"description": "Internal error", |
| 261 |
"schema": { |
| 262 |
"$ref": "#/definitions/error" |
| 263 |
} |
| 264 |
} |
| 265 |
} |
| 266 |
}, |
| 267 |
"delete": { |
| 268 |
"operationId": "deletePatron", |
| 269 |
"tags": ["patrons"], |
| 270 |
"parameters": [ |
| 271 |
{ "$ref": "#/parameters/borrowernumberPathParam" } |
| 272 |
], |
| 273 |
"produces": ["application/json"], |
| 274 |
"responses": { |
| 275 |
"200": { |
| 276 |
"description": "Patron deleted successfully", |
| 277 |
"schema": { |
| 278 |
"type": "object" |
| 279 |
} |
| 280 |
}, |
| 281 |
"400": { |
| 282 |
"description": "Patron deletion failed", |
| 283 |
"schema": { "$ref": "#/definitions/error" } |
| 284 |
}, |
| 285 |
"403": { |
| 286 |
"description": "Access forbidden", |
| 287 |
"schema": { |
| 288 |
"$ref": "#/definitions/error" |
| 289 |
} |
| 290 |
}, |
| 291 |
"404": { |
| 292 |
"description": "Patron not found", |
| 293 |
"schema": { "$ref": "#/definitions/error" } |
| 294 |
} |
| 295 |
} |
| 75 |
} |
296 |
} |
| 76 |
}, |
297 |
}, |
| 77 |
"/holds": { |
298 |
"/holds": { |
| 78 |
"get": { |
299 |
"get": { |
| 79 |
"operationId": "listHolds", |
300 |
"operationId": "listHolds", |
| 80 |
"tags": ["borrowers", "holds"], |
301 |
"tags": ["patrons", "holds"], |
| 81 |
"parameters": [ |
302 |
"parameters": [ |
| 82 |
{ |
303 |
{ |
| 83 |
"name": "reserve_id", |
304 |
"name": "reserve_id", |
|
Lines 202-208
Link Here
|
| 202 |
}, |
423 |
}, |
| 203 |
"post": { |
424 |
"post": { |
| 204 |
"operationId": "addHold", |
425 |
"operationId": "addHold", |
| 205 |
"tags": ["borrowers", "holds"], |
426 |
"tags": ["patrons", "holds"], |
| 206 |
"parameters": [ |
427 |
"parameters": [ |
| 207 |
{ |
428 |
{ |
| 208 |
"name": "body", |
429 |
"name": "body", |
|
Lines 332-354
Link Here
|
| 332 |
} |
553 |
} |
| 333 |
} |
554 |
} |
| 334 |
} |
555 |
} |
| 335 |
} |
|
|
| 336 |
}, |
| 337 |
"definitions": { |
| 338 |
"$ref": "./definitions/index.json" |
| 339 |
}, |
| 340 |
"parameters": { |
| 341 |
"borrowernumberPathParam": { |
| 342 |
"name": "borrowernumber", |
| 343 |
"in": "path", |
| 344 |
"description": "Internal patron identifier", |
| 345 |
"required": true, |
| 346 |
"type": "integer" |
| 347 |
}, |
556 |
}, |
| 348 |
"holdIdPathParam": { |
557 |
"/accountlines": { |
| 349 |
"name": "reserve_id", |
558 |
"get": { |
| 350 |
"in": "path", |
559 |
"operationId": "listAccountlines", |
| 351 |
"description": "Internal hold identifier", |
560 |
"tags": ["accountlines"], |
|
|
561 |
"produces": [ |
| 562 |
"application/json" |
| 563 |
], |
| 564 |
"responses": { |
| 565 |
"200": { |
| 566 |
"description": "A list of accountlines", |
| 567 |
"schema": { |
| 568 |
"type": "array", |
| 569 |
"items": { |
| 570 |
"$ref": "#/definitions/accountline" |
| 571 |
} |
| 572 |
} |
| 573 |
}, |
| 574 |
"403": { |
| 575 |
"description": "Access forbidden", |
| 576 |
"schema": { |
| 577 |
"$ref": "#/definitions/error" |
| 578 |
} |
| 579 |
} |
| 580 |
} |
| 581 |
} |
| 582 |
}, |
| 583 |
"/libraries": { |
| 584 |
"get": { |
| 585 |
"operationId": "listLibrary", |
| 586 |
"tags": ["libraries"], |
| 587 |
"produces": [ |
| 588 |
"application/json" |
| 589 |
], |
| 590 |
"responses": { |
| 591 |
"200": { |
| 592 |
"description": "A list of libraries", |
| 593 |
"schema": { |
| 594 |
"$ref": "#/definitions/libraries" |
| 595 |
} |
| 596 |
} |
| 597 |
} |
| 598 |
} |
| 599 |
}, |
| 600 |
"/libraries/{branchcode}": { |
| 601 |
"get": { |
| 602 |
"operationId": "getLibrary", |
| 603 |
"tags": ["libraries"], |
| 604 |
"parameters": [ |
| 605 |
{ "$ref": "#/parameters/branchcodePathParam" } |
| 606 |
], |
| 607 |
"produces": [ |
| 608 |
"application/json" |
| 609 |
], |
| 610 |
"responses": { |
| 611 |
"200": { |
| 612 |
"description": "A library", |
| 613 |
"schema": { |
| 614 |
"$ref": "#/definitions/library" |
| 615 |
} |
| 616 |
}, |
| 617 |
"404": { |
| 618 |
"description": "Library not found", |
| 619 |
"schema": { |
| 620 |
"$ref": "#/definitions/error" |
| 621 |
} |
| 622 |
} |
| 623 |
} |
| 624 |
} |
| 625 |
}, |
| 626 |
"/checkouts": { |
| 627 |
"get": { |
| 628 |
"operationId": "listCheckouts", |
| 629 |
"tags": ["patrons", "checkouts"], |
| 630 |
"parameters": [ |
| 631 |
{ |
| 632 |
"name": "borrowernumber", |
| 633 |
"in": "query", |
| 634 |
"description": "Internal patron identifier", |
| 635 |
"required": false, |
| 636 |
"type": "integer" |
| 637 |
} |
| 638 |
], |
| 639 |
"produces": [ |
| 640 |
"application/json" |
| 641 |
], |
| 642 |
"responses": { |
| 643 |
"200": { |
| 644 |
"description": "A list of checkouts", |
| 645 |
"schema": { |
| 646 |
"$ref": "#/definitions/checkouts" |
| 647 |
} |
| 648 |
}, |
| 649 |
"403": { |
| 650 |
"description": "Access forbidden", |
| 651 |
"schema": { "$ref": "#/definitions/error" } |
| 652 |
}, |
| 653 |
"404": { |
| 654 |
"description": "Borrower not found", |
| 655 |
"schema": { |
| 656 |
"$ref": "#/definitions/error" |
| 657 |
} |
| 658 |
} |
| 659 |
} |
| 660 |
} |
| 661 |
}, |
| 662 |
"/checkouts/{checkout_id}": { |
| 663 |
"get": { |
| 664 |
"operationId": "getCheckout", |
| 665 |
"tags": ["patrons", "checkouts"], |
| 666 |
"parameters": [ |
| 667 |
{ |
| 668 |
"name": "checkout_id", |
| 669 |
"in": "path", |
| 670 |
"description": "Internal checkout identifier", |
| 671 |
"required": true, |
| 672 |
"type": "integer" |
| 673 |
} |
| 674 |
], |
| 675 |
"produces": ["application/json"], |
| 676 |
"responses": { |
| 677 |
"200": { |
| 678 |
"description": "Updated borrower's checkout", |
| 679 |
"schema": { "$ref": "#/definitions/checkout" } |
| 680 |
}, |
| 681 |
"403": { |
| 682 |
"description": "Access forbidden", |
| 683 |
"schema": { "$ref": "#/definitions/error" } |
| 684 |
}, |
| 685 |
"404": { |
| 686 |
"description": "Checkout not found", |
| 687 |
"schema": { "$ref": "#/definitions/error" } |
| 688 |
} |
| 689 |
} |
| 690 |
}, |
| 691 |
"put": { |
| 692 |
"operationId": "renewCheckout", |
| 693 |
"tags": ["patrons", "checkouts"], |
| 694 |
"parameters": [ |
| 695 |
{ |
| 696 |
"name": "checkout_id", |
| 697 |
"in": "path", |
| 698 |
"description": "Internal checkout identifier", |
| 699 |
"required": true, |
| 700 |
"type": "integer" |
| 701 |
} |
| 702 |
], |
| 703 |
"produces": ["application/json"], |
| 704 |
"responses": { |
| 705 |
"200": { |
| 706 |
"description": "Updated borrower's checkout", |
| 707 |
"schema": { "$ref": "#/definitions/checkout" } |
| 708 |
}, |
| 709 |
"403": { |
| 710 |
"description": "Cannot renew checkout", |
| 711 |
"schema": { "$ref": "#/definitions/error" } |
| 712 |
}, |
| 713 |
"404": { |
| 714 |
"description": "Checkout not found", |
| 715 |
"schema": { "$ref": "#/definitions/error" } |
| 716 |
} |
| 717 |
} |
| 718 |
} |
| 719 |
}, |
| 720 |
"/checkouts/history": { |
| 721 |
"get": { |
| 722 |
"operationId": "listhistoryCheckouts", |
| 723 |
"tags": ["patrons", "checkouts"], |
| 724 |
"parameters": [ |
| 725 |
{ |
| 726 |
"name": "borrowernumber", |
| 727 |
"in": "query", |
| 728 |
"description": "Internal patron identifier", |
| 729 |
"required": false, |
| 730 |
"type": "integer" |
| 731 |
} |
| 732 |
], |
| 733 |
"produces": [ |
| 734 |
"application/json" |
| 735 |
], |
| 736 |
"responses": { |
| 737 |
"200": { |
| 738 |
"description": "A list of checkouts history", |
| 739 |
"schema": { |
| 740 |
"$ref": "#/definitions/checkouts" |
| 741 |
} |
| 742 |
}, |
| 743 |
"403": { |
| 744 |
"description": "Access forbidden", |
| 745 |
"schema": { "$ref": "#/definitions/error" } |
| 746 |
}, |
| 747 |
"404": { |
| 748 |
"description": "Borrower not found", |
| 749 |
"schema": { |
| 750 |
"$ref": "#/definitions/error" |
| 751 |
} |
| 752 |
} |
| 753 |
} |
| 754 |
} |
| 755 |
}, |
| 756 |
"/checkouts/history/{checkout_id}": { |
| 757 |
"get": { |
| 758 |
"operationId": "gethistoryCheckout", |
| 759 |
"tags": ["patrons", "checkouts"], |
| 760 |
"parameters": [ |
| 761 |
{ |
| 762 |
"name": "checkout_id", |
| 763 |
"in": "path", |
| 764 |
"description": "Internal checkout identifier", |
| 765 |
"required": true, |
| 766 |
"type": "integer" |
| 767 |
} |
| 768 |
], |
| 769 |
"produces": ["application/json"], |
| 770 |
"responses": { |
| 771 |
"200": { |
| 772 |
"description": "Got borrower's checkout", |
| 773 |
"schema": { "$ref": "#/definitions/checkout" } |
| 774 |
}, |
| 775 |
"403": { |
| 776 |
"description": "Access forbidden", |
| 777 |
"schema": { "$ref": "#/definitions/error" } |
| 778 |
}, |
| 779 |
"404": { |
| 780 |
"description": "Checkout not found", |
| 781 |
"schema": { "$ref": "#/definitions/error" } |
| 782 |
} |
| 783 |
} |
| 784 |
} |
| 785 |
}, |
| 786 |
"/items/{itemnumber}": { |
| 787 |
"get": { |
| 788 |
"operationId": "getItem", |
| 789 |
"tags": ["items"], |
| 790 |
"parameters": [ |
| 791 |
{ "$ref": "#/parameters/itemnumberPathParam" } |
| 792 |
], |
| 793 |
"consumes": ["application/json"], |
| 794 |
"produces": ["application/json"], |
| 795 |
"responses": { |
| 796 |
"200": { |
| 797 |
"description": "An item", |
| 798 |
"schema": { "$ref": "#/definitions/item" } |
| 799 |
}, |
| 800 |
"400": { |
| 801 |
"description": "Missing or wrong parameters", |
| 802 |
"schema": { "$ref": "#/definitions/error" } |
| 803 |
}, |
| 804 |
"404": { |
| 805 |
"description": "Item not found", |
| 806 |
"schema": { "$ref": "#/definitions/error" } |
| 807 |
} |
| 808 |
} |
| 809 |
} |
| 810 |
}, |
| 811 |
"/biblios/{biblionumber}": { |
| 812 |
"get": { |
| 813 |
"operationId": "getBiblio", |
| 814 |
"tags": ["biblios"], |
| 815 |
"parameters": [ |
| 816 |
{ "$ref": "#/parameters/biblionumberPathParam" } |
| 817 |
], |
| 818 |
"consumes": ["application/json"], |
| 819 |
"produces": ["application/json"], |
| 820 |
"responses": { |
| 821 |
"200": { |
| 822 |
"description": "An biblio", |
| 823 |
"schema": { "$ref": "#/definitions/biblio" } |
| 824 |
}, |
| 825 |
"400": { |
| 826 |
"description": "Missing or wrong parameters", |
| 827 |
"schema": { "$ref": "#/definitions/error" } |
| 828 |
}, |
| 829 |
"404": { |
| 830 |
"description": "Biblio not found", |
| 831 |
"schema": { "$ref": "#/definitions/error" } |
| 832 |
} |
| 833 |
} |
| 834 |
} |
| 835 |
}, |
| 836 |
"/accountlines/{accountlines_id}": { |
| 837 |
"put": { |
| 838 |
"operationId": "editAccountlines", |
| 839 |
"tags": ["accountlines"], |
| 840 |
"produces": [ |
| 841 |
"application/json" |
| 842 |
], |
| 843 |
"parameters": [ |
| 844 |
{ "$ref": "#/parameters/accountlinesIdPathParam" }, |
| 845 |
{ |
| 846 |
"name": "body", |
| 847 |
"in": "body", |
| 848 |
"description": "A JSON object containing fields to modify", |
| 849 |
"required": true, |
| 850 |
"schema": { "$ref": "#/definitions/editAccountlineBody" } |
| 851 |
} |
| 852 |
], |
| 853 |
"consumes": ["application/json"], |
| 854 |
"produces": ["application/json"], |
| 855 |
"responses": { |
| 856 |
"200": { |
| 857 |
"description": "Updated accountline", |
| 858 |
"schema": { "$ref": "#/definitions/accountline" } |
| 859 |
}, |
| 860 |
"400": { |
| 861 |
"description": "Missing or wrong parameters", |
| 862 |
"schema": { "$ref": "#/definitions/error" } |
| 863 |
}, |
| 864 |
"403": { |
| 865 |
"description": "Access forbidden", |
| 866 |
"schema": { |
| 867 |
"$ref": "#/definitions/error" |
| 868 |
} |
| 869 |
}, |
| 870 |
"404": { |
| 871 |
"description": "Accountline not found", |
| 872 |
"schema": { "$ref": "#/definitions/error" } |
| 873 |
} |
| 874 |
} |
| 875 |
} |
| 876 |
}, |
| 877 |
"/accountlines/{accountlines_id}/payment": { |
| 878 |
"put": { |
| 879 |
"operationId": "payAccountlines", |
| 880 |
"tags": ["accountlines"], |
| 881 |
"produces": [ |
| 882 |
"application/json" |
| 883 |
], |
| 884 |
"parameters": [ |
| 885 |
{ "$ref": "#/parameters/accountlinesIdPathParam" } |
| 886 |
], |
| 887 |
"produces": ["application/json"], |
| 888 |
"responses": { |
| 889 |
"200": { |
| 890 |
"description": "Paid accountline", |
| 891 |
"schema": { "$ref": "#/definitions/accountline" } |
| 892 |
}, |
| 893 |
"400": { |
| 894 |
"description": "Missing or wrong parameters", |
| 895 |
"schema": { "$ref": "#/definitions/error" } |
| 896 |
}, |
| 897 |
"403": { |
| 898 |
"description": "Access forbidden", |
| 899 |
"schema": { |
| 900 |
"$ref": "#/definitions/error" |
| 901 |
} |
| 902 |
}, |
| 903 |
"404": { |
| 904 |
"description": "Accountline not found", |
| 905 |
"schema": { "$ref": "#/definitions/error" } |
| 906 |
} |
| 907 |
} |
| 908 |
} |
| 909 |
}, |
| 910 |
"/accountlines/{accountlines_id}/partialpayment": { |
| 911 |
"put": { |
| 912 |
"operationId": "partialpayAccountlines", |
| 913 |
"tags": ["accountlines"], |
| 914 |
"produces": [ |
| 915 |
"application/json" |
| 916 |
], |
| 917 |
"parameters": [ |
| 918 |
{ "$ref": "#/parameters/accountlinesIdPathParam" }, |
| 919 |
{ |
| 920 |
"name": "body", |
| 921 |
"in": "body", |
| 922 |
"description": "A JSON object containing fields to modify", |
| 923 |
"required": true, |
| 924 |
"schema": { "$ref": "#/definitions/partialpayAccountlineBody" } |
| 925 |
} |
| 926 |
], |
| 927 |
"consumes": ["application/json"], |
| 928 |
"produces": ["application/json"], |
| 929 |
"responses": { |
| 930 |
"200": { |
| 931 |
"description": "Paid accountline", |
| 932 |
"schema": { "$ref": "#/definitions/accountline" } |
| 933 |
}, |
| 934 |
"400": { |
| 935 |
"description": "Missing or wrong parameters", |
| 936 |
"schema": { "$ref": "#/definitions/error" } |
| 937 |
}, |
| 938 |
"403": { |
| 939 |
"description": "Access forbidden", |
| 940 |
"schema": { |
| 941 |
"$ref": "#/definitions/error" |
| 942 |
} |
| 943 |
}, |
| 944 |
"404": { |
| 945 |
"description": "Accountline not found", |
| 946 |
"schema": { "$ref": "#/definitions/error" } |
| 947 |
} |
| 948 |
} |
| 949 |
} |
| 950 |
}, |
| 951 |
"/accountlines/{borrowernumber}/amountpayment": { |
| 952 |
"put": { |
| 953 |
"operationId": "payamountAccountlines", |
| 954 |
"tags": ["accountlines"], |
| 955 |
"produces": [ |
| 956 |
"application/json" |
| 957 |
], |
| 958 |
"parameters": [ |
| 959 |
{ "$ref": "#/parameters/borrowernumberPathParam" }, |
| 960 |
{ |
| 961 |
"name": "body", |
| 962 |
"in": "body", |
| 963 |
"description": "A JSON object containing fields to modify", |
| 964 |
"required": true, |
| 965 |
"schema": { "$ref": "#/definitions/partialpayAccountlineBody" } |
| 966 |
} |
| 967 |
], |
| 968 |
"consumes": ["application/json"], |
| 969 |
"produces": ["application/json"], |
| 970 |
"responses": { |
| 971 |
"200": { |
| 972 |
"description": "Amount paid", |
| 973 |
"schema": { "$ref": "#/definitions/amountpaid" } |
| 974 |
}, |
| 975 |
"400": { |
| 976 |
"description": "Missing or wrong parameters", |
| 977 |
"schema": { "$ref": "#/definitions/error" } |
| 978 |
}, |
| 979 |
"403": { |
| 980 |
"description": "Access forbidden", |
| 981 |
"schema": { |
| 982 |
"$ref": "#/definitions/error" |
| 983 |
} |
| 984 |
}, |
| 985 |
"404": { |
| 986 |
"description": "Borrower not found", |
| 987 |
"schema": { "$ref": "#/definitions/error" } |
| 988 |
} |
| 989 |
} |
| 990 |
} |
| 991 |
} |
| 992 |
}, |
| 993 |
"definitions": { |
| 994 |
"$ref": "./definitions/index.json" |
| 995 |
}, |
| 996 |
"parameters": { |
| 997 |
"biblionumbersQueryParam": { |
| 998 |
"name": "biblionumber", |
| 999 |
"in": "query", |
| 1000 |
"description": "Internal biblios identifier", |
| 1001 |
"type": "array", |
| 1002 |
"items": { |
| 1003 |
"type": "integer" |
| 1004 |
}, |
| 1005 |
"collectionFormat": "ssv" |
| 1006 |
}, |
| 1007 |
"borrowernumberPathParam": { |
| 1008 |
"name": "borrowernumber", |
| 1009 |
"in": "path", |
| 1010 |
"description": "Internal patron identifier", |
| 1011 |
"required": true, |
| 1012 |
"type": "integer" |
| 1013 |
}, |
| 1014 |
"holdIdPathParam": { |
| 1015 |
"name": "reserve_id", |
| 1016 |
"in": "path", |
| 1017 |
"description": "Internal hold identifier", |
| 1018 |
"required": true, |
| 1019 |
"type": "integer" |
| 1020 |
}, |
| 1021 |
"branchcodePathParam": { |
| 1022 |
"name": "branchcode", |
| 1023 |
"in": "path", |
| 1024 |
"description": "Internal library identifier", |
| 1025 |
"required": true, |
| 1026 |
"type": "string" |
| 1027 |
}, |
| 1028 |
"itemnumberPathParam": { |
| 1029 |
"name": "itemnumber", |
| 1030 |
"in": "path", |
| 1031 |
"description": "Internal item identifier", |
| 1032 |
"required": true, |
| 1033 |
"type": "integer" |
| 1034 |
}, |
| 1035 |
"biblionumberPathParam": { |
| 1036 |
"name": "biblionumber", |
| 1037 |
"in": "path", |
| 1038 |
"description": "Internal biblio identifier", |
| 1039 |
"required": true, |
| 1040 |
"type": "integer" |
| 1041 |
}, |
| 1042 |
"itemnumbersQueryParam": { |
| 1043 |
"name": "itemnumber", |
| 1044 |
"in": "query", |
| 1045 |
"description": "Internal items identifier", |
| 1046 |
"type": "array", |
| 1047 |
"items": { |
| 1048 |
"type": "integer" |
| 1049 |
}, |
| 1050 |
"collectionFormat": "ssv" |
| 1051 |
}, |
| 1052 |
"cardnumberPostParam": { |
| 1053 |
"name": "cardnumber", |
| 1054 |
"in": "formData", |
| 1055 |
"description": "Borrower's card's barcode/identifier", |
| 1056 |
"required": false, |
| 1057 |
"type": "string" |
| 1058 |
}, |
| 1059 |
"passwordPostParam": { |
| 1060 |
"name": "password", |
| 1061 |
"in": "formData", |
| 1062 |
"required": true, |
| 1063 |
"type": "string" |
| 1064 |
}, |
| 1065 |
"sessionidBodyParam": { |
| 1066 |
"name": "session", |
| 1067 |
"description": "The CGISESSID Cookie used to authenticate a session", |
| 1068 |
"in": "body", |
| 1069 |
"required": false, |
| 1070 |
"schema" : { |
| 1071 |
"$ref": "definitions/sessionid.json" |
| 1072 |
} |
| 1073 |
}, |
| 1074 |
"useridPostParam": { |
| 1075 |
"name": "userid", |
| 1076 |
"in": "formData", |
| 1077 |
"description": "The userid of the Borrower, unique value", |
| 1078 |
"required": false, |
| 1079 |
"type": "string" |
| 1080 |
}, |
| 1081 |
"accountlinesIdPathParam": { |
| 1082 |
"name": "accountlines_id", |
| 1083 |
"in": "path", |
| 1084 |
"description": "Internal accountline identifier", |
| 352 |
"required": true, |
1085 |
"required": true, |
| 353 |
"type": "integer" |
1086 |
"type": "integer" |
| 354 |
} |
1087 |
} |