{"openapi": "3.1.0", "info": {"title": "FertiScan", "version": "0.1.0"}, "paths": {"/healthz": {"get": {"tags": ["health"], "summary": "Liveness", "description": "Liveness probe - is the application running?", "operationId": "health_liveness", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Health"}}}}}}}, "/readyz": {"get": {"tags": ["health"], "summary": "Readiness", "description": "Readiness probe - can the application handle requests?", "operationId": "health_readiness", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Readiness"}}}}}}}, "/api/v1/login/access-token": {"post": {"tags": ["login"], "summary": "Login Access Token", "description": "OAuth2 compatible token login, get an access token for future requests.", "operationId": "login_login_access_token", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"$ref": "#/components/schemas/Body_login_login_access_token"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Token"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/login/test-token": {"post": {"tags": ["login"], "summary": "Test Token", "description": "Test access token.", "operationId": "login_test_token", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserPublic"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/password-recovery/{email}": {"post": {"tags": ["login"], "summary": "Recover Password", "description": "Password Recovery.", "operationId": "login_recover_password", "parameters": [{"name": "email", "in": "path", "required": true, "schema": {"type": "string", "title": "Email"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Message"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/reset-password/": {"post": {"tags": ["login"], "summary": "Reset Password", "description": "Reset password.", "operationId": "login_reset_password", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/NewPassword"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Message"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/password-recovery-html-content/{email}": {"post": {"tags": ["login"], "summary": "Recover Password Html Content", "description": "HTML Content for Password Recovery (dev/testing only).", "operationId": "login_recover_password_html_content", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "email", "in": "path", "required": true, "schema": {"type": "string", "title": "Email"}}], "responses": {"200": {"description": "Successful Response", "content": {"text/html": {"schema": {"type": "string"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/users": {"get": {"tags": ["users"], "summary": "Read Users", "description": "List all users (superuser only).", "operationId": "users_read_users", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "description": "Page size limit", "default": 50, "title": "Limit"}, "description": "Page size limit"}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "description": "Page offset", "default": 0, "title": "Offset"}, "description": "Page offset"}, {"name": "is_active", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Active"}}, {"name": "is_superuser", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Superuser"}}, {"name": "search", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "Search"}}, {"name": "start_created_at", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Start Created At"}}, {"name": "end_created_at", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "End Created At"}}, {"name": "order_by", "in": "query", "required": false, "schema": {"type": "string", "default": "created_at", "title": "Order By"}}, {"name": "order", "in": "query", "required": false, "schema": {"type": "string", "default": "desc", "title": "Order"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LimitOffsetPage_UserPublic_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["users"], "summary": "Create User", "description": "Create new user (superuser only).", "operationId": "users_create_user", "security": [{"OAuth2PasswordBearer": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserCreate"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserPublic"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/users/me": {"get": {"tags": ["users"], "summary": "Read User Me", "description": "Get current user.", "operationId": "users_read_user_me", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserPublic"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "delete": {"tags": ["users"], "summary": "Delete User Me", "description": "Delete current user.", "operationId": "users_delete_user_me", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Message"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "patch": {"tags": ["users"], "summary": "Update User Me", "description": "Update current user.", "operationId": "users_update_user_me", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserUpdateMe"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserPublic"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/users/me/password": {"patch": {"tags": ["users"], "summary": "Update Password Me", "description": "Update current user password.", "operationId": "users_update_password_me", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdatePassword"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Message"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/users/{user_id}": {"get": {"tags": ["users"], "summary": "Read User", "description": "Get user by ID (superuser only).", "operationId": "users_read_user", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "user_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "User Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserPublic"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["users"], "summary": "Update User", "description": "Update user (superuser only).", "operationId": "users_update_user", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "user_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "User Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserUpdate"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserPublic"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["users"], "summary": "Delete User", "description": "Delete user (superuser only).", "operationId": "users_delete_user", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "user_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "User Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Message"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/labels": {"post": {"tags": ["labels"], "summary": "Create Label", "description": "Create a new label.", "operationId": "labels_create_label", "security": [{"OAuth2PasswordBearer": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelCreate"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelCreated"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["labels"], "summary": "Read Labels", "description": "List labels with optional filters and sorting.", "operationId": "labels_read_labels", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "review_status", "in": "query", "required": false, "schema": {"anyOf": [{"$ref": "#/components/schemas/ReviewStatus"}, {"type": "null"}], "description": "Filter by review status", "title": "Review Status"}, "description": "Filter by review status"}, {"name": "unlinked", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "Filter labels not linked to a product (product_id is null)", "title": "Unlinked"}, "description": "Filter labels not linked to a product (product_id is null)"}, {"name": "order_by", "in": "query", "required": false, "schema": {"type": "string", "description": "Field to sort by", "default": "created_at", "title": "Order By"}, "description": "Field to sort by"}, {"name": "order", "in": "query", "required": false, "schema": {"type": "string", "description": "Sort direction (asc or desc)", "default": "desc", "title": "Order"}, "description": "Sort direction (asc or desc)"}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "description": "Page size limit", "default": 50, "title": "Limit"}, "description": "Page size limit"}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "description": "Page offset", "default": 0, "title": "Offset"}, "description": "Page offset"}, {"name": "product_type", "in": "query", "required": false, "schema": {"type": "string", "description": "Product type", "default": "fertilizer", "title": "Product Type"}, "description": "Product type"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LimitOffsetPage_LabelListItem_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/labels/{label_id}": {"get": {"tags": ["labels"], "summary": "Read Label", "description": "Get label detail with images (without presigned URLs).", "operationId": "labels_read_label", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelDetail"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["labels"], "summary": "Update Label", "description": "Update Label (partial update, excludes review_status).", "operationId": "labels_update_label", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelUpdate"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelDetail"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["labels"], "summary": "Delete Label", "description": "Delete a label and its associated storage files.", "operationId": "labels_delete_label", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "responses": {"204": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/labels/{label_id}/review-status": {"patch": {"tags": ["labels"], "summary": "Update Label Review Status", "description": "Update Label review_status (allowed even when completed).", "operationId": "labels_update_label_review_status", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelReviewStatusUpdate"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelDetail"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/labels/{label_id}/evaluate-non-compliance/{requirement_id}": {"get": {"tags": ["labels"], "summary": "Evaluate Non Compliance", "description": "Evaluate non-compliance of the label against a single requirement.", "operationId": "labels_evaluate_non_compliance", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}, {"name": "requirement_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Requirement Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ComplianceResult"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/labels/{label_id}/non_compliance_data_items": {"post": {"tags": ["labels"], "summary": "Create Compliance", "description": "Create a new compliance result.", "operationId": "labels_create_compliance", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NonComplianceDataItemPayload"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NonComplianceDataItemPublic"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["labels"], "summary": "Reads Compliances", "description": "Read compliance results for a label with optional filters.", "operationId": "labels_reads_compliances", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "description": "Page size limit", "default": 50, "title": "Limit"}, "description": "Page size limit"}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "description": "Page offset", "default": 0, "title": "Offset"}, "description": "Page offset"}, {"name": "note", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note"}}, {"name": "description_en", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description En"}}, {"name": "description_fr", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description Fr"}}, {"name": "status", "in": "query", "required": false, "schema": {"anyOf": [{"$ref": "#/components/schemas/ComplianceStatus"}, {"type": "null"}], "title": "Status"}}, {"name": "start_created_at", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Start Created At"}}, {"name": "end_created_at", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "End Created At"}}, {"name": "start_updated_at", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Start Updated At"}}, {"name": "end_updated_at", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "End Updated At"}}, {"name": "order_by", "in": "query", "required": false, "schema": {"type": "string", "default": "created_at", "title": "Order By"}}, {"name": "order", "in": "query", "required": false, "schema": {"type": "string", "default": "desc", "title": "Order"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LimitOffsetPage_NonComplianceDataItemPublic_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/labels/{label_id}/non_compliance_data_items/{requirement_id}": {"get": {"tags": ["labels"], "summary": "Read Compliance By Rule", "description": "Read compliance result for a label and a specific rule.", "operationId": "labels_read_compliance_by_rule", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}, {"name": "requirement_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Requirement Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NonComplianceDataItemPublic"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["labels"], "summary": "Update Compliance", "description": "Update a non-compliance data item for a given label and rule.", "operationId": "labels_update_compliance", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}, {"name": "requirement_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Requirement Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateNonComplianceDataItemPayload"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NonComplianceDataItemPublic"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["labels"], "summary": "Delete Compliance", "description": "Delete a non-compliance data item for a given label and rule.", "operationId": "labels_delete_compliance", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}, {"name": "requirement_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Requirement Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Message"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/labels/{label_id}/images": {"post": {"tags": ["labels"], "summary": "Create Label Image", "description": "Create pending LabelImage record.", "operationId": "labels_create_label_image", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PresignedUrlRequest"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelImageDetail"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["labels"], "summary": "Read Label Images", "description": "Get label images (without presigned URLs).", "operationId": "labels_read_label_images", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/LabelImageDetail"}, "title": "Response Labels Read Label Images"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/labels/{label_id}/images/{image_id}": {"get": {"tags": ["labels"], "summary": "Read Label Image", "description": "Get single label image (without presigned URL).", "operationId": "labels_read_label_image", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "image_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Image Id"}}, {"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelImageDetail"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["labels"], "summary": "Delete Label Image", "description": "Delete a label image, its storage file, and renumber remaining images.", "operationId": "labels_delete_label_image", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "image_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Image Id"}}, {"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "responses": {"204": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/labels/{label_id}/images/complete": {"post": {"tags": ["labels"], "summary": "Complete Label Image Upload", "description": "Complete upload by updating LabelImage status from pending to completed.", "operationId": "labels_complete_label_image_upload", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UploadCompletionRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelImageDetail"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/labels/{label_id}/images/{image_id}/presigned-upload-url": {"get": {"tags": ["labels"], "summary": "Get Label Image Presigned Upload Url", "description": "Get presigned upload URL for a pending label image.", "operationId": "labels_get_label_image_presigned_upload_url", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "image_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Image Id"}}, {"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}, {"name": "content_type", "in": "query", "required": true, "schema": {"type": "string", "description": "Content type (image/png, image/jpeg, image/webp)", "title": "Content Type"}, "description": "Content type (image/png, image/jpeg, image/webp)"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PresignedUploadUrlResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/labels/{label_id}/images/{image_id}/presigned-download-url": {"get": {"tags": ["labels"], "summary": "Get Label Image Presigned Download Url", "description": "Get presigned download URL for a completed label image.", "operationId": "labels_get_label_image_presigned_download_url", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "image_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Image Id"}}, {"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PresignedDownloadUrlResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/labels/{label_id}/data": {"post": {"tags": ["labels"], "summary": "Create Label Data", "description": "Create LabelData for label.", "operationId": "labels_create_label_data", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelDataCreate"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelData"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["labels"], "summary": "Read Label Data", "description": "Get LabelData for label.", "operationId": "labels_read_label_data", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelData"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["labels"], "summary": "Update Label Data", "description": "Update LabelData (partial update).", "operationId": "labels_update_label_data", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelDataUpdate"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelData"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/labels/{label_id}/data/meta": {"get": {"tags": ["labels"], "summary": "Read Label Data Meta", "description": "Get LabelDataFieldMeta records for label.", "operationId": "labels_read_label_data_meta", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}, {"name": "field_name", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Filter by field name", "title": "Field Name"}, "description": "Filter by field name"}, {"name": "needs_review", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "Filter by needs_review flag", "title": "Needs Review"}, "description": "Filter by needs_review flag"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/LabelDataFieldMetaResponse"}, "title": "Response Labels Read Label Data Meta"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["labels"], "summary": "Update Label Data Meta", "description": "Update LabelDataFieldMeta (upsert).", "operationId": "labels_update_label_data_meta", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelDataFieldMetaUpdate"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelDataFieldMetaResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/labels/{label_id}/fertilizer-data": {"post": {"tags": ["labels"], "summary": "Create Fertilizer Label Data", "description": "Create FertilizerLabelData for label.", "operationId": "labels_create_fertilizer_label_data", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FertilizerLabelDataCreate"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FertilizerLabelData"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["labels"], "summary": "Read Fertilizer Label Data", "description": "Get FertilizerLabelData for label.", "operationId": "labels_read_fertilizer_label_data", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FertilizerLabelData"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["labels"], "summary": "Update Fertilizer Label Data", "description": "Update FertilizerLabelData (partial update).", "operationId": "labels_update_fertilizer_label_data", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FertilizerLabelDataUpdate"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FertilizerLabelData"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/labels/{label_id}/fertilizer-data/meta": {"get": {"tags": ["labels"], "summary": "Read Fertilizer Label Data Meta", "description": "Get FertilizerLabelDataMeta records for label.", "operationId": "labels_read_fertilizer_label_data_meta", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}, {"name": "field_name", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Filter by field name", "title": "Field Name"}, "description": "Filter by field name"}, {"name": "needs_review", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "Filter by needs_review flag", "title": "Needs Review"}, "description": "Filter by needs_review flag"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/FertilizerLabelDataMetaResponse"}, "title": "Response Labels Read Fertilizer Label Data Meta"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["labels"], "summary": "Update Fertilizer Label Data Meta", "description": "Update FertilizerLabelDataMeta (upsert).", "operationId": "labels_update_fertilizer_label_data_meta", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FertilizerLabelDataMetaUpdate"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FertilizerLabelDataMetaResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/labels/{label_id}/fertilizer-extract": {"post": {"tags": ["labels"], "summary": "Extract Fertilizer Fields", "description": "Extract specified fields (or all fields if none specified) for fertilizer labels.", "operationId": "labels_extract_fertilizer_fields", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "label_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Label Id"}}], "requestBody": {"content": {"application/json": {"schema": {"anyOf": [{"$ref": "#/components/schemas/ExtractFieldsRequest"}, {"type": "null"}], "title": "Request"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExtractFertilizerFieldsOutput"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/legislations": {"get": {"tags": ["legislations"], "summary": "Read Legislations", "description": "List legislations for the given product type.", "operationId": "legislations_read_legislations", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "product_type", "in": "query", "required": false, "schema": {"type": "string", "description": "Product type", "default": "fertilizer", "title": "Product Type"}, "description": "Product type"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/LegislationPublic"}, "title": "Response Legislations Read Legislations"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/products": {"get": {"tags": ["products"], "summary": "Read Products", "description": "List products with optional filters.", "operationId": "products_read_products", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "description": "Page size limit", "default": 50, "title": "Limit"}, "description": "Page size limit"}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "description": "Page offset", "default": 0, "title": "Offset"}, "description": "Page offset"}, {"name": "product_type", "in": "query", "required": false, "schema": {"type": "string", "description": "Product type", "default": "fertilizer", "title": "Product Type"}, "description": "Product type"}, {"name": "registration_number", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "Registration Number"}}, {"name": "brand_name_en", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "Brand Name En"}}, {"name": "brand_name_fr", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "Brand Name Fr"}}, {"name": "name_en", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "Name En"}}, {"name": "name_fr", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "Name Fr"}}, {"name": "start_created_at", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Start Created At"}}, {"name": "end_created_at", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "End Created At"}}, {"name": "start_updated_at", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Start Updated At"}}, {"name": "end_updated_at", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "End Updated At"}}, {"name": "order_by", "in": "query", "required": false, "schema": {"type": "string", "default": "created_at", "title": "Order By"}}, {"name": "order", "in": "query", "required": false, "schema": {"type": "string", "default": "desc", "title": "Order"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LimitOffsetPage_ProductPublic_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["products"], "summary": "Create Product", "description": "Create a new product.", "operationId": "products_create_product", "security": [{"OAuth2PasswordBearer": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProductCreate"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProductPublic"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/products/{product_id}": {"get": {"tags": ["products"], "summary": "Read Product By Id", "description": "Get product by ID.", "operationId": "products_read_product_by_id", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "product_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Product Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProductPublic"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["products"], "summary": "Delete Product", "description": "Delete a product", "operationId": "products_delete_product", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "product_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Product Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Message"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/requirements": {"get": {"tags": ["requirements"], "summary": "Read Requirements", "description": "List requirements with optional filters.", "operationId": "requirements_read_requirements", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "description": "Page size limit", "default": 50, "title": "Limit"}, "description": "Page size limit"}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "description": "Page offset", "default": 0, "title": "Offset"}, "description": "Page offset"}, {"name": "title_en", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "Title En"}}, {"name": "title_fr", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "Title Fr"}}, {"name": "start_created_at", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Start Created At"}}, {"name": "end_created_at", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "End Created At"}}, {"name": "start_updated_at", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Start Updated At"}}, {"name": "end_updated_at", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "End Updated At"}}, {"name": "order_by", "in": "query", "required": false, "schema": {"type": "string", "default": "created_at", "title": "Order By"}}, {"name": "order", "in": "query", "required": false, "schema": {"type": "string", "default": "desc", "title": "Order"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LimitOffsetPage_RequirementPublic_"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/requirements/{requirement_id}": {"get": {"tags": ["requirements"], "summary": "Read Requirement By Id", "description": "Get requirement by ID.", "operationId": "requirements_read_requirement_by_id", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "requirement_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Requirement Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RequirementPublic"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/private/users/": {"post": {"tags": ["private"], "summary": "Create User No Verification", "description": "Create user without email verification - for testing only.", "operationId": "private_create_user_no_verification", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PrivateUserCreate"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserPublic"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}}, "components": {"schemas": {"BilingualText": {"properties": {"en": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "En", "description": "The English text verbatim . Leave as null if not present. Reject another language's text in this field."}, "fr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fr", "description": "The French text verbatim. Leave as null if not present. Reject another language's text in this field."}}, "type": "object", "title": "BilingualText"}, "Body_login_login_access_token": {"properties": {"grant_type": {"anyOf": [{"type": "string", "pattern": "^password$"}, {"type": "null"}], "title": "Grant Type"}, "username": {"type": "string", "title": "Username"}, "password": {"type": "string", "format": "password", "title": "Password"}, "scope": {"type": "string", "title": "Scope", "default": ""}, "client_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Client Id"}, "client_secret": {"anyOf": [{"type": "string"}, {"type": "null"}], "format": "password", "title": "Client Secret"}}, "type": "object", "required": ["username", "password"], "title": "Body_login_login_access_token"}, "ComplianceResult": {"properties": {"status": {"$ref": "#/components/schemas/ComplianceStatus", "description": "Outcome of the check: compliant, non_compliant, not_applicable, or inconclusive (requires human review)."}, "explanation": {"$ref": "#/components/schemas/BilingualText", "description": "Think step by step internally but output only the final concise evaluation."}}, "type": "object", "required": ["status", "explanation"], "title": "ComplianceResult"}, "ComplianceStatus": {"type": "string", "enum": ["compliant", "non_compliant", "not_applicable", "inconclusive"], "title": "ComplianceStatus"}, "Contact": {"properties": {"type": {"type": "string", "title": "Type", "description": "Type of contact", "examples": ["manufacturer", "distributor", "importer"]}, "name": {"type": "string", "title": "Name", "description": "Company or organization name"}, "address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Address", "description": "Full mailing address"}, "phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone", "description": "Phone number in any format"}, "email": {"anyOf": [{"type": "string", "format": "email"}, {"type": "null"}], "title": "Email", "description": "Email address"}, "website": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Website", "description": "Website URL"}}, "type": "object", "required": ["type", "name"], "title": "Contact"}, "ExtractFertilizerFieldsOutput": {"properties": {"brand_name": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}], "description": "Brand name verbatim", "examples": [{"en": "GreenGrow"}]}, "product_name": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}], "description": "Product name verbatim", "examples": [{"en": "Premium All-Purpose Fertilizer"}]}, "contacts": {"anyOf": [{"items": {"$ref": "#/components/schemas/Contact"}, "type": "array"}, {"type": "null"}], "title": "Contacts", "description": "List of contact information (manufacturer, distributor, etc.), verbatim"}, "registration_number": {"anyOf": [{"type": "string", "pattern": "^([0-9]{7}[A-Za-z])?$"}, {"type": "null"}], "title": "Registration Number", "description": "Registration number of the product itself (main label), not ingredient registration numbers"}, "registration_claim": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}], "description": "Verbatim registration claim text"}, "lot_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lot Number", "description": "Lot or batch number", "examples": ["LOT-2024-001"]}, "net_weight": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Net Weight", "description": "Verbatim mass only, reject volume"}, "volume": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Volume", "description": "Verbatim volume only, reject mass"}, "exemption_claim": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}], "description": "Verbatim claim of registration exemption (e.g., Section 18 mixture claims).", "examples": [{"en": "All ingredients in this mixture are registered"}]}, "country_of_origin": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Country Of Origin", "description": "Country where the product was manufactured or from which it was imported.", "examples": ["Canada", "United States"]}, "product_classification": {"anyOf": [{"$ref": "#/components/schemas/ProductClassification"}, {"type": "null"}], "description": "Classify the product. 'fertilizer': contains N/P/K or plant food, sold as plant nutrient. 'supplement': improves soil or aids growth, but is not a fertilizer. 'growing_medium': a medium (e.g., potting mix) containing fertilizers/supplements. 'treated_seed': seeds treated with fertilizers/supplements."}, "customer_formula_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Customer Formula Statements", "description": "A 'customer formula fertilizer' is a fertilizer prepared to the specifications of the purchaser and sold only to that purchaser. Extract verbatim text identifying the product as such, including the purchaser's name or any signature references."}, "intended_use_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Intended Use Statements", "description": "Verbatim statements indicating intended use or target audience.", "examples": [[{"en": "For industrial use only"}, {"en": "Not for retail sale"}]]}, "processing_instruction_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Processing Instruction Statements", "description": "Verbatim statements indicating the product requires further treatment, other than simple mixing or repackaging.", "examples": [[{"en": "Requires further chemical processing"}, {"en": "For use as an ingredient in XYZ manufacture"}]]}, "experimental_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Experimental Statements", "description": "Verbatim statements indicating the product is for experimental, research, or trial purposes, including instructions to destroy the product or plants upon completion.", "examples": [[{"en": "For experimental purposes only"}, {"en": "Residual product and plants must be destroyed after trial"}]]}, "export_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Export Statements", "description": "Verbatim statements indicating that the product is not intended for sale or use in Canada and is intended for export only.", "examples": [[{"en": "For export only"}, {"en": "Not for sale or use in Canada"}]]}, "n": {"anyOf": [{"type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}, {"type": "null"}], "title": "N", "description": "Nitrogen percentage (NPK analysis)", "examples": ["10.0"]}, "p": {"anyOf": [{"type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}, {"type": "null"}], "title": "P", "description": "Phosphorus percentage (NPK analysis)", "examples": ["5.0"]}, "k": {"anyOf": [{"type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}, {"type": "null"}], "title": "K", "description": "Potassium percentage (NPK analysis)", "examples": ["5.0"]}, "ingredients": {"anyOf": [{"items": {"$ref": "#/components/schemas/Ingredient"}, "type": "array"}, {"type": "null"}], "title": "Ingredients", "description": "Verbatim; this is NOT the guaranteed analysis section"}, "guaranteed_analysis": {"anyOf": [{"$ref": "#/components/schemas/GuaranteedAnalysis-Output"}, {"type": "null"}], "description": "Verbatim; this is NOT the ingredient list"}, "precaution_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Precaution Statements", "description": "Precaution statements verbatim", "examples": [[{"en": "Keep out of reach of children"}]]}, "directions_for_use_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Directions For Use Statements", "description": "Directions for use verbatim", "examples": [[{"en": "Apply 2-3 cups per 100 square feet"}]]}}, "type": "object", "title": "ExtractFertilizerFieldsOutput"}, "ExtractFieldsRequest": {"properties": {"field_names": {"anyOf": [{"items": {"anyOf": [{"$ref": "#/components/schemas/LabelDataFieldName"}, {"$ref": "#/components/schemas/FertilizerLabelDataFieldName"}]}, "type": "array"}, {"type": "null"}], "title": "Field Names", "description": "List of field names to extract. If None or empty, extract all fields."}}, "type": "object", "title": "ExtractFieldsRequest"}, "FertilizerLabelData": {"properties": {"n": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "N"}, "p": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "P"}, "k": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "K"}, "ingredients": {"anyOf": [{"items": {"$ref": "#/components/schemas/Ingredient"}, "type": "array"}, {"type": "null"}], "title": "Ingredients"}, "guaranteed_analysis": {"anyOf": [{"$ref": "#/components/schemas/GuaranteedAnalysis-Output"}, {"type": "null"}]}, "precaution_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Precaution Statements"}, "directions_for_use_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Directions For Use Statements"}, "customer_formula_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Customer Formula Statements"}, "intended_use_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Intended Use Statements"}, "processing_instruction_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Processing Instruction Statements"}, "experimental_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Experimental Statements"}, "export_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Export Statements"}, "product_classification": {"anyOf": [{"$ref": "#/components/schemas/ProductClassification"}, {"type": "null"}]}}, "type": "object", "title": "FertilizerLabelData"}, "FertilizerLabelDataCreate": {"properties": {"n": {"anyOf": [{"type": "number", "minimum": 0.0}, {"type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}, {"type": "null"}], "title": "N"}, "p": {"anyOf": [{"type": "number", "minimum": 0.0}, {"type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}, {"type": "null"}], "title": "P"}, "k": {"anyOf": [{"type": "number", "minimum": 0.0}, {"type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}, {"type": "null"}], "title": "K"}, "ingredients": {"anyOf": [{"items": {"$ref": "#/components/schemas/Ingredient"}, "type": "array"}, {"type": "null"}], "title": "Ingredients"}, "guaranteed_analysis": {"anyOf": [{"$ref": "#/components/schemas/GuaranteedAnalysis-Input"}, {"type": "null"}]}, "precaution_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Precaution Statements"}, "directions_for_use_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Directions For Use Statements"}, "customer_formula_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Customer Formula Statements"}, "intended_use_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Intended Use Statements"}, "processing_instruction_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Processing Instruction Statements"}, "experimental_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Experimental Statements"}, "export_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Export Statements"}, "product_classification": {"anyOf": [{"$ref": "#/components/schemas/ProductClassification"}, {"type": "null"}]}}, "type": "object", "title": "FertilizerLabelDataCreate"}, "FertilizerLabelDataFieldName": {"type": "string", "enum": ["n", "p", "k", "ingredients", "guaranteed_analysis", "precaution_statements", "directions_for_use_statements", "customer_formula_statements", "intended_use_statements", "processing_instruction_statements", "experimental_statements", "export_statements", "product_classification"], "title": "FertilizerLabelDataFieldName", "description": "Valid field names for FertilizerLabelDataMeta."}, "FertilizerLabelDataMetaResponse": {"properties": {"field_name": {"type": "string", "title": "Field Name"}, "needs_review": {"type": "boolean", "title": "Needs Review"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note"}, "ai_generated": {"type": "boolean", "title": "Ai Generated"}}, "type": "object", "required": ["field_name", "needs_review", "note", "ai_generated"], "title": "FertilizerLabelDataMetaResponse"}, "FertilizerLabelDataMetaUpdate": {"properties": {"field_name": {"$ref": "#/components/schemas/FertilizerLabelDataFieldName"}, "needs_review": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Needs Review"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note"}, "ai_generated": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Ai Generated"}}, "type": "object", "required": ["field_name"], "title": "FertilizerLabelDataMetaUpdate"}, "FertilizerLabelDataUpdate": {"properties": {"n": {"anyOf": [{"type": "number", "minimum": 0.0}, {"type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}, {"type": "null"}], "title": "N"}, "p": {"anyOf": [{"type": "number", "minimum": 0.0}, {"type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}, {"type": "null"}], "title": "P"}, "k": {"anyOf": [{"type": "number", "minimum": 0.0}, {"type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}, {"type": "null"}], "title": "K"}, "ingredients": {"anyOf": [{"items": {"$ref": "#/components/schemas/Ingredient"}, "type": "array"}, {"type": "null"}], "title": "Ingredients"}, "guaranteed_analysis": {"anyOf": [{"$ref": "#/components/schemas/GuaranteedAnalysis-Input"}, {"type": "null"}]}, "precaution_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Precaution Statements"}, "directions_for_use_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Directions For Use Statements"}, "customer_formula_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Customer Formula Statements"}, "intended_use_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Intended Use Statements"}, "processing_instruction_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Processing Instruction Statements"}, "experimental_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Experimental Statements"}, "export_statements": {"anyOf": [{"items": {"$ref": "#/components/schemas/BilingualText"}, "type": "array"}, {"type": "null"}], "title": "Export Statements"}, "product_classification": {"anyOf": [{"$ref": "#/components/schemas/ProductClassification"}, {"type": "null"}]}}, "type": "object", "title": "FertilizerLabelDataUpdate"}, "GuaranteedAnalysis-Input": {"properties": {"title": {"$ref": "#/components/schemas/BilingualText", "description": "Verbatim title of the guaranteed analysis section", "examples": [{"en": "Minimum Guaranteed Analysis"}]}, "is_minimum": {"type": "boolean", "title": "Is Minimum", "description": "True when the title signals minimum guarantees; false otherwise"}, "nutrients": {"items": {"$ref": "#/components/schemas/Nutrient-Input"}, "type": "array", "title": "Nutrients", "description": "Nutrients listed verbatim in this guaranteed analysis block only"}}, "type": "object", "required": ["title", "is_minimum", "nutrients"], "title": "GuaranteedAnalysis"}, "GuaranteedAnalysis-Output": {"properties": {"title": {"$ref": "#/components/schemas/BilingualText", "description": "Verbatim title of the guaranteed analysis section", "examples": [{"en": "Minimum Guaranteed Analysis"}]}, "is_minimum": {"type": "boolean", "title": "Is Minimum", "description": "True when the title signals minimum guarantees; false otherwise"}, "nutrients": {"items": {"$ref": "#/components/schemas/Nutrient-Output"}, "type": "array", "title": "Nutrients", "description": "Nutrients listed verbatim in this guaranteed analysis block only"}}, "type": "object", "required": ["title", "is_minimum", "nutrients"], "title": "GuaranteedAnalysis"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "Health": {"properties": {"status": {"type": "string", "title": "Status"}}, "type": "object", "required": ["status"], "title": "Health"}, "Ingredient": {"properties": {"name": {"$ref": "#/components/schemas/BilingualText", "description": "Ingredient name verbatim"}, "value": {"type": "string", "title": "Value", "description": "Ingredient percentage or amount."}, "unit": {"type": "string", "title": "Unit", "description": "Unit of measurement", "examples": ["%", "ppm", "mg/kg", "g/kg", "mm"]}, "registration_number": {"anyOf": [{"type": "string", "pattern": "^([0-9]{7}[A-Za-z])?$"}, {"type": "null"}], "title": "Registration Number", "description": "Per-ingredient or per-ingredient-group when the label assigns one number. Not the main product registration number."}}, "type": "object", "required": ["name", "value", "unit"], "title": "Ingredient"}, "LabelCreate": {"properties": {"product_type": {"type": "string", "title": "Product Type"}, "product_id": {"anyOf": [{"type": "string", "format": "uuid"}, {"type": "null"}], "title": "Product Id"}}, "type": "object", "required": ["product_type"], "title": "LabelCreate"}, "LabelCreated": {"properties": {"id": {"type": "string", "format": "uuid", "title": "Id"}}, "type": "object", "required": ["id"], "title": "LabelCreated", "description": "Response schema for label creation."}, "LabelData": {"properties": {"brand_name": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}]}, "product_name": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}]}, "contacts": {"anyOf": [{"items": {"$ref": "#/components/schemas/Contact"}, "type": "array"}, {"type": "null"}], "title": "Contacts"}, "registration_number": {"anyOf": [{"type": "string", "pattern": "^([0-9]{7}[A-Za-z])?$"}, {"type": "null"}], "title": "Registration Number"}, "registration_claim": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}]}, "lot_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lot Number"}, "net_weight": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Net Weight"}, "volume": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Volume"}, "exemption_claim": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}]}, "country_of_origin": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Country Of Origin"}}, "type": "object", "title": "LabelData"}, "LabelDataCreate": {"properties": {"brand_name": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}]}, "product_name": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}]}, "contacts": {"anyOf": [{"items": {"$ref": "#/components/schemas/Contact"}, "type": "array"}, {"type": "null"}], "title": "Contacts"}, "registration_number": {"anyOf": [{"type": "string", "pattern": "^([0-9]{7}[A-Za-z])?$"}, {"type": "null"}], "title": "Registration Number"}, "registration_claim": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}]}, "lot_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lot Number"}, "net_weight": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Net Weight"}, "volume": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Volume"}, "exemption_claim": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}]}, "country_of_origin": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Country Of Origin"}}, "type": "object", "title": "LabelDataCreate"}, "LabelDataFieldMetaResponse": {"properties": {"field_name": {"type": "string", "title": "Field Name"}, "needs_review": {"type": "boolean", "title": "Needs Review"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note"}, "ai_generated": {"type": "boolean", "title": "Ai Generated"}}, "type": "object", "required": ["field_name", "needs_review", "note", "ai_generated"], "title": "LabelDataFieldMetaResponse"}, "LabelDataFieldMetaUpdate": {"properties": {"field_name": {"$ref": "#/components/schemas/LabelDataFieldName"}, "needs_review": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Needs Review"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note"}, "ai_generated": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Ai Generated"}}, "type": "object", "required": ["field_name"], "title": "LabelDataFieldMetaUpdate"}, "LabelDataFieldName": {"type": "string", "enum": ["brand_name", "product_name", "contacts", "registration_number", "registration_claim", "lot_number", "net_weight", "volume", "exemption_claim", "country_of_origin"], "title": "LabelDataFieldName", "description": "Valid field names for LabelDataFieldMeta."}, "LabelDataLite": {"properties": {"brand_name": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}]}, "product_name": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}]}, "registration_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Registration Number"}}, "type": "object", "title": "LabelDataLite"}, "LabelDataUpdate": {"properties": {"brand_name": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}]}, "product_name": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}]}, "contacts": {"anyOf": [{"items": {"$ref": "#/components/schemas/Contact"}, "type": "array"}, {"type": "null"}], "title": "Contacts"}, "registration_number": {"anyOf": [{"type": "string", "pattern": "^([0-9]{7}[A-Za-z])?$"}, {"type": "null"}], "title": "Registration Number"}, "registration_claim": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}]}, "lot_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lot Number"}, "net_weight": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Net Weight"}, "volume": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Volume"}, "exemption_claim": {"anyOf": [{"$ref": "#/components/schemas/BilingualText"}, {"type": "null"}]}, "country_of_origin": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Country Of Origin"}}, "type": "object", "title": "LabelDataUpdate"}, "LabelDetail": {"properties": {"id": {"type": "string", "format": "uuid", "title": "Id"}, "product_id": {"anyOf": [{"type": "string", "format": "uuid"}, {"type": "null"}], "title": "Product Id"}, "created_by_id": {"type": "string", "format": "uuid", "title": "Created By Id"}, "review_status": {"$ref": "#/components/schemas/ReviewStatus"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At"}, "product_type": {"$ref": "#/components/schemas/ProductTypePublic"}, "created_by": {"$ref": "#/components/schemas/UserPublic"}, "images": {"items": {"$ref": "#/components/schemas/LabelImageDetail"}, "type": "array", "title": "Images"}}, "type": "object", "required": ["id", "created_by_id", "review_status", "created_at", "updated_at", "product_type", "created_by"], "title": "LabelDetail"}, "LabelImageDetail": {"properties": {"id": {"type": "string", "format": "uuid", "title": "Id"}, "label_id": {"type": "string", "format": "uuid", "title": "Label Id"}, "display_filename": {"type": "string", "title": "Display Filename"}, "file_path": {"type": "string", "title": "File Path"}, "sequence_order": {"type": "integer", "title": "Sequence Order"}, "status": {"$ref": "#/components/schemas/UploadStatus"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At"}, "current_image_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Current Image Count"}}, "type": "object", "required": ["id", "label_id", "display_filename", "file_path", "sequence_order", "status", "created_at", "updated_at"], "title": "LabelImageDetail"}, "LabelListItem": {"properties": {"id": {"type": "string", "format": "uuid", "title": "Id"}, "review_status": {"$ref": "#/components/schemas/ReviewStatus"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At"}, "label_data": {"anyOf": [{"$ref": "#/components/schemas/LabelDataLite"}, {"type": "null"}]}}, "type": "object", "required": ["id", "review_status", "created_at", "updated_at"], "title": "LabelListItem", "description": "Schema for label list items."}, "LabelReviewStatusUpdate": {"properties": {"review_status": {"$ref": "#/components/schemas/ReviewStatus"}}, "type": "object", "required": ["review_status"], "title": "LabelReviewStatusUpdate"}, "LabelUpdate": {"properties": {"product_id": {"anyOf": [{"type": "string", "format": "uuid"}, {"type": "null"}], "title": "Product Id"}}, "type": "object", "title": "LabelUpdate"}, "LegislationPublic": {"properties": {"id": {"type": "string", "format": "uuid", "title": "Id"}, "citation_reference": {"type": "string", "title": "Citation Reference"}, "legislation_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Legislation Type"}, "product_type_id": {"type": "string", "format": "uuid", "title": "Product Type Id"}, "title_en": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title En"}, "title_fr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title Fr"}, "description_en": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description En"}, "description_fr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description Fr"}, "guidance_en": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Guidance En"}, "guidance_fr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Guidance Fr"}, "source_url_en": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Source Url En"}, "source_url_fr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Source Url Fr"}, "last_amended_date": {"anyOf": [{"type": "string", "format": "date"}, {"type": "null"}], "title": "Last Amended Date"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "updated_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Updated At"}, "general_exemptions": {"items": {"$ref": "#/components/schemas/ProvisionSnippet"}, "type": "array", "title": "General Exemptions", "default": []}}, "type": "object", "required": ["id", "citation_reference", "product_type_id"], "title": "LegislationPublic"}, "LimitOffsetPage_LabelListItem_": {"properties": {"items": {"items": {"$ref": "#/components/schemas/LabelListItem"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "minimum": 0.0, "title": "Total"}, "limit": {"type": "integer", "minimum": 1.0, "title": "Limit"}, "offset": {"type": "integer", "minimum": 0.0, "title": "Offset"}}, "type": "object", "required": ["items", "total", "limit", "offset"], "title": "LimitOffsetPage[LabelListItem]"}, "LimitOffsetPage_NonComplianceDataItemPublic_": {"properties": {"items": {"items": {"$ref": "#/components/schemas/NonComplianceDataItemPublic"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "minimum": 0.0, "title": "Total"}, "limit": {"type": "integer", "minimum": 1.0, "title": "Limit"}, "offset": {"type": "integer", "minimum": 0.0, "title": "Offset"}}, "type": "object", "required": ["items", "total", "limit", "offset"], "title": "LimitOffsetPage[NonComplianceDataItemPublic]"}, "LimitOffsetPage_ProductPublic_": {"properties": {"items": {"items": {"$ref": "#/components/schemas/ProductPublic"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "minimum": 0.0, "title": "Total"}, "limit": {"type": "integer", "minimum": 1.0, "title": "Limit"}, "offset": {"type": "integer", "minimum": 0.0, "title": "Offset"}}, "type": "object", "required": ["items", "total", "limit", "offset"], "title": "LimitOffsetPage[ProductPublic]"}, "LimitOffsetPage_RequirementPublic_": {"properties": {"items": {"items": {"$ref": "#/components/schemas/RequirementPublic"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "minimum": 0.0, "title": "Total"}, "limit": {"type": "integer", "minimum": 1.0, "title": "Limit"}, "offset": {"type": "integer", "minimum": 0.0, "title": "Offset"}}, "type": "object", "required": ["items", "total", "limit", "offset"], "title": "LimitOffsetPage[RequirementPublic]"}, "LimitOffsetPage_UserPublic_": {"properties": {"items": {"items": {"$ref": "#/components/schemas/UserPublic"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "minimum": 0.0, "title": "Total"}, "limit": {"type": "integer", "minimum": 1.0, "title": "Limit"}, "offset": {"type": "integer", "minimum": 0.0, "title": "Offset"}}, "type": "object", "required": ["items", "total", "limit", "offset"], "title": "LimitOffsetPage[UserPublic]"}, "Message": {"properties": {"message": {"type": "string", "title": "Message"}}, "type": "object", "required": ["message"], "title": "Message"}, "Modifier": {"properties": {"provision": {"$ref": "#/components/schemas/ProvisionSnippet"}, "type": {"$ref": "#/components/schemas/ModifierType"}}, "type": "object", "required": ["provision", "type"], "title": "Modifier"}, "ModifierType": {"type": "string", "enum": ["EXEMPTION", "APPLICABILITY_CONDITION"], "title": "ModifierType"}, "NewPassword": {"properties": {"token": {"type": "string", "title": "Token"}, "new_password": {"type": "string", "maxLength": 40, "minLength": 8, "format": "password", "title": "New Password", "writeOnly": true}}, "type": "object", "required": ["token", "new_password"], "title": "NewPassword"}, "NonComplianceDataItemPayload": {"properties": {"requirement_id": {"type": "string", "format": "uuid", "title": "Requirement Id"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note"}, "description_en": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description En"}, "description_fr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description Fr"}, "status": {"$ref": "#/components/schemas/ComplianceStatus", "default": "inconclusive"}}, "type": "object", "required": ["requirement_id"], "title": "NonComplianceDataItemPayload"}, "NonComplianceDataItemPublic": {"properties": {"label_id": {"type": "string", "format": "uuid", "title": "Label Id"}, "requirement_id": {"type": "string", "format": "uuid", "title": "Requirement Id"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note"}, "description_en": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description En"}, "description_fr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description Fr"}, "status": {"$ref": "#/components/schemas/ComplianceStatus", "default": "inconclusive"}, "id": {"type": "string", "format": "uuid", "title": "Id"}}, "type": "object", "required": ["label_id", "requirement_id", "id"], "title": "NonComplianceDataItemPublic"}, "Nutrient-Input": {"properties": {"name": {"$ref": "#/components/schemas/BilingualText", "description": "Verbatim", "examples": [{"en": "Total Nitrogen (N)"}]}, "value": {"anyOf": [{"type": "number", "minimum": 0.0}, {"type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}, {"type": "null"}], "title": "Value", "description": "Verbatim"}, "unit": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Unit", "description": "Verbatim"}}, "type": "object", "required": ["name"], "title": "Nutrient"}, "Nutrient-Output": {"properties": {"name": {"$ref": "#/components/schemas/BilingualText", "description": "Verbatim", "examples": [{"en": "Total Nitrogen (N)"}]}, "value": {"anyOf": [{"type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}, {"type": "null"}], "title": "Value", "description": "Verbatim"}, "unit": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Unit", "description": "Verbatim"}}, "type": "object", "required": ["name"], "title": "Nutrient"}, "PresignedDownloadUrlResponse": {"properties": {"presigned_url": {"type": "string", "title": "Presigned Url"}}, "type": "object", "required": ["presigned_url"], "title": "PresignedDownloadUrlResponse", "description": "Response schema for presigned download URL request."}, "PresignedUploadUrlResponse": {"properties": {"url": {"type": "string", "title": "Url"}, "expires_at": {"type": "string", "format": "date-time", "title": "Expires At"}}, "type": "object", "required": ["url", "expires_at"], "title": "PresignedUploadUrlResponse", "description": "Response schema for presigned upload URL request."}, "PresignedUrlRequest": {"properties": {"display_filename": {"type": "string", "title": "Display Filename"}, "content_type": {"type": "string", "enum": ["image/png", "image/jpeg", "image/webp"], "title": "Content Type"}, "sequence_order": {"type": "integer", "minimum": 1.0, "title": "Sequence Order"}}, "type": "object", "required": ["display_filename", "content_type", "sequence_order"], "title": "PresignedUrlRequest", "description": "Request schema for individual presigned URL generation."}, "PrivateUserCreate": {"properties": {"email": {"type": "string", "maxLength": 255, "format": "email", "title": "Email"}, "password": {"type": "string", "maxLength": 40, "minLength": 8, "title": "Password"}, "first_name": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "Last Name"}}, "type": "object", "required": ["email", "password"], "title": "PrivateUserCreate"}, "ProductClassification": {"type": "string", "enum": ["fertilizer", "supplement", "growing_medium", "treated_seed"], "title": "ProductClassification"}, "ProductCreate": {"properties": {"registration_number": {"anyOf": [{"type": "string", "pattern": "^([0-9]{7}[A-Za-z])?$"}, {"type": "null"}], "title": "Registration Number"}, "product_type": {"type": "string", "title": "Product Type"}, "brand_name_en": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Brand Name En"}, "brand_name_fr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Brand Name Fr"}, "name_en": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name En"}, "name_fr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Fr"}}, "type": "object", "required": ["product_type"], "title": "ProductCreate"}, "ProductPublic": {"properties": {"id": {"type": "string", "format": "uuid", "title": "Id"}, "brand_name_en": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Brand Name En"}, "brand_name_fr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Brand Name Fr"}, "name_en": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name En"}, "name_fr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Fr"}, "registration_number": {"anyOf": [{"type": "string", "pattern": "^([0-9]{7}[A-Za-z])?$"}, {"type": "null"}], "title": "Registration Number"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}}, "type": "object", "required": ["id", "created_at"], "title": "ProductPublic"}, "ProductTypePublic": {"properties": {"code": {"type": "string", "maxLength": 255, "title": "Code"}, "name_en": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "Name En"}, "name_fr": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "Name Fr"}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "id": {"type": "string", "format": "uuid", "title": "Id"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At"}}, "type": "object", "required": ["code", "id", "created_at", "updated_at"], "title": "ProductTypePublic"}, "ProvisionSnippet": {"properties": {"citation": {"type": "string", "title": "Citation"}, "text_en": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Text En"}, "text_fr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Text Fr"}}, "type": "object", "required": ["citation"], "title": "ProvisionSnippet"}, "Readiness": {"properties": {"status": {"type": "string", "title": "Status"}, "database": {"type": "string", "title": "Database"}}, "type": "object", "required": ["status", "database"], "title": "Readiness"}, "RequirementPublic": {"properties": {"id": {"type": "string", "format": "uuid", "title": "Id"}, "legislation_id": {"type": "string", "format": "uuid", "title": "Legislation Id"}, "title_en": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title En"}, "title_fr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title Fr"}, "description_en": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description En"}, "description_fr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description Fr"}, "guidance_en": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Guidance En"}, "guidance_fr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Guidance Fr"}, "provisions": {"items": {"$ref": "#/components/schemas/ProvisionSnippet"}, "type": "array", "title": "Provisions", "default": []}, "modifiers": {"items": {"$ref": "#/components/schemas/Modifier"}, "type": "array", "title": "Modifiers", "default": []}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "updated_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Updated At"}}, "type": "object", "required": ["id", "legislation_id"], "title": "RequirementPublic"}, "ReviewStatus": {"type": "string", "enum": ["not_started", "in_progress", "completed"], "title": "ReviewStatus"}, "Token": {"properties": {"access_token": {"type": "string", "title": "Access Token"}, "token_type": {"type": "string", "title": "Token Type", "default": "bearer"}}, "type": "object", "required": ["access_token"], "title": "Token"}, "UpdateNonComplianceDataItemPayload": {"properties": {"note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note"}, "description_en": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description En"}, "description_fr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description Fr"}, "status": {"anyOf": [{"$ref": "#/components/schemas/ComplianceStatus"}, {"type": "null"}]}}, "type": "object", "title": "UpdateNonComplianceDataItemPayload"}, "UpdatePassword": {"properties": {"current_password": {"type": "string", "maxLength": 40, "minLength": 8, "format": "password", "title": "Current Password", "writeOnly": true}, "new_password": {"type": "string", "maxLength": 40, "minLength": 8, "format": "password", "title": "New Password", "writeOnly": true}}, "type": "object", "required": ["current_password", "new_password"], "title": "UpdatePassword"}, "UploadCompletionRequest": {"properties": {"storage_file_path": {"type": "string", "title": "Storage File Path"}}, "type": "object", "required": ["storage_file_path"], "title": "UploadCompletionRequest", "description": "Request schema for upload completion notification."}, "UploadStatus": {"type": "string", "enum": ["pending", "completed"], "title": "UploadStatus"}, "UserCreate": {"properties": {"email": {"type": "string", "maxLength": 255, "format": "email", "title": "Email"}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "is_superuser": {"type": "boolean", "title": "Is Superuser", "default": false}, "first_name": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "Last Name"}, "password": {"type": "string", "maxLength": 40, "minLength": 8, "format": "password", "title": "Password", "writeOnly": true}}, "type": "object", "required": ["email", "password"], "title": "UserCreate"}, "UserPublic": {"properties": {"email": {"type": "string", "maxLength": 255, "format": "email", "title": "Email"}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "is_superuser": {"type": "boolean", "title": "Is Superuser", "default": false}, "first_name": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "Last Name"}, "id": {"type": "string", "format": "uuid", "title": "Id"}}, "type": "object", "required": ["email", "id"], "title": "UserPublic"}, "UserUpdate": {"properties": {"email": {"anyOf": [{"type": "string", "maxLength": 255, "format": "email"}, {"type": "null"}], "title": "Email"}, "password": {"anyOf": [{"type": "string", "maxLength": 40, "minLength": 8, "format": "password", "writeOnly": true}, {"type": "null"}], "title": "Password"}, "is_active": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Active"}, "is_superuser": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Superuser"}, "first_name": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "Last Name"}}, "type": "object", "title": "UserUpdate"}, "UserUpdateMe": {"properties": {"first_name": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string", "maxLength": 255}, {"type": "null"}], "title": "Last Name"}, "email": {"anyOf": [{"type": "string", "maxLength": 255, "format": "email"}, {"type": "null"}], "title": "Email"}}, "type": "object", "title": "UserUpdateMe"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}}, "securitySchemes": {"OAuth2PasswordBearer": {"type": "oauth2", "flows": {"password": {"scopes": {}, "tokenUrl": "/api/v1/login/access-token"}}}}}}