{"openapi":"3.1.0","info":{"title":"Dictagon API","description":"DoPC and DPP generation platform — ISO 23386/23387 compliant. Built on PDTs.pt for standards-compliant Digital Declarations of Performance and Conformity under EU Regulation 2024/3110 (CPR).","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["health"],"summary":"Health check","description":"Confirms the API is running and returns environment info.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/pdts/":{"get":{"tags":["pdts"],"summary":"List all PDTs","description":"Return all Product Data Templates available on PDTs.pt.","operationId":"list_pdts_pdts__get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pdts/{pdt_id}":{"get":{"tags":["pdts"],"summary":"Get PDT detail","description":"Return full detail for a single PDT.","operationId":"get_pdt_pdts__pdt_id__get","parameters":[{"name":"pdt_id","in":"path","required":true,"schema":{"type":"integer","title":"Pdt Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pdts/{pdt_id}/json":{"get":{"tags":["pdts"],"summary":"PDT — ISO 23387 JSON export","description":"Return the full ISO 23387 structured JSON for a PDT.","operationId":"get_pdt_json_pdts__pdt_id__json_get","parameters":[{"name":"pdt_id","in":"path","required":true,"schema":{"type":"integer","title":"Pdt Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pdts/{pdt_id}/properties":{"get":{"tags":["pdts"],"summary":"PDT — extracted properties","description":"Extract and return the list of properties for a PDT with ISO 23386 metadata.\n\nThis is the enriched property list used by the AI mapper.","operationId":"get_pdt_properties_pdts__pdt_id__properties_get","parameters":[{"name":"pdt_id","in":"path","required":true,"schema":{"type":"integer","title":"Pdt Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dictionary/":{"get":{"tags":["pdts"],"summary":"List all data dictionary properties","description":"Return all ISO 23386 property definitions from the PDTs.pt data dictionary.","operationId":"list_dictionary_dictionary__get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dictionary/{property_id}":{"get":{"tags":["pdts"],"summary":"Get single property definition","description":"Return the full ISO 23386 definition for a single property.","operationId":"get_property_dictionary__property_id__get","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/construction-objects/":{"get":{"tags":["pdts"],"summary":"List all construction objects","description":"Return all construction object classifications from PDTs.pt.","operationId":"list_construction_objects_construction_objects__get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dopc/jobs":{"post":{"tags":["dopc"],"summary":"Create a DoPC job","description":"Create a new DoPC generation job.\n\nThe job starts in `pending` status. Call `/map` next to run AI property mapping.","operationId":"create_job_dopc_jobs_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoPCJobCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoPCJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["dopc"],"summary":"List all jobs","description":"Return all DoPC jobs, most recent first.","operationId":"list_jobs_dopc_jobs_get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DoPCJobResponse"},"title":"Response List Jobs Dopc Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dopc/jobs/{job_id}":{"get":{"tags":["dopc"],"summary":"Get job detail","description":"Return the full detail for a single DoPC job.","operationId":"get_job_dopc_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoPCJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["dopc"],"summary":"Delete a job and its mappings (admin)","description":"Remove one job (e.g. a single item inside a batch) and every\nPropertyMapping row that belongs to it. The uploaded source PDF, if any,\nlives in the batch's uploads folder and is removed when the batch is\ndeleted (DELETE /batch/{id}).","operationId":"delete_job_dopc_jobs__job_id__delete","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dopc/jobs/{job_id}/map":{"post":{"tags":["dopc"],"summary":"Trigger AI property mapping","description":"Use Claude AI to map the job's raw `input_data` to PDT properties.\n\nFetches the PDT's property definitions from PDTs.pt, then calls the AI mapper.\nSaves individual `PropertyMapping` rows and updates `mapped_properties` on the job.\nStatus: `pending` → `processing` → `pending` (ready for confirm) | `failed`","operationId":"map_properties_dopc_jobs__job_id__map_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dopc/jobs/{job_id}/extract":{"post":{"tags":["dopc"],"summary":"Populate a job from a DoP PDF","description":"Run the in-house extraction engine (Tier 1 + Tier 2) on an uploaded DoP\nPDF and store the results on the job (input_source=\"pdf\").\n\nExtracted characteristics land in `input_data`, Tier-2 matches in\n`mapped_properties` and as PropertyMapping rows — so the existing\nconfirm → generate → validate flow continues unchanged.","operationId":"extract_into_job_dopc_jobs__job_id__extract_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_into_job_dopc_jobs__job_id__extract_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dopc/jobs/{job_id}/confirm":{"post":{"tags":["dopc"],"summary":"Confirm or override mapped properties","description":"Accept a list of confirmed/overridden property values.\n\nFor each `MappingConfirmation`, finds the matching `PropertyMapping` row\nby `property_guid` and marks it as confirmed with the supplied value.","operationId":"confirm_mappings_dopc_jobs__job_id__confirm_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MappingConfirmation"},"title":"Confirmations"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dopc/jobs/{job_id}/generate":{"post":{"tags":["dopc"],"summary":"Generate the DoPC document","description":"Generate the final ISO 23387-structured DoPC JSON for this job.\n\nUses all confirmed property mappings. Sets status to `completed` on success.","operationId":"generate_dopc_dopc_jobs__job_id__generate_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dopc/jobs/{job_id}/validate":{"post":{"tags":["dopc"],"summary":"Validate the generated DoPC","description":"Run conformance checks against the generated DoPC document.\n\nReturns a validation report with individual check results and an overall score.","operationId":"validate_dopc_dopc_jobs__job_id__validate_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dopc/jobs/{job_id}/download":{"get":{"tags":["dopc"],"summary":"Download DoPC as JSON file","description":"Stream the generated DoPC JSON as a downloadable file attachment.","operationId":"download_dopc_dopc_jobs__job_id__download_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extract/dop":{"post":{"tags":["extract"],"summary":"Extract a DoP PDF (Tier 1, deterministic)","description":"Run deterministic Tier-1 extraction and return the ExtractedDoP JSON.","operationId":"extract_dop_extract_dop_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_dop_extract_dop_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extract/dop/match":{"post":{"tags":["extract"],"summary":"Extract + match a DoP PDF (hybrid cascade)","description":"Tier 1 extraction, then the hybrid matching cascade\n(memory → exact → fuzzy → pgvector → optional LLM adjudication).\n\nCandidates come from the given PDT when pdt_id is supplied, otherwise from\nthe full PDTs.pt data dictionary. When a PDT is known, pgvector candidates\nbelonging to it get a +0.03 soft boost.\n\nAdmin-only (X-Admin-Token). The LLM tier is honored only when a\nGROQ_API_KEY is configured — otherwise it silently stays off.","operationId":"extract_and_match_dop_extract_dop_match_post","parameters":[{"name":"pdt_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pdt Id"}},{"name":"use_memory","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Use Memory"}},{"name":"llm","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Llm"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_and_match_dop_extract_dop_match_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/matching/memory":{"get":{"tags":["matching"],"summary":"List learned label→property mappings (admin)","operationId":"list_memory_matching_memory_get","parameters":[{"name":"hen_context","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hen Context"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/matching/memory/{memory_id}":{"delete":{"tags":["matching"],"summary":"Delete a bad learning (admin)","operationId":"delete_memory_matching_memory__memory_id__delete","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Memory Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads":{"post":{"tags":["leads"],"summary":"Capture a lead (public)","operationId":"create_lead_leads_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["leads"],"summary":"List leads (admin) — filterable, sortable","description":"The qualified pipeline: filter by any checker dimension; default order\nnewest first, `sort=score` puts the most-ready (or least, read bottom-up)\nprospects together.","operationId":"list_leads_leads_get","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level"}},{"name":"urgency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Urgency"}},{"name":"catalog_size","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Catalog Size"}},{"name":"min_score","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Score"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"created_at","title":"Sort"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["leads"],"summary":"Bulk-clear leads (admin) — e.g. test leads","description":"Delete every lead, or only those from one `source` (journey / contact /\nreadiness / try). Used by the /platform \"clear test leads\" action.","operationId":"clear_leads_leads_delete","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads/{lead_id}":{"delete":{"tags":["leads"],"summary":"Delete one lead (admin)","operationId":"delete_lead_leads__lead_id__delete","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads/gdpr/retention-preview":{"get":{"tags":["leads"],"summary":"What the next cleanup run would delete (admin)","description":"Preview before deletion. An operator should be able to see what a\nscheduled job will remove before it removes it.","operationId":"retention_preview_leads_gdpr_retention_preview_get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads/gdpr/retention-run":{"post":{"tags":["leads"],"summary":"Apply the retention policy now (admin)","operationId":"retention_run_leads_gdpr_retention_run_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads/gdpr/export":{"get":{"tags":["leads"],"summary":"GDPR Art. 15 — everything held about one email (admin)","operationId":"gdpr_export_leads_gdpr_export_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","minLength":3,"title":"Email"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads/gdpr/erase":{"delete":{"tags":["leads"],"summary":"GDPR Art. 17 — erase everything for one email (admin)","description":"Deletes rows. Not a flag: a 'deleted' marker would leave the personal\ndata in the table, which is not what erasure means.","operationId":"gdpr_erase_leads_gdpr_erase_delete","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","minLength":3,"title":"Email"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/batch/template.csv":{"get":{"tags":["batch"],"summary":"Downloadable CSV template for tabular batches","description":"A sample catalog CSV: header row + 2 example rows (ceramic tiles).\n\nColumn 1 is the product name/reference — pass its header as\n`product_name_column` on upload. Every other column is treated as a\ndeclared property value and matched against the data dictionary.","operationId":"batch_template_csv_batch_template_csv_get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/batch/{batch_id}/binding":{"put":{"tags":["batch"],"summary":"Set the template + profiles a batch runs with","operationId":"set_binding_batch__batch_id__binding_put","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindingIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/batch/upload":{"post":{"tags":["batch"],"summary":"Create a batch from a ZIP or table","description":"Create a batch. `template_id` says WHAT must be declared and\n`profile_ids` (comma-separated) say WHERE to find it — a batch may carry\nseveral profiles when the manufacturer has more than one document style.\n\nBoth may be omitted at upload time and set later via PUT /batch/{id}/binding,\nbut processing refuses to run without them: extraction is template-first,\nand guessing is exactly what this pipeline no longer does.","operationId":"upload_batch_batch_upload_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_batch_batch_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/batch/{batch_id}":{"delete":{"tags":["batch"],"summary":"Delete a batch and ALL its data (admin)","description":"Removes the batch row, every job in it, every PropertyMapping of those\njobs, and the uploads/batches/{id}/ folder. Irreversible — the UI shows a\nconfirm dialog before calling this.","operationId":"delete_batch_batch__batch_id__delete","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["batch"],"summary":"Batch status + per-item summary","operationId":"batch_status_batch__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/batch/{batch_id}/process":{"post":{"tags":["batch"],"summary":"Run the template + profile over the batch","description":"Phase C — mechanical. No matcher, no embeddings, no LLM.\n\n`ocr=true` additionally reads pages with no text layer. Off by default:\nit is slow, needs a system binary, and every value it produces comes back\nas an exception for a human to confirm rather than as an accepted value.","operationId":"process_batch_batch__batch_id__process_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"ocr","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Ocr"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/batch/{batch_id}/exceptions":{"get":{"tags":["batch"],"summary":"ONLY the documents with exceptions, grouped","operationId":"batch_exceptions_batch__batch_id__exceptions_get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/batch/{batch_id}/results/{result_id}":{"get":{"tags":["batch"],"summary":"One document's values WITH provenance","description":"Every value, and the exact cell it came from.\n\nProvenance (page / table / row / column / rule) is what makes the output\ndefensible to a client or an auditor: any number can be pointed back at\nthe cell that produced it.","operationId":"document_detail_batch__batch_id__results__result_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/batch/{batch_id}/exceptions/accept":{"post":{"tags":["batch"],"summary":"Accept extracted values as read","description":"Confirm the extracted reading without retyping it.\n\nThe commonest exception is a value that was read perfectly and then\nquestioned — a class the template did not list, an OCR reading, a unit\nwritten differently. Making the operator retype it invites transcription\nerrors into a legal declaration, so the value is accepted verbatim and\nrecorded as `human_confirmed`: a person looked at this and said yes.\n\nThat is deliberately distinct from `human_corrected`, which means a person\ntyped something different from what the document said.","operationId":"accept_values_batch__batch_id__exceptions_accept_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__batch__AcceptIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/batch/{batch_id}/exceptions/correct":{"post":{"tags":["batch"],"summary":"Correct extracted values by hand","description":"Inline correction. The value is recorded with rule_strategy\n'human_corrected' so provenance stays honest: it says a person typed this,\nit does not pretend a cell was read.","operationId":"correct_values_batch__batch_id__exceptions_correct_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExceptionFix"},"title":"Fixes"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/batch/{batch_id}/exceptions/amend-rule":{"post":{"tags":["batch"],"summary":"Fix the profile rule that caused an exception, then re-run","description":"When a bad anchor caused the exception, correcting VALUES is treating\nthe symptom. Amend the rule instead — and re-run the affected documents,\nso one fix resolves every document that hit it.","operationId":"amend_rule_batch__batch_id__exceptions_amend_rule_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleAmendment"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/batch/{batch_id}/generate":{"post":{"tags":["batch"],"summary":"Generate DoPCs from extracted values","description":"One DoPC per product: every document with values produces one.\n\nROOT CAUSE OF THE MISSING DoPC (Sprint 20, 5b). Generation kept only\nproperties whose template binding was dictionary-\"mapped\", and skipped the\ndocument silently when none were. A template whose essential\ncharacteristics are all still pending a dictionary entry (the adhesives\ntemplate in the reported batch: 3 characteristics, all pending) therefore\nproduced no DoPC at all, however completely the document was mapped. The\nSprint 18 fix moved generation onto the document result but kept that\nfilter, and its test used the cement template, where most properties are\nmapped, so it never exercised the failing case.\n\nNow every declared value enters the DoPC; a property without a dictionary\nentry carries dictionary_status \"pending\". A document with nothing to\ndeclare is reported in `skipped`, never skipped silently. Documents that\nshare a folder (a DoP and its EPD) are merged into one DoPC with both\nlayers.","operationId":"generate_batch_batch__batch_id__generate_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/batch/{batch_id}/export":{"get":{"tags":["batch"],"summary":"Delivery ZIP (DoPCs + reports)","operationId":"export_batch_batch__batch_id__export_get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates":{"get":{"tags":["templates"],"summary":"List declaration templates","operationId":"list_templates_templates_get","parameters":[{"name":"product_family","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Family"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["templates"],"summary":"Create a declaration template","operationId":"create_template_templates_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates/libraries":{"get":{"tags":["templates"],"summary":"Ready-made property sets","description":"What can be added in one click, and any caveat attached to it.","operationId":"list_libraries_templates_libraries_get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates/{template_id}":{"get":{"tags":["templates"],"summary":"One template with its properties","operationId":"get_template_templates__template_id__get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["templates"],"summary":"Update a template (bumps its version)","operationId":"update_template_templates__template_id__put","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["templates"],"summary":"Delete a template and its properties","operationId":"delete_template_templates__template_id__delete","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates/{template_id}/duplicate":{"post":{"tags":["templates"],"summary":"Duplicate a template as a new version","description":"Copy template + properties. The copy is a draft at version+1; the\noriginal is left untouched so past extractions stay reproducible.\n\nMarking the original `superseded` is a separate, deliberate act — this\nendpoint never changes the source, because a draft that is still being\nedited must not orphan the version in production.","operationId":"duplicate_template_templates__template_id__duplicate_post","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates/{template_id}/properties":{"post":{"tags":["templates"],"summary":"Add a property to a template","operationId":"add_property_templates__template_id__properties_post","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates/{template_id}/properties/{property_id}":{"put":{"tags":["templates"],"summary":"Update a template property","operationId":"update_property_templates__template_id__properties__property_id__put","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"property_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Property Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["templates"],"summary":"Delete a template property","operationId":"delete_property_templates__template_id__properties__property_id__delete","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"property_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Property Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates/{template_id}/reorder":{"post":{"tags":["templates"],"summary":"Reorder template properties","operationId":"reorder_properties_templates__template_id__reorder_post","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates/dictionary/search":{"get":{"tags":["templates"],"summary":"Suggest dictionary properties (human picks)","description":"Rank Active dictionary entries against a characteristic name.\n\nSUGGESTIONS ONLY. The score is shown so a human can judge it; nothing is\nbound without a click, and what gets stored is the entry's verbatim GUID\nand referenceURI. This is the one place semantic help belongs — building\nthe template, with a person in the loop.","operationId":"dictionary_search_templates_dictionary_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates/{template_id}/gap-report":{"get":{"tags":["templates"],"summary":"Markdown gap report — the spec for creating the PDT","operationId":"gap_report_templates__template_id__gap_report_get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates/import":{"post":{"tags":["templates"],"summary":"Create a template from exported JSON","operationId":"import_template_templates_import_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateImport"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates/{template_id}/properties/library":{"post":{"tags":["templates"],"summary":"Add a ready-made set of properties","description":"Append a whole library to a template, skipping duplicates by name.","operationId":"add_library_templates__template_id__properties_library_post","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"key","in":"query","required":true,"schema":{"type":"string","title":"Key"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates/{template_id}/properties/from-pdt":{"post":{"tags":["templates"],"summary":"Import selected properties from a PDTs.pt PDT","description":"Create template properties from dictionary entries, bound verbatim.\n\nThe GUID and referenceURI come straight from the PDT export and are never\nreconstructed — an identifier we assembled ourselves would look exactly\nlike a real one while pointing at nothing.","operationId":"import_from_pdt_templates__template_id__properties_from_pdt_post","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdtImportIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates/seed/cement":{"post":{"tags":["templates"],"summary":"Seed the EN 197-1 cement template","description":"Idempotent: returns the existing template if it is already seeded.","operationId":"seed_cement_templates_seed_cement_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates/seed/windows":{"post":{"tags":["templates"],"summary":"Seed the EN 14351-1 windows template","description":"Idempotent: returns the existing template if it is already seeded.","operationId":"seed_windows_templates_seed_windows_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles/analyze":{"post":{"tags":["profiles"],"summary":"Sample PDF + template → structure + proposals","description":"Read one sample document and propose a rule per template property.\n\nReturns the document's raw table structure (so the UI can render clickable\ngrids) alongside the proposals. NOTHING is saved: the human confirms in\nthe builder and POSTs /profiles when satisfied.","operationId":"analyze_profiles_analyze_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_analyze_profiles_analyze_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles/analyze/bind-cell":{"post":{"tags":["profiles"],"summary":"Turn a clicked cell into a LABEL-anchored rule","description":"The human clicked a cell; produce the rule that finds it again.\n\nThe result anchors on the row's LABEL, never on the coordinates that were\nclicked — that is the whole point of the design.","operationId":"bind_cell_profiles_analyze_bind_cell_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_bind_cell_profiles_analyze_bind_cell_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles/analyze/derive-line-rule":{"post":{"tags":["profiles"],"summary":"A selection -> a rule verified against its own sample","operationId":"derive_line_rule_profiles_analyze_derive_line_rule_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeriveLineRuleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles/dry-run":{"post":{"tags":["profiles"],"summary":"Run unsaved rules against another document","description":"Does this profile still work on a document it was not built from?\n\nThe question the builder exists to answer BEFORE a hundred documents are\nrun. Persists nothing: rules are posted as they currently stand in the\neditor, unsaved.","operationId":"dry_run_profiles_dry_run_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_dry_run_profiles_dry_run_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles":{"get":{"tags":["profiles"],"summary":"List extraction profiles","operationId":"list_profiles_profiles_get","parameters":[{"name":"template_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["profiles"],"summary":"Save a confirmed profile","operationId":"create_profile_profiles_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles/{profile_id}":{"get":{"tags":["profiles"],"summary":"One profile with its rules","operationId":"get_profile_profiles__profile_id__get","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["profiles"],"summary":"Replace a profile's rules","operationId":"update_profile_profiles__profile_id__put","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["profiles"],"summary":"Delete a profile and its rules","description":"Refuses while a batch still points at this profile, unless forced.\n\nA batch whose only profile has vanished cannot be processed and cannot\nexplain why, so the refusal is more useful than the deletion.","operationId":"delete_profile_profiles__profile_id__delete","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles/{profile_id}/usage":{"get":{"tags":["profiles"],"summary":"What references this profile","description":"Asked before a destructive action, so the warning names real batches.","operationId":"profile_usage_profiles__profile_id__usage_get","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles/{profile_id}/duplicate":{"post":{"tags":["profiles"],"summary":"Copy a profile, rules and all","description":"For a manufacturer whose layout is a near-variant of another.\n\nThe source is left untouched: the copy is a starting point to edit, not a\nreference to it.","operationId":"duplicate_profile_profiles__profile_id__duplicate_post","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles/{profile_id}/test":{"post":{"tags":["profiles"],"summary":"Dry-run a profile over one PDF","description":"Run the saved rules over a document and show what comes out — values,\nprovenance, exceptions, completeness, anomalies. Persists nothing.","operationId":"test_profile_profiles__profile_id__test_post","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_test_profile_profiles__profile_id__test_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mapping/sessions":{"post":{"tags":["mapping"],"summary":"Start a mapping session from uploaded PDFs","description":"Create a session, or add documents to an existing batch.\n\nA session IS a batch. That is deliberate: a manually mapped document then\nflows through exceptions, DoPC generation and export exactly like one a\nprofile read, with no parallel pipeline to keep in step.","operationId":"create_session_mapping_sessions_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_session_mapping_sessions_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mapping/{batch_id}":{"get":{"tags":["mapping"],"summary":"The session: properties and documents","operationId":"session_state_mapping__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mapping/{batch_id}/documents/{job_id}":{"get":{"tags":["mapping"],"summary":"One document, rendered, with its words and mappings","description":"The document to map. `ocr=true` reads scanned pages with OCR (Sprint\n20): pages without a text layer then carry words, flagged ocr_derived,\nthat are selectable exactly like native text.","operationId":"document_view_mapping__batch_id__documents__job_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"ocr","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Ocr"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mapping/{batch_id}/documents/{job_id}/save":{"post":{"tags":["mapping"],"summary":"Save the values a person pointed at","operationId":"save_mappings_mapping__batch_id__documents__job_id__save_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mapping/{batch_id}/apply":{"post":{"tags":["mapping"],"summary":"Apply one document's positions to the others","description":"Build the confirmation grid. Nothing is saved until it is accepted.","operationId":"apply_positions_mapping__batch_id__apply_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mapping/{batch_id}/accept":{"post":{"tags":["mapping"],"summary":"Accept grid cells in bulk","operationId":"accept_grid_mapping__batch_id__accept_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__mapping__AcceptIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mapping/{batch_id}/promote":{"post":{"tags":["mapping"],"summary":"Turn a confirmed mapping into an extraction profile","operationId":"promote_to_profile_mapping__batch_id__promote_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoteIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cpr/timeline":{"get":{"tags":["timeline"],"summary":"Public CPR compliance timeline","operationId":"get_timeline_cpr_timeline_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["timeline"],"summary":"Add a specific-product row (admin)","operationId":"create_family_cpr_timeline_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FamilyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cpr/timeline/all":{"get":{"tags":["timeline"],"summary":"All timeline rows incl. hidden (admin)","operationId":"get_timeline_admin_cpr_timeline_all_get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cpr/timeline/{family_id}":{"put":{"tags":["timeline"],"summary":"Edit a timeline row (admin)","operationId":"update_family_cpr_timeline__family_id__put","parameters":[{"name":"family_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Family Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FamilyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["timeline"],"summary":"Delete a timeline row (admin)","description":"Removes one row (family or specific product). The UI confirms first —\nprefer is_visible=false when the row may come back.","operationId":"delete_family_cpr_timeline__family_id__delete","parameters":[{"name":"family_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Family Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/espr/timeline":{"get":{"tags":["espr"],"summary":"Public ESPR/DPP category tracker","operationId":"get_espr_timeline_espr_timeline_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["espr"],"summary":"Add an ESPR category (admin)","operationId":"create_category_espr_timeline_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/espr/timeline/all":{"get":{"tags":["espr"],"summary":"All ESPR rows incl. hidden (admin)","operationId":"get_espr_timeline_admin_espr_timeline_all_get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/espr/timeline/{category_id}":{"put":{"tags":["espr"],"summary":"Edit an ESPR row (admin)","operationId":"update_category_espr_timeline__category_id__put","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Category Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["espr"],"summary":"Delete an ESPR row (admin)","operationId":"delete_category_espr_timeline__category_id__delete","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Category Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/watch/subscribe":{"post":{"tags":["watch"],"summary":"Subscribe to family updates (public)","operationId":"subscribe_watch_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/watch/confirm":{"get":{"tags":["watch"],"summary":"Confirm a subscription (public, one click)","operationId":"confirm_subscription_watch_confirm_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/watch/unsubscribe":{"get":{"tags":["watch"],"summary":"Unsubscribe (public, one click, no login)","operationId":"unsubscribe_watch_unsubscribe_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/watch/subscriptions":{"get":{"tags":["watch"],"summary":"List subscriptions (admin)","operationId":"list_subscriptions_watch_subscriptions_get","parameters":[{"name":"family_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family Type"}},{"name":"family_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/watch/subscriptions/{subscription_id}":{"delete":{"tags":["watch"],"summary":"Delete a subscription (admin)","operationId":"delete_subscription_watch_subscriptions__subscription_id__delete","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"title":"Subscription Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/watch/outbox":{"get":{"tags":["watch"],"summary":"Notification outbox — queued/sent/failed (admin)","operationId":"get_outbox_watch_outbox_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports":{"get":{"tags":["passports"],"summary":"Passports, one row per lineage","operationId":"list_passports_passports_get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["passports"],"summary":"Create a draft passport","operationId":"create_passport_passports_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassportIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/organisations":{"get":{"tags":["passports"],"summary":"List Organisations","operationId":"list_organisations_passports_organisations_get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["passports"],"summary":"Create Organisation","operationId":"create_organisation_passports_organisations_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/organisations/{organisation_id}":{"put":{"tags":["passports"],"summary":"Update Organisation","operationId":"update_organisation_passports_organisations__organisation_id__put","parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organisation Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/organisations/{organisation_id}/client-tokens":{"get":{"tags":["passports"],"summary":"List Client Tokens","operationId":"list_client_tokens_passports_organisations__organisation_id__client_tokens_get","parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organisation Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["passports"],"summary":"Create Client Token","operationId":"create_client_token_passports_organisations__organisation_id__client_tokens_post","parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organisation Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/client-tokens/{token_id}":{"delete":{"tags":["passports"],"summary":"Revoke Client Token","operationId":"revoke_client_token_passports_client_tokens__token_id__delete","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Token Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/facilities":{"get":{"tags":["passports"],"summary":"List Facilities","operationId":"list_facilities_passports_facilities_get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["passports"],"summary":"Create Facility","operationId":"create_facility_passports_facilities_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/products":{"get":{"tags":["passports"],"summary":"List Products","operationId":"list_products_passports_products_get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["passports"],"summary":"Create Product","operationId":"create_product_passports_products_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/products/{product_id}":{"put":{"tags":["passports"],"summary":"Update Product","operationId":"update_product_passports_products__product_id__put","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/products/{product_id}/image":{"post":{"tags":["passports"],"summary":"Upload Product Image","description":"A product photograph: jpg, png or webp, at most 5 MB.\n\nStored as a display-size WebP (longest side 1200 px), served from\n/public/products/<id>/image.","operationId":"upload_product_image_passports_products__product_id__image_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_product_image_passports_products__product_id__image_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/declaration-sources":{"get":{"tags":["passports"],"summary":"Document results a declaration can be built from","operationId":"declaration_sources_passports_declaration_sources_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/dictionary/search":{"get":{"tags":["passports"],"summary":"Search the data dictionary","operationId":"dictionary_search_passports_dictionary_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/catalogue/en15804":{"get":{"tags":["passports"],"summary":"The EN 15804+A2 indicator set","operationId":"en15804_catalogue_passports_catalogue_en15804_get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/deletions":{"get":{"tags":["passports"],"summary":"The deletion log","operationId":"deletion_log_passports_deletions_get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/demonstrations":{"delete":{"tags":["passports"],"summary":"Delete every demonstration passport","operationId":"delete_demonstrations_passports_demonstrations_delete","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/seed/cement":{"post":{"tags":["passports"],"summary":"Seed the first real passports (cement)","operationId":"seed_cement_passports_seed_cement_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/{passport_id}":{"get":{"tags":["passports"],"summary":"Get Passport","operationId":"get_passport_passports__passport_id__get","parameters":[{"name":"passport_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Passport Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["passports"],"summary":"Delete a passport and every version","operationId":"delete_passport_passports__passport_id__delete","parameters":[{"name":"passport_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Passport Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["passports"],"summary":"Update Passport","operationId":"update_passport_passports__passport_id__put","parameters":[{"name":"passport_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Passport Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassportUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/{passport_id}/declaration":{"put":{"tags":["passports"],"summary":"Set Declaration","operationId":"set_declaration_passports__passport_id__declaration_put","parameters":[{"name":"passport_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Passport Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeclarationIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/{passport_id}/declaration/from-result":{"post":{"tags":["passports"],"summary":"Declaration From Result","operationId":"declaration_from_result_passports__passport_id__declaration_from_result_post","parameters":[{"name":"passport_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Passport Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FromResultIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/{passport_id}/environmental":{"put":{"tags":["passports"],"summary":"Set Environmental","operationId":"set_environmental_passports__passport_id__environmental_put","parameters":[{"name":"passport_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Passport Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentalIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/{passport_id}/documents":{"post":{"tags":["passports"],"summary":"Add Document","operationId":"add_document_passports__passport_id__documents_post","parameters":[{"name":"passport_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Passport Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_document_passports__passport_id__documents_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/{passport_id}/documents/{document_id}":{"delete":{"tags":["passports"],"summary":"Remove Document","operationId":"remove_document_passports__passport_id__documents__document_id__delete","parameters":[{"name":"passport_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Passport Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/{passport_id}/publish":{"post":{"tags":["passports"],"summary":"Publish Passport","operationId":"publish_passport_passports__passport_id__publish_post","parameters":[{"name":"passport_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Passport Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/{passport_id}/new-version":{"post":{"tags":["passports"],"summary":"Create New Version","operationId":"create_new_version_passports__passport_id__new_version_post","parameters":[{"name":"passport_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Passport Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/passports/{passport_id}/export":{"get":{"tags":["passports"],"summary":"Admin Export","operationId":"admin_export_passports__passport_id__export_get","parameters":[{"name":"passport_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Passport Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"json","title":"Format"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/passports":{"get":{"tags":["passport API (EN 18222)"],"summary":"Search passport identifiers by product","description":"Identifiers, not passports: a search answers with what to fetch next.","operationId":"search_passports_api_v1_passports_get","parameters":[{"name":"identifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A UPI, or a resolver path such as p/86M4CVN7P2 or 01/<GTIN>","title":"Identifier"},"description":"A UPI, or a resolver path such as p/86M4CVN7P2 or 01/<GTIN>"},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product's type code or GTIN","title":"Product Id"},"description":"The product's type code or GTIN"},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Part of the product or manufacturer name","title":"Label"},"description":"Part of the product or manufacturer name"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/passports/{identifier}":{"get":{"tags":["passport API (EN 18222)"],"summary":"One passport, in the EN 18223 structure","operationId":"get_passport_api_v1_passports__identifier__get","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"A superseded version, by number","title":"Version"},"description":"A superseded version, by number"},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}},{"name":"x-passport-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Passport-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/passports/{identifier}/collections":{"get":{"tags":["passport API (EN 18222)"],"summary":"The data element collections this passport carries","operationId":"list_collections_api_v1_passports__identifier__collections_get","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}},{"name":"x-passport-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Passport-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/passports/{identifier}/collections/{collection}":{"get":{"tags":["passport API (EN 18222)"],"summary":"One data element collection","operationId":"get_collection_api_v1_passports__identifier__collections__collection__get","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"collection","in":"path","required":true,"schema":{"type":"string","title":"Collection"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}},{"name":"x-passport-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Passport-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/passports/{identifier}/documents/{document_id}":{"get":{"tags":["passport API (EN 18222)"],"summary":"One document attached to a passport","operationId":"get_document_api_v1_passports__identifier__documents__document_id__get","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}},{"name":"x-passport-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Passport-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/passports/{identifier}/authenticity":{"get":{"tags":["passport API (EN 18222)"],"summary":"Content hash and signature (EN 18246)","operationId":"get_authenticity_api_v1_passports__identifier__authenticity_get","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/passports/resolve":{"get":{"tags":["passports-public"],"summary":"A UPI path to its passport, in the requester's tier","operationId":"resolve_passport_public_passports_resolve_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","title":"Path"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/passports/export":{"get":{"tags":["passports-public"],"summary":"Public Export","operationId":"public_export_public_passports_export_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","title":"Path"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"json","title":"Format"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/passports/qr.svg":{"get":{"tags":["passports-public"],"summary":"Qr Svg","operationId":"qr_svg_public_passports_qr_svg_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/passports/qr.png":{"get":{"tags":["passports-public"],"summary":"Qr Png","operationId":"qr_png_public_passports_qr_png_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/passports/documents/{document_id}":{"get":{"tags":["passports-public"],"summary":"Download Document","operationId":"download_document_public_passports_documents__document_id__get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/products/{product_id}/image":{"get":{"tags":["passports-public"],"summary":"Product Image","operationId":"product_image_public_products__product_id__image_get","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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/dictionary":{"get":{"tags":["passports-public"],"summary":"A data dictionary definition","operationId":"dictionary_definition_public_dictionary_get","parameters":[{"name":"uri","in":"query","required":true,"schema":{"type":"string","title":"Uri"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/client/{token}":{"get":{"tags":["passports-public"],"summary":"A manufacturer's passports","operationId":"client_view_public_client__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/client/{token}/archive":{"get":{"tags":["passports-public"],"summary":"Every passport export, one zip","operationId":"client_archive_public_client__token__archive_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"tags":["root"],"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AcceptCell":{"properties":{"status":{"type":"string","title":"Status"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"provenance":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Provenance"}},"type":"object","required":["status"],"title":"AcceptCell"},"AcceptRow":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"},"cells":{"additionalProperties":{"$ref":"#/components/schemas/AcceptCell"},"type":"object","title":"Cells"}},"type":"object","required":["job_id"],"title":"AcceptRow"},"ApplyIn":{"properties":{"source_job_id":{"type":"string","format":"uuid","title":"Source Job Id"},"target_job_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Target Job Ids"}},"type":"object","required":["source_job_id"],"title":"ApplyIn"},"BindingIn":{"properties":{"template_id":{"type":"string","format":"uuid","title":"Template Id"},"profile_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Profile Ids","default":[]}},"type":"object","required":["template_id"],"title":"BindingIn"},"Body_add_document_passports__passport_id__documents_post":{"properties":{"title":{"type":"string","title":"Title"},"document_type":{"type":"string","title":"Document Type"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"issue_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issue Date"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"access_tier":{"type":"string","title":"Access Tier","default":"public"},"file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"File"}},"type":"object","required":["title","document_type"],"title":"Body_add_document_passports__passport_id__documents_post"},"Body_analyze_profiles_analyze_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"template_id":{"type":"string","format":"uuid","title":"Template Id"},"ocr":{"type":"boolean","title":"Ocr","default":false}},"type":"object","required":["file","template_id"],"title":"Body_analyze_profiles_analyze_post"},"Body_bind_cell_profiles_analyze_bind_cell_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"template_property_id":{"type":"string","format":"uuid","title":"Template Property Id"},"page":{"type":"integer","title":"Page"},"table_index":{"type":"integer","title":"Table Index"},"row_index":{"type":"integer","title":"Row Index"},"column_index":{"type":"integer","title":"Column Index"}},"type":"object","required":["file","template_property_id","page","table_index","row_index","column_index"],"title":"Body_bind_cell_profiles_analyze_bind_cell_post"},"Body_create_session_mapping_sessions_post":{"properties":{"template_id":{"type":"string","format":"uuid","title":"Template Id"},"name":{"type":"string","title":"Name","default":"Manual mapping"},"batch_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Batch Id"},"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"}},"type":"object","required":["template_id"],"title":"Body_create_session_mapping_sessions_post"},"Body_dry_run_profiles_dry_run_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"template_id":{"type":"string","format":"uuid","title":"Template Id"},"rules":{"type":"string","title":"Rules","default":"[]"},"ocr":{"type":"boolean","title":"Ocr","default":false},"document_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Language"}},"type":"object","required":["file","template_id"],"title":"Body_dry_run_profiles_dry_run_post"},"Body_extract_and_match_dop_extract_dop_match_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_extract_and_match_dop_extract_dop_match_post"},"Body_extract_dop_extract_dop_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_extract_dop_extract_dop_post"},"Body_extract_into_job_dopc_jobs__job_id__extract_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_extract_into_job_dopc_jobs__job_id__extract_post"},"Body_test_profile_profiles__profile_id__test_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_test_profile_profiles__profile_id__test_post"},"Body_upload_batch_batch_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"name":{"type":"string","title":"Name","default":"Batch"},"pdt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pdt Id"},"product_name_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name Column"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"profile_ids":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Ids"}},"type":"object","required":["file"],"title":"Body_upload_batch_batch_upload_post"},"Body_upload_product_image_passports_products__product_id__image_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_product_image_passports_products__product_id__image_post"},"CategoryCreate":{"properties":{"category_name":{"type":"string","title":"Category Name"},"regulation":{"type":"string","title":"Regulation","default":"ESPR"},"delegated_act_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delegated Act Status"},"compliance_estimate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compliance Estimate"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_visible":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Visible"}},"type":"object","required":["category_name"],"title":"CategoryCreate"},"CategoryUpdate":{"properties":{"category_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name"},"regulation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regulation"},"delegated_act_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delegated Act Status"},"compliance_estimate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compliance Estimate"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_visible":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Visible"}},"type":"object","title":"CategoryUpdate"},"DataPointIn":{"properties":{"property_name_en":{"type":"string","title":"Property Name En"},"property_name_pt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Name Pt"},"dictionary_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dictionary Reference"},"dictionary_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dictionary Guid"},"declared_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Declared Value"},"declared_value_pt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Declared Value Pt"},"value_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Language"},"datatype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datatype"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"is_required":{"type":"boolean","title":"Is Required","default":true},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"access_tier":{"type":"string","title":"Access Tier","default":"public"},"defining_standard":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defining Standard"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"sections":{"items":{"type":"string"},"type":"array","title":"Sections"}},"type":"object","required":["property_name_en"],"title":"DataPointIn"},"DeclarationIn":{"properties":{"dop_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dop Number"},"hen_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hen Reference"},"avcp_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avcp System"},"intended_use":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intended Use"},"notified_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notified Body"},"certificate_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certificate Number"},"date_of_issue":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Issue"},"place_of_issue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place Of Issue"},"signatory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signatory"},"standard_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Standard Version"},"data_points":{"items":{"$ref":"#/components/schemas/DataPointIn"},"type":"array","title":"Data Points"}},"type":"object","title":"DeclarationIn"},"DeriveLineRuleIn":{"properties":{"template_property_id":{"type":"string","format":"uuid","title":"Template Property Id"},"property_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Name"},"page":{"type":"integer","title":"Page"},"page_width":{"type":"number","title":"Page Width"},"page_height":{"type":"number","title":"Page Height"},"lines":{"items":{"$ref":"#/components/schemas/PageLine"},"type":"array","title":"Lines"},"label_words":{"items":{"$ref":"#/components/schemas/PageWord"},"type":"array","title":"Label Words"},"value_words":{"items":{"$ref":"#/components/schemas/PageWord"},"type":"array","title":"Value Words"},"document_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Language"}},"type":"object","required":["template_property_id","page","page_width","page_height"],"title":"DeriveLineRuleIn","description":"A label selection and a value selection, plus the page they sit on.\n\nSprint 17: the page's lines travel with the request so the server can run\nthe derived rule against the very page it was made from, and refuse it if\nit reads nothing back. The previous version returned bands without ever\nchecking them, and the user met the result at batch time."},"DoPCJobCreate":{"properties":{"pdt_id":{"type":"integer","title":"Pdt Id"},"product_name":{"type":"string","title":"Product Name"},"product_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Reference"},"input_data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Input Data"}},"type":"object","required":["pdt_id","product_name"],"title":"DoPCJobCreate","description":"Payload to create a new DoPC generation job."},"DoPCJobResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"pdt_id":{"type":"integer","title":"Pdt Id"},"product_name":{"type":"string","title":"Product Name"},"product_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Reference"},"status":{"type":"string","title":"Status"},"input_data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Input Data"},"mapped_properties":{"anyOf":[{},{"type":"null"}],"title":"Mapped Properties"},"dopc_output":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Dopc Output"},"validation_report":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Validation Report"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["id","pdt_id","product_name","status","created_at","updated_at"],"title":"DoPCJobResponse","description":"Full DoPC job record returned from the API."},"EnvironmentalIn":{"properties":{"epd_registration_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Epd Registration Number"},"programme_operator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Programme Operator"},"pcr_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pcr Reference"},"declared_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Declared Unit"},"modules_declared":{"items":{"type":"string"},"type":"array","title":"Modules Declared"},"modules_not_declared":{"items":{"type":"string"},"type":"array","title":"Modules Not Declared"},"valid_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid From"},"valid_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid To"},"indicators":{"items":{"$ref":"#/components/schemas/IndicatorIn"},"type":"array","title":"Indicators"}},"type":"object","title":"EnvironmentalIn"},"ExceptionFix":{"properties":{"result_id":{"type":"string","format":"uuid","title":"Result Id"},"property_id":{"type":"string","title":"Property Id"},"value":{"type":"string","title":"Value"}},"type":"object","required":["result_id","property_id","value"],"title":"ExceptionFix"},"FacilityIn":{"properties":{"organisation_id":{"type":"string","format":"uuid","title":"Organisation Id"},"name":{"type":"string","title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"facility_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facility Identifier"}},"type":"object","required":["organisation_id","name"],"title":"FacilityIn"},"FamilyCreate":{"properties":{"hen_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hen Reference"},"publication_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Publication Date"},"adoption_deadline":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Adoption Deadline"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"expected_publication":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Publication"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_visible":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Visible"},"specific_product":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specific Product"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"},"cpr_code":{"type":"integer","title":"Cpr Code"},"family_name":{"type":"string","title":"Family Name"}},"type":"object","required":["cpr_code","family_name"],"title":"FamilyCreate"},"FamilyUpdate":{"properties":{"hen_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hen Reference"},"publication_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Publication Date"},"adoption_deadline":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Adoption Deadline"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"expected_publication":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Publication"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_visible":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Visible"},"specific_product":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specific Product"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"}},"type":"object","title":"FamilyUpdate"},"FromResultIn":{"properties":{"result_id":{"type":"string","format":"uuid","title":"Result Id"}},"type":"object","required":["result_id"],"title":"FromResultIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IndicatorIn":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"name_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name En"},"name_pt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Pt"},"dictionary_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dictionary Reference"},"dictionary_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dictionary Guid"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"module_scope":{"type":"string","title":"Module Scope"},"defining_standard":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defining Standard"},"access_tier":{"type":"string","title":"Access Tier","default":"public"}},"type":"object","required":["module_scope"],"title":"IndicatorIn"},"LeadCreate":{"properties":{"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"source":{"type":"string","title":"Source","default":"journey"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"family_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family Id"},"family_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family Status"},"catalog_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Catalog Size"},"data_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Location"},"structured_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Structured Format"},"dop_process":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dop Process"},"dictionary_answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dictionary Answer"},"dictionary_which":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dictionary Which"},"epd_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Epd Status"},"urgency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Urgency"},"dpp_signal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dpp Signal"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level"}},"type":"object","required":["email"],"title":"LeadCreate"},"MappingConfirmation":{"properties":{"property_guid":{"type":"string","title":"Property Guid"},"confirmed_value":{"type":"string","title":"Confirmed Value"},"confirmed_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmed Unit"}},"type":"object","required":["property_guid","confirmed_value"],"title":"MappingConfirmation","description":"Payload to confirm or override a single property mapping."},"MappingIn":{"properties":{"property_id":{"type":"string","title":"Property Id"},"status":{"type":"string","title":"Status"},"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page"},"words":{"items":{"$ref":"#/components/schemas/SelWord"},"type":"array","title":"Words"},"fragments":{"items":{"items":{"$ref":"#/components/schemas/SelWord"},"type":"array"},"type":"array","title":"Fragments"},"excluded":{"items":{"$ref":"#/components/schemas/SelWord"},"type":"array","title":"Excluded"}},"type":"object","required":["property_id","status"],"title":"MappingIn"},"OrganisationIn":{"properties":{"name":{"type":"string","title":"Name"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"operator_identifier_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Identifier Type"},"operator_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Identifier"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"}},"type":"object","required":["name"],"title":"OrganisationIn"},"PageLine":{"properties":{"index":{"type":"integer","title":"Index"},"words":{"items":{"$ref":"#/components/schemas/PageWord"},"type":"array","title":"Words"}},"type":"object","required":["index"],"title":"PageLine"},"PageWord":{"properties":{"text":{"type":"string","title":"Text"},"x0":{"type":"number","title":"X0"},"x1":{"type":"number","title":"X1"},"top":{"type":"number","title":"Top"},"bottom":{"type":"number","title":"Bottom"}},"type":"object","required":["text","x0","x1","top","bottom"],"title":"PageWord"},"PassportIn":{"properties":{"product_id":{"type":"string","format":"uuid","title":"Product Id"},"granularity":{"type":"string","title":"Granularity","default":"model"},"batch_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Identifier"},"item_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Identifier"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_demonstration":{"type":"boolean","title":"Is Demonstration","default":false},"registry_status":{"type":"string","title":"Registry Status","default":"not_applicable_yet"}},"type":"object","required":["product_id"],"title":"PassportIn"},"PassportUpdate":{"properties":{"granularity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Granularity"},"batch_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Identifier"},"item_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Identifier"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_demonstration":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Demonstration"},"registry_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registry Status"},"restricted_fields":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Restricted Fields"}},"type":"object","title":"PassportUpdate"},"PdtImportIn":{"properties":{"pdt_id":{"type":"integer","title":"Pdt Id"},"guids":{"items":{"type":"string"},"type":"array","title":"Guids"},"kind":{"type":"string","title":"Kind","default":"essential_characteristic"}},"type":"object","required":["pdt_id"],"title":"PdtImportIn","description":"GUIDs of the PDT properties the human ticked.\n\nOnly what was ticked is imported. The dictionary is a catalogue, not a\nspecification: which of its properties are ESSENTIAL CHARACTERISTICS for\na given declaration is a judgement about the harmonised standard, and it\nstays with the person who knows the standard."},"ProductIn":{"properties":{"organisation_id":{"type":"string","format":"uuid","title":"Organisation Id"},"facility_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Facility Id"},"name":{"type":"string","title":"Name"},"commercial_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commercial Name"},"product_type_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Code"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"cpr_family_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cpr Family Id"},"pdt_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdt Reference"},"gtin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gtin"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"dop_profile_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Dop Profile Id"},"epd_profile_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Epd Profile Id"}},"type":"object","required":["organisation_id","name"],"title":"ProductIn"},"ProductUpdate":{"properties":{"facility_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Facility Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"commercial_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commercial Name"},"product_type_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type Code"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"pdt_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdt Reference"},"gtin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gtin"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"dop_profile_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Dop Profile Id"},"epd_profile_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Epd Profile Id"}},"type":"object","title":"ProductUpdate"},"ProfileIn":{"properties":{"template_id":{"type":"string","format":"uuid","title":"Template Id"},"name":{"type":"string","title":"Name"},"manufacturer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer Name"},"status":{"type":"string","title":"Status","default":"active"},"sample_document_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Document Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"document_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Language"},"document_role":{"type":"string","title":"Document Role","default":"dop"},"rules":{"items":{"$ref":"#/components/schemas/RuleIn"},"type":"array","title":"Rules"}},"type":"object","required":["template_id","name"],"title":"ProfileIn"},"PromoteIn":{"properties":{"source_job_id":{"type":"string","format":"uuid","title":"Source Job Id"},"name":{"type":"string","title":"Name"},"manufacturer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer Name"}},"type":"object","required":["source_job_id","name"],"title":"PromoteIn"},"PropertyIn":{"properties":{"order_index":{"type":"integer","title":"Order Index","default":0},"kind":{"type":"string","title":"Kind","default":"essential_characteristic"},"name_en":{"type":"string","title":"Name En"},"name_pt":{"type":"string","title":"Name Pt"},"datatype":{"type":"string","title":"Datatype","default":"string"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"allowed_values":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Values"},"validation_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation Mode"},"is_required":{"type":"boolean","title":"Is Required","default":true},"dictionary_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dictionary Reference"},"dictionary_guid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dictionary Guid"},"dictionary_status":{"type":"string","title":"Dictionary Status","default":"pending_dictionary"},"label_synonyms":{"items":{"type":"string"},"type":"array","title":"Label Synonyms"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name_en","name_pt"],"title":"PropertyIn"},"ReorderIn":{"properties":{"property_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Property Ids"}},"type":"object","required":["property_ids"],"title":"ReorderIn"},"RuleAmendment":{"properties":{"profile_id":{"type":"string","format":"uuid","title":"Profile Id"},"template_property_id":{"type":"string","format":"uuid","title":"Template Property Id"},"strategy":{"type":"string","title":"Strategy","default":"table_anchor"},"anchor_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Pattern"},"anchor_match":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Match","default":"contains"},"value_column":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Value Column"},"table_hint":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Table Hint"},"page_hint":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Hint"},"regex_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regex Pattern"},"regex_group":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Regex Group","default":1},"fixed_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fixed Value"},"rerun":{"type":"boolean","title":"Rerun","default":true}},"type":"object","required":["profile_id","template_property_id"],"title":"RuleAmendment"},"RuleIn":{"properties":{"template_property_id":{"type":"string","format":"uuid","title":"Template Property Id"},"strategy":{"type":"string","title":"Strategy","default":"table_anchor"},"anchor_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Pattern"},"anchor_match":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Match","default":"contains"},"value_column":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Value Column"},"table_hint":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Table Hint"},"page_hint":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Hint"},"regex_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regex Pattern"},"regex_group":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Regex Group","default":1},"fixed_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fixed Value"},"confidence_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confidence Note"},"label_x_band":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Label X Band"},"value_x_band":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Value X Band"},"y_tolerance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Y Tolerance"},"value_y_span":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value Y Span"},"value_y_offset":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value Y Offset"},"occurrence_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Occurrence Index"},"y_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Y Ratio"},"neighbour_context":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Neighbour Context"},"value_fragments":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Value Fragments"},"split_delimiter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Split Delimiter"},"split_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Split Index"}},"type":"object","required":["template_property_id"],"title":"RuleIn"},"SaveIn":{"properties":{"document_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Language"},"ocr":{"type":"boolean","title":"Ocr","default":false},"mappings":{"items":{"$ref":"#/components/schemas/MappingIn"},"type":"array","title":"Mappings"}},"type":"object","title":"SaveIn"},"SelWord":{"properties":{"text":{"type":"string","title":"Text"},"x0":{"type":"number","title":"X0"},"x1":{"type":"number","title":"X1"},"top":{"type":"number","title":"Top"},"bottom":{"type":"number","title":"Bottom"},"ocr_derived":{"type":"boolean","title":"Ocr Derived","default":false},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"}},"type":"object","required":["text","x0","x1","top","bottom"],"title":"SelWord"},"Selection":{"properties":{"family_type":{"type":"string","title":"Family Type"},"family_id":{"type":"string","title":"Family Id"}},"type":"object","required":["family_type","family_id"],"title":"Selection"},"SubscribeRequest":{"properties":{"email":{"type":"string","title":"Email"},"selections":{"items":{"$ref":"#/components/schemas/Selection"},"type":"array","title":"Selections"},"lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang","default":"en"}},"type":"object","required":["email","selections"],"title":"SubscribeRequest"},"TemplateImport":{"properties":{"name":{"type":"string","title":"Name"},"product_family":{"type":"string","title":"Product Family"},"cpr_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cpr Code"},"hen_reference":{"type":"string","title":"Hen Reference"},"hen_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hen Version"},"status":{"type":"string","title":"Status","default":"draft"},"language_primary":{"type":"string","title":"Language Primary","default":"pt"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"properties":{"items":{"$ref":"#/components/schemas/PropertyIn"},"type":"array","title":"Properties"}},"type":"object","required":["name","product_family","hen_reference"],"title":"TemplateImport","description":"A template plus its properties, as produced by the export action.\n\nImport deliberately re-validates every field rather than trusting the\nfile: an exported template is a plain JSON document that someone may have\nhand-edited, and a bad datatype or an invented dictionary status must be\nrejected here rather than discovered during a run.\n\nDictionary bindings are carried across VERBATIM. They are not re-resolved\nagainst the live dictionary, because an import is a copy, not a fresh\nauthoring pass — but a binding that claims a URI without a GUID is\ndowngraded to pending_dictionary, since a half-binding is exactly the kind\nof plausible-looking lie this system refuses to ship."},"TemplateIn":{"properties":{"name":{"type":"string","title":"Name"},"product_family":{"type":"string","title":"Product Family"},"cpr_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cpr Code"},"hen_reference":{"type":"string","title":"Hen Reference"},"hen_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hen Version"},"status":{"type":"string","title":"Status","default":"draft"},"language_primary":{"type":"string","title":"Language Primary","default":"pt"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name","product_family","hen_reference"],"title":"TemplateIn"},"TokenIn":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","title":"TokenIn"},"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"},"app__routers__batch__AcceptIn":{"properties":{"property_id":{"type":"string","title":"Property Id"},"result_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Result Ids"},"all_in_group":{"type":"boolean","title":"All In Group","default":false},"exception_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exception Type"}},"type":"object","required":["property_id"],"title":"AcceptIn","description":"Accept the values that were actually read, as they were read."},"app__routers__mapping__AcceptIn":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/AcceptRow"},"type":"array","title":"Rows"}},"type":"object","title":"AcceptIn"}}}}