# Update barcode

Partially updates an existing Barcode. Only provided fields will be updated.

Endpoint: PATCH /site/{siteId}/ahds/v1/barcode/{barcodeId}
Version: 1.0
Security: bearer

## Security:

  - `bearer` (unknown)
    http bearer JWT

## Path parameters:

  - `siteId` (number, required)
    Site identifier

  - `barcodeId` (string, required)
    Barcode unique identifier (UUID)

## Request fields (application/json):

  - `extensions` (object)
    Vendor- or practice-specific extensions.

  - `forId` (string)
    Identifier of the resource this barcode is associated with. Type depends on forType.
    Example: 123e4567-e89b-12d3-a456-426614174000

  - `forType` (string)
    Type of resource this barcode is associated with (e.g., item, batch, patient).
    Example: CODE-001

  - `format` (string)
    Barcode symbology/format (e.g., CODE128, EAN13, QR).
    Example: CODE-001

  - `isActive` (boolean)
    Whether the barcode is currently active and usable.
    Example: true

  - `value` (string)
    The encoded barcode value as a string.
    Example: CODE-001

## Response 200:

  - `200` (unknown)
    Barcode updated successfully

## Response 200 fields (application/json):

  - `barcodeId` (string, required)
    Canonical unique identifier for the barcode.
    Example: 123e4567-e89b-12d3-a456-426614174000

  - `createdAt` (string, required)
    Timestamp when the barcode record was created.
    Example: 2025-01-01T00:00:00.000Z

  - `extensions` (object, required)
    Vendor- or practice-specific extensions.

  - `forId` (string, required)
    Identifier of the resource this barcode is associated with. Type depends on forType.
    Example: 123e4567-e89b-12d3-a456-426614174000

  - `forType` (string, required)
    Type of resource this barcode is associated with (e.g., item, batch, patient).
    Example: CODE-001

  - `format` (string, required)
    Barcode symbology/format (e.g., CODE128, EAN13, QR).
    Example: CODE-001

  - `isActive` (boolean, required)
    Whether the barcode is currently active and usable.
    Example: true

  - `updatedAt` (string, required)
    Timestamp when the barcode record was last updated.
    Example: 2025-01-01T00:00:00.000Z

  - `value` (string, required)
    The encoded barcode value as a string.
    Example: CODE-001

## Response 400:

  - `400` (unknown)
    Invalid request body

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 404:

  - `404` (unknown)
    Barcode not found

