---
updatedAt: 2026-07-02T10:38:05.000Z
agentTools:
  projectIndex: https://developer.2hire.io/llms.txt
---

# Generic

A set of signals defined on every vehicle

<br />

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "version": "1.0.0",
    "title": "INTEGRATION TEST",
    "description": "2HireAsAdapter IT API lets you test some interaction",
    "contact": {
      "name": "2hire",
      "email": "info@2hire.io",
      "url": "https://2hire.io"
    },
    "license": {
      "name": "License Name",
      "url": "http://example.com/license-url"
    }
  },
  "servers": [
    {
      "url": "https://integration.adapter.2hire.io"
    }
  ],
  "tags": [
    {
      "name": "Signals",
      "description": "Simulate reading a vehicle's signal"
    }
  ],
  "paths": {
    "/api/v1/vehicle/{uuid}/signal/generic/{signal}": {
      "get": {
        "tags": [
          "Signals"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "Generic",
        "operationId": "getGenericSignalById",
        "description": "A set of signals defined on every vehicle",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "description": "Identifier of the vehicle",
            "required": true,
            "schema": {
              "enum": [
                "26c1097a-45d7-4719-a195-595c252a16f7",
                "a0d10b22-2575-4f1c-95dd-a287df8114c0",
                "c9051717-34fd-49f5-b2aa-2e2093bd2c42",
                "aae121e9-3d74-4fb6-85b8-179d208b06c4"
              ],
              "type": "string"
            }
          },
          {
            "name": "signal",
            "in": "path",
            "description": "Name of the  generic signal",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "position",
                "autonomy_percentage",
                "autonomy_meters",
                "distance_covered",
                "online"
              ],
              "default": "position"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/SuccessGenericSignalResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestSignalError"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationError"
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationError"
          },
          "404": {
            "$ref": "#/components/responses/VehicleNotFoundError"
          },
          "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"
                }
              }
            }
          }
        }
      },
      "BadRequestSignalError": {
        "description": "Bad Request Error Response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BadRequestError"
            },
            "examples": {
              "Invalid signal name": {
                "summary": "Invalid Signal Name",
                "value": {
                  "code": "BAD_REQUEST_ERROR",
                  "details": {
                    "cause": "INVALID_SIGNAL_NAME"
                  },
                  "errorId": "21127d29-1587-4cc7-92c6-d74b98497e56"
                }
              },
              "Invalid uuid": {
                "summary": "Invalid uuid",
                "value": {
                  "code": "BAD_REQUEST_ERROR",
                  "details": {
                    "cause": "INVALID_UUID"
                  },
                  "errorId": "f39add1e-7cd0-4929-bf0b-e5e1baebdc11"
                }
              }
            }
          }
        }
      },
      "AuthenticationError": {
        "description": "Authentication Error Response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AuthenticationError"
            },
            "examples": {
              "Token expired": {
                "summary": "Token Expired",
                "value": {
                  "code": "AUTHENTICATION_ERROR",
                  "details": {
                    "cause": "TOKEN_EXPIRED"
                  },
                  "errorId": "21127d29-1587-4cc7-92c6-d74b98497e56"
                }
              }
            }
          }
        }
      },
      "VehicleNotFoundError": {
        "description": "VehicleNotFound Error Response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/VehicleNotFoundError"
            },
            "examples": {
              "Vehicle Not Registered": {
                "summary": "Vehicle Not Registered",
                "value": {
                  "code": "NOT_FOUND_ERROR",
                  "details": {
                    "cause": "VEHICLE_NOT_REGISTERED"
                  },
                  "errorId": "21127d29-1587-4cc7-92c6-d74b98497e56"
                }
              }
            }
          }
        }
      },
      "SuccessGenericSignalResponse": {
        "description": "Success Response Schema",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SuccessSignalResponse"
            },
            "examples": {
              "online": {
                "summary": "Online Signal",
                "value": {
                  "timestamp": 124325335,
                  "data": {
                    "online": true
                  }
                }
              },
              "position": {
                "summary": "Position Signal",
                "value": {
                  "timestamp": 124325335,
                  "data": {
                    "latitude": 40.42277527,
                    "longitude": -3.69623494
                  }
                }
              },
              "distance_covered": {
                "summary": "Distance Covered Signal",
                "value": {
                  "timestamp": 14124353532,
                  "data": {
                    "meters": 6464632
                  }
                }
              },
              "autonomy_percentage": {
                "summary": "Autonomy Percentage Signal",
                "value": {
                  "timestamp": 14124353532,
                  "data": {
                    "percentage": 56
                  }
                }
              },
              "autonomy_meters": {
                "summary": "Autonomy Meters Signal",
                "value": {
                  "timestamp": 14124353532,
                  "data": {
                    "meters": 6324
                  }
                }
              }
            }
          }
        }
      },
      "AuthorizationError": {
        "description": "Authorization Error Response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AuthorizationError"
            },
            "examples": {
              "Authorization Error": {
                "value": {
                  "code": "AUTHORIZATION_ERROR",
                  "details": {
                    "cause": "INSUFFICIENT_PERMISSIONS"
                  },
                  "errorId": "21127d29-1587-4cc7-92c6-d74b98497e56"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "SuccessSignalResponse": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "integer",
            "description": "When the signal has been saved in milliseconds"
          },
          "data": {
            "description": "payload of the signal",
            "type": "object"
          }
        }
      },
      "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",
                  "QR_CODE_NOT_FOUND"
                ]
              }
            }
          },
          "errorId": {
            "type": "string",
            "description": "uuid generated in order to track logs"
          }
        }
      },
      "BadFormatCause": {
        "type": "object",
        "properties": {
          "cause": {
            "type": "string",
            "description": "Specific cause of the error",
            "enum": [
              "BAD_FORMAT"
            ]
          }
        }
      },
      "BadRequestCause": {
        "type": "object",
        "properties": {
          "cause": {
            "type": "string",
            "description": "Specific cause of the error",
            "enum": [
              "BAD_REQUEST"
            ]
          }
        }
      },
      "InvalidUUIDCause": {
        "type": "object",
        "properties": {
          "cause": {
            "type": "string",
            "description": "Specific cause of the error",
            "enum": [
              "INVALID_UUID"
            ]
          }
        }
      },
      "InvalidSignalNameCause": {
        "type": "object",
        "properties": {
          "cause": {
            "type": "string",
            "description": "Specific cause of the error",
            "enum": [
              "INVALID_SIGNAL_NAME"
            ]
          }
        }
      },
      "AuthorizationError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Code of the error",
            "enum": [
              "AUTHORIZATION_ERROR"
            ]
          },
          "cause": {
            "type": "string",
            "description": "Specific cause of the error",
            "enum": [
              "INSUFFICIENT_PERMISSIONS",
              "UNKNOWN"
            ]
          },
          "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",
            "oneOf": [
              {
                "$ref": "#/components/schemas/BadRequestCause"
              },
              {
                "$ref": "#/components/schemas/InvalidUUIDCause"
              },
              {
                "$ref": "#/components/schemas/InvalidSignalNameCause"
              },
              {
                "$ref": "#/components/schemas/BadFormatCause"
              }
            ]
          },
          "errorId": {
            "type": "string",
            "description": "uuid generated in order to track logs"
          }
        }
      },
      "AuthenticationError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Code of the error",
            "enum": [
              "AUTHENTICATION_ERROR"
            ]
          },
          "details": {
            "type": "object",
            "properties": {
              "cause": {
                "type": "string",
                "description": "Specific cause of the error",
                "enum": [
                  "HEADER_MALFORMED",
                  "HEADER_MISSING",
                  "TOKEN_AUDIENCE_NOT_ALLOWED",
                  "TOKEN_CREATION_FAILED",
                  "TOKEN_EXPIRED",
                  "TOKEN_KEY_ERROR",
                  "TOKEN_SIGN_ERROR",
                  "TOKEN_VERIFICATION_FAILED",
                  "GET_THIRD_PARTY_TOKEN_FAILED"
                ]
              }
            }
          },
          "errorId": {
            "type": "string",
            "description": "uuid generated in order to track logs"
          }
        }
      },
      "VehicleNotFoundError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Code of the error",
            "enum": [
              "NOT_FOUND_ERROR"
            ]
          },
          "details": {
            "type": "object",
            "properties": {
              "cause": {
                "type": "string",
                "description": "Specific cause of the error",
                "enum": [
                  "VEHICLE_NOT_REGISTERED"
                ]
              }
            }
          },
          "errorId": {
            "type": "string",
            "description": "uuid generated in order to track logs"
          }
        }
      }
    }
  }
}
```