Koha/api/v1/swagger/paths/checkouts.json
Andrew Isherwood 8595e80b78 Bug 24083: Add support for unseen_renewals
This patch adds support for unseen renewals.

Here we retrofit knowledge of unseen renewals and add the display of unseen
renewal counts and warnings, in addition to adding the ability to
specify a renewal as being "unseen".

The functionality added here is goverened by the UnseenRenewals syspref.

Signed-off-by: Sally Healey <sally.Healey@cheshirewestandchester.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 16:09:58 +01:00

146 lines
4.1 KiB
JSON

{
"/checkouts": {
"get": {
"x-mojo-to": "Checkouts#list",
"operationId": "listCheckouts",
"tags": ["patrons", "checkouts"],
"parameters": [{
"$ref": "../parameters.json#/patron_id_qp"
}, {
"$ref": "../parameters.json#/page"
}, {
"$ref": "../parameters.json#/per_page"
}, {
"$ref": "../parameters.json#/match"
}, {
"$ref": "../parameters.json#/order_by"
},{
"name": "checked_in",
"in": "query",
"description": "By default, current checkouts are returned, when this is true then checked in checkouts are returned as result.",
"type": "boolean"
}],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "A list of checkouts",
"schema": {
"$ref": "../definitions.json#/checkouts"
}
},
"403": {
"description": "Access forbidden",
"schema": { "$ref": "../definitions.json#/error" }
},
"404": {
"description": "Patron not found",
"schema": { "$ref": "../definitions.json#/error" }
}
},
"x-koha-authorization": {
"permissions": {
"circulate": "circulate_remaining_permissions"
}
},
"x-koha-embed": [
"issuer"
]
}
},
"/checkouts/{checkout_id}": {
"get": {
"x-mojo-to": "Checkouts#get",
"operationId": "getCheckout",
"tags": ["patrons", "checkouts"],
"parameters": [{
"$ref": "../parameters.json#/checkout_id_pp"
}],
"produces": ["application/json"],
"responses": {
"200": {
"description": "Updated borrower's checkout",
"schema": { "$ref": "../definitions.json#/checkout" }
},
"403": {
"description": "Access forbidden",
"schema": { "$ref": "../definitions.json#/error" }
},
"404": {
"description": "Checkout not found",
"schema": { "$ref": "../definitions.json#/error" }
}
},
"x-koha-authorization": {
"permissions": {
"circulate": "circulate_remaining_permissions"
}
},
"x-koha-embed": [
"issuer"
]
}
},
"/checkouts/{checkout_id}/renewal": {
"post": {
"x-mojo-to": "Checkouts#renew",
"operationId": "renewCheckout",
"tags": ["patrons", "checkouts"],
"parameters": [
{ "$ref": "../parameters.json#/checkout_id_pp" },
{ "$ref": "../parameters.json#/seen_pp" }
],
"produces": ["application/json"],
"responses": {
"201": {
"description": "Updated borrower's checkout",
"schema": { "$ref": "../definitions.json#/checkout" }
},
"403": {
"description": "Cannot renew checkout",
"schema": { "$ref": "../definitions.json#/error" }
},
"404": {
"description": "Checkout not found",
"schema": { "$ref": "../definitions.json#/error" }
}
},
"x-koha-authorization": {
"permissions": {
"circulate": "circulate_remaining_permissions"
}
}
}
},
"/checkouts/{checkout_id}/allows_renewal": {
"get": {
"x-mojo-to": "Checkouts#allows_renewal",
"operationId": "allows_renewalCheckout",
"tags": ["patrons", "checkouts"],
"parameters": [{
"$ref": "../parameters.json#/checkout_id_pp"
}],
"produces": ["application/json"],
"responses": {
"200": {
"description": "Checkout renewability information",
"schema": { "$ref": "../definitions.json#/allows_renewal" }
},
"403": {
"description": "Forbidden",
"schema": { "$ref": "../definitions.json#/error" }
},
"404": {
"description": "Checkout not found",
"schema": { "$ref": "../definitions.json#/error" }
}
},
"x-koha-authorization": {
"permissions": {
"circulate": "circulate_remaining_permissions"
}
}
}
}
}