---
updatedAt: 2025-09-23T21:26:25.000Z
agentTools:
  projectIndex: https://developer.2hire.io/llms.txt
---

# Update online value

Update online value

<br />

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "version": "1.0.0",
    "title": "END TO END TEST",
    "description": "2HireAsAdapter E2E API lets you simulate a real-vehicle",
    "contact": {
      "name": "2hire",
      "email": "info@2hire.io",
      "url": "https://2hire.io"
    },
    "license": {
      "name": "License Name",
      "url": "http://example.com/license-url"
    }
  },
  "servers": [
    {
      "url": "https://e2e.adapter.2hire.io"
    }
  ],
  "tags": [
    {
      "name": "Update Online",
      "description": "Set a simulated vehicle as online or offline"
    }
  ],
  "paths": {
    "/devices/{identifier}/state/online": {
      "put": {
        "tags": [
          "Update Online"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "Update online value",
        "operationId": "updateOnline",
        "description": "Update online value",
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "description": "Identifier of the vehicle",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "online"
                ],
                "properties": {
                  "online": {
                    "type": "boolean",
                    "description": "Online value"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SuccessUpdateStateResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "404": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "responses": {
      "InternalError": {
        "description": "Internal Error Response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/InternalError"
            },
            "examples": {
              "Internal Error": {
                "value": {
                  "code": "INTERNAL_ERROR",
                  "details": {
                    "cause": "INTERNAL_ERROR"
                  },
                  "errorId": "21127d29-1587-4cc7-92c6-d74b98497e56"
                }
              }
            }
          }
        }
      },
      "SuccessUpdateStateResponse": {
        "description": "Success Response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SuccessBatteryOnlineTripResponse"
            },
            "examples": {
              "success response": {
                "summary": "Success Response",
                "value": {
                  "success": true
                }
              }
            }
          }
        }
      },
      "BadRequestError": {
        "description": "Bad Request Error Response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BadRequestError"
            },
            "examples": {
              "Bad Format": {
                "summary": "Bad Format Error",
                "value": {
                  "code": "BAD_REQUEST_ERROR",
                  "details": {
                    "cause": "BAD_FORMAT"
                  },
                  "errorId": "21127d29-1587-4cc7-92c6-d74b98497e56"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "SuccessBatteryOnlineTripResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        }
      },
      "InternalError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Code of the error",
            "enum": [
              "INTERNAL_ERROR"
            ]
          },
          "details": {
            "type": "object",
            "properties": {
              "cause": {
                "type": "string",
                "description": "Specific cause of the error",
                "enum": [
                  "INTERNAL_ERROR"
                ]
              }
            }
          },
          "errorId": {
            "type": "string",
            "description": "uuid generated in order to track logs"
          }
        }
      },
      "BadRequestError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Code of the error",
            "enum": [
              "BAD_REQUEST_ERROR"
            ]
          },
          "details": {
            "type": "object",
            "properties": {
              "cause": {
                "type": "string",
                "description": "Specific cause of the error",
                "enum": [
                  "INVALID_UUID",
                  "INVALID_SIGNAL_NAME",
                  "BAD_FORMAT"
                ]
              }
            }
          },
          "errorId": {
            "type": "string",
            "description": "uuid generated in order to track logs"
          }
        }
      }
    }
  },
  "x-explorer-enabled": true,
  "x-proxy-enabled": true,
  "x-samples-enabled": true,
  "x-samples-languages": [
    "curl",
    "node",
    "ruby",
    "javascript",
    "python"
  ]
}
```