diff --git a/api/v1/swagger/paths/transfer_limits.yaml b/api/v1/swagger/paths/transfer_limits.yaml index db3725656c..f73a1d31d9 100644 --- a/api/v1/swagger/paths/transfer_limits.yaml +++ b/api/v1/swagger/paths/transfer_limits.yaml @@ -5,7 +5,7 @@ description: This resource returns a list of existing transfer limits. summary: List transfer limits tags: - - transfer + - transfer_limits parameters: - name: to_library_id in: query @@ -76,7 +76,7 @@ description: This resource accepts a new transfer limit and creates it if it does not already exist. tags: - - transfer + - transfer_limits summary: Add a transfer limit parameters: - name: body @@ -128,7 +128,7 @@ operationId: deleteTransferLimit description: This resource deletes a transfer limit for the given limit id tags: - - transfer + - transfer_limits summary: Delete transfer limit parameters: - $ref: "../swagger.yaml#/parameters/transfer_limit_id_pp" @@ -173,6 +173,10 @@ This resource batch creates new transfer limits based on the given data. + Transfer limits can be defined based on `collection_code` or `item_type`. The endpoint + only accepts one at a time, and which one is used will depend on the value of the + `BranchTransferLimitsType` system preference. + For example, if the paramters `to_library_id: 'BranchA'` and `item_type: 'BOOK'` are passed in new transfer limits for `BOOK`s will be created, with one transfer limit each for all the branches defined in Koha. Given 4 branches, 3 limits would be created: @@ -185,13 +189,11 @@ The body of the query would look like ``` - { 'to_library_id': 'BranchA', 'item_type': 'BOOK' } - ``` As another example, imagine we have an itemtype that is never supposed to be transferred to another library. @@ -200,14 +202,12 @@ library. The body of the query would look like ``` - { 'item_type': 'LOCAL_ONLY' } - ``` tags: - - transfer + - transfer_limits summary: Batch add transfer limits parameters: - name: body @@ -256,6 +256,10 @@ description: Access forbidden schema: $ref: "../swagger.yaml#/definitions/error" + "409": + description: Conflict in creating resource + schema: + $ref: "../swagger.yaml#/definitions/error" "500": description: | Internal server error. Possible `error_code` attribute values: @@ -277,7 +281,7 @@ version](#op-post-transfer_limits-batch), except it deletes transfer in batch rather than creating them. tags: - - transfer + - transfer_limits summary: Batch delete transfer limits parameters: - name: body @@ -310,8 +314,6 @@ responses: "204": description: Transfer limits deleted - schema: - type: string "401": description: Authentication required schema: diff --git a/api/v1/swagger/swagger.yaml b/api/v1/swagger/swagger.yaml index 6d75b6d5f9..db7c4bb0a7 100644 --- a/api/v1/swagger/swagger.yaml +++ b/api/v1/swagger/swagger.yaml @@ -897,7 +897,7 @@ tags: name: tickets x-displayName: Tickets - description: "Manage transfer limits\n" - name: transfer + name: transfer_limits x-displayName: Transfer limits - description: "Handle two factor authentication flows\n" name: 2fa