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

# Deregister a vehicle

Deregister a vehicle in the system

# 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": "Vehicle Deregistration",
      "description": "Simulate vehicle deregister"
    }
  ],
  "paths": {
    "/api/v1/vehicle/deregister": {
      "put": {
        "security": [
          {
            "Bearer": []
          }
        ],
        "tags": [
          "Vehicle Deregistration"
        ],
        "summary": "Deregister a vehicle",
        "operationId": "PutDeregisterVehicle",
        "description": "Deregister a vehicle in the system",
        "parameters": [
          {
            "name": "x-user",
            "in": "header",
            "description": "User identifier",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-application",
            "in": "header",
            "description": "Application identifier",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VehicleDeregistrationSchema"
              },
              "examples": {
                "Success response": {
                  "value": {
                    "vehicleId": "26c1097a-45d7-4719-a195-595c252a16f7"
                  }
                },
                "BAD_REQUEST_ERROR response": {
                  "value": {
                    "vehicleId": "c9051717-34fd-49f5-b2aa-2e2093bd2c42"
                  }
                },
                "CONFLICT_ERROR response": {
                  "value": {
                    "vehicleId": "aae121e9-3d74-4fb6-85b8-179d208b06c4"
                  }
                },
                "INTERNAL_ERROR_RESPONSE": {
                  "value": {
                    "vehicleId": "196ea6c2-5fb0-47ea-a8b4-ee0010dfd8e0"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SuccessDeregistrationResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestErrorDeregister"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationError"
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationError"
          },
          "409": {
            "$ref": "#/components/responses/DeregistrationConflictError"
          },
          "500": {
            "$ref": "#/components/responses/InternalErrorDeregisterResponse"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailableError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "responses": {
      "SuccessDeregistrationResponse": {
        "description": "Success Deregistration Response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SuccessDeregistrationResponse"
            },
            "examples": {
              "success response": {
                "summary": "Success Response",
                "value": {
                  "success": true
                }
              }
            }
          }
        }
      },
      "ServiceUnavailableError": {
        "description": "Service Unavailable Response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ServiceUnavailableError"
            },
            "examples": {
              "Register Disabled": {
                "value": {
                  "code": "SERVICE_UNAVAILABLE",
                  "details": {
                    "cause": "SERVICE_UNAVAILABLE"
                  },
                  "errorId": "21127d29-1587-4cc7-92c6-d74b98497e56"
                }
              },
              "Idempotent Register Disabled": {
                "value": {
                  "code": "SERVICE_UNAVAILABLE",
                  "details": {
                    "cause": "SERVICE_UNAVAILABLE"
                  },
                  "errorId": "21127d29-1587-4cc7-92c6-d74b98497e56"
                }
              },
              "Deregister Disabled": {
                "value": {
                  "code": "SERVICE_UNAVAILABLE",
                  "details": {
                    "cause": "SERVICE_UNAVAILABLE"
                  },
                  "errorId": "21127d29-1587-4cc7-92c6-d74b98497e56"
                }
              }
            }
          }
        }
      },
      "BadRequestErrorDeregister": {
        "description": "Bad Request Response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/DeregisterBadRequestError"
            },
            "examples": {
              "Unsupported Deregister": {
                "value": {
                  "code": "BAD_REQUEST_ERROR",
                  "details": {
                    "cause": "UNSUPPORTED_DEREGISTER"
                  },
                  "errorId": "21127d29-1587-4cc7-92c6-d74b98497e56"
                }
              }
            }
          }
        }
      },
      "InternalErrorDeregisterResponse": {
        "description": "Internal Error Response Schema",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/DeregisterInternalError"
            },
            "examples": {
              "Internal Error": {
                "value": {
                  "code": "INTERNAL_ERROR",
                  "details": {
                    "cause": "INTERNAL_ERROR"
                  },
                  "errorId": "21127d29-1587-4cc7-92c6-d74b98497e56"
                }
              }
            }
          }
        }
      },
      "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"
                }
              }
            }
          }
        }
      },
      "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"
                }
              }
            }
          }
        }
      },
      "DeregistrationConflictError": {
        "description": "Conflict Error response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ConflictErrorPendingAction"
            },
            "examples": {
              "Pending Action": {
                "summary": "Pending action",
                "value": {
                  "code": "CONFLICT_ERROR",
                  "details": {
                    "cause": "PENDING_ACTION"
                  },
                  "errorId": "21127d29-1587-4cc7-92c6-d74b98497e56"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "SuccessDeregistrationResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Deregistration was successful"
          }
        }
      },
      "BadFormatCause": {
        "type": "object",
        "properties": {
          "cause": {
            "type": "string",
            "description": "Specific cause of the error",
            "enum": [
              "BAD_FORMAT"
            ]
          }
        }
      },
      "ConflictErrorPendingAction": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Code of the error",
            "enum": [
              "CONFLICT_ERROR"
            ]
          },
          "details": {
            "type": "object",
            "properties": {
              "cause": {
                "type": "string",
                "description": "Specific cause of the error",
                "enum": [
                  "PENDING_ACTION"
                ]
              }
            }
          },
          "errorId": {
            "type": "string",
            "description": "uuid generated in order to track logs"
          }
        }
      },
      "InternalErrorCause": {
        "type": "object",
        "properties": {
          "cause": {
            "type": "string",
            "description": "Specific cause of the error",
            "enum": [
              "INTERNAL_ERROR"
            ]
          }
        }
      },
      "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"
          }
        }
      },
      "DeregisterInternalError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Code of the error",
            "enum": [
              "INTERNAL_ERROR"
            ]
          },
          "details": {
            "$ref": "#/components/schemas/InternalErrorCause"
          },
          "errorId": {
            "type": "string",
            "description": "uuid generated in order to track logs"
          }
        }
      },
      "ServiceUnavailableErrorCause": {
        "type": "object",
        "properties": {
          "cause": {
            "type": "string",
            "description": "Specific cause of the error",
            "enum": [
              "SERVICE_UNAVAILABLE"
            ]
          }
        }
      },
      "ServiceUnavailableError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Code of the error",
            "enum": [
              "SERVICE_UNAVAILABLE"
            ]
          },
          "details": {
            "$ref": "#/components/schemas/ServiceUnavailableErrorCause"
          },
          "errorId": {
            "type": "string",
            "description": "uuid generated in order to track logs"
          }
        }
      },
      "UnsupportedDeregisterCause": {
        "type": "object",
        "properties": {
          "cause": {
            "type": "string",
            "description": "Specific cause of the error",
            "enum": [
              "UNSUPPORTED_DEREGISTER"
            ]
          }
        }
      },
      "DeregisterBadRequestError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Code of the error",
            "enum": [
              "BAD_REQUEST_ERROR"
            ]
          },
          "details": {
            "type": "object",
            "oneOf": [
              {
                "$ref": "#/components/schemas/BadFormatCause"
              },
              {
                "$ref": "#/components/schemas/UnsupportedDeregisterCause"
              }
            ]
          },
          "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"
          }
        }
      },
      "VehicleDeregistrationSchema": {
        "type": "object",
        "title": "Deregister",
        "properties": {
          "vehicleId": {
            "type": "string",
            "description": "Identifier of the identifier to be deleted"
          }
        },
        "required": [
          "vehicleId"
        ]
      }
    }
  }
}
```