# Assign RFID

This endpoint assigns one RFID to the user. If the RFID is already assigned to another user, it will be re-assigned to this user.

Endpoint: POST /api/v1/users/rfid
Version: 1.2.0
Security: user

## Security:

  - `user` (unknown)
    http bearer JWT

## Request fields (application/json):

  - `rfidFormat` (string, required)
    The RFID format.
    Enum: "HITAG1", "HITAG2", "EM4001", "EM4002", "EM4100", "EM4102", "EM4022", "MIFARE", "LEGIC", "NFC_EGYM_APPLE", "NFC_EGYM_GOOGLE", "NFC_EXTERNAL_APPLE", "NFC_EXTERNAL_GOOGLE"

  - `rfid` (string, required)
    The RFID.

## Response 204:

  - `204` (unknown)
    No Content

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `timestamp` (integer)
    Unix epoch milliseconds when the error occurred.
    Example: 1775122463109

  - `path` (string)
    The request path that triggered the error.
    Example: /api/v1/measurements/body/history

  - `status` (integer)
    HTTP status code.
    Example: 400

  - `error` (string)
    Short textual description of the HTTP status.
    Example: Bad Request

  - `requestId` (string)
    Unique identifier for the request, useful for correlating logs and support tickets.
    Example: d0c0fd9e-236

  - `message` (string)
    Human-readable description of the error.
    Example: Invalid request parameters: value must be greater than or equal to 1 and less than or equal to 1000

  - `fieldErrors` (array)
    List of field-level validation errors. Only present when the error was caused by request-body binding failures or custom form validation.

  - `fieldErrors.name` (string)
    The field name.

  - `fieldErrors.message` (string)
    The error message.
    Example: Must not be null.

  - `fieldErrors.rejectedValue` (any)
    The rejected value.
    Example: Must not be null.

  - `errorCode` (string)
    Machine-readable error code for domain-specific errors. Only present for exceptions that carry a custom error code.
    Example: USER_NOT_FOUND

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `timestamp` (integer)
    Unix epoch milliseconds when the error occurred.
    Example: 1775122463109

  - `path` (string)
    The request path that triggered the error.
    Example: /api/v1/measurements/body/history

  - `status` (integer)
    HTTP status code.
    Example: 400

  - `error` (string)
    Short textual description of the HTTP status.
    Example: Bad Request

  - `requestId` (string)
    Unique identifier for the request, useful for correlating logs and support tickets.
    Example: d0c0fd9e-236

  - `message` (string)
    Human-readable description of the error.
    Example: Invalid request parameters: value must be greater than or equal to 1 and less than or equal to 1000

  - `fieldErrors` (array)
    List of field-level validation errors. Only present when the error was caused by request-body binding failures or custom form validation.

  - `fieldErrors.name` (string)
    The field name.

  - `fieldErrors.message` (string)
    The error message.
    Example: Must not be null.

  - `fieldErrors.rejectedValue` (any)
    The rejected value.
    Example: Must not be null.

  - `errorCode` (string)
    Machine-readable error code for domain-specific errors. Only present for exceptions that carry a custom error code.
    Example: USER_NOT_FOUND

## Response 500:

  - `500` (unknown)
    Internal Server Error

## Response 500 fields (application/json):

  - `timestamp` (integer)
    Unix epoch milliseconds when the error occurred.
    Example: 1775122463109

  - `path` (string)
    The request path that triggered the error.
    Example: /api/v1/measurements/body/history

  - `status` (integer)
    HTTP status code.
    Example: 400

  - `error` (string)
    Short textual description of the HTTP status.
    Example: Bad Request

  - `requestId` (string)
    Unique identifier for the request, useful for correlating logs and support tickets.
    Example: d0c0fd9e-236

  - `message` (string)
    Human-readable description of the error.
    Example: Invalid request parameters: value must be greater than or equal to 1 and less than or equal to 1000

  - `fieldErrors` (array)
    List of field-level validation errors. Only present when the error was caused by request-body binding failures or custom form validation.

  - `fieldErrors.name` (string)
    The field name.

  - `fieldErrors.message` (string)
    The error message.
    Example: Must not be null.

  - `fieldErrors.rejectedValue` (any)
    The rejected value.
    Example: Must not be null.

  - `errorCode` (string)
    Machine-readable error code for domain-specific errors. Only present for exceptions that carry a custom error code.
    Example: USER_NOT_FOUND

