|
Lines 17-25
Link Here
|
| 17 |
description: Search on from_library_id |
17 |
description: Search on from_library_id |
| 18 |
required: false |
18 |
required: false |
| 19 |
type: string |
19 |
type: string |
| 20 |
- name: item_type |
20 |
- name: item_type_id |
| 21 |
in: query |
21 |
in: query |
| 22 |
description: Search on item_type |
22 |
description: Search on item_type_id |
| 23 |
required: false |
23 |
required: false |
| 24 |
type: string |
24 |
type: string |
| 25 |
- name: collection_code |
25 |
- name: collection_code |
|
Lines 179-195
Link Here
|
| 179 |
|
179 |
|
| 180 |
This resource batch creates new transfer limits based on the given data. |
180 |
This resource batch creates new transfer limits based on the given data. |
| 181 |
|
181 |
|
| 182 |
Transfer limits can be defined based on `collection_code` or `item_type`. The endpoint |
182 |
Transfer limits can be defined based on `collection_code` or `item_type_id`. The endpoint |
| 183 |
only accepts one at a time, and which one is used will depend on the value of the |
183 |
only accepts one at a time, and which one is used will depend on the value of the |
| 184 |
`BranchTransferLimitsType` system preference. |
184 |
`BranchTransferLimitsType` system preference. |
| 185 |
|
185 |
|
| 186 |
For example, if the paramters `to_library_id: 'BranchA'` and `item_type: 'BOOK'` are passed in |
186 |
For example, if the paramters `to_library_id: 'BranchA'` and `item_type_id: 'BOOK'` are passed in |
| 187 |
new transfer limits for `BOOK`s will be created, with one transfer limit each for all the |
187 |
new transfer limits for `BOOK`s will be created, with one transfer limit each for all the |
| 188 |
branches defined in Koha. Given 4 branches, 3 limits would be created: |
188 |
branches defined in Koha. Given 4 branches, 3 limits would be created: |
| 189 |
|
189 |
|
| 190 |
* to_library_id: 'BranchA', from_library_id: 'BranchB', item_type: 'BOOK' |
190 |
* to_library_id: 'BranchA', from_library_id: 'BranchB', item_type_id: 'BOOK' |
| 191 |
* to_library_id: 'BranchA', from_library_id: 'BranchC', item_type: 'BOOK' |
191 |
* to_library_id: 'BranchA', from_library_id: 'BranchC', item_type_id: 'BOOK' |
| 192 |
* to_library_id: 'BranchA', from_library_id: 'BranchD', item_type: 'BOOK' |
192 |
* to_library_id: 'BranchA', from_library_id: 'BranchD', item_type_id: 'BOOK' |
| 193 |
|
193 |
|
| 194 |
|
194 |
|
| 195 |
The body of the query would look like |
195 |
The body of the query would look like |
|
Lines 197-215
Link Here
|
| 197 |
``` |
197 |
``` |
| 198 |
{ |
198 |
{ |
| 199 |
'to_library_id': 'BranchA', |
199 |
'to_library_id': 'BranchA', |
| 200 |
'item_type': 'BOOK' |
200 |
'item_type_id': 'BOOK' |
| 201 |
|
201 |
|
| 202 |
} |
202 |
} |
| 203 |
``` |
203 |
``` |
| 204 |
|
204 |
|
| 205 |
As another example, imagine we have an itemtype that is never supposed to be transferred to another library. |
205 |
As another example, imagine we have an itemtype that is never supposed to be transferred to another library. |
| 206 |
If we call that itemtype `LOCAL_ONLY` we would need to just pass `item_type: 'LOCAL_ONLY'`, which would create transfer |
206 |
If we call that itemtype `LOCAL_ONLY` we would need to just pass `item_type_id: 'LOCAL_ONLY'`, which would create transfer |
| 207 |
limits for all libraries, meaning those items would never be allowed to transfer to another |
207 |
limits for all libraries, meaning those items would never be allowed to transfer to another |
| 208 |
library. The body of the query would look like |
208 |
library. The body of the query would look like |
| 209 |
|
209 |
|
| 210 |
``` |
210 |
``` |
| 211 |
{ |
211 |
{ |
| 212 |
'item_type': 'LOCAL_ONLY' |
212 |
'item_type_id': 'LOCAL_ONLY' |
| 213 |
} |
213 |
} |
| 214 |
``` |
214 |
``` |
| 215 |
tags: |
215 |
tags: |
|
Lines 229-239
Link Here
|
| 229 |
from_library_id: |
229 |
from_library_id: |
| 230 |
type: string |
230 |
type: string |
| 231 |
description: Internal library id for which library the item is coming from |
231 |
description: Internal library id for which library the item is coming from |
| 232 |
item_type: |
232 |
item_type_id: |
| 233 |
type: |
233 |
type: |
| 234 |
- string |
234 |
- string |
| 235 |
- "null" |
235 |
- "null" |
| 236 |
description: Itemtype defining the type for this limi |
236 |
description: Itemtype defining the type for this limit |
| 237 |
collection_code: |
237 |
collection_code: |
| 238 |
type: |
238 |
type: |
| 239 |
- string |
239 |
- string |
|
Lines 303-313
Link Here
|
| 303 |
from_library_id: |
303 |
from_library_id: |
| 304 |
type: string |
304 |
type: string |
| 305 |
description: Internal library id for which library the item is coming from |
305 |
description: Internal library id for which library the item is coming from |
| 306 |
item_type: |
306 |
item_type_id: |
| 307 |
type: |
307 |
type: |
| 308 |
- string |
308 |
- string |
| 309 |
- "null" |
309 |
- "null" |
| 310 |
description: Itemtype defining the type for this limi |
310 |
description: Itemtype defining the type for this limit |
| 311 |
collection_code: |
311 |
collection_code: |
| 312 |
type: |
312 |
type: |
| 313 |
- string |
313 |
- string |