Josef Moravec
c2d7189d0e
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
139 lines
3.9 KiB
JSON
139 lines
3.9 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"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/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"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/checkouts/{checkout_id}/renewal": {
|
|
"post": {
|
|
"x-mojo-to": "Checkouts#renew",
|
|
"operationId": "renewCheckout",
|
|
"tags": ["patrons", "checkouts"],
|
|
"parameters": [{
|
|
"$ref": "../parameters.json#/checkout_id_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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|