|
Lines 1-111
Link Here
|
| 1 |
{ |
1 |
{ |
| 2 |
"/clubs/{club_id}/holds": { |
2 |
"/clubs/{club_id}/holds": { |
| 3 |
"post": { |
3 |
"post": { |
| 4 |
"x-mojo-to": "Clubs::Holds#add", |
4 |
"x-mojo-to": "Clubs::Holds#add", |
| 5 |
"operationId": "addClubHold", |
5 |
"operationId": "addClubHold", |
| 6 |
"tags": ["clubs"], |
6 |
"tags": [ |
| 7 |
"parameters": [{ |
7 |
"clubs" |
| 8 |
"$ref": "../parameters.json#/club_id_pp" |
8 |
], |
| 9 |
}, { |
9 |
"summary": "Add a club hold", |
| 10 |
"name": "body", |
10 |
"parameters": [ |
| 11 |
"in": "body", |
11 |
{ |
| 12 |
"description": "A JSON object containing informations about the new hold", |
12 |
"$ref": "../parameters.json#/club_id_pp" |
| 13 |
"required": true, |
13 |
}, |
| 14 |
"schema": { |
14 |
{ |
| 15 |
"type": "object", |
15 |
"name": "body", |
| 16 |
"properties": { |
16 |
"in": "body", |
| 17 |
"biblio_id": { |
17 |
"description": "A JSON object containing informations about the new hold", |
| 18 |
"description": "Internal biblio identifier", |
18 |
"required": true, |
| 19 |
"type": [ "integer", "null" ] |
19 |
"schema": { |
| 20 |
}, |
20 |
"type": "object", |
| 21 |
"item_id": { |
21 |
"properties": { |
| 22 |
"description": "Internal item identifier", |
22 |
"biblio_id": { |
| 23 |
"type": [ "integer", "null" ] |
23 |
"description": "Internal biblio identifier", |
| 24 |
}, |
24 |
"type": [ |
| 25 |
"pickup_library_id": { |
25 |
"integer", |
| 26 |
"description": "Internal library identifier for the pickup library", |
26 |
"null" |
| 27 |
"type": "string" |
27 |
] |
| 28 |
}, |
|
|
| 29 |
"expiration_date": { |
| 30 |
"description": "Hold end date", |
| 31 |
"type": ["string", "null"], |
| 32 |
"format": "date" |
| 33 |
}, |
| 34 |
"notes": { |
| 35 |
"description": "Notes related to this hold", |
| 36 |
"type": [ "string", "null" ] |
| 37 |
}, |
| 38 |
"item_type": { |
| 39 |
"description": "Limit hold on one itemtype (ignored for item-level holds)", |
| 40 |
"type": [ "string", "null" ] |
| 41 |
}, |
| 42 |
"default_patron_home": { |
| 43 |
"description": "For each patron, set pickup location to patron's home library if possible", |
| 44 |
"type": "integer" |
| 45 |
} |
| 46 |
}, |
| 47 |
"required": [ "pickup_library_id" ], |
| 48 |
"additionalProperties": false |
| 49 |
} |
| 50 |
} |
| 51 |
], |
| 52 |
"consumes": ["application/json"], |
| 53 |
"produces": ["application/json"], |
| 54 |
"responses": { |
| 55 |
"201": { |
| 56 |
"description": "Created hold", |
| 57 |
"schema": { |
| 58 |
"$ref": "../definitions/club_hold.json" |
| 59 |
} |
| 60 |
}, |
28 |
}, |
| 61 |
"400": { |
29 |
"item_id": { |
| 62 |
"description": "Missing or wrong parameters", |
30 |
"description": "Internal item identifier", |
| 63 |
"schema": { |
31 |
"type": [ |
| 64 |
"$ref": "../definitions.json#/error" |
32 |
"integer", |
| 65 |
} |
33 |
"null" |
|
|
34 |
] |
| 66 |
}, |
35 |
}, |
| 67 |
"401": { |
36 |
"pickup_library_id": { |
| 68 |
"description": "Authentication required", |
37 |
"description": "Internal library identifier for the pickup library", |
| 69 |
"schema": { |
38 |
"type": "string" |
| 70 |
"$ref": "../definitions.json#/error" |
|
|
| 71 |
} |
| 72 |
}, |
39 |
}, |
| 73 |
"403": { |
40 |
"expiration_date": { |
| 74 |
"description": "Hold not allowed", |
41 |
"description": "Hold end date", |
| 75 |
"schema": { |
42 |
"type": [ |
| 76 |
"$ref": "../definitions.json#/error" |
43 |
"string", |
| 77 |
} |
44 |
"null" |
|
|
45 |
], |
| 46 |
"format": "date" |
| 78 |
}, |
47 |
}, |
| 79 |
"404": { |
48 |
"notes": { |
| 80 |
"description": "Hold not found", |
49 |
"description": "Notes related to this hold", |
| 81 |
"schema": { |
50 |
"type": [ |
| 82 |
"$ref": "../definitions.json#/error" |
51 |
"string", |
| 83 |
} |
52 |
"null" |
|
|
53 |
] |
| 84 |
}, |
54 |
}, |
| 85 |
"409": { |
55 |
"item_type": { |
| 86 |
"description": "Hold not allowed", |
56 |
"description": "Limit hold on one itemtype (ignored for item-level holds)", |
| 87 |
"schema": { |
57 |
"type": [ |
| 88 |
"$ref": "../definitions.json#/error" |
58 |
"string", |
| 89 |
} |
59 |
"null" |
|
|
60 |
] |
| 90 |
}, |
61 |
}, |
| 91 |
"500": { |
62 |
"default_patron_home": { |
| 92 |
"description": "Internal server error", |
63 |
"description": "For each patron, set pickup location to patron's home library if possible", |
| 93 |
"schema": { |
64 |
"type": "integer" |
| 94 |
"$ref": "../definitions.json#/error" |
|
|
| 95 |
} |
| 96 |
}, |
| 97 |
"503": { |
| 98 |
"description": "Under maintenance", |
| 99 |
"schema": { |
| 100 |
"$ref": "../definitions.json#/error" |
| 101 |
} |
| 102 |
} |
65 |
} |
| 103 |
}, |
66 |
}, |
| 104 |
"x-koha-authorization": { |
67 |
"required": [ |
| 105 |
"permissions": { |
68 |
"pickup_library_id" |
| 106 |
"reserveforothers": "1" |
69 |
], |
| 107 |
} |
70 |
"additionalProperties": false |
| 108 |
} |
71 |
} |
|
|
72 |
} |
| 73 |
], |
| 74 |
"consumes": [ |
| 75 |
"application/json" |
| 76 |
], |
| 77 |
"produces": [ |
| 78 |
"application/json" |
| 79 |
], |
| 80 |
"responses": { |
| 81 |
"201": { |
| 82 |
"description": "Created club hold", |
| 83 |
"schema": { |
| 84 |
"$ref": "../definitions/club_hold.json" |
| 85 |
} |
| 86 |
}, |
| 87 |
"400": { |
| 88 |
"description": "Missing or wrong parameters", |
| 89 |
"schema": { |
| 90 |
"$ref": "../definitions.json#/error" |
| 91 |
} |
| 92 |
}, |
| 93 |
"401": { |
| 94 |
"description": "Authentication required", |
| 95 |
"schema": { |
| 96 |
"$ref": "../definitions.json#/error" |
| 97 |
} |
| 98 |
}, |
| 99 |
"403": { |
| 100 |
"description": "Hold not allowed", |
| 101 |
"schema": { |
| 102 |
"$ref": "../definitions.json#/error" |
| 103 |
} |
| 104 |
}, |
| 105 |
"404": { |
| 106 |
"description": "Club not found", |
| 107 |
"schema": { |
| 108 |
"$ref": "../definitions.json#/error" |
| 109 |
} |
| 110 |
}, |
| 111 |
"409": { |
| 112 |
"description": "Hold not allowed", |
| 113 |
"schema": { |
| 114 |
"$ref": "../definitions.json#/error" |
| 115 |
} |
| 116 |
}, |
| 117 |
"500": { |
| 118 |
"description": "Internal server error", |
| 119 |
"schema": { |
| 120 |
"$ref": "../definitions.json#/error" |
| 121 |
} |
| 122 |
}, |
| 123 |
"503": { |
| 124 |
"description": "Under maintenance", |
| 125 |
"schema": { |
| 126 |
"$ref": "../definitions.json#/error" |
| 127 |
} |
| 128 |
} |
| 129 |
}, |
| 130 |
"x-koha-authorization": { |
| 131 |
"permissions": { |
| 132 |
"reserveforothers": "1" |
| 109 |
} |
133 |
} |
|
|
134 |
} |
| 110 |
} |
135 |
} |
|
|
136 |
} |
| 111 |
} |
137 |
} |