> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.coperniq.io/api-reference/assets/update-asset/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.coperniq.io/_mcp/server. # Update Asset PATCH https://api.coperniq.io/v1/assets/{asset_id} Content-Type: application/json Update an existing asset. All fields are optional — only include what you want to change. `siteId` and `accountId` cannot be changed after creation. Including either field in the request body is rejected with a `400 Bad Request` validation error. To archive an asset, set `isArchived: true`. To unarchive, set `isArchived: false`. Reference: https://docs.coperniq.io/api-reference/assets/update-asset ## Authentication - `x-api-key` header (required) — API Key authentication via header ## Request ### Path parameters - `asset_id` (string, required) ### Body (application/json) This endpoint expects an AssetUpdate. - `name` (string, optional) - `type` (enum, optional) — Asset type enum. - Allowed values: `BATTERY_SYSTEM`, `CHARGING_GATEWAY`, `COMBINER_BOX`, `EV_CHARGER`, `LOAD_CENTER`, `MICROINVERTER`, `POWER_OPTIMIZER`, `PRODUCTION_METER`, `RAPID_SHUTDOWN_DEVICE`, `PV_INVERTER`, `TRACKER`, `WEATHER_STATION`, `AIR_CONDITIONER`, `AIR_HANDLING_UNIT`, `BOILER`, `CHILLER`, `COOLING_TOWER`, `FAN`, `HEAT_EXCHANGER`, `HEAT_PUMP`, `MAKE_UP_AIR_UNIT`, `PUMP`, `ROOFTOP_UNIT`, `THERMOSTAT`, `VARIABLE_FREQUENCY_DRIVE`, `AUTOMATIC_TRANSFER_SWITCH`, `BREAKER`, `DISCONNECT_SWITCH`, `ELECTRIC_METER`, `GENERATOR`, `LIGHTING_PANEL`, `PANELBOARD`, `SWITCHGEAR`, `TRANSFORMER`, `UNINTERRUPTIBLE_POWER_SUPPLY`, `BACKFLOW_PREVENTER`, `BOOSTER_PUMP`, `GREASE_INTERCEPTOR`, `STORAGE_TANK`, `SUMP_PUMP`, `VALVE`, `WATER_FILTRATION_SYSTEM`, `WATER_HEATER`, `WATER_SOFTENER`, `ACCESS_CONTROLLER`, `AUTOMATION_CONTROLLER`, `CAMERA`, `CARD_READER`, `DOOR_STRIKE`, `MAGLOCK`, `NETWORK_SWITCH`, `NETWORK_VIDEO_RECORDER`, `SENSOR`, `WIRELESS_ACCESS_POINT`, `OTHER` - `status` (enum, optional) — Asset lifecycle status. - Allowed values: `DRAFT`, `ACTIVE`, `MAINTENANCE`, `INACTIVE`, `RETIRED` - `manufacturer` (string, optional) - `model` (string, optional) - `serialNumber` (string, optional) - `size` (double, optional) - `labelIds` (list of integer, optional) — Replaces the asset's label list. - `installDate` (string, optional, nullable) - `manufacturingDate` (string, optional, nullable) - `expectedLifetime` (double, optional) — Expected lifetime in years - `description` (string, optional) - `coverImageFileId` (integer, optional) - `nameplateImageFileId` (integer, optional) - `isArchived` (boolean, optional) ## Response ### 200 Asset updated successfully - `id` (integer, required) — Asset identifier. - `status` (enum, required) — Asset lifecycle status. - Allowed values: `DRAFT`, `ACTIVE`, `MAINTENANCE`, `INACTIVE`, `RETIRED` - `siteId` (integer, required) - `labels` (list of AssetLabel, required) — Labels attached to the asset, ordered by position. - `isArchived` (boolean, required) - `uid` (integer, optional, nullable) — Short human-readable identifier for the asset (nullable for older records). - `name` (string, optional, nullable) - `type` (enum, optional, nullable) — Asset type enum. - Allowed values: `BATTERY_SYSTEM`, `CHARGING_GATEWAY`, `COMBINER_BOX`, `EV_CHARGER`, `LOAD_CENTER`, `MICROINVERTER`, `POWER_OPTIMIZER`, `PRODUCTION_METER`, `RAPID_SHUTDOWN_DEVICE`, `PV_INVERTER`, `TRACKER`, `WEATHER_STATION`, `AIR_CONDITIONER`, `AIR_HANDLING_UNIT`, `BOILER`, `CHILLER`, `COOLING_TOWER`, `FAN`, `HEAT_EXCHANGER`, `HEAT_PUMP`, `MAKE_UP_AIR_UNIT`, `PUMP`, `ROOFTOP_UNIT`, `THERMOSTAT`, `VARIABLE_FREQUENCY_DRIVE`, `AUTOMATIC_TRANSFER_SWITCH`, `BREAKER`, `DISCONNECT_SWITCH`, `ELECTRIC_METER`, `GENERATOR`, `LIGHTING_PANEL`, `PANELBOARD`, `SWITCHGEAR`, `TRANSFORMER`, `UNINTERRUPTIBLE_POWER_SUPPLY`, `BACKFLOW_PREVENTER`, `BOOSTER_PUMP`, `GREASE_INTERCEPTOR`, `STORAGE_TANK`, `SUMP_PUMP`, `VALVE`, `WATER_FILTRATION_SYSTEM`, `WATER_HEATER`, `WATER_SOFTENER`, `ACCESS_CONTROLLER`, `AUTOMATION_CONTROLLER`, `CAMERA`, `CARD_READER`, `DOOR_STRIKE`, `MAGLOCK`, `NETWORK_SWITCH`, `NETWORK_VIDEO_RECORDER`, `SENSOR`, `WIRELESS_ACCESS_POINT`, `OTHER` - `manufacturer` (string, optional, nullable) - `model` (string, optional, nullable) - `serialNumber` (string, optional, nullable) - `accountId` (integer, optional, nullable) — ID of the account (project with type ACCOUNT) the asset belongs to. - `size` (double, optional, nullable) - `installDate` (string, optional, nullable) - `manufacturingDate` (string, optional, nullable) - `expectedLifetime` (double, optional, nullable) — Expected lifetime in years - `description` (string, optional, nullable) - `coverImageFileId` (integer, optional, nullable) - `nameplateImageFileId` (integer, optional, nullable) - `createdAt` (string, optional) - `updatedAt` (string, optional) ## Errors ### 400 Bad Request Error Invalid request - `message` (string, optional) - `code` (enum, optional) - Allowed values: `NOT_FOUND` - `field` (string, optional) — Field that caused the validation error (if applicable) ### 401 Unauthorized Error Authentication failed - `message` (string, optional) - `code` (enum, optional) - Allowed values: `NOT_FOUND` ### 404 Not Found Error Resource not found - `message` (string, optional) - `code` (enum, optional) - Allowed values: `NOT_FOUND` ## Types ### AssetLabel Label attached to an asset (read-only expansion of the label id). - `id` (integer, required) - `name` (string, required) - `type` (enum, required) - Allowed values: `ASSET`, `TASK` - `color` (string, optional, nullable) ## Examples **Request** ```json {} ``` **Response** ```json { "id": 1, "status": "DRAFT", "siteId": 1, "labels": [ { "id": 1, "name": "string", "type": "ASSET", "color": "string" } ], "isArchived": true, "uid": 1, "name": "string", "type": "BATTERY_SYSTEM", "manufacturer": "string", "model": "string", "serialNumber": "string", "accountId": 1, "size": 1.1, "installDate": "2023-01-15", "manufacturingDate": "2023-01-15", "expectedLifetime": 1.1, "description": "string", "coverImageFileId": 1, "nameplateImageFileId": 1, "createdAt": "2024-01-15T09:30:00Z", "updatedAt": "2024-01-15T09:30:00Z" } ``` **SDK Code** ```python import requests url = "https://api.coperniq.io/v1/assets/asset_id" payload = {} headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.coperniq.io/v1/assets/asset_id'; const options = { method: 'PATCH', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.coperniq.io/v1/assets/asset_id" payload := strings.NewReader("{}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.coperniq.io/v1/assets/asset_id") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Patch.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.patch("https://api.coperniq.io/v1/assets/asset_id") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('PATCH', 'https://api.coperniq.io/v1/assets/asset_id', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.coperniq.io/v1/assets/asset_id"); var request = new RestRequest(Method.PATCH); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.coperniq.io/v1/assets/asset_id")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PATCH" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` > Official Coperniq API documentation. Build integrations for solar and construction project management — projects, opportunities, work orders, invoices, webhooks, and more.