4 x-mojo-to: TransferLimits#list
5 operationId: listTransferLimits
6 description: "This resource returns a list of existing transfer limits."
7 summary: List transfer limits
13 description: Search on to_library_id
16 - name: from_library_id
18 description: Search on from_library_id
23 description: Search on item_type
26 - name: collection_code
28 description: Search on collection_code
31 - "$ref": "../parameters.json#/match"
32 - "$ref": "../parameters.json#/order_by"
33 - "$ref": "../parameters.json#/page"
34 - "$ref": "../parameters.json#/per_page"
35 - "$ref": "../parameters.json#/q_param"
36 - "$ref": "../parameters.json#/q_body"
37 - "$ref": "../parameters.json#/q_header"
42 description: A list of transfer limits
46 "$ref": "../definitions.json#/transfer_limit"
48 description: Internal error
50 "$ref": "../definitions.json#/error"
52 description: Under maintenance
54 "$ref": "../definitions.json#/error"
57 parameters: manage_transfers
59 x-mojo-to: TransferLimits#add
60 operationId: addTransferLimit
61 description: "This resource accepts a new transfer limit and creates it if it does not already exist."
64 summary: Add a transfer limit
68 description: A JSON object containing information about a new transfer limit
71 "$ref": "../definitions.json#/transfer_limit"
76 description: Transfer limit added
78 "$ref": "../definitions.json#/transfer_limit"
80 description: Bad request
82 "$ref": "../definitions.json#/error"
84 description: Authentication required
86 "$ref": "../definitions.json#/error"
88 description: Access forbidden
90 "$ref": "../definitions.json#/error"
92 description: Conflict in creating resource
94 "$ref": "../definitions.json#/error"
96 description: Internal error
98 "$ref": "../definitions.json#/error"
100 description: Under maintenance
102 "$ref": "../definitions.json#/error"
103 x-koha-authorization:
105 parameters: manage_transfers
106 "/transfer_limits/{limit_id}":
108 x-mojo-to: TransferLimits#delete
109 operationId: deleteTransferLimit
110 description: "This resource deletes a transfer limit for the given limit id"
113 summary: Delete transfer limit
115 - "$ref": "../parameters.json#/transfer_limit_id_pp"
120 description: Transfer limit deleted
124 description: Authentication required
126 "$ref": "../definitions.json#/error"
128 description: Access forbidden
130 "$ref": "../definitions.json#/error"
132 description: Library not found
134 "$ref": "../definitions.json#/error"
136 description: Internal error
138 "$ref": "../definitions.json#/error"
140 description: Under maintenance
142 "$ref": "../definitions.json#/error"
143 x-koha-authorization:
145 parameters: manage_transfers
146 "/transfer_limits/batch":
148 x-mojo-to: TransferLimits#batch_add
149 operationId: batchAddTransferLimits
150 description: "This resource batch creates new transfer limits based on the given data.
152 For example, if the paramters `to_library_id: 'BranchA'` and `item_type: 'BOOK'` are passed in
153 new transfer limits for `BOOK`s will be created, with one transfer limit each for all the
154 branches defined in Koha. Given 4 branches, 3 limits would be created:
157 * to_library_id: 'BranchA', from_library_id: 'BranchB', item_type: 'BOOK'
159 * to_library_id: 'BranchA', from_library_id: 'BranchC', item_type: 'BOOK'
161 * to_library_id: 'BranchA', from_library_id: 'BranchD', item_type: 'BOOK'
164 The body of the query would look like
167 'to_library_id': 'BranchA',
174 As another example, imagine we have an itemtype that is never supposed to be transferred to another library.
175 If we call that itemtype `LOCAL_ONLY` we would need to just pass `item_type: 'LOCAL_ONLY'`, which would create transfer
176 limits for all libraries, meaning those items would never be allowed to transfer to another
177 library. The body of the query would look like
180 'item_type': 'LOCAL_ONLY'
185 summary: Batch add transfer limits
189 description: A JSON object containing information about new transfer limits.
196 description: Internal library id for which library the item is going to
199 description: Internal library id for which library the item is coming
205 description: Itemtype defining the type for this limi
210 description: Authorized value for the collection code associated with
212 additionalProperties: false
217 description: A list of transfer limits
221 "$ref": "../definitions.json#/transfer_limit"
223 description: Internal error
225 "$ref": "../definitions.json#/error"
227 description: Under maintenance
229 "$ref": "../definitions.json#/error"
230 x-koha-authorization:
232 parameters: manage_transfers
234 x-mojo-to: TransferLimits#batch_delete
235 operationId: batchDeleteTransferLimits
236 description: 'This endpoint works just like [the POST version](#op-post-transfer_limits-batch), except it deletes transfer in batch
237 rather than creating them.'
240 summary: Batch delete transfer limits
244 description: A JSON object containing information about new transfer limits.
251 description: Internal library id for which library the item is going to
254 description: Internal library id for which library the item is coming
260 description: Itemtype defining the type for this limi
265 description: Authorized value for the collection code associated with
267 additionalProperties: false
272 description: Transfer limits deleted
276 description: Authentication required
278 "$ref": "../definitions.json#/error"
280 description: Access forbidden
282 "$ref": "../definitions.json#/error"
284 description: Library not found
286 "$ref": "../definitions.json#/error"
288 description: Internal error
290 "$ref": "../definitions.json#/error"
292 description: Under maintenance
294 "$ref": "../definitions.json#/error"
295 x-koha-authorization:
297 parameters: manage_transfers