## Update a maintenance record `PUT https://getkollek.com/api/copies/{copy}/maintenance-records/{maintenanceRecord}` Update a maintenance record. Every field is replaced, so send the ones you want to keep along with the ones you are changing. **Permissions:** Owners and editors. Viewers get a 404 response. ### Path parameters - `copy` (integer, required): The ID of the copy the maintenance record belongs to. - `maintenanceRecord` (integer, required): The ID of the maintenance record. ### Body parameters - `type` (string, required): What kind of work this was. One of cleaning, repair, servicing, conservation, restoration, replacement or inspection. - `title` (string, required): A short summary of the work. - `description` (string, optional): The detail behind the title. - `performed_by` (string, optional): Who performed the work. - `performed_at` (string, optional): The date the work was done, in YYYY-MM-DD format. - `cost_amount` (integer, optional): What the work cost, in the smallest currency unit (e.g. cents). - `cost_currency_code` (string, optional): The three letter currency code the cost is expressed in. Defaults to the currency of the collection. - `item_condition_before_id` (integer, optional): The ID of the condition the copy was in before the work. Must be a condition of your account. - `item_condition_after_id` (integer, optional): The ID of the condition the copy is in after the work. Must be a condition of your account. Setting it updates the copy's current condition. - `next_due_at` (string, optional): When this care is next due, in YYYY-MM-DD format. Leave it out when the work is not recurring. - `include_in_provenance` (boolean, optional): Whether the work is significant enough to belong to the object's story. When true, a matching provenance event is generated; setting it back to false removes that event. **Returns:** The updated maintenance record object. ### Example request ```bash curl https://getkollek.com/api/copies/1/maintenance-records/1 \ -X PUT \ -H "Authorization: Bearer $API_KEY" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "type": "conservation", "title": "Archival cleaning and re-housing", "description": "Surface cleaned and re-boxed in archival storage.", "performed_by": "Atelier Restauration", "performed_at": "2024-01-01", "cost_amount": "12000", "cost_currency_code": "USD", "item_condition_before_id": "3", "item_condition_after_id": "1", "next_due_at": "2025-01-01", "include_in_provenance": "false" }' ``` ### Example response `Status: 200` ```json { "data": { "type": "maintenance_record", "id": "1", "attributes": { "copy_id": "1", "provenance_event_id": null, "type": "conservation", "title": "Archival cleaning and re-housing", "description": "Surface cleaned and re-boxed in archival storage.", "performed_by": "Atelier Restauration", "performed_at": 1704067200, "cost_amount": 12000, "cost_currency_code": "USD", "item_condition_before_id": "3", "item_condition_after_id": "1", "next_due_at": 1735689600, "include_in_provenance": false, "created_at": 1752537600, "updated_at": 1752537600 }, "links": { "self": "https://getkollek.com/api/copies/1/maintenance-records/1" } } } ```