# Update a vehicle Update a vehicle. Endpoint: PATCH /vehicles/{vehicle_id} Version: 2.0 Security: oauth2 ## Path parameters: - `vehicle_id` (string, required) The ID of the specific vehicle to retrieve. Example: "vhcl01HRFF3SEVSCRAV9B3CHVDFN0H" ## Query parameters: - `expand` (array) Specify a url field to expand into a nested resource. Enum: "user", "trim", "trim.model", "trim.model.make", "latest_status_log" ## Header parameters: - `EvEnergy-Version` (number) Specify the version of this endpoint to use. Enum: 2 ## Request fields (application/json): - `maximum_charge_limit_percentage` (integer) The required target state of charge of the car as a percentage between 50 and 100. The car will not be smart charged above this value. ## Response 200 fields (application/json): - `id` (string) Unique identifier for the given Vehicle. Example: "vhcl01HRFF3SEVSCRAV9B3CHVDFN0H" - `url` (string) Example: "https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H" - `trim` (any) Defaults to a url, but can be expanded to the full Trim resource via the expand query parameter. - `user` (any) Defaults to a url, but can be expanded to the full User resource via the expand query parameter. Example: "https://api.ev.energy/v2/users/user01HN2NJ9NMRZBXT1H6FT9N7735" - `latest_status_log` (any) An expandable reference to the most recent status log for this Vehicle. This can be requested or expanded to get the most accurate information we have on the device's current status. Example: "https://api.ev.energy/v2/vehicles/vhcl01HRFF3SEVSCRAV9B3CHVDFN0H/status_logs/2024-04-17T09:39:45.994584Z/" - `charging_sub_sessions` (string) Provides a pre-constructed URL to list charging sub-sessions involving this Vehicle. Example: "https://api.ev.energy/charging_sub_sessions/?vehicle_id=vhcl01HRFF3SEVSCRAV9B3CHVDFN0H" - `integrated` (any) Whether we have an integration with this vehicle. - UNINTEGRATED: This vehicle is not integrated - ACTIVE: This vehicle is integrated and the connection is working. - INACTIVE: This vehicle has been integrated but the connection has been severed, usually because the user needs to reconnect it. Enum: "UNINTEGRATED", "ACTIVE", "INACTIVE" - `maximum_charge_limit_percentage` (integer) The target state of charge of the car as a percentage between 50 and 100. The car will not be smart charged above this value. Can be null if target charge level has not been set or we don't know the car's battery size. ## Response 400 fields (application/problem+json): - `type` (string) Example: "https://api.ev.energy/v2/problems/example-problem/" - `status` (number) Example: 400 - `title` (string, required) Example: "Short description" - `detail` (string, required) Example: "Long, more specific description." - `instance` (string) Example: "https://api.ev.energy/v2/users/user01HN2P75GBNFRJPCZJXEFVXH5E" - `notification` (object) Something that the user should be informed about. - `notification.id` (string, required) Unique identifier for the Notification Example: "notf67O36PLTFDB57M0E5L33JZLGM0" - `notification.url` (string, required) Example: "https://api.ev.energy/notifications/notf67O36PLTFDB57M0E5L33JZLGM0" - `notification.message_id` (string, required) Internal identifier for this notification type. E.g. 'ERR0023' - `notification.category` (any, required) Category of this notification type Enum: "ACTIONABLE", "SERVICE", "RETRY", "MARKETING", "INTERNAL" - `notification.event_time` (string, required) The timestamp of the event described by this notification - `notification.short_text_title` (string, required) Short title for the notification - `notification.short_text_body` (string, required) Short description of the event being notified - `notification.detail_page_title` (string) Title of a help page giving more information about this notification - `notification.detail_page_body` (string) Text of a help page giving more information about this notification - `notification.external_link` (string,null) URL of a web page giving further information about this notification - `notification.external_button_label` (string) Text to be displayed on a button leading to the external_link location - `notification.read_at` (string) When the user examined the contents of this notification - `notification.resolved_at` (string) When the problem associated with this notification was resolved ## Response 401 fields (application/problem+json): - `status` (number) Example: 401 - `title` (string, required) Example: "Unauthorized" - `detail` (string, required) Example: "Authentication credentials were not provided." ## Response 403 fields (application/problem+json): - `status` (number) Example: 403 - `title` (string, required) Example: "Forbidden" - `detail` (string, required) Example: "You do not have permission to perform this action." ## Response 404 fields (application/problem+json): - `status` (number) Example: 404 - `title` (string, required) Example: "Not found" - `detail` (string, required) Example: "Resource does not exist or cannot be accessed." ## Response 406 fields (application/problem+json): - `status` (number) Example: 406 - `title` (string, required) Example: "Not Acceptable" - `detail` (string, required) Example: "Could not satisfy the request Accept header." ## Response 429 fields (application/problem+json): - `type` (string) Example: "https://api.ev.energy/v2/problems/example-problem/" - `status` (number) Example: 400 - `title` (string, required) Example: "Short description" - `detail` (string, required) Example: "Long, more specific description." - `instance` (string) Example: "https://api.ev.energy/v2/users/user01HN2P75GBNFRJPCZJXEFVXH5E" - `notification` (object) Something that the user should be informed about. - `notification.id` (string, required) Unique identifier for the Notification Example: "notf67O36PLTFDB57M0E5L33JZLGM0" - `notification.url` (string, required) Example: "https://api.ev.energy/notifications/notf67O36PLTFDB57M0E5L33JZLGM0" - `notification.message_id` (string, required) Internal identifier for this notification type. E.g. 'ERR0023' - `notification.category` (any, required) Category of this notification type Enum: "ACTIONABLE", "SERVICE", "RETRY", "MARKETING", "INTERNAL" - `notification.event_time` (string, required) The timestamp of the event described by this notification - `notification.short_text_title` (string, required) Short title for the notification - `notification.short_text_body` (string, required) Short description of the event being notified - `notification.detail_page_title` (string) Title of a help page giving more information about this notification - `notification.detail_page_body` (string) Text of a help page giving more information about this notification - `notification.external_link` (string,null) URL of a web page giving further information about this notification - `notification.external_button_label` (string) Text to be displayed on a button leading to the external_link location - `notification.read_at` (string) When the user examined the contents of this notification - `notification.resolved_at` (string) When the problem associated with this notification was resolved