|
Lines 35-40
Link Here
|
| 35 |
"circulate": "circulate_remaining_permissions" |
35 |
"circulate": "circulate_remaining_permissions" |
| 36 |
} |
36 |
} |
| 37 |
} |
37 |
} |
|
|
38 |
}, |
| 39 |
"post": { |
| 40 |
"x-mojo-to": "Checkouts#add", |
| 41 |
"operationId": "addCheckout", |
| 42 |
"tags": ["patrons", "checkouts"], |
| 43 |
"parameters": [{ |
| 44 |
"name": "body", |
| 45 |
"in": "body", |
| 46 |
"description": "A JSON object containing information about the new checkout", |
| 47 |
"required": true, |
| 48 |
"schema": { |
| 49 |
"type": "object", |
| 50 |
"properties": { |
| 51 |
"patron_id": { |
| 52 |
"description": "Internal patron identifier", |
| 53 |
"type": "string" |
| 54 |
}, |
| 55 |
"barcode": { |
| 56 |
"description": "Internal item barcode", |
| 57 |
"type": "string" |
| 58 |
}, |
| 59 |
"due_date": { |
| 60 |
"description": "Checkout due date", |
| 61 |
"type": ["string", "null"], |
| 62 |
"format": "date" |
| 63 |
}, |
| 64 |
"inprocess": { |
| 65 |
"description": "In process", |
| 66 |
"type": ["boolean", "null"] |
| 67 |
}, |
| 68 |
"ignore_reserves": { |
| 69 |
"description": "Should reserves on this item be ignored", |
| 70 |
"type": [ "boolean", "null" ] |
| 71 |
}, |
| 72 |
"cancel_reserve": { |
| 73 |
"description": "Should reserves on this item be cancelled", |
| 74 |
"type": [ "string", "null" ], |
| 75 |
"enum": [ |
| 76 |
"revert", |
| 77 |
"cancel" |
| 78 |
] |
| 79 |
}, |
| 80 |
"issue_date": { |
| 81 |
"description": "Checkout issue date", |
| 82 |
"type": ["string", "null"], |
| 83 |
"format": "date" |
| 84 |
}, |
| 85 |
"sipmode": { |
| 86 |
"description": "Flag indicating sipmode", |
| 87 |
"type": ["boolean", "null"] |
| 88 |
}, |
| 89 |
"params": { |
| 90 |
"description": "Object holding other arbitrary paramters", |
| 91 |
"type": ["object", "null"] |
| 92 |
} |
| 93 |
}, |
| 94 |
"required": [ "patron_id", "barcode" ] |
| 95 |
} |
| 96 |
} |
| 97 |
], |
| 98 |
"consumes": ["application/json"], |
| 99 |
"produces": ["application/json"], |
| 100 |
"responses": { |
| 101 |
"201": { |
| 102 |
"description": "Created checkout", |
| 103 |
"schema": { |
| 104 |
"$ref": "../definitions.json#/checkout" |
| 105 |
} |
| 106 |
}, |
| 107 |
"400": { |
| 108 |
"description": "Missing or wrong parameters", |
| 109 |
"schema": { |
| 110 |
"$ref": "../definitions.json#/error" |
| 111 |
} |
| 112 |
}, |
| 113 |
"401": { |
| 114 |
"description": "Authentication required", |
| 115 |
"schema": { |
| 116 |
"$ref": "../definitions.json#/error" |
| 117 |
} |
| 118 |
}, |
| 119 |
"403": { |
| 120 |
"description": "Checkout not allowed", |
| 121 |
"schema": { |
| 122 |
"$ref": "../definitions.json#/error" |
| 123 |
} |
| 124 |
}, |
| 125 |
"404": { |
| 126 |
"description": "Item not found", |
| 127 |
"schema": { |
| 128 |
"$ref": "../definitions.json#/error" |
| 129 |
} |
| 130 |
}, |
| 131 |
"404": { |
| 132 |
"description": "Borrower not found", |
| 133 |
"schema": { |
| 134 |
"$ref": "../definitions.json#/error" |
| 135 |
} |
| 136 |
}, |
| 137 |
"500": { |
| 138 |
"description": "Internal server error", |
| 139 |
"schema": { |
| 140 |
"$ref": "../definitions.json#/error" |
| 141 |
} |
| 142 |
}, |
| 143 |
"503": { |
| 144 |
"description": "Under maintenance", |
| 145 |
"schema": { |
| 146 |
"$ref": "../definitions.json#/error" |
| 147 |
} |
| 148 |
} |
| 149 |
}, |
| 150 |
"x-koha-authorization": { |
| 151 |
"permissions": { |
| 152 |
"circulate": "circulate_remaining_permissions" |
| 153 |
} |
| 154 |
} |
| 38 |
} |
155 |
} |
| 39 |
}, |
156 |
}, |
| 40 |
"/checkouts/{checkout_id}": { |
157 |
"/checkouts/{checkout_id}": { |