# Create barcode Creates a new Barcode record. Barcode resource in the Animal Health Data Store Endpoint: POST /site/{siteId}/ahds/v1/barcode Version: 1.0 Security: bearer ## Path parameters: - `siteId` (number, required) Site identifier ## Request fields (application/json): - `barcodeId` (string, required) Canonical unique identifier for the barcode. Example: "123e4567-e89b-12d3-a456-426614174000" - `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). - `format` (string) Barcode symbology/format (e.g., CODE128, EAN13, QR). - `isActive` (boolean, required) Whether the barcode is currently active and usable. - `value` (string, required) The encoded barcode value as a string. ## Response 201 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). - `format` (string, required) Barcode symbology/format (e.g., CODE128, EAN13, QR). - `isActive` (boolean, required) Whether the barcode is currently active and usable. - `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. ## Response 400 fields ## Response 401 fields ## Response 409 fields