## Return a loan `POST https://getkollek.com/api/copies/{copy}/loans/{loan}/return` Mark an open loan as returned. This closes it with the return date and the condition it came back in, brings the copy back into your custody, and, when the loan is part of provenance, records the return in the object's story. A loan that is already closed returns a 404. **Permissions:** Owners and editors. Viewers get a 404 response. ### Path parameters - `copy` (integer, required): The ID of the copy the loan belongs to. - `loan` (integer, required): The ID of the loan. ### Body parameters - `returned_at` (string, required): The date the copy came back, in YYYY-MM-DD format. - `item_condition_in_id` (integer, optional): The ID of the condition the copy came back in. Must be a condition of your account. Setting it updates the copy's current condition. **Returns:** The returned loan object. ### Example request ```bash curl https://getkollek.com/api/copies/1/loans/1/return \ -X POST \ -H "Authorization: Bearer $API_KEY" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "returned_at": "2024-06-15", "item_condition_in_id": "3" }' ``` ### Example response `Status: 200` ```json { "data": { "type": "loan", "id": "1", "attributes": { "copy_id": "1", "loan_provenance_event_id": null, "return_provenance_event_id": null, "direction": "outgoing", "status": "returned", "party": "The Whitney Museum", "purpose": "Retrospective exhibition, east wing.", "loaned_at": 1704067200, "due_at": 1719792000, "returned_at": null, "item_condition_out_id": "1", "item_condition_in_id": null, "deposit_amount": 250000, "deposit_currency_code": "USD", "include_in_provenance": true, "created_at": 1752537600, "updated_at": 1752537600 }, "context": { "item_name": "Amazing Spider-Man #1", "copy_identifier": "CBX-042", "collection_name": "My Comics" }, "links": { "self": "https://getkollek.com/api/copies/1/loans/1" } } } ```