## Correct a location record `PUT https://getkollek.com/api/copies/{copy}/location-history/{locationHistory}` Correct a location history record that was logged wrong. Every field is replaced, so send the ones you want to keep. The copy's current location is recomputed from the history afterwards. **Permissions:** Owners and editors. Viewers get a 404 response. ### Path parameters - `copy` (integer, required): The ID of the copy the record belongs to. - `locationHistory` (integer, required): The ID of the location history record. ### Body parameters - `location_id` (integer, required): The ID of the location the copy is moving to. Must be a location of your account. - `moved_at` (string, required): The date the copy arrived at the location, in YYYY-MM-DD format. - `reason` (string, optional): Why the copy was moved. - `note` (string, optional): A free form note about the move. - `moved_out_at` (string, optional): The date the copy left the location, in YYYY-MM-DD format. Leave it out for the record that is still open. **Returns:** The updated location history record. ### Example request ```bash curl https://getkollek.com/api/copies/1/location-history/1 \ -X PUT \ -H "Authorization: Bearer $API_KEY" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "location_id": "4", "moved_at": "2024-01-01", "reason": "Rotated into the display case", "note": "Front row, eye level.", "moved_out_at": "2024-06-01" }' ``` ### Example response `Status: 200` ```json { "data": { "type": "location_history", "id": "1", "attributes": { "copy_id": "1", "location_id": "4", "moved_at": 1704067200, "moved_out_at": null, "reason": "Rotated into the display case", "note": null, "is_open": true, "created_at": 1752537600, "updated_at": 1752537600 }, "links": { "self": "https://getkollek.com/api/copies/1/location-history/1" } } } ```