# Create purchaseorder Creates a new Purchaseorder record. Purchaseorder resource in the Animal Health Data Store Endpoint: POST /site/{siteId}/ahds/v1/purchaseorder Version: 1.0 Security: bearer ## Path parameters: - `siteId` (number, required) Site identifier ## Request fields (application/json): - `clientId` (string) Client associated with this purchase order, if applicable. Example: "123e4567-e89b-12d3-a456-426614174000" - `comments` (string) Free-text comments on the purchase order. - `extensions` (object) Vendor- or practice-specific extensions. - `freightAmount` (string) Freight amount as a decimal string. Example: "100.00" - `freightTaxAmount` (string) Tax amount applicable to freight. Example: "100.00" - `isActive` (boolean, required) Whether the purchase order is active. - `orderDate` (string, required) Calendar date of the purchase order. Example: "2025-01-01" - `ownershipId` (string) Ownership or business unit identifier associated with this purchase order. Example: "123e4567-e89b-12d3-a456-426614174000" - `purchaseOrderItemIds` (array) List of purchase order item identifiers associated with this purchase order. - `purchaseorderId` (string, required) Canonical identifier for the purchase order. Example: "123e4567-e89b-12d3-a456-426614174000" - `shippingAddressId` (string) Reference to the shipping address resource. Example: "123e4567-e89b-12d3-a456-426614174000" - `status` (string, required) Status of the purchase order. Enum: "draft", "submitted", "confirmed", "partiallyReceived", "received", "cancelled" - `supplierAccountNumber` (string) Account number with the supplier. - `supplierId` (string, required) Supplier from whom the order is placed. Example: "123e4567-e89b-12d3-a456-426614174000" - `supplierOrderNumber` (string) Supplier-provided order number. - `taxAmount` (string) Total tax amount for the purchase order. Example: "100.00" - `totalAmount` (string) Total amount for the purchase order including tax. Example: "100.00" ## Response 201 fields (application/json): - `clientId` (string, required) Client associated with this purchase order, if applicable. Example: "123e4567-e89b-12d3-a456-426614174000" - `comments` (string, required) Free-text comments on the purchase order. - `createdAt` (string, required) Timestamp when the purchase order was created. Example: "2025-01-01T00:00:00.000Z" - `extensions` (object, required) Vendor- or practice-specific extensions. - `freightAmount` (string, required) Freight amount as a decimal string. Example: "100.00" - `freightTaxAmount` (string, required) Tax amount applicable to freight. Example: "100.00" - `isActive` (boolean, required) Whether the purchase order is active. - `orderDate` (string, required) Calendar date of the purchase order. Example: "2025-01-01T00:00:00Z" - `ownershipId` (string, required) Ownership or business unit identifier associated with this purchase order. Example: "123e4567-e89b-12d3-a456-426614174000" - `purchaseOrderItemIds` (array, required) List of purchase order item identifiers associated with this purchase order. - `purchaseorderId` (string, required) Canonical identifier for the purchase order. Example: "123e4567-e89b-12d3-a456-426614174000" - `shippingAddressId` (string, required) Reference to the shipping address resource. Example: "123e4567-e89b-12d3-a456-426614174000" - `status` (string, required) Status of the purchase order. Enum: "draft", "submitted", "confirmed", "partiallyReceived", "received", "cancelled" - `supplierAccountNumber` (string, required) Account number with the supplier. - `supplierId` (string, required) Supplier from whom the order is placed. Example: "123e4567-e89b-12d3-a456-426614174000" - `supplierOrderNumber` (string, required) Supplier-provided order number. - `taxAmount` (string, required) Total tax amount for the purchase order. Example: "100.00" - `totalAmount` (string, required) Total amount for the purchase order including tax. Example: "100.00" - `updatedAt` (string, required) Timestamp when the purchase order was last modified. Example: "2025-01-01T00:00:00.000Z" ## Response 400 fields ## Response 401 fields ## Response 409 fields