{"components":{"parameters":{"IdempotencyKey":{"description":"Optional. A unique value (for example a UUID) that makes this write safe to retry. Replay means a retry with the same key and the same body does not run the write again: it gets the first response back, marked `Idempotent-Replayed: true`. Keys are kept for 24 hours per credential and workspace. The same key with a different body is refused with 422 `idempotency_key_reused`; a retry while the first request is still running gets 409. See \"Retrying writes safely\": https://app.instica.com/docs/api#idempotency","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}},"responses":{"Conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflicts with the current state, or a request with the same Idempotency-Key is still running."},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"The credential is valid but lacks the role, scope or plan this operation needs."},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found in the caller's organization."},"RateLimited":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"Unauthenticated":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Missing or invalid credentials. Send an API key or OAuth access token as `Authorization: Bearer`."},"ValidationFailed":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Validation failed, or an Idempotency-Key was reused with a different request body."}},"schemas":{"AcceptTermsRequest":{"description":"Body of ``POST workspaces/current/accept-terms``: the signature given with the terms.\n\n``checker_answers`` carries the public checker's answers given before sign-up, so they are kept and the first\nobligations check is queued in the same request that finishes setup (T6-2).","properties":{"checker_answers":{"$ref":"#/components/schemas/CheckerAnswersRequest"},"signature":{"$ref":"#/components/schemas/SignatureRequest"}},"required":["signature"],"type":"object"},"AccessEnum":{"description":"* `read_only` - Read only\n* `edit` - Can edit","enum":["read_only","edit"],"type":"string"},"AccountClosure":{"description":"An account closure: its grace window, purge progress and the evidence the owner chose to keep.","properties":{"cancelled_at":{"format":"date-time","nullable":true,"type":"string"},"closed_at":{"format":"date-time","type":"string"},"completed_at":{"format":"date-time","nullable":true,"type":"string"},"delete_by":{"format":"date-time","type":"string"},"deletion_request_id":{"format":"uuid","nullable":true,"type":"string"},"evidence_retained_until":{"format":"date-time","nullable":true,"type":"string"},"final_export_id":{"format":"uuid","nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"object":{"type":"string"},"purge_after":{"format":"date-time","type":"string"},"retain_evidence_years":{"type":"integer"},"stage":{"type":"string"},"status":{"type":"string"},"subscription_cancelled":{"type":"boolean"}},"required":["cancelled_at","closed_at","completed_at","delete_by","deletion_request_id","evidence_retained_until","final_export_id","id","object","purge_after","retain_evidence_years","stage","status","subscription_cancelled"],"type":"object"},"AccountClosureStatus":{"description":"The closure policy and the organization's open closure, if any.","properties":{"blocked_reason":{"type":"string"},"can_close":{"type":"boolean"},"closure":{"allOf":[{"$ref":"#/components/schemas/AccountClosure"}],"nullable":true},"policy":{"$ref":"#/components/schemas/ClosurePolicy"}},"required":["blocked_reason","can_close","closure","policy"],"type":"object"},"AccrualRequestRequest":{"description":"Export a saved estimate as an accrual journal for one GL period.","properties":{"estimate_id":{"minimum":1,"type":"integer"},"gl_period":{"maxLength":7,"minLength":1,"pattern":"^\\d{4}-(0[1-9]|1[0-2])$","type":"string"}},"required":["estimate_id","gl_period"],"type":"object"},"AcknowledgeRequest":{"description":"Body of ``POST reports/periods/<id>/findings/<finding_id>/acknowledge/``: why the finding is accepted.","properties":{"note":{"maxLength":500,"minLength":1,"type":"string"}},"required":["note"],"type":"object"},"AmendRequest":{"description":"Body of ``POST reports/periods/<id>/amend/``.","properties":{"format_id":{"maxLength":128,"minLength":1,"type":"string"},"inputs":{"additionalProperties":{"maxLength":255,"type":"string"},"type":"object"},"reason":{"maxLength":2000,"minLength":1,"type":"string"}},"required":["format_id","reason"],"type":"object"},"ApiKey":{"description":"An API key without its secret.","properties":{"api_version":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"entity_ids":{"items":{"type":"integer"},"type":"array"},"expires_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"type":"string"},"last_four":{"type":"string"},"last_used_at":{"format":"date-time","nullable":true,"type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"object":{"type":"string"},"prefix":{"type":"string"},"revoked_at":{"format":"date-time","nullable":true,"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"required":["api_version","created_at","entity_ids","expires_at","id","kind","last_four","last_used_at","livemode","name","object","prefix","revoked_at","scopes","updated_at"],"type":"object"},"ApiKeyCreateRequest":{"description":"Create an API key or service account.","properties":{"api_version":{"description":"Dated API version (YYYY-MM-DD) this key is pinned to; blank uses the organization default.","maxLength":10,"type":"string"},"entity_ids":{"items":{"type":"integer"},"type":"array"},"expires_in_days":{"maximum":366,"minimum":1,"nullable":true,"type":"integer"},"livemode":{"default":true,"type":"boolean"},"name":{"maxLength":120,"minLength":1,"type":"string"},"scopes":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}},"required":["name","scopes"],"type":"object"},"ApiKeyCreated":{"description":"A newly issued key: the secret appears here once and never again.","properties":{"api_version":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"entity_ids":{"items":{"type":"integer"},"type":"array"},"expires_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"type":"string"},"last_four":{"type":"string"},"last_used_at":{"format":"date-time","nullable":true,"type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"object":{"type":"string"},"prefix":{"type":"string"},"revoked_at":{"format":"date-time","nullable":true,"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"},"secret":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["api_version","created_at","entity_ids","expires_at","id","kind","last_four","last_used_at","livemode","name","object","prefix","revoked_at","scopes","secret","updated_at"],"type":"object"},"ApiKeyList":{"description":"A page of keys.","properties":{"data":{"items":{"$ref":"#/components/schemas/ApiKey"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"},"ApiVersion":{"description":"The organization's pinned API version and the supported ones.","properties":{"default_version":{"type":"string"},"latest_version":{"type":"string"},"supported_versions":{"items":{"type":"string"},"type":"array"}},"required":["default_version","latest_version","supported_versions"],"type":"object"},"ApiVersionUpdateRequest":{"description":"``PUT /api-version`` body.","properties":{"default_version":{"minLength":1,"type":"string"}},"required":["default_version"],"type":"object"},"ApprovalRightRequest":{"description":"Grant or revoke the right to approve packaging specs.","properties":{"can_approve_specs":{"type":"boolean"}},"required":["can_approve_specs"],"type":"object"},"AssistantAskRequest":{"description":"A question plus a short history.","properties":{"history":{"items":{"$ref":"#/components/schemas/AssistantTurnRequest"},"maxItems":12,"type":"array"},"question":{"maxLength":1000,"minLength":1,"type":"string"}},"required":["question"],"type":"object"},"AssistantTurnRequest":{"description":"One earlier turn of the conversation.","properties":{"content":{"maxLength":4000,"type":"string"},"role":{"$ref":"#/components/schemas/AssistantTurnRoleEnum"}},"required":["content","role"],"type":"object"},"AssistantTurnRoleEnum":{"description":"* `user` - user\n* `assistant` - assistant","enum":["user","assistant"],"type":"string"},"AttestRequest":{"description":"Body of ``POST reports/versions/<id>/attest/``: the signer's name, title and drawn or typed signature.","properties":{"signature":{"$ref":"#/components/schemas/SignatureRequest"},"signer_name":{"maxLength":255,"minLength":1,"type":"string"},"signer_title":{"default":"","maxLength":255,"type":"string"},"statement_version":{"maxLength":64,"minLength":1,"type":"string"}},"required":["signature","signer_name"],"type":"object"},"AuditChainCheck":{"description":"One page of re-hashing the audit log on request (P6-14).","properties":{"checked_at":{"format":"date-time","type":"string"},"complete":{"description":"False when events are left to check: send resume_after back as after to carry on.","type":"boolean"},"events_checked":{"description":"Events re-hashed so far, oldest first, up to the first break; the whole check once complete.","type":"integer"},"first_broken_event_id":{"description":"The event whose hash or link did not match; empty when the log is intact.","type":"string"},"resume_after":{"description":"A token naming the last event this page checked when complete is false; empty otherwise.","type":"string"},"valid":{"description":"True when every event's hash and link to the one before it match.","type":"boolean"}},"required":["checked_at","complete","events_checked","first_broken_event_id","resume_after","valid"],"type":"object"},"AuditChainCheckRequestRequest":{"description":"Where to carry on a chain check that a page left unfinished (P6-14).","properties":{"after":{"description":"The resume_after token of the previous page. Leave it out to start from the oldest event.","maxLength":512,"type":"string"}},"type":"object"},"AuditEvent":{"description":"One audit event (contract C5).","properties":{"action":{"type":"string"},"actor":{"additionalProperties":{},"type":"object"},"changes":{"additionalProperties":{},"type":"object"},"credential":{"additionalProperties":{},"nullable":true,"type":"object"},"hash":{"type":"string"},"id":{"format":"uuid","type":"string"},"object":{"type":"string"},"occurred_at":{"format":"date-time","type":"string"},"org_id":{"nullable":true,"type":"integer"},"outcome":{"additionalProperties":{},"type":"object"},"prev_hash":{"type":"string"},"request":{"additionalProperties":{},"type":"object"},"schema_version":{"type":"integer"},"target":{"additionalProperties":{},"type":"object"}},"required":["action","actor","changes","credential","hash","id","object","occurred_at","org_id","outcome","prev_hash","request","schema_version","target"],"type":"object"},"AuditEventList":{"description":"A page of audit events (newest first).","properties":{"data":{"items":{"$ref":"#/components/schemas/AuditEvent"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"},"AuthorizeContext":{"description":"What the consent screen shows.","properties":{"client":{"additionalProperties":{},"type":"object"},"organizations":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"redirect_uri":{"type":"string"},"requested_scopes":{"items":{"type":"string"},"type":"array"}},"required":["client","organizations","redirect_uri","requested_scopes"],"type":"object"},"AuthorizeDecisionRequest":{"description":"The consent decision: the original parameters plus the chosen organization and scopes.","properties":{"client_id":{"minLength":1,"type":"string"},"code_challenge":{"minLength":1,"type":"string"},"code_challenge_method":{"minLength":1,"type":"string"},"decision":{"$ref":"#/components/schemas/DecisionEnum"},"organization_id":{"type":"integer"},"redirect_uri":{"minLength":1,"type":"string"},"resource":{"type":"string"},"response_type":{"minLength":1,"type":"string"},"scope":{"type":"string"},"scopes":{"items":{"minLength":1,"type":"string"},"type":"array"},"state":{"type":"string"}},"required":["client_id","code_challenge","code_challenge_method","decision","redirect_uri","response_type"],"type":"object"},"AuthorizeRedirect":{"description":"Where to send the person's browser next.","properties":{"redirect_to":{"type":"string"}},"required":["redirect_to"],"type":"object"},"BlankEnum":{"enum":[""]},"BrandAnswerEnum":{"description":"* `own_brand` - Our own brand\n* `other_brands` - Other companies' brands\n* `unsure` - Not sure","enum":["own_brand","other_brands","unsure"],"type":"string"},"BrandInputRequest":{"description":"Body of ``POST onboarding/brands/``.","properties":{"entity_id":{"minimum":1,"type":"integer"},"name":{"maxLength":255,"minLength":1,"type":"string"}},"required":["entity_id","name"],"type":"object"},"BreakGlassOwnersRequest":{"description":"Body of ``PUT /identity/break-glass-owners``: the owners to name, by membership id; an empty list names none.","properties":{"member_uids":{"items":{"maxLength":64,"minLength":1,"type":"string"},"maxItems":100,"type":"array"}},"required":["member_uids"],"type":"object"},"BundleComponentInputRequest":{"description":"Say how many units of the component one unit of the bundle holds, and when.","properties":{"effective_from":{"format":"date","nullable":true,"type":"string"},"effective_to":{"format":"date","nullable":true,"type":"string"},"quantity":{"minimum":1,"type":"integer"}},"type":"object"},"CaptureSourceEnum":{"description":"* `bluetooth_scale` - Bluetooth scale\n* `usb_serial_scale` - USB serial scale\n* `usb_hid_scale` - USB HID scale\n* `keyboard_scale` - Keyboard-wedge scale\n* `photo_read_scale` - Scale display read from the photo\n* `manual_entry` - Manual entry\n* `integration` - Integration proposal confirmed by a person","enum":["bluetooth_scale","usb_serial_scale","usb_hid_scale","keyboard_scale","photo_read_scale","manual_entry","integration"],"type":"string"},"CategoryAssignmentRequest":{"description":"The customer's choice of fee category for one of their material categories.","properties":{"component":{"minimum":1,"nullable":true,"type":"integer"},"fee_category_code":{"maxLength":128,"minLength":1,"type":"string"},"jurisdiction_code":{"maxLength":8,"minLength":1,"type":"string"},"material_category":{"minimum":1,"type":"integer"},"note":{"default":"","maxLength":500,"type":"string"}},"required":["fee_category_code","jurisdiction_code","material_category"],"type":"object"},"CertificateRequest":{"description":"Input for creating or updating a stored certificate; the file is optional and size-limited.","properties":{"certificate_number":{"maxLength":128,"minLength":1,"type":"string"},"component_id":{"minimum":1,"type":"integer"},"expires_on":{"format":"date","nullable":true,"type":"string"},"file":{"format":"binary","type":"string"},"issued_on":{"format":"date","nullable":true,"type":"string"},"issuer":{"maxLength":255,"minLength":1,"type":"string"},"notes":{"type":"string"},"standard":{"maxLength":128,"minLength":1,"type":"string"}},"required":["certificate_number","component_id","issuer","standard"],"type":"object"},"ChangeRequest":{"description":"One proposed component change; unset fields stay as recorded.","properties":{"component_id":{"maxLength":32,"minLength":1,"type":"string"},"material_code":{"maxLength":32,"minLength":1,"type":"string"},"pcr_percent":{"format":"decimal","pattern":"^-?\\d{0,4}(?:\\.\\d{0,2})?$","type":"string"},"unit_grams":{"format":"decimal","pattern":"^-?\\d{0,10}(?:\\.\\d{0,4})?$","type":"string"}},"required":["component_id"],"type":"object"},"ChannelEnum":{"description":"* `email` - email\n* `in_app` - in_app","enum":["email","in_app"],"type":"string"},"CheckerAnswersRequest":{"description":"The public checker's answers given with the terms; answers it would refuse are dropped, never an error.\n\nThe answers are a convenience carried from before sign-up, so they must not stop the terms being accepted. A\nrefusal is logged with the names of the refused fields (never their values), so a client sending answers the\nserver cannot read is visible rather than silently losing the user's places.","properties":{"levels":{"items":{"$ref":"#/components/schemas/LevelsEnum"},"type":"array"},"product_types":{"items":{"$ref":"#/components/schemas/ProductTypesEnum"},"type":"array"},"regions":{"items":{"minLength":1,"pattern":"^[A-Z]{2}(-[A-Z0-9]{1,3})?$","type":"string"},"maxItems":60,"minItems":1,"type":"array"},"revenue":{"$ref":"#/components/schemas/RevenueAnswerRequest"},"role":{"allOf":[{"$ref":"#/components/schemas/RoleFddEnum"}],"description":"Whose brand is on the products: own_brand, other_brands, or unsure (no role is assumed).\n\n* `own_brand` - own_brand\n* `other_brands` - other_brands\n* `unsure` - unsure"}},"required":["regions"],"type":"object"},"CheckoutPreviewRequest":{"description":"Body of ``POST billing/checkout/preview/``: the plan and interval to price before confirming.","properties":{"interval":{"$ref":"#/components/schemas/IntervalEnum"},"plan":{"$ref":"#/components/schemas/PlanEnum"}},"required":["interval","plan"],"type":"object"},"CheckoutRequest":{"description":"Body of ``POST billing/checkout/``: the plan and interval to buy or switch to.\n\n``locale`` is the language Stripe Checkout opens in; ``proration_date`` is the preview's timestamp, so a plan\nchange charges the amount the preview showed.","properties":{"cancel_url":{"maxLength":2000,"type":"string"},"interval":{"$ref":"#/components/schemas/IntervalEnum"},"locale":{"$ref":"#/components/schemas/LocaleEnum"},"plan":{"$ref":"#/components/schemas/PlanEnum"},"proration_date":{"minimum":0,"type":"integer"},"success_url":{"maxLength":2000,"type":"string"}},"required":["interval","plan"],"type":"object"},"ClosurePolicy":{"description":"The closure windows the confirmation screen explains.","properties":{"delete_by_days":{"type":"integer"},"export_retention_days":{"type":"integer"},"grace_days":{"type":"integer"},"max_retention_years":{"type":"integer"}},"required":["delete_by_days","export_retention_days","grace_days","max_retention_years"],"type":"object"},"CodeRequest":{"description":"A TOTP or recovery code.","properties":{"code":{"maxLength":64,"minLength":1,"type":"string"}},"required":["code"],"type":"object"},"ComponentInputRequest":{"description":"Create or edit a spec component with its full attribute set.","properties":{"colour":{"maxLength":64,"type":"string"},"compostable":{"nullable":true,"type":"boolean"},"compostable_certificate_expires":{"format":"date","nullable":true,"type":"string"},"compostable_certificate_number":{"maxLength":128,"type":"string"},"compostable_certification":{"maxLength":128,"type":"string"},"contact_sensitive":{"nullable":true,"type":"boolean"},"format":{"default":"","maxLength":255,"type":"string"},"markings":{"items":{"maxLength":64,"minLength":1,"type":"string"},"type":"array"},"material_code":{"maxLength":64,"minLength":1,"type":"string"},"name":{"maxLength":255,"minLength":1,"type":"string"},"opacity":{"oneOf":[{"$ref":"#/components/schemas/OpacityEnum"},{"$ref":"#/components/schemas/BlankEnum"}]},"pcr_percent":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,3}(?:\\.\\d{0,2})?$","type":"string"},"pcr_percent_tier":{"$ref":"#/components/schemas/CurrentTierEnum"},"pfas_free_declared":{"nullable":true,"type":"boolean"},"quantity_per_spec":{"default":1,"minimum":1,"type":"integer"},"recyclable":{"nullable":true,"type":"boolean"},"reusable":{"nullable":true,"type":"boolean"},"reuse_cycles":{"minimum":0,"nullable":true,"type":"integer"},"single_use_beverage_bottle":{"nullable":true,"type":"boolean"},"sort_order":{"minimum":0,"type":"integer"},"sub_material":{"maxLength":128,"type":"string"},"unit_grams":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,6}(?:\\.\\d{0,3})?$","type":"string"},"unit_grams_method":{"description":"How an estimated or declared weight was worked out; required for those tiers.","maxLength":4000,"type":"string"},"unit_grams_tier":{"$ref":"#/components/schemas/CurrentTierEnum"}},"required":["material_code","name"],"type":"object"},"CurrentTierEnum":{"description":"* `measured` - Measured\n* `supplier` - Supplier declared\n* `estimated` - Estimated\n* `declared` - Customer declared","enum":["measured","supplier","estimated","declared"],"type":"string"},"CustomerRateRequest":{"description":"A rate the customer entered from their PRO contract or invoice.","properties":{"category_code":{"maxLength":128,"minLength":1,"type":"string"},"currency":{"maxLength":3,"minLength":3,"type":"string"},"name":{"default":"","maxLength":255,"type":"string"},"note":{"default":"","maxLength":500,"type":"string"},"rate":{"format":"decimal","pattern":"^-?\\d{0,12}(?:\\.\\d{0,6})?$","type":"string"},"schedule_id":{"maxLength":64,"minLength":1,"type":"string"},"unit":{"$ref":"#/components/schemas/UnitEnum"}},"required":["category_code","currency","rate","schedule_id","unit"],"type":"object"},"DataRequest":{"description":"An export or deletion request (a deletion carries its account closure).","properties":{"cancelled_at":{"format":"date-time","nullable":true,"type":"string"},"closure":{"allOf":[{"$ref":"#/components/schemas/AccountClosure"}],"nullable":true},"completed_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"error":{"type":"string"},"id":{"format":"uuid","type":"string"},"include_csv":{"type":"boolean"},"kind":{"type":"string"},"object":{"type":"string"},"result_expires_at":{"format":"date-time","nullable":true,"type":"string"},"scheduled_for":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"}},"required":["cancelled_at","completed_at","created_at","error","id","include_csv","kind","object","result_expires_at","scheduled_for","status"],"type":"object"},"DataRequestList":{"description":"A page of data-rights requests.","properties":{"data":{"items":{"$ref":"#/components/schemas/DataRequest"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"},"DecisionEnum":{"description":"* `approve` - approve\n* `deny` - deny","enum":["approve","deny"],"type":"string"},"DeclarationInputRequest":{"description":"One statement that an entity does or does not sell into a jurisdiction.","properties":{"entity_id":{"minimum":1,"type":"integer"},"jurisdiction":{"minLength":1,"pattern":"^[A-Z]{2}(-[A-Z0-9]{1,3})?$","type":"string"},"sells":{"type":"boolean"}},"required":["entity_id","jurisdiction","sells"],"type":"object"},"DeclarationsWriteRequest":{"description":"Body of ``PUT obligations/declarations/``.","properties":{"declarations":{"items":{"$ref":"#/components/schemas/DeclarationInputRequest"},"type":"array"},"revenue":{"items":{"$ref":"#/components/schemas/RevenueInputRequest"},"type":"array"}},"type":"object"},"DeletionRequestRequest":{"description":"Owner confirmation for closing the account: the organization name typed exactly, and what to keep.","properties":{"confirmation":{"maxLength":255,"minLength":1,"type":"string"},"include_csv":{"default":false,"type":"boolean"},"retain_evidence_years":{"default":0,"maximum":10,"minimum":0,"type":"integer"}},"required":["confirmation"],"type":"object"},"DeviceEnum":{"description":"* `web` - Web\n* `ios` - iOS","enum":["web","ios"],"type":"string"},"DomainCreateRequest":{"description":"Claim a domain.","properties":{"domain":{"maxLength":253,"minLength":1,"type":"string"}},"required":["domain"],"type":"object"},"EntityInputRequest":{"description":"Body of ``POST onboarding/entities/``: the first legal entity and, optionally, its first brand.","properties":{"brand_name":{"maxLength":255,"type":"string"},"country_code":{"pattern":"^[A-Z]{2}$","type":"string"},"legal_name":{"maxLength":255,"type":"string"},"name":{"maxLength":255,"minLength":1,"type":"string"},"tax_id":{"maxLength":64,"type":"string"}},"required":["name"],"type":"object"},"EntityScopeRequest":{"description":"Replace a member's entity and brand scope; empty lists lift the restriction.","properties":{"brand_ids":{"items":{"type":"integer"},"type":"array"},"entity_ids":{"items":{"type":"integer"},"type":"array"}},"type":"object"},"EprCaptureAsset":{"description":"Serialize a normalized evidence image.","properties":{"captured_at_client":{"format":"date-time","nullable":true,"type":"string"},"content_sha256":{"readOnly":true,"type":"string"},"created_at":{"format":"date-time","readOnly":true,"type":"string"},"file":{"format":"uri","readOnly":true,"type":"string"},"height":{"readOnly":true,"type":"integer"},"id":{"readOnly":true,"type":"integer"},"perceptual_hash":{"readOnly":true,"type":"string"},"width":{"readOnly":true,"type":"integer"}},"required":["content_sha256","created_at","file","height","id","perceptual_hash","width"],"type":"object"},"Error":{"description":"The error envelope.","properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}},"required":["error"],"type":"object"},"ErrorBody":{"description":"Shape of ``error``.","properties":{"code":{"type":"string"},"docs_url":{"type":"string"},"fields":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"issues":{"description":"Per-field issues as {field, code, message}, when the endpoint reports a code for each field.","items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},"message":{"type":"string"},"request_id":{"type":"string"},"retryable":{"description":"Whether sending the same request again later can succeed (rate limit, timeout, server error).","type":"boolean"}},"required":["code","docs_url","fields","message","request_id","retryable"],"type":"object"},"ErrorEnvelope":{"description":"Every EPR API error.","properties":{"error":{"additionalProperties":true,"properties":{"code":{"description":"Stable machine-readable code; see docs_url.","type":"string"},"docs_url":{"description":"Where this error code is explained.","type":"string"},"fields":{"additionalProperties":true,"description":"Field errors keyed by field name (rows as `1.units_sold`).","type":"object"},"message":{"description":"A plain-language explanation safe to show a person.","type":"string"},"request_id":{"description":"The request's id; the same value as `X-Request-ID`.","type":"string"}},"required":["code","docs_url","fields","message","request_id"],"type":"object"}},"required":["error"],"type":"object"},"EvaluateRequest":{"description":"Body of ``POST obligations/evaluate/`` (as_of defaults to today).","properties":{"as_of":{"format":"date","type":"string"}},"type":"object"},"ExportJob":{"description":"Serializer for listing and displaying export jobs.","properties":{"completed_at":{"description":"When processing completed.","format":"date-time","nullable":true,"readOnly":true,"type":"string"},"created":{"description":"`DateTime` when item was created.","format":"date-time","readOnly":true,"type":"string"},"download_url":{"description":"Get the download URL if available.","nullable":true,"readOnly":true,"type":"string"},"error_message":{"nullable":true,"readOnly":true,"type":"string"},"expires_at":{"description":"When this export will expire and be deleted.","format":"date-time","readOnly":true,"type":"string"},"export_type":{"allOf":[{"$ref":"#/components/schemas/ExportTypeEnum"}],"description":"The type of export.\n\n* `inventory_csv` - Inventory CSV\n* `sales_report` - Sales Report\n* `epr_caa_csv` - EPR CAA CSV\n* `epr_evidence_zip` - EPR Evidence ZIP","readOnly":true},"file_size":{"description":"File size in bytes.","nullable":true,"readOnly":true,"type":"integer"},"filename":{"description":"User-friendly filename for download.","readOnly":true,"type":"string"},"filters":{"description":"Filter parameters used to generate the export.","readOnly":true},"is_downloadable":{"readOnly":true,"type":"boolean"},"is_expired":{"readOnly":true,"type":"boolean"},"job":{"readOnly":true,"type":"string"},"row_count":{"description":"Number of rows in the export.","readOnly":true,"type":"integer"},"started_at":{"description":"When processing started.","format":"date-time","nullable":true,"readOnly":true,"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/ExportJobStatusEnum"}],"description":"Current status of the export job.\n\n* `pending` - Pending\n* `processing` - Processing\n* `completed` - Completed\n* `failed` - Failed\n* `expired` - Expired","readOnly":true},"uid":{"nullable":true,"readOnly":true,"type":"string"}},"required":["completed_at","created","download_url","error_message","expires_at","export_type","file_size","filename","filters","is_downloadable","is_expired","job","row_count","started_at","status","uid"],"type":"object"},"ExportJobStatusEnum":{"description":"* `pending` - Pending\n* `processing` - Processing\n* `completed` - Completed\n* `failed` - Failed\n* `expired` - Expired","enum":["pending","processing","completed","failed","expired"],"type":"string"},"ExportRequestRequest":{"description":"Options for an export: JSON always, plus a CSV copy of every table on request.","properties":{"include_csv":{"default":false,"type":"boolean"}},"type":"object"},"ExportTypeEnum":{"description":"* `inventory_csv` - Inventory CSV\n* `sales_report` - Sales Report\n* `epr_caa_csv` - EPR CAA CSV\n* `epr_evidence_zip` - EPR Evidence ZIP","enum":["inventory_csv","sales_report","epr_caa_csv","epr_evidence_zip"],"type":"string"},"ExternalAuditorInviteRequest":{"description":"Invite an external adviser, scoped to entities (and optionally periods), ending at a fixed time.\n\n``access`` is the client's choice: ``read_only`` (the default) or ``edit`` (prepare and correct figures, never\nsign, bill or manage members). Either way the adviser takes no paid seat.","properties":{"access":{"allOf":[{"$ref":"#/components/schemas/AccessEnum"}],"default":"read_only"},"access_expires_at":{"format":"date-time","type":"string"},"brand_ids":{"items":{"type":"integer"},"type":"array"},"email":{"format":"email","minLength":1,"type":"string"},"entity_ids":{"items":{"type":"integer"},"minItems":1,"type":"array"},"message":{"maxLength":2000,"type":"string"},"period_ids":{"items":{"type":"integer"},"type":"array"}},"required":["access_expires_at","email","entity_ids"],"type":"object"},"ExternalAuditorInvited":{"description":"The pending external-auditor invitation.","properties":{"access":{"$ref":"#/components/schemas/AccessEnum"},"access_expires_at":{"format":"date-time","type":"string"},"email":{"type":"string"},"entity_ids":{"items":{"type":"integer"},"type":"array"},"expires_at":{"format":"date-time","type":"string"},"period_ids":{"items":{"type":"integer"},"type":"array"},"uid":{"type":"string"}},"required":["access","access_expires_at","email","entity_ids","expires_at","period_ids","uid"],"type":"object"},"FamilyInputRequest":{"description":"Create or rename a spec family.","properties":{"name":{"maxLength":255,"minLength":1,"type":"string"},"notes":{"default":"","type":"string"}},"required":["name"],"type":"object"},"FxRateRequest":{"description":"A currency rate with its date and source; the engine never fetches rates itself.","properties":{"base_currency":{"maxLength":3,"minLength":3,"type":"string"},"quote_currency":{"maxLength":3,"minLength":3,"type":"string"},"rate":{"format":"decimal","pattern":"^-?\\d{0,10}(?:\\.\\d{0,8})?$","type":"string"},"rate_date":{"format":"date","type":"string"},"rate_source":{"$ref":"#/components/schemas/RateSourceEnum"},"source_note":{"default":"","maxLength":500,"type":"string"}},"required":["base_currency","quote_currency","rate","rate_date","rate_source"],"type":"object"},"InputsWriteRequest":{"description":"Body of ``PUT reports/periods/<id>/inputs/``: header values keyed by source path; empty string removes.","properties":{"values":{"additionalProperties":{"maxLength":255,"type":"string"},"type":"object"}},"required":["values"],"type":"object"},"IntervalEnum":{"description":"* `month` - month\n* `year` - year","enum":["month","year"],"type":"string"},"InvoiceLineRequest":{"description":"One line of a PRO invoice as the customer entered it.","properties":{"amount":{"format":"decimal","pattern":"^-?\\d{0,16}(?:\\.\\d{0,2})?$","type":"string"},"category_code":{"maxLength":128,"minLength":1,"type":"string"},"description":{"default":"","maxLength":255,"type":"string"},"quantity":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,12}(?:\\.\\d{0,6})?$","type":"string"},"rate":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,12}(?:\\.\\d{0,6})?$","type":"string"},"unit":{"default":"","maxLength":16,"type":"string"}},"required":["amount","category_code"],"type":"object"},"InvoiceRequestRequest":{"description":"A PRO invoice to compare with an estimate.","properties":{"currency":{"maxLength":3,"minLength":3,"type":"string"},"estimate_id":{"nullable":true,"type":"integer"},"fee_id":{"maxLength":64,"minLength":1,"type":"string"},"invoice_number":{"default":"","maxLength":128,"type":"string"},"lines":{"items":{"$ref":"#/components/schemas/InvoiceLineRequest"},"type":"array"},"options":{"$ref":"#/components/schemas/OptionsRequest"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"pro_name":{"default":"","maxLength":255,"type":"string"},"total":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,16}(?:\\.\\d{0,2})?$","type":"string"}},"required":["currency","fee_id","lines","period_end","period_start"],"type":"object"},"JournalDateStyleEnum":{"description":"* `` - Each tool's usual style\n* `dmy` - dmy\n* `mdy` - mdy\n* `iso` - iso","enum":["dmy","mdy","iso"],"type":"string"},"LabellingRunRequest":{"description":"Body of ``POST targets/labelling/``; at least one market is required.","properties":{"as_of":{"format":"date","type":"string"},"baseline_plastic_grams":{"format":"decimal","pattern":"^-?\\d{0,15}(?:\\.\\d{0,3})?$","type":"string"},"baseline_year":{"maximum":2100,"minimum":1990,"type":"integer"},"markets":{"items":{"minLength":1,"pattern":"^[A-Z]{2}(-[A-Z0-9]{1,3})?$","type":"string"},"type":"array"},"spec_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"}},"required":["markets"],"type":"object"},"LayerInputRowRequest":{"description":"One laminate layer.","properties":{"grams":{"format":"decimal","pattern":"^-?\\d{0,6}(?:\\.\\d{0,3})?$","type":"string"},"grams_tier":{"allOf":[{"$ref":"#/components/schemas/CurrentTierEnum"}],"default":"estimated"},"material_code":{"maxLength":64,"minLength":1,"type":"string"},"pcr_percent":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,3}(?:\\.\\d{0,2})?$","type":"string"}},"required":["grams","material_code"],"type":"object"},"LayersInputRequest":{"description":"Replace every layer of a component.","properties":{"layers":{"items":{"$ref":"#/components/schemas/LayerInputRowRequest"},"type":"array"}},"required":["layers"],"type":"object"},"LegalHoldReasonRequest":{"description":"Body of placing or releasing a legal hold: the written reason.","properties":{"reason":{"maxLength":2000,"type":"string"}},"required":["reason"],"type":"object"},"LevelEnum":{"description":"* `primary` - Primary\n* `secondary` - Secondary\n* `tertiary` - Tertiary\n* `ecommerce` - E-commerce","enum":["primary","secondary","tertiary","ecommerce"],"type":"string"},"LevelsEnum":{"description":"* `primary` - primary\n* `secondary` - secondary\n* `tertiary` - tertiary\n* `ecommerce` - ecommerce","enum":["primary","secondary","tertiary","ecommerce"],"type":"string"},"LinkInputRequest":{"description":"Attach a spec to a SKU.","properties":{"effective_from":{"format":"date","nullable":true,"type":"string"},"effective_to":{"format":"date","nullable":true,"type":"string"},"units_per_sku":{"minimum":1,"type":"integer"}},"type":"object"},"LocaleEnum":{"description":"* `en-US` - en-US\n* `es-419` - es-419\n* `pt-BR` - pt-BR\n* `de` - de\n* `fr` - fr\n* `fr-CA` - fr-CA\n* `zh-Hans` - zh-Hans","enum":["en-US","es-419","pt-BR","de","fr","fr-CA","zh-Hans"],"type":"string"},"MaterialCategory":{"description":"Serialize a versioned regulator material category with its customer wording.\n\n``name`` stays the official category name; ``plain_name``/``plain_group``/``plain_group_order`` and\n``search_terms`` come from ``epr/data/material_plain_language.yaml`` and are null/empty for a code outside\nthe checked-in taxonomy.","properties":{"ca_compostable":{"nullable":true,"type":"boolean"},"ca_recyclable":{"nullable":true,"type":"boolean"},"ca_recycling_rate":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,3}(?:\\.\\d{0,2})?$","type":"string"},"code":{"maxLength":32,"type":"string"},"format_hint":{"maxLength":500,"type":"string"},"id":{"readOnly":true,"type":"integer"},"is_plastic":{"type":"boolean"},"name":{"maxLength":255,"type":"string"},"plain_group":{"description":"Return the picker group (material, then form inside it), for example \"Cardboard and paper\".","nullable":true,"readOnly":true,"type":"string"},"plain_group_order":{"description":"Return the display position of the picker group.","nullable":true,"readOnly":true,"type":"integer"},"plain_name":{"description":"Return the everyday name in the reader's language, for example \"Corrugated cardboard ... without plastic\".","nullable":true,"readOnly":true,"type":"string"},"search_terms":{"description":"Return the everyday words that should find this category (\"cardboard box\", \"dropper\").","items":{"type":"string"},"readOnly":true,"type":"array"},"taxonomy_version":{"maxLength":64,"type":"string"}},"required":["code","id","name","plain_group","plain_group_order","plain_name","search_terms","taxonomy_version"],"type":"object"},"MeasurementConfirmer":{"description":"The person who confirmed (attested to) a measurement: their name and email.","properties":{"email":{"readOnly":true,"type":"string"},"name":{"readOnly":true,"type":"string"}},"required":["email","name"],"type":"object"},"MeasurementRecord":{"description":"Serialize immutable measurement evidence, attestations and provenance (who measured it, how and when).","properties":{"ai_format":{"maxLength":255,"type":"string"},"ai_grams":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,6}(?:\\.\\d{0,3})?$","type":"string"},"ai_grams_confidence":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,1}(?:\\.\\d{0,2})?$","type":"string"},"ai_material_code":{"maxLength":32,"type":"string"},"ai_material_confidence":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,1}(?:\\.\\d{0,2})?$","type":"string"},"ai_unit_as_displayed":{"maxLength":32,"type":"string"},"assets":{"items":{"$ref":"#/components/schemas/EprCaptureAsset"},"readOnly":true,"type":"array"},"attestation":{},"capture_source":{"oneOf":[{"$ref":"#/components/schemas/CaptureSourceEnum"},{"$ref":"#/components/schemas/BlankEnum"}]},"component":{"type":"integer"},"component_name":{"readOnly":true,"type":"string"},"confirmed_at":{"format":"date-time","type":"string"},"confirmed_by":{"allOf":[{"$ref":"#/components/schemas/MeasurementConfirmer"}],"readOnly":true},"content_sha256":{"maxLength":64,"type":"string"},"grams":{"format":"decimal","pattern":"^-?\\d{0,6}(?:\\.\\d{0,3})?$","readOnly":true,"type":"string"},"material_code":{"readOnly":true,"type":"string"},"method":{"maxLength":500,"type":"string"},"provider_model":{"maxLength":200,"type":"string"},"scale_device":{"maxLength":200,"type":"string"},"session":{"type":"integer"},"signing_key_id":{"maxLength":128,"type":"string"},"sku_code":{"readOnly":true,"type":"string"},"superseded_by":{"nullable":true,"type":"integer"},"taxonomy_version":{"maxLength":64,"type":"string"},"uid":{"format":"uuid","readOnly":true,"type":"string"},"void_reason":{"maxLength":500,"type":"string"},"voided_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["assets","component","component_name","confirmed_by","content_sha256","grams","material_code","session","signing_key_id","sku_code","taxonomy_version","uid"],"type":"object"},"MethodEnum":{"description":"* `drawn` - drawn\n* `typed` - typed","enum":["drawn","typed"],"type":"string"},"MetricEnum":{"description":"* `recycled_content_percent` - Recycled content (%)\n* `recyclable_percent` - Recyclable share (%)\n* `reusable_percent` - Reusable share (%)\n* `weight_reduction_percent` - Weight reduction (%)\n* `total_grams` - Total packaging grams","enum":["recycled_content_percent","recyclable_percent","reusable_percent","weight_reduction_percent","total_grams"],"type":"string"},"MfaRequiredEnum":{"description":"* `off` - off\n* `roles` - roles\n* `everyone` - everyone","enum":["off","roles","everyone"],"type":"string"},"MfaVerifyRequest":{"description":"Challenge answer: a TOTP code or a single-use recovery code.","properties":{"code":{"maxLength":64,"type":"string"},"recovery_code":{"maxLength":64,"type":"string"}},"type":"object"},"ModulationRequest":{"description":"An eco-modulation adjustment the customer entered from their PRO (percent of the base fee).","properties":{"category_codes":{"items":{"maxLength":128,"minLength":1,"type":"string"},"type":"array"},"group_id":{"maxLength":64,"minLength":1,"type":"string"},"note":{"default":"","maxLength":500,"type":"string"},"percent":{"format":"decimal","pattern":"^-?\\d{0,5}(?:\\.\\d{0,3})?$","type":"string"}},"required":["group_id","percent"],"type":"object"},"OAuthClient":{"description":"A registered public OAuth client.","properties":{"client_id":{"type":"string"},"client_id_issued_at":{"type":"integer"},"client_name":{"type":"string"},"grant_types":{"items":{"type":"string"},"type":"array"},"redirect_uris":{"items":{"type":"string"},"type":"array"},"response_types":{"items":{"type":"string"},"type":"array"},"token_endpoint_auth_method":{"type":"string"}},"required":["client_id","client_id_issued_at","client_name","grant_types","redirect_uris","response_types","token_endpoint_auth_method"],"type":"object"},"OAuthClientRegistrationRequest":{"description":"``POST /oauth/register`` body (RFC 7591 client metadata).","properties":{"client_name":{"type":"string"},"grant_types":{"items":{"minLength":1,"type":"string"},"type":"array"},"redirect_uris":{"description":"https or loopback URIs.","items":{"minLength":1,"type":"string"},"type":"array"},"response_types":{"items":{"minLength":1,"type":"string"},"type":"array"},"token_endpoint_auth_method":{"description":"Only none.","minLength":1,"type":"string"}},"required":["redirect_uris"],"type":"object"},"OAuthIntrospection":{"description":"RFC 7662 introspection result.","properties":{"active":{"type":"boolean"},"client_id":{"type":"string"},"entity_ids":{"items":{"type":"integer"},"type":"array"},"exp":{"type":"integer"},"iat":{"type":"integer"},"livemode":{"type":"boolean"},"scope":{"type":"string"},"token_type":{"type":"string"}},"required":["active"],"type":"object"},"OAuthToken":{"description":"A short-lived bearer token.","properties":{"access_token":{"type":"string"},"entity_ids":{"items":{"type":"integer"},"type":"array"},"expires_in":{"type":"integer"},"livemode":{"type":"boolean"},"refresh_token":{"description":"Authorization-code grants only; rotates on use.","type":"string"},"scope":{"type":"string"},"token_type":{"type":"string"}},"required":["access_token","entity_ids","expires_in","livemode","scope","token_type"],"type":"object"},"OAuthTokenActionRequest":{"description":"``POST /oauth/introspect`` and ``/oauth/revoke`` body.","properties":{"client_id":{"type":"string"},"client_secret":{"type":"string"},"token":{"minLength":1,"type":"string"}},"required":["token"],"type":"object"},"OAuthTokenRequestRequest":{"description":"``POST /oauth/token`` body (JSON or form). Credentials may instead use HTTP Basic.","properties":{"client_id":{"description":"The service account id.","type":"string"},"client_secret":{"description":"The service account secret.","type":"string"},"code":{"description":"authorization_code: the code.","type":"string"},"code_verifier":{"description":"authorization_code: PKCE.","type":"string"},"grant_type":{"description":"client_credentials, authorization_code or refresh_token.","minLength":1,"type":"string"},"redirect_uri":{"description":"authorization_code: as sent.","type":"string"},"refresh_token":{"description":"refresh_token: the token.","type":"string"},"scope":{"description":"Space-separated scopes; blank = all.","type":"string"}},"required":["grant_type"],"type":"object"},"OpacityEnum":{"description":"* `transparent` - Transparent\n* `translucent` - Translucent\n* `opaque` - Opaque\n* `` - ","enum":["transparent","translucent","opaque"],"type":"string"},"OperatorRecoveryDecisionRequest":{"description":"Staff decision on a sole owner's recovery, with the written identity-verification reason.","properties":{"approve":{"type":"boolean"},"reason":{"maxLength":500,"minLength":1,"type":"string"}},"required":["approve","reason"],"type":"object"},"OptionsRequest":{"description":"Choices that change how a schedule is applied.","properties":{"flat_tier_id":{"default":"","maxLength":64,"type":"string"},"include_other_fee_ids":{"items":{"maxLength":64,"minLength":1,"type":"string"},"type":"array"},"modulation":{"items":{"$ref":"#/components/schemas/ModulationRequest"},"type":"array"}},"type":"object"},"OwnRecoveryRequestRequest":{"description":"Ask for a reset of your own factors, with an optional note for whoever verifies you.","properties":{"note":{"default":"","maxLength":1000,"type":"string"}},"type":"object"},"OwnershipTransferRequest":{"description":"Hand ownership to another active member.","properties":{"new_owner_member_uid":{"minLength":1,"type":"string"},"previous_owner_role":{"allOf":[{"$ref":"#/components/schemas/PreviousOwnerRoleEnum"}],"default":"admin"}},"required":["new_owner_member_uid"],"type":"object"},"PackagingComponent":{"description":"Serialize packaging components with their latest confirmed weight.","properties":{"compostable":{"nullable":true,"type":"boolean"},"format":{"maxLength":255,"type":"string"},"format_label":{"description":"Return the format in the reader's language (a template's French name, say); ``format`` stays as stored.","readOnly":true,"type":"string"},"id":{"readOnly":true,"type":"integer"},"is_active":{"readOnly":true,"type":"boolean"},"latest_grams":{"description":"Return the newest non-voided confirmed gram value.","nullable":true,"readOnly":true,"type":"string"},"material_category":{"type":"integer"},"name":{"maxLength":255,"type":"string"},"pcr_percent":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,3}(?:\\.\\d{0,2})?$","type":"string"},"recyclable":{"nullable":true,"type":"boolean"},"reusable":{"nullable":true,"type":"boolean"},"sort_order":{"maximum":2147483647,"minimum":0,"type":"integer"},"spec":{"readOnly":true,"type":"integer"},"units_per_sku":{"minimum":1,"type":"integer"},"weight_grams":{"description":"Return the best known grams per unit (measured, else typed), or ``None`` when no weight is known.","nullable":true,"readOnly":true,"type":"string"},"weight_tier":{"description":"Return how well ``weight_grams`` is known, or ``None`` when no weight is known.","nullable":true,"readOnly":true,"type":"string"}},"required":["format_label","id","is_active","latest_grams","material_category","name","spec","weight_grams","weight_tier"],"type":"object"},"PackagingComponentRequest":{"description":"Serialize packaging components with their latest confirmed weight.","properties":{"compostable":{"nullable":true,"type":"boolean"},"format":{"maxLength":255,"type":"string"},"material_category":{"type":"integer"},"name":{"maxLength":255,"minLength":1,"type":"string"},"pcr_percent":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,3}(?:\\.\\d{0,2})?$","type":"string"},"recyclable":{"nullable":true,"type":"boolean"},"reusable":{"nullable":true,"type":"boolean"},"sort_order":{"maximum":2147483647,"minimum":0,"type":"integer"},"units_per_sku":{"minimum":1,"type":"integer"}},"required":["material_category","name"],"type":"object"},"PackagingSku":{"description":"Serialize a packaging SKU and its component hierarchy.","properties":{"components":{"items":{"additionalProperties":{},"type":"object"},"readOnly":true,"type":"array"},"created_at":{"format":"date-time","readOnly":true,"type":"string"},"gtin":{"maxLength":32,"type":"string"},"id":{"readOnly":true,"type":"integer"},"is_active":{"readOnly":true,"type":"boolean"},"name":{"maxLength":255,"type":"string"},"notes":{"type":"string"},"sku_code":{"maxLength":128,"type":"string"},"upc":{"maxLength":32,"type":"string"},"updated_at":{"format":"date-time","readOnly":true,"type":"string"}},"required":["components","created_at","id","is_active","name","sku_code","updated_at"],"type":"object"},"PackagingSkuPage":{"description":"One cursor page of packaging SKUs (E5-16): the ``data`` rows plus ``has_more`` and ``next_cursor``.","properties":{"data":{"items":{"$ref":"#/components/schemas/PackagingSku"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"},"PackagingSkuRequest":{"description":"Serialize a packaging SKU and its component hierarchy.","properties":{"gtin":{"maxLength":32,"type":"string"},"name":{"maxLength":255,"minLength":1,"type":"string"},"notes":{"type":"string"},"sku_code":{"maxLength":128,"minLength":1,"type":"string"},"upc":{"maxLength":32,"type":"string"}},"required":["name","sku_code"],"type":"object"},"PasskeyCompleteRequest":{"description":"The browser's ``PublicKeyCredential`` assertion as JSON.","properties":{"credential":{"additionalProperties":{},"type":"object"}},"required":["credential"],"type":"object"},"PatchedBrandUpdateRequest":{"description":"Body of ``PATCH brands/<id>/``: rename, move to another entity, or deactivate.","properties":{"entity_id":{"minimum":1,"type":"integer"},"is_active":{"type":"boolean"},"name":{"maxLength":255,"minLength":1,"type":"string"}},"type":"object"},"PatchedCertificateRequest":{"description":"Input for creating or updating a stored certificate; the file is optional and size-limited.","properties":{"certificate_number":{"maxLength":128,"minLength":1,"type":"string"},"component_id":{"minimum":1,"type":"integer"},"expires_on":{"format":"date","nullable":true,"type":"string"},"file":{"format":"binary","type":"string"},"issued_on":{"format":"date","nullable":true,"type":"string"},"issuer":{"maxLength":255,"minLength":1,"type":"string"},"notes":{"type":"string"},"standard":{"maxLength":128,"minLength":1,"type":"string"}},"type":"object"},"PatchedComponentInputRequest":{"description":"Create or edit a spec component with its full attribute set.","properties":{"colour":{"maxLength":64,"type":"string"},"compostable":{"nullable":true,"type":"boolean"},"compostable_certificate_expires":{"format":"date","nullable":true,"type":"string"},"compostable_certificate_number":{"maxLength":128,"type":"string"},"compostable_certification":{"maxLength":128,"type":"string"},"contact_sensitive":{"nullable":true,"type":"boolean"},"format":{"default":"","maxLength":255,"type":"string"},"markings":{"items":{"maxLength":64,"minLength":1,"type":"string"},"type":"array"},"material_code":{"maxLength":64,"minLength":1,"type":"string"},"name":{"maxLength":255,"minLength":1,"type":"string"},"opacity":{"oneOf":[{"$ref":"#/components/schemas/OpacityEnum"},{"$ref":"#/components/schemas/BlankEnum"}]},"pcr_percent":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,3}(?:\\.\\d{0,2})?$","type":"string"},"pcr_percent_tier":{"$ref":"#/components/schemas/CurrentTierEnum"},"pfas_free_declared":{"nullable":true,"type":"boolean"},"quantity_per_spec":{"default":1,"minimum":1,"type":"integer"},"recyclable":{"nullable":true,"type":"boolean"},"reusable":{"nullable":true,"type":"boolean"},"reuse_cycles":{"minimum":0,"nullable":true,"type":"integer"},"single_use_beverage_bottle":{"nullable":true,"type":"boolean"},"sort_order":{"minimum":0,"type":"integer"},"sub_material":{"maxLength":128,"type":"string"},"unit_grams":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,6}(?:\\.\\d{0,3})?$","type":"string"},"unit_grams_method":{"description":"How an estimated or declared weight was worked out; required for those tiers.","maxLength":4000,"type":"string"},"unit_grams_tier":{"$ref":"#/components/schemas/CurrentTierEnum"}},"type":"object"},"PatchedDomainUpdateRequest":{"description":"Change SSO enforcement on a verified domain.","properties":{"provider_uid":{"type":"string"},"sso_enforced":{"type":"boolean"}},"type":"object"},"PatchedEntityUpdateRequest":{"description":"Body of ``PATCH entities/<id>/``: any subset of the entity's editable fields.","properties":{"brand_answer":{"oneOf":[{"$ref":"#/components/schemas/BrandAnswerEnum"},{"$ref":"#/components/schemas/BlankEnum"}]},"country_code":{"pattern":"^[A-Z]{2}$","type":"string"},"is_active":{"type":"boolean"},"legal_name":{"maxLength":255,"type":"string"},"name":{"maxLength":255,"minLength":1,"type":"string"},"registered_address":{"type":"string"},"tax_id":{"maxLength":64,"type":"string"}},"type":"object"},"PatchedFamilyInputRequest":{"description":"Create or rename a spec family.","properties":{"name":{"maxLength":255,"minLength":1,"type":"string"},"notes":{"default":"","type":"string"}},"type":"object"},"PatchedIpAllowlistUpdateRequest":{"description":"Body of ``PATCH /identity/ip-allowlist``; omitted fields keep their stored value.","properties":{"confirm_lockout":{"default":false,"type":"boolean"},"enabled":{"type":"boolean"},"entries":{"items":{"maxLength":200,"type":"string"},"maxItems":100,"type":"array"}},"type":"object"},"PatchedPackagingComponentRequest":{"description":"Serialize packaging components with their latest confirmed weight.","properties":{"compostable":{"nullable":true,"type":"boolean"},"format":{"maxLength":255,"type":"string"},"material_category":{"type":"integer"},"name":{"maxLength":255,"minLength":1,"type":"string"},"pcr_percent":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,3}(?:\\.\\d{0,2})?$","type":"string"},"recyclable":{"nullable":true,"type":"boolean"},"reusable":{"nullable":true,"type":"boolean"},"sort_order":{"maximum":2147483647,"minimum":0,"type":"integer"},"units_per_sku":{"minimum":1,"type":"integer"}},"type":"object"},"PatchedPackagingSkuRequest":{"description":"Serialize a packaging SKU and its component hierarchy.","properties":{"gtin":{"maxLength":32,"type":"string"},"name":{"maxLength":255,"minLength":1,"type":"string"},"notes":{"type":"string"},"sku_code":{"maxLength":128,"minLength":1,"type":"string"},"upc":{"maxLength":32,"type":"string"}},"type":"object"},"PatchedPolicyUpdateRequest":{"description":"Partial update of the organization security policy; break-glass owners change only through their own route.","properties":{"allowed_factors":{"items":{"minLength":1,"type":"string"},"type":"array"},"mfa_required":{"$ref":"#/components/schemas/MfaRequiredEnum"},"mfa_roles":{"items":{"minLength":1,"type":"string"},"type":"array"},"passkey_required_roles":{"items":{"minLength":1,"type":"string"},"type":"array"},"session_absolute_hours":{"maximum":8760,"minimum":0,"type":"integer"},"session_idle_minutes":{"maximum":525600,"minimum":0,"type":"integer"}},"type":"object"},"PatchedProviderWriteRequest":{"description":"Create or update an SSO connection.","properties":{"client_secret":{"type":"string","writeOnly":true},"config":{"additionalProperties":{},"type":"object"},"default_role":{"maxLength":20,"minLength":1,"type":"string"},"enabled":{"type":"boolean"},"group_claim":{"maxLength":120,"minLength":1,"type":"string"},"idp_enforces_mfa":{"type":"boolean"},"jit_provisioning":{"type":"boolean"},"name":{"maxLength":120,"minLength":1,"type":"string"},"protocol":{"$ref":"#/components/schemas/ProtocolEnum"}},"type":"object"},"PatchedRetentionUpdateRequest":{"description":"Body of ``PATCH /identity/audit-retention``.","properties":{"audit_retention_days":{"type":"integer"}},"type":"object"},"PatchedReusableSupplyInputRequest":{"description":"Create or edit the new units of one reusable component first supplied in a period.","properties":{"component":{"type":"integer"},"jurisdiction_code":{"maxLength":8,"minLength":1,"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"units_supplied":{"maximum":2000000000,"minimum":1,"type":"integer"}},"type":"object"},"PatchedShippingProfileInputRequest":{"description":"Create or edit a shipping profile.","properties":{"attach_rate":{"default":"1.000","format":"decimal","pattern":"^-?\\d{0,1}(?:\\.\\d{0,3})?$","type":"string"},"data_quality_tier":{"allOf":[{"$ref":"#/components/schemas/CurrentTierEnum"}],"default":"estimated"},"effective_from":{"format":"date","nullable":true,"type":"string"},"effective_to":{"format":"date","nullable":true,"type":"string"},"is_active":{"default":true,"type":"boolean"},"jurisdiction_code":{"maxLength":8,"minLength":1,"pattern":"^[A-Z]{2}(-[A-Z0-9]{1,3})?$","type":"string"},"name":{"maxLength":255,"minLength":1,"type":"string"},"sku":{"nullable":true,"type":"integer"},"spec":{"type":"integer"}},"type":"object"},"PatchedSpecInputRequest":{"description":"Create or edit a packaging spec.","properties":{"code":{"default":"","maxLength":128,"type":"string"},"description":{"default":"","type":"string"},"family":{"nullable":true,"type":"integer"},"level":{"allOf":[{"$ref":"#/components/schemas/LevelEnum"}],"default":"primary"},"name":{"maxLength":255,"minLength":1,"type":"string"},"variant_label":{"default":"","maxLength":255,"type":"string"},"variant_of":{"nullable":true,"type":"integer"}},"type":"object"},"PatchedTrackingRequest":{"description":"Own goals and sourced targets with computed progress (percent of the way from baseline to target).","properties":{"baseline_value":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,11}(?:\\.\\d{0,3})?$","type":"string"},"baseline_year":{"maximum":2147483647,"minimum":0,"nullable":true,"type":"integer"},"current_tier":{"$ref":"#/components/schemas/CurrentTierEnum"},"current_value":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,11}(?:\\.\\d{0,3})?$","type":"string"},"entity_id":{"nullable":true,"type":"integer"},"is_regulatory":{"type":"boolean"},"jurisdiction_code":{"maxLength":8,"pattern":"^[A-Z]{2}(-[A-Z0-9]{1,3})?$","type":"string"},"metric":{"$ref":"#/components/schemas/MetricEnum"},"source_url":{"format":"uri","maxLength":500,"type":"string"},"target_value":{"format":"decimal","pattern":"^-?\\d{0,11}(?:\\.\\d{0,3})?$","type":"string"},"target_year":{"maximum":2147483647,"minimum":0,"type":"integer"}},"type":"object"},"PatchedWebhookEndpointUpdateRequest":{"description":"Change a webhook endpoint.","properties":{"description":{"maxLength":255,"type":"string"},"events":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"is_active":{"type":"boolean"},"url":{"format":"uri","maxLength":2048,"minLength":1,"type":"string"}},"type":"object"},"PatchedWorkspaceSetupRequest":{"description":"Workspace fields plus the company's legal name, which names the default legal entity.","properties":{"ai_assist_default":{"type":"boolean"},"company_country_code":{"description":"The first legal entity's country, as an ISO 3166-1 alpha-2 code.","minLength":1,"pattern":"^[A-Z]{2}$","type":"string","writeOnly":true},"company_legal_name":{"description":"The company's legal name; it names the default legal entity used on declarations and exports.","maxLength":255,"minLength":1,"type":"string","writeOnly":true},"component_library_opt_in":{"type":"boolean"},"declaration_signer_name":{"maxLength":255,"type":"string"},"declaration_signer_title":{"maxLength":255,"type":"string"},"first_brand_name":{"description":"The brand on the first legal entity's products; optional.","maxLength":255,"type":"string","writeOnly":true},"monthly_spend_alert_cents":{"maximum":2147483647,"minimum":0,"nullable":true,"type":"integer"},"workspace_name":{"description":"The workspace's own name, for example a consultant's practice; it may differ from the first client.","maxLength":255,"minLength":1,"type":"string","writeOnly":true}},"type":"object"},"PeriodChoice":{"description":"A reporting period an external auditor can be limited to, with the entity it belongs to.","properties":{"entity_id":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["entity_id","id","name"],"type":"object"},"PeriodCreateRequest":{"description":"Body of ``POST reports/periods/``.","properties":{"due_date":{"format":"date","nullable":true,"type":"string"},"entity_id":{"minimum":1,"type":"integer"},"jurisdiction_code":{"minLength":1,"pattern":"^[A-Z]{2}(-[A-Z0-9]{1,3})?$","type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"}},"required":["entity_id","jurisdiction_code","period_end","period_start"],"type":"object"},"PeriodRequest":{"description":"A jurisdiction, a reporting period and the choices for one estimate.","properties":{"all_clients":{"default":false,"type":"boolean"},"entity_id":{"minimum":1,"nullable":true,"type":"integer"},"fee_id":{"default":"","maxLength":64,"type":"string"},"jurisdiction_code":{"maxLength":8,"minLength":1,"type":"string"},"options":{"$ref":"#/components/schemas/OptionsRequest"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"reporting_currency":{"default":"","oneOf":[{"$ref":"#/components/schemas/ReportingCurrencyEnum"},{"$ref":"#/components/schemas/BlankEnum"}]}},"required":["jurisdiction_code","period_end","period_start"],"type":"object"},"PlanEnum":{"description":"* `free` - free\n* `starter` - starter\n* `growth` - growth\n* `scale` - scale","enum":["free","starter","growth","scale"],"type":"string"},"PortalRequest":{"description":"Body of ``POST billing/portal/``: where Stripe sends the customer back to.","properties":{"return_url":{"maxLength":2000,"type":"string"}},"type":"object"},"PreferenceChangeRequest":{"description":"One requested preference change.","properties":{"channel":{"$ref":"#/components/schemas/ChannelEnum"},"enabled":{"type":"boolean"},"kind":{"maxLength":40,"minLength":1,"type":"string"}},"required":["channel","enabled","kind"],"type":"object"},"PreferencesInputRequest":{"description":"Body of ``PUT preferences/``.","properties":{"preferences":{"items":{"$ref":"#/components/schemas/PreferenceChangeRequest"},"type":"array"}},"required":["preferences"],"type":"object"},"PreviewRequest":{"description":"Wizard answers.","properties":{"levels":{"items":{"$ref":"#/components/schemas/LevelsEnum"},"type":"array"},"product_types":{"items":{"$ref":"#/components/schemas/ProductTypesEnum"},"type":"array"},"regions":{"items":{"minLength":1,"pattern":"^[A-Z]{2}(-[A-Z0-9]{1,3})?$","type":"string"},"maxItems":60,"minItems":1,"type":"array"},"revenue":{"$ref":"#/components/schemas/RevenueAnswerRequest"},"role":{"allOf":[{"$ref":"#/components/schemas/RoleFddEnum"}],"description":"Whose brand is on the products: own_brand, other_brands, or unsure (no role is assumed).\n\n* `own_brand` - own_brand\n* `other_brands` - other_brands\n* `unsure` - unsure"}},"required":["regions"],"type":"object"},"PreviousOwnerRoleEnum":{"description":"* `admin` - admin\n* `contributor` - contributor\n* `auditor` - auditor","enum":["admin","contributor","auditor"],"type":"string"},"ProductTypesEnum":{"description":"* `paper` - paper\n* `plastic` - plastic\n* `glass` - glass\n* `metal` - metal\n* `wood` - wood","enum":["paper","plastic","glass","metal","wood"],"type":"string"},"ProtocolEnum":{"description":"* `saml` - saml\n* `oidc` - oidc","enum":["saml","oidc"],"type":"string"},"ProviderWriteRequest":{"description":"Create or update an SSO connection.","properties":{"client_secret":{"type":"string","writeOnly":true},"config":{"additionalProperties":{},"type":"object"},"default_role":{"maxLength":20,"minLength":1,"type":"string"},"enabled":{"type":"boolean"},"group_claim":{"maxLength":120,"minLength":1,"type":"string"},"idp_enforces_mfa":{"type":"boolean"},"jit_provisioning":{"type":"boolean"},"name":{"maxLength":120,"minLength":1,"type":"string"},"protocol":{"$ref":"#/components/schemas/ProtocolEnum"}},"type":"object"},"RateSourceEnum":{"description":"* `customer_entered` - Entered by the customer\n* `ecb` - European Central Bank reference rate\n* `bank_of_canada` - Bank of Canada\n* `bank_of_england` - Bank of England\n* `other` - Other published source","enum":["customer_entered","ecb","bank_of_canada","bank_of_england","other"],"type":"string"},"RecoveryDecisionRequest":{"description":"Owner decision.","properties":{"approve":{"type":"boolean"}},"required":["approve"],"type":"object"},"RecoveryRequestRequest":{"description":"Ask owners to reset a member's factors.","properties":{"member_uid":{"type":"integer"}},"required":["member_uid"],"type":"object"},"RegionalRevenueRequest":{"description":"Revenue earned in one of the chosen places for the last full year, in the answer's currency.","properties":{"amount":{"format":"decimal","pattern":"^-?\\d{0,14}(?:\\.\\d{0,2})?$","type":"string"},"jurisdiction":{"minLength":1,"pattern":"^[A-Z]{2}(-[A-Z0-9]{1,3})?$","type":"string"}},"required":["amount","jurisdiction"],"type":"object"},"ReportingCurrencyEnum":{"description":"* `AED` - AED\n* `AFN` - AFN\n* `ALL` - ALL\n* `AMD` - AMD\n* `AOA` - AOA\n* `ARS` - ARS\n* `AUD` - AUD\n* `AWG` - AWG\n* `AZN` - AZN\n* `BAM` - BAM\n* `BBD` - BBD\n* `BDT` - BDT\n* `BGN` - BGN\n* `BHD` - BHD\n* `BIF` - BIF\n* `BMD` - BMD\n* `BND` - BND\n* `BOB` - BOB\n* `BRL` - BRL\n* `BSD` - BSD\n* `BTN` - BTN\n* `BWP` - BWP\n* `BYN` - BYN\n* `BZD` - BZD\n* `CAD` - CAD\n* `CDF` - CDF\n* `CHF` - CHF\n* `CLP` - CLP\n* `CNY` - CNY\n* `COP` - COP\n* `CRC` - CRC\n* `CUP` - CUP\n* `CVE` - CVE\n* `CZK` - CZK\n* `DJF` - DJF\n* `DKK` - DKK\n* `DOP` - DOP\n* `DZD` - DZD\n* `EGP` - EGP\n* `ERN` - ERN\n* `ETB` - ETB\n* `EUR` - EUR\n* `FJD` - FJD\n* `FKP` - FKP\n* `GBP` - GBP\n* `GEL` - GEL\n* `GHS` - GHS\n* `GIP` - GIP\n* `GMD` - GMD\n* `GNF` - GNF\n* `GTQ` - GTQ\n* `GYD` - GYD\n* `HKD` - HKD\n* `HNL` - HNL\n* `HTG` - HTG\n* `HUF` - HUF\n* `IDR` - IDR\n* `ILS` - ILS\n* `INR` - INR\n* `IQD` - IQD\n* `IRR` - IRR\n* `ISK` - ISK\n* `JMD` - JMD\n* `JOD` - JOD\n* `JPY` - JPY\n* `KES` - KES\n* `KGS` - KGS\n* `KHR` - KHR\n* `KMF` - KMF\n* `KPW` - KPW\n* `KRW` - KRW\n* `KWD` - KWD\n* `KYD` - KYD\n* `KZT` - KZT\n* `LAK` - LAK\n* `LBP` - LBP\n* `LKR` - LKR\n* `LRD` - LRD\n* `LSL` - LSL\n* `LYD` - LYD\n* `MAD` - MAD\n* `MDL` - MDL\n* `MGA` - MGA\n* `MKD` - MKD\n* `MMK` - MMK\n* `MNT` - MNT\n* `MOP` - MOP\n* `MRU` - MRU\n* `MUR` - MUR\n* `MVR` - MVR\n* `MWK` - MWK\n* `MXN` - MXN\n* `MYR` - MYR\n* `MZN` - MZN\n* `NAD` - NAD\n* `NGN` - NGN\n* `NIO` - NIO\n* `NOK` - NOK\n* `NPR` - NPR\n* `NZD` - NZD\n* `OMR` - OMR\n* `PAB` - PAB\n* `PEN` - PEN\n* `PGK` - PGK\n* `PHP` - PHP\n* `PKR` - PKR\n* `PLN` - PLN\n* `PYG` - PYG\n* `QAR` - QAR\n* `RON` - RON\n* `RSD` - RSD\n* `RUB` - RUB\n* `RWF` - RWF\n* `SAR` - SAR\n* `SBD` - SBD\n* `SCR` - SCR\n* `SDG` - SDG\n* `SEK` - SEK\n* `SGD` - SGD\n* `SHP` - SHP\n* `SLE` - SLE\n* `SOS` - SOS\n* `SRD` - SRD\n* `SSP` - SSP\n* `STN` - STN\n* `SVC` - SVC\n* `SYP` - SYP\n* `SZL` - SZL\n* `THB` - THB\n* `TJS` - TJS\n* `TMT` - TMT\n* `TND` - TND\n* `TOP` - TOP\n* `TRY` - TRY\n* `TTD` - TTD\n* `TWD` - TWD\n* `TZS` - TZS\n* `UAH` - UAH\n* `UGX` - UGX\n* `USD` - USD\n* `UYU` - UYU\n* `UZS` - UZS\n* `VES` - VES\n* `VND` - VND\n* `VUV` - VUV\n* `WST` - WST\n* `XAF` - XAF\n* `XCD` - XCD\n* `XCG` - XCG\n* `XOF` - XOF\n* `XPF` - XPF\n* `YER` - YER\n* `ZAR` - ZAR\n* `ZMW` - ZMW\n* `ZWG` - ZWG","enum":["AED","AFN","ALL","AMD","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHF","CLP","CNY","COP","CRC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLE","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VES","VND","VUV","WST","XAF","XCD","XCG","XOF","XPF","YER","ZAR","ZMW","ZWG"],"type":"string"},"ReusableSupplyInputRequest":{"description":"Create or edit the new units of one reusable component first supplied in a period.","properties":{"component":{"type":"integer"},"jurisdiction_code":{"maxLength":8,"minLength":1,"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"units_supplied":{"maximum":2000000000,"minimum":1,"type":"integer"}},"required":["component","jurisdiction_code","period_end","period_start","units_supplied"],"type":"object"},"RevenueAnswerRequest":{"description":"Worldwide annual revenue for the last full year and, optionally, the revenue earned in each chosen place.","properties":{"amount":{"description":"Worldwide revenue. May be left out when only revenue in places is given.","format":"decimal","nullable":true,"pattern":"^-?\\d{0,14}(?:\\.\\d{0,2})?$","type":"string"},"currency":{"minLength":1,"pattern":"^[A-Z]{3}$","type":"string"},"regional":{"description":"Revenue in a chosen place, for rules that count only the revenue earned there (Ontario).","items":{"$ref":"#/components/schemas/RegionalRevenueRequest"},"type":"array"}},"required":["currency"],"type":"object"},"RevenueInputRequest":{"description":"One year of revenue for an entity, as a decimal string; ``amount: null`` removes that row.\n\n``jurisdiction`` is empty for worldwide revenue, or a place code for the revenue earned in that place.","properties":{"amount":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,14}(?:\\.\\d{0,2})?$","type":"string"},"currency":{"minLength":1,"pattern":"^[A-Z]{3}$","type":"string"},"entity_id":{"minimum":1,"type":"integer"},"jurisdiction":{"default":"","pattern":"^[A-Z]{2}(-[A-Z0-9]{1,3})?$","type":"string"},"year":{"maximum":2100,"minimum":1990,"type":"integer"}},"required":["amount","currency","entity_id","year"],"type":"object"},"RoleFddEnum":{"description":"* `own_brand` - own_brand\n* `other_brands` - other_brands\n* `unsure` - unsure","enum":["own_brand","other_brands","unsure"],"type":"string"},"RoleRuleRequest":{"description":"IdP group to role.","properties":{"entity_ids":{"items":{"type":"integer"},"type":"array"},"group":{"maxLength":255,"minLength":1,"type":"string"},"role":{"maxLength":20,"minLength":1,"type":"string"}},"required":["group","role"],"type":"object"},"Sandbox":{"description":"The sandbox organization linked to the live organization.","properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"name":{"type":"string"},"object":{"type":"string"},"organization_id":{"type":"integer"}},"required":["created_at","id","name","object","organization_id"],"type":"object"},"ScimTokenCreateRequest":{"description":"Name a new SCIM token; the name is required and unique among the organization's active tokens.","properties":{"name":{"maxLength":120,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"ScopeChoice":{"description":"An entity or brand a member can be scoped to.","properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"SeatSummary":{"description":"Seats in use against the limit (``limit`` null means unlimited).","properties":{"at_limit":{"type":"boolean"},"in_use":{"type":"integer"},"limit":{"nullable":true,"type":"integer"},"upgrade_path":{"type":"string"}},"required":["at_limit","in_use","limit","upgrade_path"],"type":"object"},"SettingsRequest":{"description":"Reporting currency and invoice-check tolerances.","properties":{"journal_date_style":{"oneOf":[{"$ref":"#/components/schemas/JournalDateStyleEnum"},{"$ref":"#/components/schemas/BlankEnum"}]},"journal_expense_account":{"maxLength":120,"type":"string"},"journal_liability_account":{"maxLength":120,"type":"string"},"reporting_currency":{"oneOf":[{"$ref":"#/components/schemas/ReportingCurrencyEnum"},{"$ref":"#/components/schemas/BlankEnum"}]},"tolerance_amount":{"format":"decimal","pattern":"^-?\\d{0,10}(?:\\.\\d{0,2})?$","type":"string"},"tolerance_percent":{"format":"decimal","pattern":"^-?\\d{0,4}(?:\\.\\d{0,2})?$","type":"string"}},"type":"object"},"ShippingProfileInputRequest":{"description":"Create or edit a shipping profile.","properties":{"attach_rate":{"default":"1.000","format":"decimal","pattern":"^-?\\d{0,1}(?:\\.\\d{0,3})?$","type":"string"},"data_quality_tier":{"allOf":[{"$ref":"#/components/schemas/CurrentTierEnum"}],"default":"estimated"},"effective_from":{"format":"date","nullable":true,"type":"string"},"effective_to":{"format":"date","nullable":true,"type":"string"},"is_active":{"default":true,"type":"boolean"},"jurisdiction_code":{"maxLength":8,"minLength":1,"pattern":"^[A-Z]{2}(-[A-Z0-9]{1,3})?$","type":"string"},"name":{"maxLength":255,"minLength":1,"type":"string"},"sku":{"nullable":true,"type":"integer"},"spec":{"type":"integer"}},"required":["jurisdiction_code","name","spec"],"type":"object"},"SignatureRequest":{"description":"One signature: ``image`` is a ``data:image/png;base64,`` URL; a typed one names its style and text.","properties":{"font":{"default":"","maxLength":32,"type":"string"},"image":{"maxLength":349551,"minLength":1,"type":"string"},"method":{"$ref":"#/components/schemas/MethodEnum"},"typed_text":{"default":"","maxLength":255,"type":"string"}},"required":["image","method"],"type":"object"},"SigningRightRequest":{"description":"Grant or revoke the report-signing right.","properties":{"can_sign_reports":{"type":"boolean"}},"required":["can_sign_reports"],"type":"object"},"SimulateRequest":{"description":"Body of ``POST targets/simulate/``.","properties":{"as_of":{"format":"date","type":"string"},"baseline_plastic_grams":{"format":"decimal","pattern":"^-?\\d{0,15}(?:\\.\\d{0,3})?$","type":"string"},"baseline_year":{"maximum":2100,"minimum":1990,"type":"integer"},"changes":{"items":{"$ref":"#/components/schemas/ChangeRequest"},"type":"array"},"markets":{"items":{"minLength":1,"pattern":"^[A-Z]{2}(-[A-Z0-9]{1,3})?$","type":"string"},"type":"array"},"spec_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"}},"required":["changes"],"type":"object"},"SkuStateVolume":{"description":"Serialize one state and year sales-volume row (a ``US-xx`` jurisdiction over a calendar year).","properties":{"place":{"maxLength":8,"type":"string"},"state":{"maxLength":2,"type":"string"},"units_sold":{"minimum":0,"nullable":true,"type":"integer"},"year":{"maximum":2100,"minimum":2000,"type":"integer"}},"required":["units_sold","year"],"type":"object"},"SkuStateVolumeRequest":{"description":"Serialize one state and year sales-volume row (a ``US-xx`` jurisdiction over a calendar year).","properties":{"place":{"maxLength":8,"minLength":1,"type":"string"},"state":{"maxLength":2,"minLength":1,"type":"string"},"units_sold":{"minimum":0,"nullable":true,"type":"integer"},"year":{"maximum":2100,"minimum":2000,"type":"integer"}},"required":["units_sold","year"],"type":"object"},"SpecApprovalInputRequest":{"description":"Approve a spec's current draft revision, with an optional note.","properties":{"note":{"default":"","maxLength":2000,"type":"string"}},"type":"object"},"SpecInputRequest":{"description":"Create or edit a packaging spec.","properties":{"code":{"default":"","maxLength":128,"type":"string"},"description":{"default":"","type":"string"},"family":{"nullable":true,"type":"integer"},"level":{"allOf":[{"$ref":"#/components/schemas/LevelEnum"}],"default":"primary"},"name":{"maxLength":255,"minLength":1,"type":"string"},"variant_label":{"default":"","maxLength":255,"type":"string"},"variant_of":{"nullable":true,"type":"integer"}},"required":["name"],"type":"object"},"StartSession":{"description":"Who is signing in on the public start page, always answered with 200 so the browser logs no refusal.","properties":{"code":{"description":"The refusal code behind blocked, or blank","type":"string"},"message":{"description":"Why the person is held back, or blank","type":"string"},"state":{"allOf":[{"$ref":"#/components/schemas/StateEnum"}],"description":"signed_out: no session. unverified: the email address is not verified yet. no_workspace: signed in with no workspace yet. blocked: signed in but held back (see message). setup: terms not accepted yet. ready: the workspace is in use. unavailable: the workspace could not be read.\n\n* `signed_out` - signed_out\n* `unverified` - unverified\n* `no_workspace` - no_workspace\n* `blocked` - blocked\n* `setup` - setup\n* `ready` - ready\n* `unavailable` - unavailable"},"workspace":{"allOf":[{"$ref":"#/components/schemas/Workspace"}],"description":"The workspace for setup and ready, else null","nullable":true}},"required":["code","message","state","workspace"],"type":"object"},"StateEnum":{"description":"* `signed_out` - signed_out\n* `unverified` - unverified\n* `no_workspace` - no_workspace\n* `blocked` - blocked\n* `setup` - setup\n* `ready` - ready\n* `unavailable` - unavailable","enum":["signed_out","unverified","no_workspace","blocked","setup","ready","unavailable"],"type":"string"},"TeamMember":{"description":"A member with EPR permissions and entity scope.","properties":{"access_expires_at":{"format":"date-time","nullable":true,"type":"string"},"brand_ids":{"items":{"type":"integer"},"type":"array"},"can_approve_specs":{"type":"boolean"},"can_manage_team":{"type":"boolean"},"can_sign_reports":{"type":"boolean"},"email":{"type":"string"},"entity_ids":{"items":{"type":"integer"},"type":"array"},"entity_scope_restricted":{"type":"boolean"},"is_external_auditor":{"type":"boolean"},"joined_at":{"format":"date-time","type":"string"},"name":{"type":"string"},"period_ids":{"items":{"type":"integer"},"type":"array"},"role":{"type":"string"},"uid":{"type":"string"}},"required":["access_expires_at","brand_ids","can_approve_specs","can_manage_team","can_sign_reports","email","entity_ids","entity_scope_restricted","is_external_auditor","joined_at","name","period_ids","role","uid"],"type":"object"},"TeamOverview":{"description":"Members, seats, the caller's capabilities and the entities and brands available for scoping.","properties":{"brands":{"items":{"$ref":"#/components/schemas/ScopeChoice"},"type":"array"},"can_manage":{"type":"boolean"},"entities":{"items":{"$ref":"#/components/schemas/ScopeChoice"},"type":"array"},"is_owner":{"type":"boolean"},"members":{"items":{"$ref":"#/components/schemas/TeamMember"},"type":"array"},"owner_count":{"type":"integer"},"periods":{"items":{"$ref":"#/components/schemas/PeriodChoice"},"type":"array"},"seats":{"$ref":"#/components/schemas/SeatSummary"}},"required":["brands","can_manage","entities","is_owner","members","owner_count","periods","seats"],"type":"object"},"TeardownSession":{"description":"Serialize a resumable teardown session.","properties":{"analysis":{"readOnly":true},"completed_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"device":{"$ref":"#/components/schemas/DeviceEnum"},"id":{"readOnly":true,"type":"integer"},"sku":{"type":"integer"},"started_at":{"format":"date-time","readOnly":true,"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/TeardownSessionStatusEnum"}],"readOnly":true}},"required":["analysis","completed_at","device","id","sku","started_at","status"],"type":"object"},"TeardownSessionRequest":{"description":"Serialize a resumable teardown session.","properties":{"device":{"$ref":"#/components/schemas/DeviceEnum"},"sku":{"type":"integer"}},"required":["device","sku"],"type":"object"},"TeardownSessionStatusEnum":{"description":"* `in_progress` - In progress\n* `completed` - Completed\n* `abandoned` - Abandoned","enum":["in_progress","completed","abandoned"],"type":"string"},"TrackingRequest":{"description":"Own goals and sourced targets with computed progress (percent of the way from baseline to target).","properties":{"baseline_value":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,11}(?:\\.\\d{0,3})?$","type":"string"},"baseline_year":{"maximum":2147483647,"minimum":0,"nullable":true,"type":"integer"},"current_tier":{"$ref":"#/components/schemas/CurrentTierEnum"},"current_value":{"format":"decimal","nullable":true,"pattern":"^-?\\d{0,11}(?:\\.\\d{0,3})?$","type":"string"},"entity_id":{"nullable":true,"type":"integer"},"is_regulatory":{"type":"boolean"},"jurisdiction_code":{"maxLength":8,"pattern":"^[A-Z]{2}(-[A-Z0-9]{1,3})?$","type":"string"},"metric":{"$ref":"#/components/schemas/MetricEnum"},"source_url":{"format":"uri","maxLength":500,"type":"string"},"target_value":{"format":"decimal","pattern":"^-?\\d{0,11}(?:\\.\\d{0,3})?$","type":"string"},"target_year":{"maximum":2147483647,"minimum":0,"type":"integer"}},"required":["metric","target_value","target_year"],"type":"object"},"UnitEnum":{"description":"* `kg` - kg\n* `tonne` - tonne\n* `lb` - lb\n* `short_ton` - short_ton\n* `item` - item","enum":["kg","tonne","lb","short_ton","item"],"type":"string"},"WebAuthnCompleteRequest":{"description":"Browser credential JSON plus an optional label.","properties":{"credential":{"additionalProperties":{},"type":"object"},"name":{"maxLength":120,"type":"string"}},"required":["credential"],"type":"object"},"WebhookDelivery":{"description":"One delivery-log row.","properties":{"attempts":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"delivered_at":{"format":"date-time","nullable":true,"type":"string"},"endpoint_id":{"format":"uuid","type":"string"},"error":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string"},"id":{"format":"uuid","type":"string"},"next_attempt_at":{"format":"date-time","nullable":true,"type":"string"},"object":{"type":"string"},"redelivery_of":{"format":"uuid","nullable":true,"type":"string"},"response_excerpt":{"type":"string"},"response_status":{"nullable":true,"type":"integer"},"status":{"type":"string"}},"required":["attempts","created_at","delivered_at","endpoint_id","error","event_id","event_type","id","next_attempt_at","object","redelivery_of","response_excerpt","response_status","status"],"type":"object"},"WebhookDeliveryList":{"description":"A page of deliveries.","properties":{"data":{"items":{"$ref":"#/components/schemas/WebhookDelivery"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"},"WebhookEndpoint":{"description":"A webhook endpoint without its secret.","properties":{"created_at":{"format":"date-time","type":"string"},"description":{"type":"string"},"disabled_at":{"format":"date-time","nullable":true,"type":"string"},"disabled_reason":{"type":"string"},"events":{"items":{"type":"string"},"type":"array"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"livemode":{"type":"boolean"},"object":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"url":{"type":"string"}},"required":["created_at","description","disabled_at","disabled_reason","events","id","is_active","livemode","object","updated_at","url"],"type":"object"},"WebhookEndpointCreateRequest":{"description":"Create a webhook endpoint.","properties":{"description":{"default":"","maxLength":255,"type":"string"},"events":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"livemode":{"default":true,"type":"boolean"},"url":{"format":"uri","maxLength":2048,"minLength":1,"type":"string"}},"required":["events","url"],"type":"object"},"WebhookEndpointList":{"description":"A page of endpoints.","properties":{"data":{"items":{"$ref":"#/components/schemas/WebhookEndpoint"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"},"WebhookEndpointSecret":{"description":"An endpoint returned with its signing secret (creation and rotation only).","properties":{"created_at":{"format":"date-time","type":"string"},"description":{"type":"string"},"disabled_at":{"format":"date-time","nullable":true,"type":"string"},"disabled_reason":{"type":"string"},"events":{"items":{"type":"string"},"type":"array"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"livemode":{"type":"boolean"},"object":{"type":"string"},"secret":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"url":{"type":"string"}},"required":["created_at","description","disabled_at","disabled_reason","events","id","is_active","livemode","object","secret","updated_at","url"],"type":"object"},"WebhookEventCatalog":{"description":"The catalog of subscribable events.","properties":{"api_version":{"type":"string"},"data":{"items":{"$ref":"#/components/schemas/WebhookEventType"},"type":"array"}},"required":["api_version","data"],"type":"object"},"WebhookEventType":{"description":"One event type in the catalog.","properties":{"description":{"type":"string"},"type":{"type":"string"}},"required":["description","type"],"type":"object"},"Workspace":{"description":"Serialize producer workspace identity and launch state.","properties":{"ai_assist_default":{"type":"boolean"},"component_library_opt_in":{"type":"boolean"},"created_at":{"format":"date-time","readOnly":true,"type":"string"},"current_terms_version":{"description":"Return the terms version a new acceptance would record.","readOnly":true,"type":"string"},"declaration_signer_name":{"maxLength":255,"type":"string"},"declaration_signer_title":{"maxLength":255,"type":"string"},"monthly_spend_alert_cents":{"maximum":2147483647,"minimum":0,"nullable":true,"type":"integer"},"status":{"allOf":[{"$ref":"#/components/schemas/WorkspaceStatusEnum"}],"readOnly":true},"terms_accepted_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"terms_outdated":{"description":"Return whether the workspace accepted an older terms version than the current one.","readOnly":true,"type":"boolean"},"terms_signature_font":{"readOnly":true,"type":"string"},"terms_signature_method":{"readOnly":true,"type":"string"},"terms_version":{"readOnly":true,"type":"string"},"updated_at":{"format":"date-time","readOnly":true,"type":"string"},"workspace_name":{"description":"The workspace's own name (a practice or company); blank until a person names it","readOnly":true,"type":"string"}},"required":["created_at","current_terms_version","status","terms_accepted_at","terms_outdated","terms_signature_font","terms_signature_method","terms_version","updated_at","workspace_name"],"type":"object"},"WorkspaceSetupRequest":{"description":"Workspace fields plus the company's legal name, which names the default legal entity.","properties":{"ai_assist_default":{"type":"boolean"},"company_country_code":{"description":"The first legal entity's country, as an ISO 3166-1 alpha-2 code.","minLength":1,"pattern":"^[A-Z]{2}$","type":"string","writeOnly":true},"company_legal_name":{"description":"The company's legal name; it names the default legal entity used on declarations and exports.","maxLength":255,"minLength":1,"type":"string","writeOnly":true},"component_library_opt_in":{"type":"boolean"},"declaration_signer_name":{"maxLength":255,"type":"string"},"declaration_signer_title":{"maxLength":255,"type":"string"},"first_brand_name":{"description":"The brand on the first legal entity's products; optional.","maxLength":255,"type":"string","writeOnly":true},"monthly_spend_alert_cents":{"maximum":2147483647,"minimum":0,"nullable":true,"type":"integer"},"workspace_name":{"description":"The workspace's own name, for example a consultant's practice; it may differ from the first client.","maxLength":255,"minLength":1,"type":"string","writeOnly":true}},"type":"object"},"WorkspaceStatusEnum":{"description":"* `pending` - Pending\n* `active` - Active\n* `suspended` - Suspended","enum":["pending","active","suspended"],"type":"string"}},"securitySchemes":{"Bearer":{"description":"An API key (`ik_live_…` or `ik_test_…`) or an OAuth access token (`iat_…`).","scheme":"bearer","type":"http"}}},"info":{"description":"Packaging data, reports and account administration for producers. Nothing here submits to a regulator.","title":"Instica EPR API","version":"2026-10-01"},"openapi":"3.0.3","paths":{"/account-closure":{"get":{"description":"What closing the account does (grace window, deletion deadline, the longest evidence retention), the open closure if the account is closing, and whether the caller may close it now (and why not).","operationId":"get_account_closure","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountClosureStatus"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Account closure policy and status","tags":["EPR access"]}},"/allocation/compute":{"post":{"description":"Body: group_code, year. The stored policy chooses the method.","operationId":"post_allocation_compute","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"group_code":{"type":"string"},"year":{"type":"integer"}},"required":["group_code","year"],"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"properties":{"group_code":{"type":"string"},"year":{"type":"string"}},"required":["group_code","year"],"type":"object"}}}},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"accepted_rows":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"entity":{"type":"string"},"error_message":{"type":"string"},"filename":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"kind":{"type":"string"},"preset":{"type":"string"},"rejected_rows":{"type":"integer"},"result":{"additionalProperties":true,"type":"object"},"row_count":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"uid":{"type":"string"}},"required":["accepted_rows","created_at","entity","error_message","filename","finished_at","kind","preset","rejected_rows","result","row_count","started_at","status","uid"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Accepted; the work continues in the background."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Queue an allocation run for a group and year","tags":["EPR"]}},"/allocation/groups":{"get":{"description":"List groups.","operationId":"get_allocation_groups","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"group_code":{"type":"string"},"leaf_codes":{"items":{"type":"string"},"type":"array"},"methods":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"pending_codes":{"items":{"type":"string"},"type":"array"},"reference_date":{"type":"string"},"source_url":{"type":"string"}},"required":["group_code","leaf_codes","methods","name","pending_codes","reference_date","source_url"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List groups","tags":["EPR"]}},"/allocation/policies":{"get":{"description":"List policies (filters: group_code, year).","operationId":"get_allocation_policies","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"group_code":{"type":"string"},"id":{"type":"integer"},"method":{"type":"string"},"note":{"type":"string"},"reported_places":{"items":{"type":"string"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"year":{"type":"integer"}},"required":["group_code","id","method","note","reported_places","updated_at","year"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List policies (filters: group_code, year)","tags":["EPR"]},"put":{"description":"Set the method for a group and year (body: group_code, year, method, note).","operationId":"put_allocation_policies","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"group_code":{"type":"string"},"method":{"type":"string"},"note":{"type":"string"},"year":{"type":"integer"}},"required":["group_code","method","year"],"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"properties":{"group_code":{"type":"string"},"method":{"type":"string"},"note":{"type":"string"},"year":{"type":"string"}},"required":["group_code","method","year"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"group_code":{"type":"string"},"id":{"type":"integer"},"method":{"type":"string"},"note":{"type":"string"},"reported_places":{"items":{"type":"string"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"year":{"type":"integer"}},"required":["group_code","id","method","note","reported_places","updated_at","year"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"group_code":{"type":"string"},"id":{"type":"integer"},"method":{"type":"string"},"note":{"type":"string"},"reported_places":{"items":{"type":"string"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"year":{"type":"integer"}},"required":["group_code","id","method","note","reported_places","updated_at","year"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Set the method for a group and year (body: group_code, year, method, note)","tags":["EPR"]}},"/allocation/results":{"get":{"description":"Return estimated allocated units, filtered to the caller's entity scope.","operationId":"get_allocation_results","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"counted_source":{"type":"string"},"counted_units":{"type":"integer"},"data_quality_tier":{"type":"string"},"id":{"type":"integer"},"is_estimate":{"type":"boolean"},"jurisdiction_code":{"type":"string"},"method":{"type":"string"},"packaging_grams":{"nullable":true,"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"sku_code":{"type":"string"},"sku_id":{"type":"integer"},"units":{"type":"integer"},"weight":{"type":"string"}},"required":["counted_source","counted_units","data_quality_tier","id","is_estimate","jurisdiction_code","method","packaging_grams","period_end","period_start","sku_code","sku_id","units","weight"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return estimated allocated units, filtered to the caller's entity scope","tags":["EPR"]}},"/analytics/funnel/":{"get":{"description":"Return events, organizations and people per step, in funnel order.","operationId":"get_analytics_funnel","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"from":{"format":"date","type":"string"},"steps":{"items":{"properties":{"events":{"type":"integer"},"name":{"type":"string"},"organizations":{"type":"integer"},"people":{"type":"integer"}},"required":["events","name","organizations","people"],"type":"object"},"type":"array"},"to":{"format":"date","type":"string"}},"required":["from","steps","to"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return events, organizations and people per step, in funnel order","tags":["analytics"]}},"/api-keys":{"get":{"description":"List API keys.","operationId":"get_api_keys","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyList"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List API keys","tags":["EPR access"]},"post":{"description":"The secret is returned once. Only a hash and the prefix are stored.","operationId":"post_api_keys","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create an API key","tags":["EPR access"]}},"/api-keys/{uid}":{"delete":{"description":"Revoke an API key.","operationId":"delete_api_keys_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Revoke an API key","tags":["EPR access"]},"get":{"description":"Return one API key.","operationId":"get_api_keys_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Get an API key","tags":["EPR access"]}},"/api-keys/{uid}/rotate":{"post":{"description":"Rotate an API key.","operationId":"post_api_keys_uid_rotate","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"$ref":"#/components/responses/Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Rotate an API key","tags":["EPR access"]}},"/api-version":{"get":{"description":"Return the pinned default and the supported versions.","operationId":"get_api_version","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiVersion"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Get the default API version","tags":["EPR access"]},"put":{"description":"New keys are pinned to this version unless they name another. A request header overrides a pin.","operationId":"put_api_version","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiVersionUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiVersion"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Pin the default API version","tags":["EPR access"]}},"/assets":{"post":{"description":"Normalize, hash, and persist one organization-scoped evidence image.","operationId":"post_assets","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"captured_at_client":{"format":"date-time","type":"string"},"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"captured_at_client":{"format":"date-time","type":"string"},"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EprCaptureAsset"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"415":{"description":"Unsupported image"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Upload EPR evidence","tags":["EPR"]}},"/assistant/ask/":{"post":{"description":"Answer from the organization's own records, with citations. It drafts supplier requests as text only, and refers legal questions to counsel. Returns 404 when the person works manually.","operationId":"post_assistant_ask","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantAskRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/AssistantAskRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AssistantAskRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"answer":{"type":"string"},"citations":{"items":{"properties":{"id":{"type":"string"},"label":{"type":"string"},"link":{"type":"string"},"type":{"type":"string"}},"required":["id","label","link","type"],"type":"object"},"type":"array"},"draft":{"nullable":true,"properties":{"body":{"type":"string"},"subject":{"type":"string"}},"required":["body","subject"],"type":"object"},"refused":{"type":"boolean"}},"required":["answer","citations","draft","refused"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"503":{"description":"Service Unavailable."}},"security":[{"Bearer":[]}],"summary":"Ask the assistant about this organization's EPR data","tags":["assistant"]}},"/assistant/status/":{"get":{"description":"Report whether the assistant is available. It is off when the person works manually.","operationId":"get_assistant_status","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Report whether the assistant is available","tags":["assistant"]}},"/audit-events":{"get":{"description":"Newest first. Members restricted to entities see only events on those entities.","operationId":"get_audit_events","parameters":[{"in":"query","name":"action","schema":{"type":"string"}},{"description":"Text matched against the actor's email or key name and a person's full name.","in":"query","name":"actor","schema":{"type":"string"}},{"in":"query","name":"actor_id","schema":{"type":"string"}},{"in":"query","name":"cursor","schema":{"type":"string"}},{"in":"query","name":"domain","schema":{"type":"string"}},{"in":"query","name":"entity_id","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"integer"}},{"in":"query","name":"outcome","schema":{"type":"string"}},{"description":"Events at or after this moment (ISO 8601).","in":"query","name":"since","schema":{"type":"string"}},{"in":"query","name":"target_id","schema":{"type":"string"}},{"in":"query","name":"target_type","schema":{"type":"string"}},{"in":"query","name":"until","schema":{"type":"string"}},{"description":"Alias of `since`, kept for the list-wide incremental-sync convention.","in":"query","name":"updated_since","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditEventList"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List audit events","tags":["EPR access"]}},"/audit-events/export":{"get":{"description":"The same rows as the list for the same filters and scope, newest first, up to 50,000 rows. Times are UTC; a cell that would start a spreadsheet formula is prefixed with an apostrophe.","operationId":"get_audit_events_export","parameters":[{"in":"query","name":"action","schema":{"type":"string"}},{"description":"Text matched against the actor's email or key name and a person's full name.","in":"query","name":"actor","schema":{"type":"string"}},{"in":"query","name":"actor_id","schema":{"type":"string"}},{"in":"query","name":"domain","schema":{"type":"string"}},{"in":"query","name":"entity_id","schema":{"type":"string"}},{"in":"query","name":"outcome","schema":{"type":"string"}},{"description":"Events at or after this moment (ISO 8601).","in":"query","name":"since","schema":{"type":"string"}},{"in":"query","name":"target_id","schema":{"type":"string"}},{"in":"query","name":"target_type","schema":{"type":"string"}},{"in":"query","name":"until","schema":{"type":"string"}},{"description":"Alias of `since`, kept for the list-wide incremental-sync convention.","in":"query","name":"updated_since","schema":{"type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Export audit events as CSV","tags":["EPR access"]}},"/audit-events/verify":{"post":{"description":"Re-hashes events oldest first and checks each one links to the hash of the event before it. Each call checks one page of events. While complete is false, send resume_after back as after to check the next page. The finished check is itself logged as audit.chain.verified: success when intact, failed with audit_chain_broken when not. The same check can be run offline on a CSV export (docs/epr/verify-the-audit-log.md).","operationId":"post_audit_events_verify","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditChainCheckRequestRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditChainCheck"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Check the audit log's hash chain","tags":["EPR access"]}},"/billing/":{"get":{"description":"Return the organization's billing summary.","operationId":"get_billing","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"can_manage_billing":{"type":"boolean"},"current_plan":{"type":"string"},"entitlements":{"properties":{"api_tier":{"type":"string"},"interval":{"type":"string"},"limits":{"additionalProperties":{"properties":{"allowed":{"type":"boolean"},"limit":{"nullable":true,"type":"integer"},"soft":{"type":"boolean"},"upgrade_to":{"nullable":true,"type":"string"},"used":{"type":"integer"}},"required":["allowed","limit","soft","upgrade_to","used"],"type":"object"},"type":"object"},"plan":{"type":"string"},"plan_name":{"type":"string"},"priority_support":{"type":"boolean"},"read_only":{"type":"boolean"},"records_window":{"properties":{"end":{"nullable":true,"type":"string"},"start":{"nullable":true,"type":"string"}},"required":["end","start"],"type":"object"},"scim":{"type":"boolean"},"sso":{"type":"boolean"},"state":{"type":"string"}},"required":["api_tier","interval","limits","plan","plan_name","priority_support","read_only","records_window","scim","sso","state"],"type":"object"},"indicative_cad":{"nullable":true,"properties":{"from_currency":{"type":"string"},"publisher":{"type":"string"},"rate":{"type":"string"},"retrieved_at":{"type":"string"},"source_url":{"type":"string"},"to_currency":{"type":"string"},"year":{"type":"integer"}},"required":["from_currency","publisher","rate","retrieved_at","source_url","to_currency","year"],"type":"object"},"owner_names":{"items":{"type":"string"},"type":"array"},"plans":{"items":{"properties":{"annual_cents":{"nullable":true,"type":"integer"},"api_tier":{"type":"string"},"included_records":{"type":"integer"},"max_entities":{"nullable":true,"type":"integer"},"max_seats":{"nullable":true,"type":"integer"},"monthly_cents":{"nullable":true,"type":"integer"},"name":{"type":"string"},"overage_cents":{"nullable":true,"type":"integer"},"priority_support":{"type":"boolean"},"purchasable":{"type":"boolean"},"purchasable_month":{"type":"boolean"},"purchasable_year":{"type":"boolean"},"records_window":{"type":"string"},"scim":{"type":"boolean"},"slug":{"type":"string"},"sso":{"type":"boolean"}},"required":["annual_cents","api_tier","included_records","max_entities","max_seats","monthly_cents","name","overage_cents","priority_support","purchasable","purchasable_month","purchasable_year","records_window","scim","slug","sso"],"type":"object"},"type":"array"},"second_factor_enrolled":{"type":"boolean"},"serves_clients":{"type":"boolean"},"subscription":{"nullable":true,"properties":{"cancel_at_period_end":{"type":"boolean"},"current_period_end":{"format":"date-time","nullable":true,"type":"string"},"granted_access":{"type":"boolean"},"has_billing_account":{"type":"boolean"},"interval":{"type":"string"},"past_due_since":{"format":"date-time","nullable":true,"type":"string"},"pay_url":{"type":"string"},"payment_declined_at":{"format":"date-time","nullable":true,"type":"string"},"state":{"type":"string"},"trial_end":{"format":"date-time","nullable":true,"type":"string"}},"required":["cancel_at_period_end","current_period_end","granted_access","has_billing_account","interval","past_due_since","pay_url","payment_declined_at","state","trial_end"],"type":"object"},"usage":{"properties":{"estimated_overage_cents":{"type":"integer"},"included":{"type":"integer"},"overage_records":{"type":"integer"},"overage_unit_cents":{"nullable":true,"type":"integer"},"period_end":{"nullable":true,"type":"string"},"period_start":{"nullable":true,"type":"string"},"plan":{"type":"string"},"reconciliation":{"nullable":true,"properties":{"checked_at":{"type":"string"},"detail":{"type":"string"},"drift":{"type":"integer"},"status":{"type":"string"}},"required":["checked_at","detail","drift","status"],"type":"object"},"records":{"type":"integer"},"remaining":{"type":"integer"},"reported_overage":{"type":"integer"}},"required":["estimated_overage_cents","included","overage_records","overage_unit_cents","period_end","period_start","plan","reconciliation","records","remaining","reported_overage"],"type":"object"},"usage_by_entity":{"items":{"properties":{"entity_id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"records":{"type":"integer"}},"required":["entity_id","name","records"],"type":"object"},"type":"array"}},"required":["can_manage_billing","current_plan","entitlements","indicative_cad","owner_names","plans","second_factor_enrolled","serves_clients","subscription","usage","usage_by_entity"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Get the current billing plan, entitlements and usage","tags":["EPR"]}},"/billing/checkout/":{"post":{"description":"Create a checkout session, or modify a live subscription.","operationId":"post_billing_checkout","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"mode":{"type":"string"},"url":{"type":"string"}},"required":["mode","url"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Start checkout or change plan","tags":["EPR"]}},"/billing/checkout/preview/":{"post":{"description":"Return the price of the plan and, for a live subscription, Stripe's preview of the prorated invoice the change creates today (negative when it leaves a credit). Pass ``proration_date`` back to checkout so the charge matches the preview. Nothing is charged.","operationId":"post_billing_checkout_preview","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutPreviewRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/CheckoutPreviewRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CheckoutPreviewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount_today_cents":{"nullable":true,"type":"integer"},"interval":{"type":"string"},"interval_before":{"type":"string"},"losing":{"items":{"type":"string"},"type":"array"},"mode":{"type":"string"},"next_invoice_on":{"nullable":true,"type":"string"},"plan":{"type":"string"},"plan_before":{"type":"string"},"price_cents":{"type":"integer"},"proration_date":{"nullable":true,"type":"integer"},"tax_today_cents":{"nullable":true,"type":"integer"}},"required":["amount_today_cents","interval","interval_before","losing","mode","next_invoice_on","plan","plan_before","price_cents","proration_date","tax_today_cents"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Preview a plan purchase or change","tags":["EPR"]}},"/billing/checkout/status/":{"get":{"description":"Return ``active`` once Stripe's webhooks have recorded the session's subscription as active or trialing, ``pending`` until then, or ``expired``. The return page polls this instead of trusting the redirect from Stripe.","operationId":"get_billing_checkout_status","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"interval":{"type":"string"},"plan":{"type":"string"},"status":{"type":"string"}},"required":["interval","plan","status"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Check whether a checkout has activated the plan","tags":["EPR"]}},"/billing/entitlements/":{"get":{"description":"Return entitlements for the organization.","operationId":"get_billing_entitlements","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"api_tier":{"type":"string"},"interval":{"type":"string"},"limits":{"additionalProperties":{"properties":{"allowed":{"type":"boolean"},"limit":{"nullable":true,"type":"integer"},"soft":{"type":"boolean"},"upgrade_to":{"nullable":true,"type":"string"},"used":{"type":"integer"}},"required":["allowed","limit","soft","upgrade_to","used"],"type":"object"},"type":"object"},"plan":{"type":"string"},"plan_name":{"type":"string"},"priority_support":{"type":"boolean"},"read_only":{"type":"boolean"},"records_window":{"properties":{"end":{"nullable":true,"type":"string"},"start":{"nullable":true,"type":"string"}},"required":["end","start"],"type":"object"},"scim":{"type":"boolean"},"sso":{"type":"boolean"},"state":{"type":"string"}},"required":["api_tier","interval","limits","plan","plan_name","priority_support","read_only","records_window","scim","sso","state"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Plan entitlements and limits","tags":["EPR"]}},"/billing/invoices/":{"get":{"description":"List invoices for the organization's Stripe customer, without drafts or the unpaid first invoice of a subscription that never started, and the credit Stripe holds for the customer (cents).","operationId":"get_billing_invoices","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"credit_balance_cents":{"type":"integer"},"data":{"items":{"properties":{"created_at":{"nullable":true,"type":"string"},"currency":{"type":"string"},"hosted_invoice_url":{"type":"string"},"id":{"type":"string"},"number":{"type":"string"},"pdf_url":{"type":"string"},"status":{"type":"string"},"subtotal_cents":{"type":"integer"},"tax_cents":{"type":"integer"},"total_cents":{"type":"integer"},"usage_period_end":{"format":"date","nullable":true,"type":"string"},"usage_period_start":{"format":"date","nullable":true,"type":"string"}},"required":["created_at","currency","hosted_invoice_url","id","number","pdf_url","status","subtotal_cents","tax_cents","total_cents","usage_period_end","usage_period_start"],"type":"object"},"type":"array"}},"required":["credit_balance_cents","data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Billing invoices","tags":["EPR"]}},"/billing/portal/":{"post":{"description":"Return the billing portal URL.","operationId":"post_billing_portal","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PortalRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PortalRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"url":{"type":"string"}},"required":["url"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Open the billing portal","tags":["EPR"]}},"/billing/usage/":{"get":{"description":"Return meter detail including the last reconciliation result.","operationId":"get_billing_usage","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"estimated_overage_cents":{"type":"integer"},"included":{"type":"integer"},"overage_records":{"type":"integer"},"overage_unit_cents":{"nullable":true,"type":"integer"},"period_end":{"nullable":true,"type":"string"},"period_start":{"nullable":true,"type":"string"},"plan":{"type":"string"},"reconciliation":{"nullable":true,"properties":{"checked_at":{"type":"string"},"detail":{"type":"string"},"drift":{"type":"integer"},"status":{"type":"string"}},"required":["checked_at","detail","drift","status"],"type":"object"},"records":{"type":"integer"},"remaining":{"type":"integer"},"reported_overage":{"type":"integer"}},"required":["estimated_overage_cents","included","overage_records","overage_unit_cents","period_end","period_start","plan","reconciliation","records","remaining","reported_overage"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Get the records meter for the current period","tags":["EPR"]}},"/billing/usage/by-entity/":{"get":{"description":"One row per client entity with the billable records confirmed from `start` (inclusive) to `end` (exclusive), both ISO dates, then a row without an entity for records tied to no client.","operationId":"get_billing_usage_by_entity","parameters":[{"description":"Day after the period ends (YYYY-MM-DD).","in":"query","name":"end","required":true,"schema":{"type":"string"}},{"description":"First day of the period (YYYY-MM-DD).","in":"query","name":"start","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Records used per client entity in a period, as CSV","tags":["EPR"]}},"/brands/{id}/":{"patch":{"description":"Edit a brand. It can only sit under an active entity inside the caller's scope.","operationId":"patch_brands_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedBrandUpdateRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedBrandUpdateRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedBrandUpdateRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"entity_id":{"type":"integer"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"}},"required":["entity_id","id","is_active","name"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Edit a brand; a brand in an inactive or out-of-scope entity is refused","tags":["onboarding"]}},"/bulk/jobs":{"get":{"description":"List bulk jobs of the organization, newest first. Filters: kind, status.","operationId":"get_bulk_jobs","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"accepted_rows":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"entity":{"type":"string"},"error_message":{"type":"string"},"filename":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"kind":{"type":"string"},"preset":{"type":"string"},"rejected_rows":{"type":"integer"},"result":{"additionalProperties":true,"type":"object"},"row_count":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"uid":{"type":"string"}},"required":["accepted_rows","created_at","entity","error_message","filename","finished_at","kind","preset","rejected_rows","result","row_count","started_at","status","type","uid"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List bulk jobs, newest first (filters: kind, status)","tags":["EPR"]},"post":{"description":"Body: {kind, rows}. kind is skus, specs, components, volumes, suppliers or measurements; rows is a list of objects (at most 20,000). The job runs in the background: poll the job, then download its result file for every rejected row. Measurement rows become proposals that a person confirms. Send an Idempotency-Key header to make retries safe.","operationId":"post_bulk_jobs","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"kind":{"type":"string"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["kind","rows"],"type":"object"}}}},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"accepted_rows":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"entity":{"type":"string"},"error_message":{"type":"string"},"filename":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"kind":{"type":"string"},"preset":{"type":"string"},"rejected_rows":{"type":"integer"},"result":{"additionalProperties":true,"type":"object"},"row_count":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"uid":{"type":"string"}},"required":["accepted_rows","created_at","entity","error_message","filename","finished_at","kind","preset","rejected_rows","result","row_count","started_at","status","type","uid"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Accepted; the work continues in the background."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Queue a bulk job from JSON rows","tags":["EPR"]}},"/bulk/jobs/{uid}":{"get":{"description":"Return the job's status and counts with a capped preview of its errors.","operationId":"get_bulk_jobs_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"accepted_rows":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"entity":{"type":"string"},"error_message":{"type":"string"},"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"filename":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"kind":{"type":"string"},"preset":{"type":"string"},"rejected_rows":{"type":"integer"},"result":{"additionalProperties":true,"type":"object"},"row_count":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"uid":{"type":"string"}},"required":["accepted_rows","created_at","entity","error_message","errors","filename","finished_at","kind","preset","rejected_rows","result","row_count","started_at","status","type","uid"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return a bulk job","tags":["EPR"]}},"/bulk/jobs/{uid}/result":{"get":{"description":"Download every rejected row of a finished bulk job as JSON (default) or CSV (?file=csv).","operationId":"get_bulk_jobs_uid_result","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"job":{"properties":{"accepted_rows":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"entity":{"type":"string"},"error_message":{"type":"string"},"filename":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"kind":{"type":"string"},"preset":{"type":"string"},"rejected_rows":{"type":"integer"},"result":{"additionalProperties":true,"type":"object"},"row_count":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"uid":{"type":"string"}},"required":["accepted_rows","created_at","entity","error_message","filename","finished_at","kind","preset","rejected_rows","result","row_count","started_at","status","uid"],"type":"object"},"total_errors":{"type":"integer"}},"required":["errors","job","total_errors"],"type":"object"}},"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflicts with the current state."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Download a bulk job's result file","tags":["EPR"]}},"/bulk/kinds":{"get":{"description":"List the row kinds a bulk job accepts, each with its columns and required columns.","operationId":"get_bulk_kinds","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"columns":{"items":{"type":"string"},"type":"array"},"description":{"type":"string"},"kind":{"type":"string"},"required":{"items":{"type":"string"},"type":"array"}},"required":["columns","description","kind","required"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List bulk job kinds","tags":["EPR"]}},"/clients":{"get":{"description":"One row per client you may see: products, products still missing packaging, places the latest check found obligated or missing data, and the next report due. Not narrowed by the client you chose.","operationId":"get_clients","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"checked":{"type":"boolean"},"country_code":{"type":"string"},"focused":{"type":"boolean"},"id":{"type":"integer"},"latest_volume_year":{"nullable":true,"type":"integer"},"name":{"type":"string"},"next_due_date":{"nullable":true,"type":"string"},"obligated_places":{"type":"integer"},"overdue_reports":{"type":"integer"},"parent_id":{"nullable":true,"type":"integer"},"places_needing_data":{"type":"integer"},"product_count":{"type":"integer"},"products_without_packaging":{"type":"integer"}},"required":["checked","country_code","focused","id","latest_volume_year","name","next_due_date","obligated_places","overdue_reports","parent_id","places_needing_data","product_count","products_without_packaging"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List your clients and how each one stands","tags":["EPR"]}},"/clients/focus":{"get":{"description":"Return the chosen client (null means \"All clients\") and the clients you may choose from.","operationId":"get_clients_focus","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"clients":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"}},"required":["id","name","parent_id"],"type":"object"},"type":"array"},"focus":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"own_workspaces":{"items":{"properties":{"clients":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"}},"required":["id","name","parent_id"],"type":"object"},"type":"array"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["clients","id","name"],"type":"object"},"type":"array"},"scoped":{"type":"boolean"},"serves_clients":{"type":"boolean"}},"required":["clients","focus","own_workspaces","scoped","serves_clients"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Read the client you are working on","tags":["EPR"]},"put":{"description":"Record the client every screen should show; null means \"All clients\". Only a client inside your own scope can be chosen, and the choice never widens what you may see.","operationId":"put_clients_focus","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"entity_id":{"nullable":true,"type":"integer"}},"required":["entity_id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"clients":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"}},"required":["id","name","parent_id"],"type":"object"},"type":"array"},"focus":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"own_workspaces":{"items":{"properties":{"clients":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"}},"required":["id","name","parent_id"],"type":"object"},"type":"array"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["clients","id","name"],"type":"object"},"type":"array"},"scoped":{"type":"boolean"},"serves_clients":{"type":"boolean"}},"required":["clients","focus","own_workspaces","scoped","serves_clients"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Choose the client you are working on","tags":["EPR"]}},"/components/{id}":{"delete":{"description":"Soft-retire a component while retaining its measurement history.","operationId":"delete_components_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"No response body"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Retire a packaging component","tags":["EPR"]},"patch":{"description":"Partially update an active organization-owned packaging component.","operationId":"patch_components_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPackagingComponentRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedPackagingComponentRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedPackagingComponentRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackagingComponent"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"Inactive material"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Update a packaging component","tags":["EPR"]}},"/connectors":{"get":{"description":"List providers.","operationId":"get_connectors","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"connection":{"nullable":true,"properties":{"account_ref":{"type":"string"},"consecutive_failures":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"label":{"type":"string"},"last_error_at":{"format":"date-time","nullable":true,"type":"string"},"last_error_code":{"type":"string"},"last_error_message":{"type":"string"},"last_success_at":{"format":"date-time","nullable":true,"type":"string"},"next_sync_at":{"format":"date-time","nullable":true,"type":"string"},"provider":{"type":"string"},"scopes_granted":{"items":{"type":"string"},"type":"array"},"status":{"type":"string"},"store_url":{"type":"string"},"sync_enabled":{"type":"boolean"},"sync_since":{"format":"date","nullable":true,"type":"string"},"syncing":{"type":"boolean"}},"required":["account_ref","consecutive_failures","created_at","id","label","last_error_at","last_error_code","last_error_message","last_success_at","next_sync_at","provider","scopes_granted","status","store_url","sync_enabled","sync_since","syncing"],"type":"object"},"fields":{"items":{"properties":{"kind":{"type":"string"},"name":{"type":"string"}},"required":["kind","name"],"type":"object"},"type":"array"},"id":{"type":"string"},"label":{"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"}},"required":["connection","fields","id","label","scopes"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List providers","tags":["EPR"]}},"/connectors/connections/{uid}":{"delete":{"description":"Disconnect: revoke where the provider allows it and delete the stored credentials.","operationId":"delete_connectors_connections_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"account_ref":{"type":"string"},"consecutive_failures":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"label":{"type":"string"},"last_error_at":{"format":"date-time","nullable":true,"type":"string"},"last_error_code":{"type":"string"},"last_error_message":{"type":"string"},"last_success_at":{"format":"date-time","nullable":true,"type":"string"},"next_sync_at":{"format":"date-time","nullable":true,"type":"string"},"provider":{"type":"string"},"scopes_granted":{"items":{"type":"string"},"type":"array"},"status":{"type":"string"},"store_url":{"type":"string"},"sync_enabled":{"type":"boolean"},"sync_since":{"format":"date","nullable":true,"type":"string"},"syncing":{"type":"boolean"}},"required":["account_ref","consecutive_failures","created_at","id","label","last_error_at","last_error_code","last_error_message","last_success_at","next_sync_at","provider","scopes_granted","status","store_url","sync_enabled","sync_since","syncing"],"type":"object"},"revoked_at_provider":{"type":"boolean"}},"required":["data","revoked_at_provider"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Disconnect: revoke where the provider allows it and delete the stored credentials","tags":["EPR"]},"get":{"description":"Return one connection.","operationId":"get_connectors_connections_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"account_ref":{"type":"string"},"consecutive_failures":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"label":{"type":"string"},"last_error_at":{"format":"date-time","nullable":true,"type":"string"},"last_error_code":{"type":"string"},"last_error_message":{"type":"string"},"last_success_at":{"format":"date-time","nullable":true,"type":"string"},"next_sync_at":{"format":"date-time","nullable":true,"type":"string"},"provider":{"type":"string"},"scopes_granted":{"items":{"type":"string"},"type":"array"},"status":{"type":"string"},"store_url":{"type":"string"},"sync_enabled":{"type":"boolean"},"sync_since":{"format":"date","nullable":true,"type":"string"},"syncing":{"type":"boolean"}},"required":["account_ref","consecutive_failures","created_at","id","label","last_error_at","last_error_code","last_error_message","last_success_at","next_sync_at","provider","scopes_granted","status","store_url","sync_enabled","sync_since","syncing"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one connection","tags":["EPR"]}},"/connectors/connections/{uid}/runs":{"get":{"description":"Sync history, newest first.","operationId":"get_connectors_connections_uid_runs","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"catalog_items":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"error_code":{"type":"string"},"error_message":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"import_job_id":{"nullable":true,"type":"string"},"pages":{"type":"integer"},"sales_lines_changed":{"type":"integer"},"sales_lines_seen":{"type":"integer"},"skus_created":{"type":"integer"},"skus_updated":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"trigger":{"type":"string"}},"required":["catalog_items","created_at","error_code","error_message","finished_at","id","import_job_id","pages","sales_lines_changed","sales_lines_seen","skus_created","skus_updated","started_at","status","trigger"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Sync history, newest first","tags":["EPR"]}},"/connectors/connections/{uid}/sync":{"post":{"description":"Queue a sync now (body: ``full_resync`` true to re-read from the start date).","operationId":"post_connectors_connections_uid_sync","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"full_resync":{"type":"boolean"}},"type":"object"}}}},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"catalog_items":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"error_code":{"type":"string"},"error_message":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"import_job_id":{"nullable":true,"type":"string"},"pages":{"type":"integer"},"sales_lines_changed":{"type":"integer"},"sales_lines_seen":{"type":"integer"},"skus_created":{"type":"integer"},"skus_updated":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"trigger":{"type":"string"}},"required":["catalog_items","created_at","error_code","error_message","finished_at","id","import_job_id","pages","sales_lines_changed","sales_lines_seen","skus_created","skus_updated","started_at","status","trigger"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Accepted; the work continues in the background."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Queue a sync now (body: `full_resync` true to re-read from the start date)","tags":["EPR"]}},"/connectors/connections/{uid}/test":{"post":{"description":"Check the stored credentials with one read call.","operationId":"post_connectors_connections_uid_test","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"connection":{"properties":{"account_ref":{"type":"string"},"consecutive_failures":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"label":{"type":"string"},"last_error_at":{"format":"date-time","nullable":true,"type":"string"},"last_error_code":{"type":"string"},"last_error_message":{"type":"string"},"last_success_at":{"format":"date-time","nullable":true,"type":"string"},"next_sync_at":{"format":"date-time","nullable":true,"type":"string"},"provider":{"type":"string"},"scopes_granted":{"items":{"type":"string"},"type":"array"},"status":{"type":"string"},"store_url":{"type":"string"},"sync_enabled":{"type":"boolean"},"sync_since":{"format":"date","nullable":true,"type":"string"},"syncing":{"type":"boolean"}},"required":["account_ref","consecutive_failures","created_at","id","label","last_error_at","last_error_code","last_error_message","last_success_at","next_sync_at","provider","scopes_granted","status","store_url","sync_enabled","sync_since","syncing"],"type":"object"},"error_code":{"type":"string"},"label":{"type":"string"},"message":{"type":"string"},"ok":{"type":"boolean"}},"required":["connection","error_code","label","message","ok"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Check the stored credentials with one read call","tags":["EPR"]}},"/connectors/{provider}/keys":{"post":{"description":"Verify and store the keys (encrypted).","operationId":"post_connectors_provider_keys","parameters":[{"in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"additionalProperties":{"type":"string"},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"account_ref":{"type":"string"},"consecutive_failures":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"label":{"type":"string"},"last_error_at":{"format":"date-time","nullable":true,"type":"string"},"last_error_code":{"type":"string"},"last_error_message":{"type":"string"},"last_success_at":{"format":"date-time","nullable":true,"type":"string"},"next_sync_at":{"format":"date-time","nullable":true,"type":"string"},"provider":{"type":"string"},"scopes_granted":{"items":{"type":"string"},"type":"array"},"status":{"type":"string"},"store_url":{"type":"string"},"sync_enabled":{"type":"boolean"},"sync_since":{"format":"date","nullable":true,"type":"string"},"syncing":{"type":"boolean"}},"required":["account_ref","consecutive_failures","created_at","id","label","last_error_at","last_error_code","last_error_message","last_success_at","next_sync_at","provider","scopes_granted","status","store_url","sync_enabled","sync_since","syncing"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Verify and store the keys (encrypted)","tags":["EPR"]}},"/data-deletions":{"get":{"description":"List deletion requests.","operationId":"get_data_deletions","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRequestList"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List deletion requests","tags":["EPR access"]},"post":{"description":"Owner only, with a fresh step-up. Type the organization name exactly to confirm. The Stripe subscription is cancelled at once, the workspace becomes read-only and a final export is prepared. Everything is deleted after a 28 day grace window (within 30 days of the request); the owner can cancel until then. Optionally keep the sealed evidence and the audit log for 1 to 10 years.","operationId":"post_data_deletions","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletionRequestRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRequest"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}},"security":[{"Bearer":[]}],"summary":"Close the account and delete the organization's data","tags":["EPR access"]}},"/data-deletions/{uid}/cancel":{"post":{"description":"Cancel during the grace window: the account reopens (billing restarts only when resubscribed).","operationId":"post_data_deletions_uid_cancel","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRequest"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Cancel a scheduled deletion","tags":["EPR access"]}},"/data-exports":{"get":{"description":"List export requests.","operationId":"get_data_exports","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRequestList"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List data exports","tags":["EPR access"]},"post":{"description":"Builds a ZIP of everything the organization holds (JSON, an optional CSV copy of every table, all files, a README and a manifest with each file's schema) asynchronously. The requester is emailed when it is ready; poll the export or wait for the email, then download it.","operationId":"post_data_exports","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequestRequest"}}}},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRequest"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Request a GDPR/CCPA data export","tags":["EPR access"]}},"/data-exports/{uid}/download":{"get":{"description":"Stream the finished ZIP.","operationId":"get_data_exports_uid_download","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"The export ZIP."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Download a data export","tags":["EPR access"]}},"/entities/":{"get":{"description":"List the caller's legal entities and brands; a scope-restricted member sees only their own.","operationId":"get_entities","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"brands":{"items":{"properties":{"entity_id":{"type":"integer"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"}},"required":["entity_id","id","is_active","name"],"type":"object"},"type":"array"},"can_manage":{"type":"boolean"},"entities":{"items":{"properties":{"brand_answer":{"description":"Whose brand is on the products: own_brand, other_brands, unsure, or empty when not answered.","enum":["","own_brand","other_brands","unsure"],"type":"string"},"country_code":{"type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"},"legal_name":{"type":"string"},"name":{"type":"string"},"registered_address":{"type":"string"},"tax_id":{"type":"string"}},"required":["brand_answer","country_code","id","is_active","is_default","legal_name","name","registered_address","tax_id"],"type":"object"},"type":"array"}},"required":["brands","can_manage","entities"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List the caller's legal entities and brands; a scope-restricted member sees only their own","tags":["onboarding"]}},"/entities/{id}/":{"patch":{"description":"Edit a legal entity. The default entity and an entity that still has active brands cannot be deactivated; reactivating one re-checks the plan's entity cap.","operationId":"patch_entities_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedEntityUpdateRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedEntityUpdateRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedEntityUpdateRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"brand_answer":{"description":"Whose brand is on the products: own_brand, other_brands, unsure, or empty when not answered.","enum":["","own_brand","other_brands","unsure"],"type":"string"},"country_code":{"type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"},"legal_name":{"type":"string"},"name":{"type":"string"},"registered_address":{"type":"string"},"tax_id":{"type":"string"}},"required":["brand_answer","country_code","id","is_active","is_default","legal_name","name","registered_address","tax_id"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Edit a legal entity; reactivating one re-checks the plan's entity cap","tags":["onboarding"]}},"/events/":{"post":{"description":"Validate and store up to ``MAX_BATCH`` events; per-event problems are reported, not fatal.","operationId":"post_events","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"anonymous_id":{"type":"string"},"events":{"items":{"properties":{"name":{"type":"string"},"properties":{"additionalProperties":true,"nullable":true,"type":"object"}},"required":["name"],"type":"object"},"type":"array"}},"required":["events"],"type":"object"}}}},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"accepted":{"type":"integer"},"rejected":{"items":{"properties":{"field":{"type":"string"},"index":{"type":"integer"},"message":{"type":"string"}},"required":["field","index","message"],"type":"object"},"type":"array"}},"required":["accepted","rejected"],"type":"object"}}},"description":"Accepted; the work continues in the background."},"204":{"description":"Done; the response has no body."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Validate and store up to `MAX_BATCH` events; per-event problems are reported, not fatal","tags":["events"]}},"/evidence/audit-log":{"get":{"description":"List audit events (``?action=``, ``?target_type=``, ``?target_id=``); entity-restricted members are refused.","operationId":"get_evidence_audit_log","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"action":{"type":"string"},"actor_label":{"type":"string"},"actor_type":{"type":"string"},"changes":{"additionalProperties":true,"type":"object"},"hash":{"type":"string"},"id":{"type":"integer"},"occurred_at":{"format":"date-time","type":"string"},"outcome":{"type":"string"},"prev_hash":{"type":"string"},"target_id":{"type":"string"},"target_label":{"type":"string"},"target_type":{"type":"string"},"via":{"type":"string"}},"required":["action","actor_label","actor_type","changes","hash","id","occurred_at","outcome","prev_hash","target_id","target_label","target_type","via"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List audit events; entity-restricted members are refused","tags":["EPR"]}},"/evidence/history/{kind}/{ident}":{"get":{"description":"Return who changed the record, what changed (field, before and after) and when, newest first. ``kind`` is one of sku, spec, spec_family, component, measurement_record or reporting_period.","operationId":"get_evidence_history_kind_ident","parameters":[{"in":"path","name":"ident","required":true,"schema":{"type":"string"}},{"in":"path","name":"kind","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"entries":{"items":{"properties":{"action":{"type":"string"},"actor_label":{"type":"string"},"actor_type":{"type":"string"},"changes":{"additionalProperties":true,"type":"object"},"credential_label":{"type":"string"},"id":{"type":"string"},"occurred_at":{"format":"date-time","type":"string"},"outcome":{"type":"string"},"source":{"type":"string"},"target_id":{"type":"string"},"target_type":{"type":"string"},"via":{"type":"string"}},"required":["action","actor_label","actor_type","changes","id","occurred_at","outcome","source","via"],"type":"object"},"type":"array"},"id":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"}},"required":["entries","id","kind","label"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Read the change history of one record","tags":["EPR"]}},"/evidence/measurements":{"get":{"description":"List measurements as evidence (``?component=``, ``?include_closed=true``).","operationId":"get_evidence_measurements","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"capture_source":{"type":"string"},"captured_grams":{"nullable":true,"type":"string"},"component_id":{"type":"integer"},"component_name":{"type":"string"},"confirmed_at":{"format":"date-time","type":"string"},"confirmed_by":{"properties":{"email":{"type":"string"},"name":{"type":"string"}},"required":["email","name"],"type":"object"},"grams":{"type":"string"},"material_code":{"type":"string"},"method":{"type":"string"},"photo_count":{"type":"integer"},"scale_device":{"type":"string"},"superseded":{"type":"boolean"},"uid":{"type":"string"},"voided":{"type":"boolean"}},"required":["capture_source","captured_grams","component_id","component_name","confirmed_at","confirmed_by","grams","material_code","method","photo_count","scale_device","superseded","uid","voided"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List measurements as evidence","tags":["EPR"]}},"/exports":{"get":{"description":"Return the most recent regulator and evidence export jobs for the current user.","operationId":"get_exports","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ExportJob"},"type":"array"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List EPR exports","tags":["EPR"]},"post":{"description":"Create and enqueue a preparation workbook CSV (paid plans; 402 ``plan_required`` on Free) or an evidence ZIP for selected states and year, for one client or all of them.","operationId":"post_exports","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"entity_id":{"description":"The client the export is for, or \"all\". Defaults to the chosen client; required when the workspace has more than one client and none is chosen.","oneOf":[{"type":"integer"},{"enum":["all"],"type":"string"}]},"states":{"items":{"type":"string"},"type":"array"},"type":{"enum":["caa_csv","evidence_zip"],"type":"string"},"year":{"type":"integer"}},"required":["states","type","year"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJob"}}},"description":""},"400":{"description":"Invalid export request"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"description":"The preparation workbook CSV needs a paid plan"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Request an EPR export","tags":["EPR"]}},"/feeds/odata/":{"get":{"description":"OData v4 service document, ``$metadata`` and entity set for Power Query and Excel.","operationId":"get_feeds_odata","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"@odata.context":{"type":"string"},"@odata.count":{"type":"integer"},"@odata.nextLink":{"type":"string"},"value":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["@odata.context","value"],"type":"object"}},"application/xml":{"schema":{"type":"string"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"description":"Missing or invalid credentials."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"OData v4 service document, `$metadata` and entity set (Power Query, Excel)","tags":["EPR"]}},"/feeds/odata/{resource}":{"get":{"description":"OData v4 service document, ``$metadata`` and entity set for Power Query and Excel.","operationId":"get_feeds_odata_resource","parameters":[{"in":"path","name":"resource","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"@odata.context":{"type":"string"},"@odata.count":{"type":"integer"},"@odata.nextLink":{"type":"string"},"value":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["@odata.context","value"],"type":"object"}},"application/xml":{"schema":{"type":"string"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"description":"Missing or invalid credentials."},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"OData v4 service document, `$metadata` and entity set (Power Query, Excel)","tags":["EPR"]}},"/feeds/{feed}.{fmt}":{"get":{"description":"Read a feed as CSV or JSON. The key is sent as a header or ``?key=``.","operationId":"get_feeds_feed_fmt","parameters":[{"in":"path","name":"feed","required":true,"schema":{"pattern":"^[a-z]+$","type":"string"}},{"in":"path","name":"fmt","required":true,"schema":{"pattern":"^csv|json$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"count":{"type":"integer"},"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"feed":{"type":"string"},"truncated":{"type":"boolean"}},"required":["count","data","feed","truncated"],"type":"object"}},"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"description":"Missing or invalid credentials."},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Read a feed as CSV or JSON (the key is sent as a header or `?key=`)","tags":["EPR"]}},"/fees/accruals/":{"get":{"description":"List accrual exports.","operationId":"get_fees_accruals","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"estimate_id":{"type":"integer"},"gl_period":{"type":"string"},"id":{"type":"integer"},"object":{"type":"string"},"row_count":{"type":"integer"},"sha256":{"type":"string"},"total":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"}},"required":["created_at","estimate_id","gl_period","id","object","row_count","sha256","total"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List accrual exports","tags":["EPR"]},"post":{"description":"Export a saved estimate as an accrual journal for one GL period.","operationId":"post_fees_accruals","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccrualRequestRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/AccrualRequestRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AccrualRequestRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"estimate_id":{"type":"integer"},"gl_period":{"type":"string"},"id":{"type":"integer"},"object":{"type":"string"},"row_count":{"type":"integer"},"sha256":{"type":"string"},"total":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"}},"required":["created_at","estimate_id","gl_period","id","object","row_count","sha256","total"],"type":"object"}}},"description":"Success."},"201":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"estimate_id":{"type":"integer"},"gl_period":{"type":"string"},"id":{"type":"integer"},"object":{"type":"string"},"row_count":{"type":"integer"},"sha256":{"type":"string"},"total":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"}},"required":["created_at","estimate_id","gl_period","id","object","row_count","sha256","total"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Conflicts with the current state."},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Export a saved estimate as an accrual journal for one GL period","tags":["EPR"]}},"/fees/accruals/{id}/csv/":{"get":{"description":"Return the stored CSV unchanged.","operationId":"get_fees_accruals_id_csv","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the stored CSV unchanged","tags":["EPR"]}},"/fees/accruals/{id}/journal/{tool}/":{"get":{"description":"Download a saved accrual export as a manual-journal CSV in the tool's import format. Optional query parameters: expense_account, liability_account, date_style (dmy, mdy or iso).","operationId":"get_fees_accruals_id_journal_tool","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"tool","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Download a saved fee accrual as a Xero, QuickBooks Online or NetSuite journal","tags":["EPR"]}},"/fees/category-assignments/":{"get":{"description":"List the customer's assignments, optionally for one jurisdiction.","operationId":"get_fees_category_assignments","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"candidates":{"items":{"properties":{"category_code":{"type":"string"},"name":{"type":"string"}},"required":["category_code","name"],"type":"object"},"type":"array"},"component":{"nullable":true,"type":"integer"},"component_name":{"type":"string"},"fee_category_code":{"type":"string"},"id":{"type":"integer"},"jurisdiction_code":{"type":"string"},"material_category":{"type":"integer"},"material_name":{"type":"string"},"note":{"type":"string"},"object":{"type":"string"}},"required":["candidates","fee_category_code","id","jurisdiction_code","material_category","material_name","note","object"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List the customer's assignments, optionally for one jurisdiction","tags":["EPR"]},"post":{"description":"Assign (or reassign) a fee category for a material in a jurisdiction.","operationId":"post_fees_category_assignments","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryAssignmentRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/CategoryAssignmentRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CategoryAssignmentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"candidates":{"items":{"properties":{"category_code":{"type":"string"},"name":{"type":"string"}},"required":["category_code","name"],"type":"object"},"type":"array"},"component":{"nullable":true,"type":"integer"},"component_name":{"type":"string"},"fee_category_code":{"type":"string"},"id":{"type":"integer"},"jurisdiction_code":{"type":"string"},"material_category":{"type":"integer"},"material_name":{"type":"string"},"note":{"type":"string"},"object":{"type":"string"}},"required":["candidates","fee_category_code","id","jurisdiction_code","material_category","material_name","note","object"],"type":"object"}}},"description":"Success."},"201":{"content":{"application/json":{"schema":{"properties":{"candidates":{"items":{"properties":{"category_code":{"type":"string"},"name":{"type":"string"}},"required":["category_code","name"],"type":"object"},"type":"array"},"component":{"nullable":true,"type":"integer"},"component_name":{"type":"string"},"fee_category_code":{"type":"string"},"id":{"type":"integer"},"jurisdiction_code":{"type":"string"},"material_category":{"type":"integer"},"material_name":{"type":"string"},"note":{"type":"string"},"object":{"type":"string"}},"required":["candidates","fee_category_code","id","jurisdiction_code","material_category","material_name","note","object"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Assign (or reassign) a fee category for a material in a jurisdiction","tags":["EPR"]}},"/fees/category-assignments/{id}/":{"delete":{"description":"Clear the customer's fee-category choice for a material. New estimates price the material from its sourced range again; saved estimates keep their stored figures.","operationId":"delete_fees_category_assignments_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Clear a fee-category choice","tags":["EPR"]}},"/fees/customer-rates/":{"get":{"description":"List entered rates, optionally for one schedule.","operationId":"get_fees_customer_rates","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"category_code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"data_quality":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"note":{"type":"string"},"object":{"type":"string"},"rate":{"type":"string"},"schedule_id":{"type":"string"},"unit":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["category_code","created_at","currency","data_quality","id","name","note","object","rate","schedule_id","unit","updated_at"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List entered rates, optionally for one schedule","tags":["EPR"]},"post":{"description":"Create or replace the rate for one schedule and category.","operationId":"post_fees_customer_rates","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerRateRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/CustomerRateRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CustomerRateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"category_code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"data_quality":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"note":{"type":"string"},"object":{"type":"string"},"rate":{"type":"string"},"schedule_id":{"type":"string"},"unit":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["category_code","created_at","currency","data_quality","id","name","note","object","rate","schedule_id","unit","updated_at"],"type":"object"}}},"description":"Success."},"201":{"content":{"application/json":{"schema":{"properties":{"category_code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"data_quality":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"note":{"type":"string"},"object":{"type":"string"},"rate":{"type":"string"},"schedule_id":{"type":"string"},"unit":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["category_code","created_at","currency","data_quality","id","name","note","object","rate","schedule_id","unit","updated_at"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create or replace the rate for one schedule and category","tags":["EPR"]}},"/fees/customer-rates/{id}/":{"delete":{"description":"Remove an entered rate.","operationId":"delete_fees_customer_rates_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Remove an entered rate","tags":["EPR"]}},"/fees/estimate/":{"post":{"description":"Compute an estimate, and save it when asked.","operationId":"post_fees_estimate","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"entity_id":{"nullable":true,"type":"integer"},"fee_id":{"type":"string"},"jurisdiction_code":{"type":"string"},"label":{"type":"string"},"options":{"properties":{"flat_tier_id":{"type":"string"},"include_other_fee_ids":{"items":{"type":"string"},"type":"array"},"modulation":{"items":{"properties":{"category_codes":{"items":{"type":"string"},"type":"array"},"group_id":{"type":"string"},"note":{"type":"string"},"percent":{"type":"string"}},"required":["group_id","percent"],"type":"object"},"type":"array"}},"type":"object"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"reporting_currency":{"type":"string"},"save":{"type":"boolean"}},"required":["jurisdiction_code","period_end","period_start"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"by_entity":{"items":{"properties":{"id":{"type":"integer"},"lines_to_confirm":{"type":"integer"},"name":{"type":"string"},"range_high":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"range_low":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"status":{"type":"string"},"total":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"}},"required":["id","lines_to_confirm","name","range_high","range_low","status","total"],"type":"object"},"type":"array"},"entity":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"estimate":{"additionalProperties":true,"type":"object"},"object":{"type":"string"}},"required":["by_entity","entity","estimate","object"],"type":"object"}}},"description":"Success."},"201":{"content":{"application/json":{"schema":{"properties":{"estimate":{"additionalProperties":true,"type":"object"},"object":{"type":"string"},"record":{"properties":{"created_at":{"format":"date-time","type":"string"},"data_quality":{"type":"string"},"entity_id":{"nullable":true,"type":"integer"},"entity_name":{"type":"string"},"fee_version":{"type":"string"},"id":{"type":"integer"},"jurisdiction_code":{"type":"string"},"label":{"type":"string"},"lines_to_confirm":{"type":"integer"},"object":{"type":"string"},"period":{"properties":{"end":{"format":"date","type":"string"},"start":{"format":"date","type":"string"}},"required":["end","start"],"type":"object"},"range_high":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"range_low":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"schedule_id":{"type":"string"},"sha256":{"type":"string"},"status":{"type":"string"},"total":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"total_reporting":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"unpriced_lines":{"type":"integer"}},"required":["created_at","data_quality","entity_id","entity_name","fee_version","id","jurisdiction_code","label","lines_to_confirm","object","period","range_high","range_low","schedule_id","sha256","status","total","total_reporting","unpriced_lines"],"type":"object"}},"required":["estimate","object","record"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Compute an estimate, and save it when asked","tags":["EPR"]}},"/fees/estimate/skus/":{"post":{"description":"Return one row per SKU with its fee and fee per unit sold.","operationId":"post_fees_estimate_skus","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PeriodRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PeriodRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"estimate_status":{"type":"string"},"estimate_total":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"fee_id":{"type":"string"},"fee_version":{"type":"string"},"label":{"type":"string"},"object":{"type":"string"},"skus":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"split_total":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"summary":{"additionalProperties":true,"type":"object"},"total":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"}},"required":["estimate_status","estimate_total","fee_id","fee_version","label","object","skus","split_total","summary","total"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one row per SKU with its fee and fee per unit sold","tags":["EPR"]}},"/fees/estimates/":{"get":{"description":"List saved estimates, newest period first. `out_of_date` marks one whose data changed since it was saved; an accrual cannot be built from it.","operationId":"get_fees_estimates","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"data_quality":{"type":"string"},"entity_id":{"nullable":true,"type":"integer"},"entity_name":{"type":"string"},"fee_version":{"type":"string"},"id":{"type":"integer"},"jurisdiction_code":{"type":"string"},"label":{"type":"string"},"lines_to_confirm":{"type":"integer"},"object":{"type":"string"},"out_of_date":{"type":"boolean"},"period":{"properties":{"end":{"format":"date","type":"string"},"start":{"format":"date","type":"string"}},"required":["end","start"],"type":"object"},"range_high":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"range_low":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"schedule_id":{"type":"string"},"sha256":{"type":"string"},"status":{"type":"string"},"total":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"total_reporting":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"unpriced_lines":{"type":"integer"}},"required":["created_at","data_quality","entity_id","entity_name","fee_version","id","jurisdiction_code","label","lines_to_confirm","object","out_of_date","period","range_high","range_low","schedule_id","sha256","status","total","total_reporting","unpriced_lines"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List saved estimates, newest period first","tags":["EPR"]}},"/fees/estimates/{id}/":{"get":{"description":"Return one saved estimate with its lines and citations.","operationId":"get_fees_estimates_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"data_quality":{"type":"string"},"entity_id":{"nullable":true,"type":"integer"},"entity_name":{"type":"string"},"estimate":{},"fee_version":{"type":"string"},"id":{"type":"integer"},"jurisdiction_code":{"type":"string"},"label":{"type":"string"},"lines_to_confirm":{"type":"integer"},"object":{"type":"string"},"period":{"properties":{"end":{"format":"date","type":"string"},"start":{"format":"date","type":"string"}},"required":["end","start"],"type":"object"},"range_high":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"range_low":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"schedule_id":{"type":"string"},"sha256":{"type":"string"},"status":{"type":"string"},"total":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"total_reporting":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"unpriced_lines":{"type":"integer"}},"required":["created_at","data_quality","entity_id","entity_name","estimate","fee_version","id","jurisdiction_code","label","lines_to_confirm","object","period","range_high","range_low","schedule_id","sha256","status","total","total_reporting","unpriced_lines"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one saved estimate with its lines and citations","tags":["EPR"]}},"/fees/estimates/{id}/approvals/":{"get":{"description":"List approval requests for a saved estimate. ``required`` says whether the organization needs an approval before the estimate is exported as an accrual.","operationId":"get_fees_estimates_id_approvals","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"can_approve":{"type":"boolean"},"can_request":{"type":"boolean"},"data":{"items":{"properties":{"approver_id":{"nullable":true,"type":"integer"},"approver_name":{"type":"string"},"approver_title":{"type":"string"},"can_decide":{"type":"boolean"},"content_sha256":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"note":{"type":"string"},"proposed_inputs":{"additionalProperties":{"type":"string"},"type":"object"},"requested_at":{"format":"date-time","type":"string"},"requested_by_id":{"nullable":true,"type":"integer"},"requested_by_name":{"type":"string"},"status":{"type":"string"},"subject_id":{"type":"integer"},"subject_type":{"type":"string"},"uid":{"type":"string"}},"required":["approver_id","approver_name","approver_title","can_decide","content_sha256","decided_at","note","proposed_inputs","requested_at","requested_by_id","requested_by_name","status","subject_id","subject_type","uid"],"type":"object"},"type":"array"},"required":{"type":"boolean"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"404":{"description":"Not found in the caller's organization."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List approval requests for a saved estimate","tags":["EPR"]},"post":{"description":"Ask a second person to approve a saved estimate. An identical open request is returned.","operationId":"post_fees_estimates_id_approvals","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"inputs":{"additionalProperties":{"type":"string"},"type":"object"},"note":{"type":"string"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"approver_id":{"nullable":true,"type":"integer"},"approver_name":{"type":"string"},"approver_title":{"type":"string"},"can_decide":{"type":"boolean"},"content_sha256":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"note":{"type":"string"},"proposed_inputs":{"additionalProperties":{"type":"string"},"type":"object"},"requested_at":{"format":"date-time","type":"string"},"requested_by_id":{"nullable":true,"type":"integer"},"requested_by_name":{"type":"string"},"status":{"type":"string"},"subject_id":{"type":"integer"},"subject_type":{"type":"string"},"uid":{"type":"string"}},"required":["approver_id","approver_name","approver_title","can_decide","content_sha256","decided_at","note","proposed_inputs","requested_at","requested_by_id","requested_by_name","status","subject_id","subject_type","uid"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Ask a second person to approve a saved estimate","tags":["EPR"]}},"/fees/estimates/{id}/approvals/{uid}/approve/":{"post":{"description":"Approve a saved estimate as the second person. Refused for the person who asked and for anyone without the signing right across the whole organization.","operationId":"post_fees_estimates_id_approvals_uid_approve","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"approver_name":{"type":"string"},"approver_title":{"type":"string"},"note":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"approver_id":{"nullable":true,"type":"integer"},"approver_name":{"type":"string"},"approver_title":{"type":"string"},"can_decide":{"type":"boolean"},"content_sha256":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"note":{"type":"string"},"proposed_inputs":{"additionalProperties":{"type":"string"},"type":"object"},"requested_at":{"format":"date-time","type":"string"},"requested_by_id":{"nullable":true,"type":"integer"},"requested_by_name":{"type":"string"},"status":{"type":"string"},"subject_id":{"type":"integer"},"subject_type":{"type":"string"},"uid":{"type":"string"}},"required":["approver_id","approver_name","approver_title","can_decide","content_sha256","decided_at","note","proposed_inputs","requested_at","requested_by_id","requested_by_name","status","subject_id","subject_type","uid"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Approve a saved estimate as the second person","tags":["EPR"]}},"/fees/estimates/{id}/approvals/{uid}/reject/":{"post":{"description":"Send a saved estimate back with a note saying what needs to change.","operationId":"post_fees_estimates_id_approvals_uid_reject","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"approver_name":{"type":"string"},"approver_title":{"type":"string"},"note":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"approver_id":{"nullable":true,"type":"integer"},"approver_name":{"type":"string"},"approver_title":{"type":"string"},"can_decide":{"type":"boolean"},"content_sha256":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"note":{"type":"string"},"proposed_inputs":{"additionalProperties":{"type":"string"},"type":"object"},"requested_at":{"format":"date-time","type":"string"},"requested_by_id":{"nullable":true,"type":"integer"},"requested_by_name":{"type":"string"},"status":{"type":"string"},"subject_id":{"type":"integer"},"subject_type":{"type":"string"},"uid":{"type":"string"}},"required":["approver_id","approver_name","approver_title","can_decide","content_sha256","decided_at","note","proposed_inputs","requested_at","requested_by_id","requested_by_name","status","subject_id","subject_type","uid"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Send a saved estimate back with a note","tags":["EPR"]}},"/fees/forecast/":{"get":{"description":"Return the forecast with its method stated.","operationId":"get_fees_forecast","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"forecast":{"additionalProperties":true,"type":"object"},"object":{"type":"string"}},"required":["forecast","object"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the forecast with its method stated","tags":["EPR"]}},"/fees/fx-rates/":{"get":{"description":"List stored FX rates.","operationId":"get_fees_fx_rates","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"base_currency":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"object":{"type":"string"},"quote_currency":{"type":"string"},"rate":{"type":"string"},"rate_date":{"format":"date","type":"string"},"rate_source":{"type":"string"},"source_note":{"type":"string"}},"required":["base_currency","created_at","id","object","quote_currency","rate","rate_date","rate_source","source_note"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List stored FX rates","tags":["EPR"]},"post":{"description":"Store a rate; the same pair and date is a conflict (enter a new date instead).","operationId":"post_fees_fx_rates","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FxRateRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/FxRateRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/FxRateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"base_currency":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"object":{"type":"string"},"quote_currency":{"type":"string"},"rate":{"type":"string"},"rate_date":{"format":"date","type":"string"},"rate_source":{"type":"string"},"source_note":{"type":"string"}},"required":["base_currency","created_at","id","object","quote_currency","rate","rate_date","rate_source","source_note"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Conflicts with the current state."},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Store a rate; the same pair and date is a conflict (enter a new date instead)","tags":["EPR"]}},"/fees/fx-rates/{id}/":{"delete":{"description":"Remove a stored rate.","operationId":"delete_fees_fx_rates_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Remove a stored rate","tags":["EPR"]}},"/fees/invoice-uploads/":{"get":{"description":"List uploaded invoice files, newest first.","operationId":"get_fees_invoice_uploads","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"ai_used":{"type":"boolean"},"confirmed_at":{"format":"date-time","nullable":true,"type":"string"},"content_sha256":{"type":"string"},"content_type":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"error":{"type":"string"},"extraction_method":{"type":"string"},"header":{"properties":{"currency":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"invoice_date":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"invoice_number":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"period_end":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"period_start":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"pro_name":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"total":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"}},"type":"object"},"id":{"type":"integer"},"invoice_id":{"nullable":true,"type":"integer"},"lines":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"notes":{"items":{"type":"string"},"type":"array"},"object":{"type":"string"},"original_name":{"type":"string"},"schedule_id":{"type":"string"},"schedule_note":{"nullable":true,"type":"string"},"size_bytes":{"type":"integer"},"status":{"type":"string"}},"required":["ai_used","confirmed_at","content_sha256","content_type","created_at","error","extraction_method","header","id","invoice_id","lines","notes","object","original_name","schedule_id","schedule_note","size_bytes","status"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List uploaded invoice files, newest first","tags":["EPR"]},"post":{"description":"Upload a PDF, image, CSV or XLSX invoice and queue it to be read. Nothing is saved as an invoice until the customer reviews the draft and confirms it.","operationId":"post_fees_invoice_uploads","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"},"schedule_id":{"type":"string"}},"required":["file","schedule_id"],"type":"object"}}}},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"ai_used":{"type":"boolean"},"confirmed_at":{"format":"date-time","nullable":true,"type":"string"},"content_sha256":{"type":"string"},"content_type":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"error":{"type":"string"},"extraction_method":{"type":"string"},"header":{"properties":{"currency":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"invoice_date":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"invoice_number":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"period_end":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"period_start":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"pro_name":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"total":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"}},"type":"object"},"id":{"type":"integer"},"invoice_id":{"nullable":true,"type":"integer"},"lines":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"notes":{"items":{"type":"string"},"type":"array"},"object":{"type":"string"},"original_name":{"type":"string"},"schedule_id":{"type":"string"},"schedule_note":{"nullable":true,"type":"string"},"size_bytes":{"type":"integer"},"status":{"type":"string"}},"required":["ai_used","confirmed_at","content_sha256","content_type","created_at","error","extraction_method","header","id","invoice_id","lines","notes","object","original_name","schedule_id","schedule_note","size_bytes","status"],"type":"object"}}},"description":"Accepted; the work continues in the background."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"description":"The upload is too large."},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Upload a PDF, image, CSV or XLSX invoice and queue it to be read","tags":["EPR"]}},"/fees/invoice-uploads/{id}/":{"get":{"description":"Return one upload with its draft, per-field confidence and source snippets.","operationId":"get_fees_invoice_uploads_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ai_used":{"type":"boolean"},"confirmed_at":{"format":"date-time","nullable":true,"type":"string"},"content_sha256":{"type":"string"},"content_type":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"error":{"type":"string"},"extraction_method":{"type":"string"},"header":{"properties":{"currency":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"invoice_date":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"invoice_number":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"period_end":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"period_start":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"pro_name":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"total":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"}},"type":"object"},"id":{"type":"integer"},"invoice_id":{"nullable":true,"type":"integer"},"lines":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"notes":{"items":{"type":"string"},"type":"array"},"object":{"type":"string"},"original_name":{"type":"string"},"schedule_id":{"type":"string"},"schedule_note":{"nullable":true,"type":"string"},"size_bytes":{"type":"integer"},"status":{"type":"string"}},"required":["ai_used","confirmed_at","content_sha256","content_type","created_at","error","extraction_method","header","id","invoice_id","lines","notes","object","original_name","schedule_id","schedule_note","size_bytes","status"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one upload with its draft, per-field confidence and source snippets","tags":["EPR"]}},"/fees/invoice-uploads/{id}/confirm/":{"post":{"description":"Save the reviewed draft as an invoice and check it against an estimate. The body is the invoice as the customer reviewed and edited it, with reviewed set to true; nothing read from the file is accepted without this call.","operationId":"post_fees_invoice_uploads_id_confirm","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequestRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/InvoiceRequestRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InvoiceRequestRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"check":{"additionalProperties":true,"type":"object"},"invoice":{"properties":{"check":{},"check_status":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"estimate_id":{"nullable":true,"type":"integer"},"flagged_count":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"lines":{"items":{"properties":{"amount":{"type":"string"},"category_code":{"type":"string"},"description":{"type":"string"},"line_number":{"type":"integer"},"quantity":{"nullable":true,"type":"string"},"rate":{"nullable":true,"type":"string"},"unit":{"type":"string"}},"required":["amount","category_code","description","line_number","quantity","rate","unit"],"type":"object"},"type":"array"},"object":{"type":"string"},"period":{"properties":{"end":{"format":"date","type":"string"},"start":{"format":"date","type":"string"}},"required":["end","start"],"type":"object"},"pro_name":{"type":"string"},"schedule_id":{"type":"string"},"total":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"}},"required":["check","check_status","created_at","estimate_id","flagged_count","id","invoice_number","lines","object","period","pro_name","schedule_id","total"],"type":"object"},"object":{"type":"string"},"upload":{"properties":{"ai_used":{"type":"boolean"},"confirmed_at":{"format":"date-time","nullable":true,"type":"string"},"content_sha256":{"type":"string"},"content_type":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"error":{"type":"string"},"extraction_method":{"type":"string"},"header":{"properties":{"currency":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"invoice_date":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"invoice_number":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"period_end":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"period_start":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"pro_name":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"},"total":{"properties":{"confidence":{"type":"number"},"source_snippet":{"type":"string"},"value":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"required":["confidence","source_snippet","value","verified"],"type":"object"}},"type":"object"},"id":{"type":"integer"},"invoice_id":{"nullable":true,"type":"integer"},"lines":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"notes":{"items":{"type":"string"},"type":"array"},"object":{"type":"string"},"original_name":{"type":"string"},"schedule_id":{"type":"string"},"schedule_note":{"nullable":true,"type":"string"},"size_bytes":{"type":"integer"},"status":{"type":"string"}},"required":["ai_used","confirmed_at","content_sha256","content_type","created_at","error","extraction_method","header","id","invoice_id","lines","notes","object","original_name","schedule_id","schedule_note","size_bytes","status"],"type":"object"}},"required":["check","invoice","object","upload"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Save the reviewed draft as an invoice and check it against an estimate","tags":["EPR"]}},"/fees/invoice-uploads/{id}/file/":{"get":{"description":"Download the original invoice file.","operationId":"get_fees_invoice_uploads_id_file","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Download the original invoice file","tags":["EPR"]}},"/fees/invoices/":{"get":{"description":"List saved invoices.","operationId":"get_fees_invoices","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"check_status":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"estimate_id":{"nullable":true,"type":"integer"},"flagged_count":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"object":{"type":"string"},"period":{"properties":{"end":{"format":"date","type":"string"},"start":{"format":"date","type":"string"}},"required":["end","start"],"type":"object"},"pro_name":{"type":"string"},"schedule_id":{"type":"string"},"total":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"}},"required":["check_status","created_at","estimate_id","flagged_count","id","invoice_number","object","period","pro_name","schedule_id","total"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List saved invoices","tags":["EPR"]},"post":{"description":"Save an invoice and compare it with an estimate for the same schedule and period.","operationId":"post_fees_invoices","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequestRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/InvoiceRequestRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InvoiceRequestRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"check":{"additionalProperties":true,"type":"object"},"invoice":{"properties":{"check":{},"check_status":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"estimate_id":{"nullable":true,"type":"integer"},"flagged_count":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"lines":{"items":{"properties":{"amount":{"type":"string"},"category_code":{"type":"string"},"description":{"type":"string"},"line_number":{"type":"integer"},"quantity":{"nullable":true,"type":"string"},"rate":{"nullable":true,"type":"string"},"unit":{"type":"string"}},"required":["amount","category_code","description","line_number","quantity","rate","unit"],"type":"object"},"type":"array"},"object":{"type":"string"},"period":{"properties":{"end":{"format":"date","type":"string"},"start":{"format":"date","type":"string"}},"required":["end","start"],"type":"object"},"pro_name":{"type":"string"},"schedule_id":{"type":"string"},"total":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"}},"required":["check","check_status","created_at","estimate_id","flagged_count","id","invoice_number","lines","object","period","pro_name","schedule_id","total"],"type":"object"},"object":{"type":"string"}},"required":["check","invoice","object"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Save an invoice and compare it with an estimate for the same schedule and period","tags":["EPR"]}},"/fees/invoices/{id}/":{"get":{"description":"Return one invoice with every variance line.","operationId":"get_fees_invoices_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"check":{},"check_status":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"estimate_id":{"nullable":true,"type":"integer"},"flagged_count":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"lines":{"items":{"properties":{"amount":{"type":"string"},"category_code":{"type":"string"},"description":{"type":"string"},"line_number":{"type":"integer"},"quantity":{"nullable":true,"type":"string"},"rate":{"nullable":true,"type":"string"},"unit":{"type":"string"}},"required":["amount","category_code","description","line_number","quantity","rate","unit"],"type":"object"},"type":"array"},"object":{"type":"string"},"period":{"properties":{"end":{"format":"date","type":"string"},"start":{"format":"date","type":"string"}},"required":["end","start"],"type":"object"},"pro_name":{"type":"string"},"schedule_id":{"type":"string"},"total":{"nullable":true,"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"}},"required":["check","check_status","created_at","estimate_id","flagged_count","id","invoice_number","lines","object","period","pro_name","schedule_id","total"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one invoice with every variance line","tags":["EPR"]}},"/fees/schedules/":{"get":{"description":"List schedule summaries.","operationId":"get_fees_schedules","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List schedule summaries","tags":["EPR"]}},"/fees/schedules/{fee_id}/":{"get":{"description":"Return the schedule as published, with the customer's entered rates alongside.","operationId":"get_fees_schedules_fee_id","parameters":[{"in":"path","name":"fee_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"customer_rates":{"items":{"properties":{"category_code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"data_quality":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"note":{"type":"string"},"object":{"type":"string"},"rate":{"type":"string"},"schedule_id":{"type":"string"},"unit":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["category_code","created_at","currency","data_quality","id","name","note","object","rate","schedule_id","unit","updated_at"],"type":"object"},"type":"array"},"schedule":{},"summary":{"additionalProperties":true,"type":"object"}},"required":["customer_rates","schedule","summary"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the schedule as published, with the customer's entered rates alongside","tags":["EPR"]}},"/fees/settings/":{"get":{"description":"Return the settings (defaults when none were saved).","operationId":"get_fees_settings","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"journal_date_style":{"type":"string"},"journal_expense_account":{"type":"string"},"journal_liability_account":{"type":"string"},"object":{"type":"string"},"reporting_currency":{"type":"string"},"tolerance_amount":{"type":"string"},"tolerance_percent":{"type":"string"}},"required":["journal_date_style","journal_expense_account","journal_liability_account","object","reporting_currency","tolerance_amount","tolerance_percent"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the settings (defaults when none were saved)","tags":["EPR"]},"put":{"description":"Save the settings.","operationId":"put_fees_settings","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/SettingsRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/SettingsRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"journal_date_style":{"type":"string"},"journal_expense_account":{"type":"string"},"journal_liability_account":{"type":"string"},"object":{"type":"string"},"reporting_currency":{"type":"string"},"tolerance_amount":{"type":"string"},"tolerance_percent":{"type":"string"}},"required":["journal_date_style","journal_expense_account","journal_liability_account","object","reporting_currency","tolerance_amount","tolerance_percent"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Save the settings","tags":["EPR"]}},"/fees/sources/":{"get":{"description":"Every market and rule with its figure (or why it has none), unit, effective date, source URL, retrieved date and the retrieved document's hash. Filter with ``market`` and ``kind``. Also lists the documented readings and the schedules and layouts not yet published, with the caller's watches.","operationId":"get_fees_sources","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"publications":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"readings":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["data","publications","readings"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List the fee and threshold source table","tags":["fees"]}},"/fees/sources/watches/":{"post":{"description":"Ask to be emailed when an awaited schedule or layout is published.","operationId":"post_fees_sources_watches","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"subject_id":{"type":"string"}},"required":["subject_id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created":{"type":"boolean"},"jurisdiction":{"type":"string"},"subject_id":{"type":"string"},"uid":{"type":"string"}},"required":["created","jurisdiction","subject_id","uid"],"type":"object"}}},"description":"Success."},"201":{"content":{"application/json":{"schema":{"properties":{"created":{"type":"boolean"},"jurisdiction":{"type":"string"},"subject_id":{"type":"string"},"uid":{"type":"string"}},"required":["created","jurisdiction","subject_id","uid"],"type":"object"}}},"description":"Created."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Ask to be emailed when an awaited schedule or layout is published","tags":["fees"]}},"/fees/sources/watches/{uid}/":{"delete":{"description":"Stop watching an awaited schedule or layout.","operationId":"delete_fees_sources_watches_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Stop watching an awaited schedule or layout","tags":["fees"]}},"/file-flows/connections":{"get":{"description":"List connections.","operationId":"get_file_flows_connections","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"base_path":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"has_credentials":{"type":"boolean"},"host":{"type":"string"},"host_key_fingerprint":{"type":"string"},"host_key_pinned_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"last_test_at":{"format":"date-time","nullable":true,"type":"string"},"last_test_code":{"type":"string"},"last_test_ok":{"nullable":true,"type":"boolean"},"name":{"type":"string"},"options":{"additionalProperties":true,"type":"object"},"port":{"type":"integer"},"public_key":{"type":"string"},"transport":{"type":"string"},"username":{"type":"string"}},"required":["base_path","created_at","has_credentials","host","host_key_fingerprint","host_key_pinned_at","id","last_test_at","last_test_code","last_test_ok","name","options","port","public_key","transport","username"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List connections","tags":["EPR"]},"post":{"description":"Create a connection (credentials are stored encrypted and never returned).","operationId":"post_file_flows_connections","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"base_path":{"type":"string"},"credentials":{"properties":{"access_key_id":{"type":"string"},"account_key":{"type":"string"},"external_id":{"type":"string"},"password":{"type":"string"},"private_key":{"type":"string"},"role_arn":{"type":"string"},"sas_token":{"type":"string"},"secret_access_key":{"type":"string"},"service_account_json":{"type":"string"}},"type":"object"},"host":{"type":"string"},"name":{"type":"string"},"options":{"properties":{"container":{"type":"string"},"endpoint_url":{"type":"string"},"region":{"type":"string"}},"type":"object"},"port":{"type":"integer"},"sas_url":{"type":"string"},"transport":{"type":"string"},"username":{"type":"string"}},"required":["name","transport"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"base_path":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"has_credentials":{"type":"boolean"},"host":{"type":"string"},"host_key_fingerprint":{"type":"string"},"host_key_pinned_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"last_test_at":{"format":"date-time","nullable":true,"type":"string"},"last_test_code":{"type":"string"},"last_test_ok":{"nullable":true,"type":"boolean"},"name":{"type":"string"},"options":{"additionalProperties":true,"type":"object"},"port":{"type":"integer"},"public_key":{"type":"string"},"transport":{"type":"string"},"username":{"type":"string"}},"required":["base_path","created_at","has_credentials","host","host_key_fingerprint","host_key_pinned_at","id","last_test_at","last_test_code","last_test_ok","name","options","port","public_key","transport","username"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a connection (credentials are stored encrypted and never returned)","tags":["EPR"]}},"/file-flows/connections/{uid}":{"delete":{"description":"Delete a connection that no flow uses.","operationId":"delete_file_flows_connections_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Delete a connection that no flow uses","tags":["EPR"]},"get":{"description":"Return one connection.","operationId":"get_file_flows_connections_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"base_path":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"has_credentials":{"type":"boolean"},"host":{"type":"string"},"host_key_fingerprint":{"type":"string"},"host_key_pinned_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"last_test_at":{"format":"date-time","nullable":true,"type":"string"},"last_test_code":{"type":"string"},"last_test_ok":{"nullable":true,"type":"boolean"},"name":{"type":"string"},"options":{"additionalProperties":true,"type":"object"},"port":{"type":"integer"},"public_key":{"type":"string"},"transport":{"type":"string"},"username":{"type":"string"}},"required":["base_path","created_at","has_credentials","host","host_key_fingerprint","host_key_pinned_at","id","last_test_at","last_test_code","last_test_ok","name","options","port","public_key","transport","username"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one connection","tags":["EPR"]},"patch":{"description":"Change a connection; changing the host clears the pinned SFTP host key.","operationId":"patch_file_flows_connections_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"base_path":{"type":"string"},"credentials":{"properties":{"access_key_id":{"type":"string"},"account_key":{"type":"string"},"external_id":{"type":"string"},"password":{"type":"string"},"private_key":{"type":"string"},"role_arn":{"type":"string"},"sas_token":{"type":"string"},"secret_access_key":{"type":"string"},"service_account_json":{"type":"string"}},"type":"object"},"host":{"type":"string"},"name":{"type":"string"},"options":{"properties":{"container":{"type":"string"},"endpoint_url":{"type":"string"},"region":{"type":"string"}},"type":"object"},"port":{"type":"integer"},"sas_url":{"type":"string"},"transport":{"type":"string"},"username":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"base_path":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"has_credentials":{"type":"boolean"},"host":{"type":"string"},"host_key_fingerprint":{"type":"string"},"host_key_pinned_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"last_test_at":{"format":"date-time","nullable":true,"type":"string"},"last_test_code":{"type":"string"},"last_test_ok":{"nullable":true,"type":"boolean"},"name":{"type":"string"},"options":{"additionalProperties":true,"type":"object"},"port":{"type":"integer"},"public_key":{"type":"string"},"transport":{"type":"string"},"username":{"type":"string"}},"required":["base_path","created_at","has_credentials","host","host_key_fingerprint","host_key_pinned_at","id","last_test_at","last_test_code","last_test_ok","name","options","port","public_key","transport","username"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Change a connection; changing the host clears the pinned SFTP host key","tags":["EPR"]}},"/file-flows/connections/{uid}/generate-key":{"post":{"description":"Generate a key pair; the private key is stored encrypted, the public key is returned.","operationId":"post_file_flows_connections_uid_generate_key","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"base_path":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"has_credentials":{"type":"boolean"},"host":{"type":"string"},"host_key_fingerprint":{"type":"string"},"host_key_pinned_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"last_test_at":{"format":"date-time","nullable":true,"type":"string"},"last_test_code":{"type":"string"},"last_test_ok":{"nullable":true,"type":"boolean"},"name":{"type":"string"},"options":{"additionalProperties":true,"type":"object"},"port":{"type":"integer"},"public_key":{"type":"string"},"transport":{"type":"string"},"username":{"type":"string"}},"required":["base_path","created_at","has_credentials","host","host_key_fingerprint","host_key_pinned_at","id","last_test_at","last_test_code","last_test_ok","name","options","port","public_key","transport","username"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Generate a key pair; the private key is stored encrypted, the public key is returned","tags":["EPR"]}},"/file-flows/connections/{uid}/host-key":{"post":{"description":"Pin the host key (body: ``fingerprint``, which must match what the server presents now).","operationId":"post_file_flows_connections_uid_host_key","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"fingerprint":{"type":"string"}},"required":["fingerprint"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"base_path":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"has_credentials":{"type":"boolean"},"host":{"type":"string"},"host_key_fingerprint":{"type":"string"},"host_key_pinned_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"last_test_at":{"format":"date-time","nullable":true,"type":"string"},"last_test_code":{"type":"string"},"last_test_ok":{"nullable":true,"type":"boolean"},"name":{"type":"string"},"options":{"additionalProperties":true,"type":"object"},"port":{"type":"integer"},"public_key":{"type":"string"},"transport":{"type":"string"},"username":{"type":"string"}},"required":["base_path","created_at","has_credentials","host","host_key_fingerprint","host_key_pinned_at","id","last_test_at","last_test_code","last_test_ok","name","options","port","public_key","transport","username"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Pin the host key (body: `fingerprint`, which must match what the server presents now)","tags":["EPR"]}},"/file-flows/connections/{uid}/test":{"post":{"description":"Check the connection; an unpinned SFTP host returns the presented fingerprint to confirm.","operationId":"post_file_flows_connections_uid_test","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"code":{"type":"string"},"connection":{"properties":{"base_path":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"has_credentials":{"type":"boolean"},"host":{"type":"string"},"host_key_fingerprint":{"type":"string"},"host_key_pinned_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"last_test_at":{"format":"date-time","nullable":true,"type":"string"},"last_test_code":{"type":"string"},"last_test_ok":{"nullable":true,"type":"boolean"},"name":{"type":"string"},"options":{"additionalProperties":true,"type":"object"},"port":{"type":"integer"},"public_key":{"type":"string"},"transport":{"type":"string"},"username":{"type":"string"}},"required":["base_path","created_at","has_credentials","host","host_key_fingerprint","host_key_pinned_at","id","last_test_at","last_test_code","last_test_ok","name","options","port","public_key","transport","username"],"type":"object"},"ok":{"type":"boolean"},"presented_fingerprint":{"type":"string"}},"required":["code","connection","ok","presented_fingerprint"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Check the connection; an unpinned SFTP host returns the presented fingerprint to confirm","tags":["EPR"]}},"/file-flows/email-in":{"get":{"description":"Return the organization's import address and allowed senders.","operationId":"get_file_flows_email_in","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"address":{"type":"string"},"allowed_senders":{"items":{"type":"string"},"type":"array"},"rotated_at":{"format":"date-time","type":"string"}},"required":["address","allowed_senders","rotated_at"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the organization's import address and allowed senders","tags":["EPR"]},"patch":{"description":"Set the allowed senders (addresses or ``@domain``); empty allows every member.","operationId":"patch_file_flows_email_in","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"allowed_senders":{"items":{"type":"string"},"type":"array"}},"required":["allowed_senders"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"address":{"type":"string"},"allowed_senders":{"items":{"type":"string"},"type":"array"},"rotated_at":{"format":"date-time","type":"string"}},"required":["address","allowed_senders","rotated_at"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Set the allowed senders (addresses or `@domain`); empty allows every member","tags":["EPR"]}},"/file-flows/email-in/quarantine":{"get":{"description":"Emails held for owner approval (not a member, or not an allowed sender).","operationId":"get_file_flows_email_in_quarantine","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"attachment_names":{"items":{"type":"string"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"reason":{"type":"string"},"released_at":{"format":"date-time","nullable":true,"type":"string"},"sender":{"type":"string"},"subject":{"type":"string"}},"required":["attachment_names","created_at","id","reason","released_at","sender","subject"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Emails held for owner approval","tags":["EPR"]}},"/file-flows/email-in/quarantine/{uid}/release":{"post":{"description":"Approve a held email and import its attachments.","operationId":"post_file_flows_email_in_quarantine_uid_release","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"attempt":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"error_code":{"type":"string"},"error_file_name":{"type":"string"},"files":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"flow_id":{"nullable":true,"type":"string"},"flow_name":{"type":"string"},"has_error_file":{"type":"boolean"},"id":{"type":"string"},"import_job_id":{"nullable":true,"type":"string"},"rows_accepted":{"type":"integer"},"rows_rejected":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"trigger":{"type":"string"}},"required":["attempt","created_at","error_code","error_file_name","files","finished_at","flow_id","flow_name","has_error_file","id","import_job_id","rows_accepted","rows_rejected","started_at","status","trigger"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Approve a held email and import its attachments","tags":["EPR"]}},"/file-flows/email-in/rotate":{"post":{"description":"Replace the address token; the old address stops working at once.","operationId":"post_file_flows_email_in_rotate","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"address":{"type":"string"},"allowed_senders":{"items":{"type":"string"},"type":"array"},"rotated_at":{"format":"date-time","type":"string"}},"required":["address","allowed_senders","rotated_at"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Replace the address token; the old address stops working at once","tags":["EPR"]}},"/file-flows/feed-keys":{"get":{"description":"List feed keys.","operationId":"get_file_flows_feed_keys","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"feed":{"type":"string"},"id":{"type":"string"},"key_prefix":{"type":"string"},"label":{"type":"string"},"last_read_at":{"format":"date-time","nullable":true,"type":"string"},"revoked_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["created_at","feed","id","key_prefix","label","last_read_at","revoked_at"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List feed keys","tags":["EPR"]},"post":{"description":"Create a read-only key for one feed; the key is shown once (body: ``feed``, ``label``).","operationId":"post_file_flows_feed_keys","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"feed":{"type":"string"},"label":{"type":"string"}},"required":["feed"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"created_at":{"format":"date-time","type":"string"},"feed":{"type":"string"},"id":{"type":"string"},"key":{"type":"string"},"key_prefix":{"type":"string"},"label":{"type":"string"},"last_read_at":{"format":"date-time","nullable":true,"type":"string"},"revoked_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["created_at","feed","id","key","key_prefix","label","last_read_at","revoked_at"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a read-only key for one feed; the key is shown once","tags":["EPR"]}},"/file-flows/feed-keys/{uid}":{"delete":{"description":"Revoke a feed key.","operationId":"delete_file_flows_feed_keys_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"created_at":{"format":"date-time","type":"string"},"feed":{"type":"string"},"id":{"type":"string"},"key_prefix":{"type":"string"},"label":{"type":"string"},"last_read_at":{"format":"date-time","nullable":true,"type":"string"},"revoked_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["created_at","feed","id","key_prefix","label","last_read_at","revoked_at"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Revoke a feed key","tags":["EPR"]}},"/file-flows/flows":{"get":{"description":"List flows (filter: ``direction``).","operationId":"get_file_flows_flows","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"after_import":{"type":"string"},"connection_id":{"type":"string"},"consecutive_failures":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"direction":{"type":"string"},"enabled":{"type":"boolean"},"entity":{"type":"string"},"file_glob":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"last_run_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"next_run_at":{"format":"date-time","nullable":true,"type":"string"},"notify_emails":{"items":{"type":"string"},"type":"array"},"options":{"additionalProperties":true,"type":"object"},"overwrite":{"type":"boolean"},"path_pattern":{"type":"string"},"paused":{"type":"boolean"},"paused_at":{"format":"date-time","nullable":true,"type":"string"},"preset":{"type":"string"},"schedule":{"type":"string"},"tz_name":{"type":"string"}},"required":["after_import","connection_id","consecutive_failures","created_at","direction","enabled","entity","file_glob","id","kind","last_run_at","name","next_run_at","notify_emails","options","overwrite","path_pattern","paused","paused_at","preset","schedule","tz_name"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List flows (filter: `direction`)","tags":["EPR"]},"post":{"description":"Create a flow (body: ``connection_id``, ``direction``, ``kind``, ``path_pattern``, ``schedule``).","operationId":"post_file_flows_flows","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"after_import":{"type":"string"},"connection_id":{"type":"string"},"direction":{"type":"string"},"enabled":{"type":"boolean"},"entity":{"type":"string"},"file_glob":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"notify_emails":{"items":{"type":"string"},"nullable":true,"type":"array"},"options":{"additionalProperties":true,"properties":{},"type":"object"},"overwrite":{"type":"boolean"},"path_pattern":{"type":"string"},"preset":{"type":"string"},"schedule":{"type":"string"},"tz_name":{"type":"string"}},"required":["connection_id","direction","kind","name"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"after_import":{"type":"string"},"connection_id":{"type":"string"},"consecutive_failures":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"direction":{"type":"string"},"enabled":{"type":"boolean"},"entity":{"type":"string"},"file_glob":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"last_run_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"next_run_at":{"format":"date-time","nullable":true,"type":"string"},"notify_emails":{"items":{"type":"string"},"type":"array"},"options":{"additionalProperties":true,"type":"object"},"overwrite":{"type":"boolean"},"path_pattern":{"type":"string"},"paused":{"type":"boolean"},"paused_at":{"format":"date-time","nullable":true,"type":"string"},"preset":{"type":"string"},"schedule":{"type":"string"},"tz_name":{"type":"string"}},"required":["after_import","connection_id","consecutive_failures","created_at","direction","enabled","entity","file_glob","id","kind","last_run_at","name","next_run_at","notify_emails","options","overwrite","path_pattern","paused","paused_at","preset","schedule","tz_name"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a flow (body: `connection_id`, `direction`, `kind`, `path_pattern`, `schedule`, ...)","tags":["EPR"]}},"/file-flows/flows/{uid}":{"delete":{"description":"Delete a flow; its run history is kept.","operationId":"delete_file_flows_flows_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Delete a flow; its run history is kept","tags":["EPR"]},"get":{"description":"Return one flow.","operationId":"get_file_flows_flows_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"after_import":{"type":"string"},"connection_id":{"type":"string"},"consecutive_failures":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"direction":{"type":"string"},"enabled":{"type":"boolean"},"entity":{"type":"string"},"file_glob":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"last_run_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"next_run_at":{"format":"date-time","nullable":true,"type":"string"},"notify_emails":{"items":{"type":"string"},"type":"array"},"options":{"additionalProperties":true,"type":"object"},"overwrite":{"type":"boolean"},"path_pattern":{"type":"string"},"paused":{"type":"boolean"},"paused_at":{"format":"date-time","nullable":true,"type":"string"},"preset":{"type":"string"},"schedule":{"type":"string"},"tz_name":{"type":"string"}},"required":["after_import","connection_id","consecutive_failures","created_at","direction","enabled","entity","file_glob","id","kind","last_run_at","name","next_run_at","notify_emails","options","overwrite","path_pattern","paused","paused_at","preset","schedule","tz_name"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one flow","tags":["EPR"]},"patch":{"description":"Change a flow.","operationId":"patch_file_flows_flows_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"after_import":{"type":"string"},"direction":{"type":"string"},"enabled":{"type":"boolean"},"entity":{"type":"string"},"file_glob":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"notify_emails":{"items":{"type":"string"},"nullable":true,"type":"array"},"options":{"additionalProperties":true,"properties":{},"type":"object"},"overwrite":{"type":"boolean"},"path_pattern":{"type":"string"},"preset":{"type":"string"},"schedule":{"type":"string"},"tz_name":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"after_import":{"type":"string"},"connection_id":{"type":"string"},"consecutive_failures":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"direction":{"type":"string"},"enabled":{"type":"boolean"},"entity":{"type":"string"},"file_glob":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"last_run_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"next_run_at":{"format":"date-time","nullable":true,"type":"string"},"notify_emails":{"items":{"type":"string"},"type":"array"},"options":{"additionalProperties":true,"type":"object"},"overwrite":{"type":"boolean"},"path_pattern":{"type":"string"},"paused":{"type":"boolean"},"paused_at":{"format":"date-time","nullable":true,"type":"string"},"preset":{"type":"string"},"schedule":{"type":"string"},"tz_name":{"type":"string"}},"required":["after_import","connection_id","consecutive_failures","created_at","direction","enabled","entity","file_glob","id","kind","last_run_at","name","next_run_at","notify_emails","options","overwrite","path_pattern","paused","paused_at","preset","schedule","tz_name"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Change a flow","tags":["EPR"]}},"/file-flows/flows/{uid}/resume":{"post":{"description":"Resume a paused flow after fixing its cause.","operationId":"post_file_flows_flows_uid_resume","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"after_import":{"type":"string"},"connection_id":{"type":"string"},"consecutive_failures":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"direction":{"type":"string"},"enabled":{"type":"boolean"},"entity":{"type":"string"},"file_glob":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"last_run_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"next_run_at":{"format":"date-time","nullable":true,"type":"string"},"notify_emails":{"items":{"type":"string"},"type":"array"},"options":{"additionalProperties":true,"type":"object"},"overwrite":{"type":"boolean"},"path_pattern":{"type":"string"},"paused":{"type":"boolean"},"paused_at":{"format":"date-time","nullable":true,"type":"string"},"preset":{"type":"string"},"schedule":{"type":"string"},"tz_name":{"type":"string"}},"required":["after_import","connection_id","consecutive_failures","created_at","direction","enabled","entity","file_glob","id","kind","last_run_at","name","next_run_at","notify_emails","options","overwrite","path_pattern","paused","paused_at","preset","schedule","tz_name"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Resume a paused flow after fixing its cause","tags":["EPR"]}},"/file-flows/flows/{uid}/run":{"post":{"description":"Run a flow now.","operationId":"post_file_flows_flows_uid_run","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"attempt":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"error_code":{"type":"string"},"error_file_name":{"type":"string"},"files":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"flow_id":{"nullable":true,"type":"string"},"flow_name":{"type":"string"},"has_error_file":{"type":"boolean"},"id":{"type":"string"},"import_job_id":{"nullable":true,"type":"string"},"rows_accepted":{"type":"integer"},"rows_rejected":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"trigger":{"type":"string"}},"required":["attempt","created_at","error_code","error_file_name","files","finished_at","flow_id","flow_name","has_error_file","id","import_job_id","rows_accepted","rows_rejected","started_at","status","trigger"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Accepted; the work continues in the background."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Run a flow now","tags":["EPR"]}},"/file-flows/runs":{"get":{"description":"Run history, newest first (filter: ``flow`` id).","operationId":"get_file_flows_runs","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"attempt":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"error_code":{"type":"string"},"error_file_name":{"type":"string"},"files":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"flow_id":{"nullable":true,"type":"string"},"flow_name":{"type":"string"},"has_error_file":{"type":"boolean"},"id":{"type":"string"},"import_job_id":{"nullable":true,"type":"string"},"rows_accepted":{"type":"integer"},"rows_rejected":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"trigger":{"type":"string"}},"required":["attempt","created_at","error_code","error_file_name","files","finished_at","flow_id","flow_name","has_error_file","id","import_job_id","rows_accepted","rows_rejected","started_at","status","trigger"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Run history, newest first (filter: `flow` id)","tags":["EPR"]}},"/file-flows/runs/{uid}":{"get":{"description":"Return one run.","operationId":"get_file_flows_runs_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"attempt":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"error_code":{"type":"string"},"error_file_name":{"type":"string"},"files":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"flow_id":{"nullable":true,"type":"string"},"flow_name":{"type":"string"},"has_error_file":{"type":"boolean"},"id":{"type":"string"},"import_job_id":{"nullable":true,"type":"string"},"rows_accepted":{"type":"integer"},"rows_rejected":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"trigger":{"type":"string"}},"required":["attempt","created_at","error_code","error_file_name","files","finished_at","flow_id","flow_name","has_error_file","id","import_job_id","rows_accepted","rows_rejected","started_at","status","trigger"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one run","tags":["EPR"]}},"/file-flows/runs/{uid}/error-file":{"get":{"description":"Download the CSV of rejected rows.","operationId":"get_file_flows_runs_uid_error_file","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Download the CSV of rejected rows","tags":["EPR"]}},"/filled-templates/{id}/download":{"get":{"description":"Return the filled file for the customer to upload to the portal.","operationId":"get_filled_templates_id_download","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}},"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the filled file for the customer to upload to the portal","tags":["EPR"]}},"/home/summary/":{"get":{"description":"Return all sections, the onboarding checklist and the next-actions list.","operationId":"get_home_summary","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"as_of":{"format":"date","type":"string"},"data-quality":{"properties":{"component_tiers":{"additionalProperties":{"type":"integer"},"type":"object"},"components_estimated":{"type":"integer"},"components_measured":{"type":"integer"},"components_total":{"type":"integer"},"percent_measured":{"type":"integer"},"tiers":{"additionalProperties":{"properties":{"records":{"type":"integer"},"units":{"type":"integer"}},"required":["records","units"],"type":"object"},"type":"object"},"total_records":{"type":"integer"}},"required":["component_tiers","components_estimated","components_measured","components_total","percent_measured","tiers","total_records"],"type":"object"},"deadlines":{"properties":{"deadlines":{"items":{"properties":{"due_date":{"format":"date","type":"string"},"entity_name":{"nullable":true,"type":"string"},"exemption_id":{"nullable":true,"type":"string"},"id":{"type":"string"},"jurisdiction":{"type":"string"},"kind":{"type":"string"},"overdue":{"type":"boolean"},"path":{"type":"string"},"period_end":{"format":"date","nullable":true,"type":"string"},"period_id":{"nullable":true,"type":"integer"},"period_start":{"format":"date","nullable":true,"type":"string"},"place":{"type":"string"},"source_url":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"}},"required":["due_date","entity_name","exemption_id","id","jurisdiction","kind","overdue","path","period_end","period_id","period_start","place","source_url","status"],"type":"object"},"type":"array"}},"required":["deadlines"],"type":"object"},"fees":{"properties":{"estimates":{"items":{"properties":{"currency":{"type":"string"},"data_quality":{},"id":{"type":"integer"},"jurisdiction":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"previous_total":{"nullable":true,"type":"string"},"previous_year":{"nullable":true,"type":"integer"},"status":{"type":"string"},"total":{"nullable":true,"type":"string"}},"required":["currency","data_quality","id","jurisdiction","period_end","period_start","previous_total","previous_year","status","total"],"type":"object"},"type":"array"},"restricted":{"type":"boolean"}},"required":["estimates","restricted"],"type":"object"},"next-actions":{"properties":{"actions":{"items":{"properties":{"code":{"type":"string"},"count":{"type":"integer"},"detail":{"type":"string"},"href":{"type":"string"}},"required":["code","count","href"],"type":"object"},"type":"array"}},"required":["actions"],"type":"object"},"obligations":{"properties":{"as_of":{"format":"date","nullable":true,"type":"string"},"checking":{"type":"boolean"},"counts":{"additionalProperties":{"type":"integer"},"type":"object"},"jurisdictions":{"items":{"properties":{"apply_for_exemption":{"type":"boolean"},"entities":{"type":"integer"},"jurisdiction":{"type":"string"},"status":{"type":"string"}},"required":["apply_for_exemption","entities","jurisdiction","status"],"type":"object"},"type":"array"},"multi_entity":{"type":"boolean"},"other_count":{"type":"integer"},"run_id":{"nullable":true,"type":"integer"},"suggested_places":{"type":"integer"}},"required":["as_of","checking","counts","jurisdictions","multi_entity","other_count","run_id","suggested_places"],"type":"object"},"onboarding":{"properties":{"brands":{"type":"integer"},"completed":{"type":"integer"},"next_step":{"nullable":true,"type":"string"},"steps":{"items":{"properties":{"complete":{"type":"boolean"},"count":{"type":"integer"},"href":{"type":"string"},"key":{"type":"string"}},"required":["complete","count","href","key"],"type":"object"},"type":"array"},"total":{"type":"integer"}},"required":["brands","completed","next_step","steps","total"],"type":"object"},"periods":{"properties":{"approvals_waiting":{"items":{"properties":{"id":{"type":"integer"},"kind":{"type":"string"}},"required":["id","kind"],"type":"object"},"type":"array"},"counts":{"additionalProperties":{"type":"integer"},"type":"object"},"current":{"items":{"properties":{"due_date":{"format":"date","nullable":true,"type":"string"},"entity_name":{"type":"string"},"id":{"type":"integer"},"jurisdiction":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"status":{"type":"string"}},"required":["due_date","entity_name","id","jurisdiction","period_end","period_start","status"],"type":"object"},"type":"array"},"total":{"type":"integer"}},"required":["approvals_waiting","counts","current","total"],"type":"object"},"quality-flags":{"properties":{"counts":{"additionalProperties":{"type":"integer"},"type":"object"},"latest":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"kind":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string"}},"required":["created_at","id","kind","message","severity"],"type":"object"},"type":"array"},"open_total":{"type":"integer"}},"required":["counts","latest","open_total"],"type":"object"},"supplier-requests":{"properties":{"expiring_soon":{"type":"integer"},"outstanding":{"type":"integer"},"requests":{"items":{"properties":{"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"reminder_count":{"type":"integer"},"sent_at":{"format":"date-time","nullable":true,"type":"string"},"supplier":{"type":"string"}},"required":["expires_at","id","reminder_count","sent_at","supplier"],"type":"object"},"type":"array"},"suppliers":{"type":"integer"}},"required":["expiring_soon","outstanding","requests","suppliers"],"type":"object"}},"required":["as_of","data-quality","deadlines","fees","next-actions","obligations","onboarding","periods","quality-flags","supplier-requests"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return all sections, the onboarding checklist and the next-actions list","tags":["home"]}},"/home/summary/{section}/":{"get":{"description":"Return one section; unknown sections are 404.","operationId":"get_home_summary_section","parameters":[{"in":"path","name":"section","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one section; unknown sections are 404","tags":["home"]}},"/identity/audit-retention":{"get":{"description":"Return the organization's chosen retention period, its bounds, and whether a legal hold pauses it.","operationId":"get_identity_audit_retention","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"audit_retention_days":{"type":"integer"},"default_days":{"type":"integer"},"max_days":{"type":"integer"},"min_days":{"type":"integer"},"paused_by_legal_hold":{"type":"boolean"}},"required":["audit_retention_days","default_days","max_days","min_days","paused_by_legal_hold"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the audit-log retention period","tags":["identity"]},"patch":{"description":"Set how many days audit events are kept, from 365 to 3,650. The period is the organization's own choice; the daily sweep removes older events and records a checkpoint so the chain still verifies.","operationId":"patch_identity_audit_retention","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedRetentionUpdateRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"audit_retention_days":{"type":"integer"},"default_days":{"type":"integer"},"max_days":{"type":"integer"},"min_days":{"type":"integer"},"paused_by_legal_hold":{"type":"boolean"}},"required":["audit_retention_days","default_days","max_days","min_days","paused_by_legal_hold"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Change the audit-log retention period (step-up required)","tags":["identity"]}},"/identity/break-glass-owners":{"get":{"description":"List the workspace's owners, which of them are break-glass owners and whether the caller may change that.","operationId":"get_identity_break_glass_owners","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"allowlist_on":{"type":"boolean"},"can_edit":{"type":"boolean"},"owners":{"items":{"properties":{"break_glass":{"type":"boolean"},"email":{"type":"string"},"is_you":{"type":"boolean"},"member_uid":{"type":"string"},"name":{"type":"string"}},"required":["break_glass","email","is_you","member_uid","name"],"type":"object"},"type":"array"}},"required":["allowlist_on","can_edit","owners"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List the owners and which of them are break-glass owners","tags":["identity"]},"put":{"description":"Replace the break-glass owners. Each must be an active owner. Refused with 409 when the list would be emptied while the IP allowlist is on.","operationId":"put_identity_break_glass_owners","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakGlassOwnersRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"allowlist_on":{"type":"boolean"},"can_edit":{"type":"boolean"},"owners":{"items":{"properties":{"break_glass":{"type":"boolean"},"email":{"type":"string"},"is_you":{"type":"boolean"},"member_uid":{"type":"string"},"name":{"type":"string"}},"required":["break_glass","email","is_you","member_uid","name"],"type":"object"},"type":"array"}},"required":["allowlist_on","can_edit","owners"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Name the break-glass owners (owner only, step-up required)","tags":["identity"]}},"/identity/domains":{"get":{"description":"List claimed domains.","operationId":"get_identity_domains","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"domain":{"type":"string"},"provider_uid":{"nullable":true,"type":"string"},"sso_enforced":{"type":"boolean"},"txt_record_name":{"type":"string"},"txt_record_value":{"type":"string"},"uid":{"type":"string"},"verified":{"type":"boolean"}},"required":["domain","provider_uid","sso_enforced","txt_record_name","txt_record_value","uid","verified"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List claimed domains","tags":["identity"]},"post":{"description":"Claim a domain; publish the returned TXT value to verify it.","operationId":"post_identity_domains","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"domain":{"type":"string"},"provider_uid":{"nullable":true,"type":"string"},"sso_enforced":{"type":"boolean"},"txt_record_name":{"type":"string"},"txt_record_value":{"type":"string"},"uid":{"type":"string"},"verified":{"type":"boolean"}},"required":["domain","provider_uid","sso_enforced","txt_record_name","txt_record_value","uid","verified"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Claim a domain; publish the returned TXT value to verify it","tags":["identity"]}},"/identity/domains/{uid}":{"delete":{"description":"Remove a domain claim.","operationId":"delete_identity_domains_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Remove a domain claim","tags":["identity"]},"patch":{"description":"Turn SSO enforcement on or off (step-up required).","operationId":"patch_identity_domains_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedDomainUpdateRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"domain":{"type":"string"},"provider_uid":{"nullable":true,"type":"string"},"sso_enforced":{"type":"boolean"},"txt_record_name":{"type":"string"},"txt_record_value":{"type":"string"},"uid":{"type":"string"},"verified":{"type":"boolean"}},"required":["domain","provider_uid","sso_enforced","txt_record_name","txt_record_value","uid","verified"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Turn SSO enforcement on or off (step-up required)","tags":["identity"]}},"/identity/domains/{uid}/verify":{"post":{"description":"Look up the TXT record now.","operationId":"post_identity_domains_uid_verify","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"domain":{"type":"string"},"provider_uid":{"nullable":true,"type":"string"},"sso_enforced":{"type":"boolean"},"txt_record_name":{"type":"string"},"txt_record_value":{"type":"string"},"uid":{"type":"string"},"verified":{"type":"boolean"}},"required":["domain","provider_uid","sso_enforced","txt_record_name","txt_record_value","uid","verified"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Look up the TXT record now","tags":["identity"]}},"/identity/ip-allowlist":{"get":{"description":"Return the allowlist, whether it is on, and how the caller's own address fares against it.","operationId":"get_identity_ip_allowlist","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"break_glass":{"type":"boolean"},"current_ip":{"nullable":true,"type":"string"},"current_ip_allowed":{"type":"boolean"},"enabled":{"type":"boolean"},"entries":{"items":{"type":"string"},"type":"array"},"max_entries":{"type":"integer"}},"required":["break_glass","current_ip","current_ip_allowed","enabled","entries","max_entries"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the IP allowlist","tags":["identity"]},"patch":{"description":"Turn the allowlist on or off and replace its entries (IPv4/IPv6 addresses or CIDR ranges). Refused with 409 when the change would block the caller's own address, unless confirm_lockout is true.","operationId":"patch_identity_ip_allowlist","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedIpAllowlistUpdateRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"break_glass":{"type":"boolean"},"current_ip":{"nullable":true,"type":"string"},"current_ip_allowed":{"type":"boolean"},"enabled":{"type":"boolean"},"entries":{"items":{"type":"string"},"type":"array"},"max_entries":{"type":"integer"}},"required":["break_glass","current_ip","current_ip_allowed","enabled","entries","max_entries"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Change the IP allowlist (step-up required)","tags":["identity"]}},"/identity/legal-holds":{"get":{"description":"Return the organization's legal holds, active ones first, newest first.","operationId":"get_identity_legal_holds","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"string"},"object":{"type":"string"},"placed_at":{"format":"date-time","type":"string"},"placed_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"reason":{"type":"string"},"release_reason":{"type":"string"},"released_at":{"format":"date-time","nullable":true,"type":"string"},"released_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"required":["active","id","object","placed_at","placed_by","reason","release_reason","released_at","released_by"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List legal holds","tags":["identity"]},"post":{"description":"Freeze deletion of the organization's records: account closure, the audit retention sweep and members' personal account deletion are refused until the hold is released. A reason is required.","operationId":"post_identity_legal_holds","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalHoldReasonRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"active":{"type":"boolean"},"id":{"type":"string"},"object":{"type":"string"},"placed_at":{"format":"date-time","type":"string"},"placed_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"reason":{"type":"string"},"release_reason":{"type":"string"},"released_at":{"format":"date-time","nullable":true,"type":"string"},"released_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"required":["active","id","object","placed_at","placed_by","reason","release_reason","released_at","released_by"],"type":"object"}}},"description":"Created."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Place a legal hold (step-up required)","tags":["identity"]}},"/identity/legal-holds/{uid}/release":{"post":{"description":"Release an active hold with a written reason. Deletion is allowed again once no hold is active.","operationId":"post_identity_legal_holds_uid_release","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalHoldReasonRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"active":{"type":"boolean"},"id":{"type":"string"},"object":{"type":"string"},"placed_at":{"format":"date-time","type":"string"},"placed_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"reason":{"type":"string"},"release_reason":{"type":"string"},"released_at":{"format":"date-time","nullable":true,"type":"string"},"released_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"required":["active","id","object","placed_at","placed_by","reason","release_reason","released_at","released_by"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Release a legal hold (step-up required)","tags":["identity"]}},"/identity/mfa":{"get":{"description":"Factors, assurance level of this session and the org requirement.","operationId":"get_identity_mfa","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"aal":{"type":"integer"},"factors":{"properties":{"recovery_codes":{"type":"integer"},"totp":{"type":"integer"},"webauthn":{"type":"integer"}},"required":["recovery_codes","totp","webauthn"],"type":"object"},"passkeys":{"items":{"properties":{"created_at":{"type":"string"},"name":{"type":"string"},"uid":{"type":"string"}},"required":["created_at","name","uid"],"type":"object"},"type":"array"},"recent_mfa":{"type":"boolean"},"requirement":{"type":"string"},"requirement_reason":{"type":"string"}},"required":["aal","factors","passkeys","recent_mfa","requirement","requirement_reason"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Factors, assurance level of this session and the org requirement","tags":["identity"]}},"/identity/mfa/factors/{factor}":{"delete":{"description":"Remove a factor (step-up required; another factor must remain).","operationId":"delete_identity_mfa_factors_factor","parameters":[{"in":"path","name":"factor","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Remove a factor (step-up required; another factor must remain)","tags":["identity"]}},"/identity/mfa/recovery-codes":{"post":{"description":"Generate 10 new single-use codes (replacing the old set); shown once.","operationId":"post_identity_mfa_recovery_codes","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"codes":{"items":{"type":"string"},"type":"array"}},"required":["codes"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Generate 10 new single-use codes (replacing the old set); shown once","tags":["identity"]}},"/identity/mfa/recovery-requests":{"get":{"description":"Pending requests for the organization.","operationId":"get_identity_mfa_recovery_requests","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"status":{"type":"string"},"target":{"type":"string"},"uid":{"type":"string"}},"required":["status","target","uid"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Pending requests for the organization","tags":["identity"]},"post":{"description":"Open a request for a member who lost every factor.","operationId":"post_identity_mfa_recovery_requests","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoveryRequestRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"status":{"type":"string"},"uid":{"type":"string"}},"required":["status","uid"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Open a request for a member who lost every factor","tags":["identity"]}},"/identity/mfa/recovery-requests/self":{"post":{"description":"Ask for a sign-in reset after losing every factor (phone, passkeys and recovery codes). Signed in with the password only. Another owner of the organization decides it; a sole owner's request goes to Instica support as a ticket. ``decided_by`` says which (``owner`` or ``support``).","operationId":"post_identity_mfa_recovery_requests_self","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnRecoveryRequestRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"decided_by":{"type":"string"},"status":{"type":"string"},"uid":{"type":"string"}},"required":["decided_by","status","uid"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Ask for a sign-in reset after losing every factor","tags":["identity"]}},"/identity/mfa/recovery-requests/{uid}/decide":{"post":{"description":"Approve or deny.","operationId":"post_identity_mfa_recovery_requests_uid_decide","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoveryDecisionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"type":"string"},"uid":{"type":"string"}},"required":["status","uid"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Approve or deny","tags":["identity"]}},"/identity/mfa/recovery-requests/{uid}/operator-decide":{"post":{"description":"Staff approval of a sole owner's recovery. Self-approval is forbidden, so an organization whose only owner lost every factor has no owner who can decide; an active staff member (with a recent second factor) records why the person's identity was verified and approves or denies. The request must be pending and the organization must have no other active owner. The decision is audited with the operator as actor and every owner is emailed.","operationId":"post_identity_mfa_recovery_requests_uid_operator_decide","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorRecoveryDecisionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"type":"string"},"uid":{"type":"string"}},"required":["status","uid"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Staff approval of a sole owner's recovery","tags":["identity"]}},"/identity/mfa/totp/begin":{"post":{"description":"Start authenticator enrolment; the secret is shown once.","operationId":"post_identity_mfa_totp_begin","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"otpauth_uri":{"type":"string"},"secret":{"type":"string"}},"required":["otpauth_uri","secret"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Start authenticator enrolment; the secret is shown once","tags":["identity"]}},"/identity/mfa/totp/confirm":{"post":{"description":"Confirm the authenticator with a first code; the session becomes AAL2.","operationId":"post_identity_mfa_totp_confirm","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"confirmed":{"type":"boolean"},"recovery_codes":{"items":{"type":"string"},"type":"array"}},"required":["confirmed","recovery_codes"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Confirm the authenticator with a first code; the session becomes AAL2","tags":["identity"]}},"/identity/mfa/verify":{"post":{"description":"Verify a TOTP or recovery code (locked out after repeated failures).","operationId":"post_identity_mfa_verify","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaVerifyRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"aal":{"type":"integer"}},"required":["aal"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Verify a TOTP or recovery code (locked out after repeated failures)","tags":["identity"]}},"/identity/mfa/webauthn/authenticate/begin":{"post":{"description":"Return request options.","operationId":"post_identity_mfa_webauthn_authenticate_begin","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return request options","tags":["identity"]}},"/identity/mfa/webauthn/authenticate/complete":{"post":{"description":"Verify the assertion; a passkey with user verification reaches AAL2.","operationId":"post_identity_mfa_webauthn_authenticate_complete","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebAuthnCompleteRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"aal":{"type":"integer"}},"required":["aal"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Verify the assertion; a passkey with user verification reaches AAL2","tags":["identity"]}},"/identity/mfa/webauthn/register/begin":{"post":{"description":"Return creation options.","operationId":"post_identity_mfa_webauthn_register_begin","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return creation options","tags":["identity"]}},"/identity/mfa/webauthn/register/complete":{"post":{"description":"Verify and store the passkey.","operationId":"post_identity_mfa_webauthn_register_complete","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebAuthnCompleteRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"},"recovery_codes":{"items":{"type":"string"},"type":"array"},"uid":{"type":"string"}},"required":["name","recovery_codes","uid"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Verify and store the passkey","tags":["identity"]}},"/identity/oidc/callback":{"get":{"description":"Check the single-use state, exchange the code with the PKCE verifier, verify the ID token (RS256 or ES256, issuer, audience, expiry, nonce), provision the member and sign in. Redirects to the saved page, or to /login?error=<code> when refused.","operationId":"get_identity_oidc_callback","responses":{"302":{"description":"Found."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Finish an OpenID Connect sign-in","tags":["identity"]}},"/identity/oidc/presets":{"get":{"description":"Return the tested IdP presets (Okta, Microsoft Entra ID, Google Workspace) and the redirect URI.","operationId":"get_identity_oidc_presets","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"presets":{"items":{"properties":{"group_claim":{"type":"string"},"group_claim_options":{"items":{"type":"string"},"type":"array"},"groups_supported":{"type":"boolean"},"issuer_fields":{"items":{"type":"string"},"type":"array"},"issuer_template":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"},"setup_steps":{"items":{"type":"string"},"type":"array"}},"required":["group_claim","issuer_fields","issuer_template","key","name"],"type":"object"},"type":"array"},"redirect_uri":{"type":"string"}},"required":["presets","redirect_uri"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List OpenID Connect presets","tags":["identity"]}},"/identity/oidc/{uid}/start":{"get":{"description":"Store a single-use state, nonce and PKCE (S256) verifier in the session and redirect to the IdP's authorization endpoint. A refused start redirects to /login?error=<code>.","operationId":"get_identity_oidc_uid_start","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"302":{"description":"Found."},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Start an OpenID Connect sign-in","tags":["identity"]}},"/identity/providers":{"get":{"description":"List SSO connections.","operationId":"get_identity_providers","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"certificate":{"properties":{"days_remaining":{"nullable":true,"type":"integer"},"expires_at":{"nullable":true,"type":"string"},"status":{"type":"string"},"subject":{"type":"string"},"warning":{"type":"string"}},"required":["days_remaining","expires_at","status","subject","warning"],"type":"object"},"config":{"additionalProperties":true,"type":"object"},"default_role":{"type":"string"},"enabled":{"type":"boolean"},"group_claim":{"type":"string"},"has_secret":{"type":"boolean"},"idp_enforces_mfa":{"type":"boolean"},"jit_provisioning":{"type":"boolean"},"login_url":{"type":"string"},"name":{"type":"string"},"protocol":{"type":"string"},"service_provider":{"nullable":true,"properties":{"acs_url":{"type":"string"},"email_attributes":{"items":{"type":"string"},"type":"array"},"entity_id":{"type":"string"},"groups_attribute":{"type":"string"},"metadata_url":{"type":"string"},"sls_url":{"type":"string"}},"required":["acs_url","email_attributes","entity_id","groups_attribute","metadata_url","sls_url"],"type":"object"},"uid":{"type":"string"},"want_assertions_encrypted":{"type":"boolean"}},"required":["certificate","config","default_role","enabled","group_claim","has_secret","idp_enforces_mfa","jit_provisioning","login_url","name","protocol","service_provider","uid","want_assertions_encrypted"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List SSO connections","tags":["identity"]},"post":{"description":"Create an SSO connection (step-up required).","operationId":"post_identity_providers","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderWriteRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"certificate":{"properties":{"days_remaining":{"nullable":true,"type":"integer"},"expires_at":{"nullable":true,"type":"string"},"status":{"type":"string"},"subject":{"type":"string"},"warning":{"type":"string"}},"required":["days_remaining","expires_at","status","subject","warning"],"type":"object"},"config":{"additionalProperties":true,"type":"object"},"default_role":{"type":"string"},"enabled":{"type":"boolean"},"group_claim":{"type":"string"},"has_secret":{"type":"boolean"},"idp_enforces_mfa":{"type":"boolean"},"jit_provisioning":{"type":"boolean"},"login_url":{"type":"string"},"name":{"type":"string"},"protocol":{"type":"string"},"service_provider":{"nullable":true,"properties":{"acs_url":{"type":"string"},"email_attributes":{"items":{"type":"string"},"type":"array"},"entity_id":{"type":"string"},"groups_attribute":{"type":"string"},"metadata_url":{"type":"string"},"sls_url":{"type":"string"}},"required":["acs_url","email_attributes","entity_id","groups_attribute","metadata_url","sls_url"],"type":"object"},"uid":{"type":"string"},"want_assertions_encrypted":{"type":"boolean"}},"required":["certificate","config","default_role","enabled","group_claim","has_secret","idp_enforces_mfa","jit_provisioning","login_url","name","protocol","service_provider","uid","want_assertions_encrypted"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create an SSO connection (step-up required)","tags":["identity"]}},"/identity/providers/{uid}":{"delete":{"description":"Remove a connection (step-up required).","operationId":"delete_identity_providers_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Remove a connection (step-up required)","tags":["identity"]},"get":{"description":"One connection.","operationId":"get_identity_providers_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"certificate":{"properties":{"days_remaining":{"nullable":true,"type":"integer"},"expires_at":{"nullable":true,"type":"string"},"status":{"type":"string"},"subject":{"type":"string"},"warning":{"type":"string"}},"required":["days_remaining","expires_at","status","subject","warning"],"type":"object"},"config":{"additionalProperties":true,"type":"object"},"default_role":{"type":"string"},"enabled":{"type":"boolean"},"group_claim":{"type":"string"},"has_secret":{"type":"boolean"},"idp_enforces_mfa":{"type":"boolean"},"jit_provisioning":{"type":"boolean"},"login_url":{"type":"string"},"name":{"type":"string"},"protocol":{"type":"string"},"service_provider":{"nullable":true,"properties":{"acs_url":{"type":"string"},"email_attributes":{"items":{"type":"string"},"type":"array"},"entity_id":{"type":"string"},"groups_attribute":{"type":"string"},"metadata_url":{"type":"string"},"sls_url":{"type":"string"}},"required":["acs_url","email_attributes","entity_id","groups_attribute","metadata_url","sls_url"],"type":"object"},"uid":{"type":"string"},"want_assertions_encrypted":{"type":"boolean"}},"required":["certificate","config","default_role","enabled","group_claim","has_secret","idp_enforces_mfa","jit_provisioning","login_url","name","protocol","service_provider","uid","want_assertions_encrypted"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"One connection","tags":["identity"]},"patch":{"description":"Edit a connection (step-up required).","operationId":"patch_identity_providers_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedProviderWriteRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"certificate":{"properties":{"days_remaining":{"nullable":true,"type":"integer"},"expires_at":{"nullable":true,"type":"string"},"status":{"type":"string"},"subject":{"type":"string"},"warning":{"type":"string"}},"required":["days_remaining","expires_at","status","subject","warning"],"type":"object"},"config":{"additionalProperties":true,"type":"object"},"default_role":{"type":"string"},"enabled":{"type":"boolean"},"group_claim":{"type":"string"},"has_secret":{"type":"boolean"},"idp_enforces_mfa":{"type":"boolean"},"jit_provisioning":{"type":"boolean"},"login_url":{"type":"string"},"name":{"type":"string"},"protocol":{"type":"string"},"service_provider":{"nullable":true,"properties":{"acs_url":{"type":"string"},"email_attributes":{"items":{"type":"string"},"type":"array"},"entity_id":{"type":"string"},"groups_attribute":{"type":"string"},"metadata_url":{"type":"string"},"sls_url":{"type":"string"}},"required":["acs_url","email_attributes","entity_id","groups_attribute","metadata_url","sls_url"],"type":"object"},"uid":{"type":"string"},"want_assertions_encrypted":{"type":"boolean"}},"required":["certificate","config","default_role","enabled","group_claim","has_secret","idp_enforces_mfa","jit_provisioning","login_url","name","protocol","service_provider","uid","want_assertions_encrypted"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Edit a connection (step-up required)","tags":["identity"]}},"/identity/providers/{uid}/rules":{"get":{"description":"List group-to-role rules.","operationId":"get_identity_providers_uid_rules","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"entity_ids":{"items":{"type":"integer"},"type":"array"},"group":{"type":"string"},"role":{"type":"string"},"uid":{"type":"string"}},"required":["entity_ids","group","role","uid"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List group-to-role rules","tags":["identity"]},"post":{"description":"Add a rule (step-up required).","operationId":"post_identity_providers_uid_rules","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleRuleRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"entity_ids":{"items":{"type":"integer"},"type":"array"},"group":{"type":"string"},"role":{"type":"string"},"uid":{"type":"string"}},"required":["entity_ids","group","role","uid"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Add a rule (step-up required)","tags":["identity"]}},"/identity/providers/{uid}/rules/{rule_uid}":{"delete":{"description":"Remove a rule.","operationId":"delete_identity_providers_uid_rules_rule_uid","parameters":[{"in":"path","name":"rule_uid","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Remove a rule","tags":["identity"]}},"/identity/providers/{uid}/saml-metadata":{"get":{"description":"The SAML service-provider metadata for this connection, built with python3-saml: entity ID, ACS URL, and the encryption certificate when encrypted assertions are required. SAML connections only.","operationId":"get_identity_providers_uid_saml_metadata","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/samlmetadata+xml":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Download the service-provider metadata","tags":["identity"]}},"/identity/scim-tokens":{"get":{"description":"List tokens (never the secret), with the absolute SCIM base URL to give the IdP. It is built on the same public origin as the SSO redirect URI.","operationId":"get_identity_scim_tokens","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"base_url":{"type":"string"},"data":{"items":{"properties":{"created_at":{"type":"string"},"last_four":{"type":"string"},"last_used_at":{"nullable":true,"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"revoked":{"type":"boolean"},"uid":{"type":"string"}},"required":["created_at","last_four","last_used_at","name","prefix","revoked","uid"],"type":"object"},"type":"array"}},"required":["base_url","data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List tokens (never the secret)","tags":["identity"]},"post":{"description":"Mint a token; the secret is returned once (step-up required).","operationId":"post_identity_scim_tokens","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScimTokenCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"created_at":{"type":"string"},"last_four":{"type":"string"},"last_used_at":{"nullable":true,"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"revoked":{"type":"boolean"},"secret":{"type":"string"},"uid":{"type":"string"}},"required":["created_at","last_four","last_used_at","name","prefix","revoked","secret","uid"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Mint a token; the secret is returned once (step-up required)","tags":["identity"]}},"/identity/scim-tokens/{uid}":{"delete":{"description":"Revoke a token.","operationId":"delete_identity_scim_tokens_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Revoke a token","tags":["identity"]}},"/identity/security-policy":{"get":{"description":"Return the policy.","operationId":"get_identity_security_policy","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"allowed_factors":{"items":{"type":"string"},"type":"array"},"break_glass_owner_ids":{"items":{"type":"integer"},"type":"array"},"mfa_required":{"type":"string"},"mfa_roles":{"items":{"type":"string"},"type":"array"},"paid_plan_requires_managers":{"type":"boolean"},"passkey_required_roles":{"items":{"type":"string"},"type":"array"},"session_absolute_hours":{"type":"integer"},"session_idle_minutes":{"type":"integer"}},"required":["allowed_factors","break_glass_owner_ids","mfa_required","mfa_roles","paid_plan_requires_managers","passkey_required_roles","session_absolute_hours","session_idle_minutes"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the policy","tags":["identity"]},"patch":{"description":"Change the policy (step-up required).","operationId":"patch_identity_security_policy","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPolicyUpdateRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"allowed_factors":{"items":{"type":"string"},"type":"array"},"break_glass_owner_ids":{"items":{"type":"integer"},"type":"array"},"mfa_required":{"type":"string"},"mfa_roles":{"items":{"type":"string"},"type":"array"},"paid_plan_requires_managers":{"type":"boolean"},"passkey_required_roles":{"items":{"type":"string"},"type":"array"},"session_absolute_hours":{"type":"integer"},"session_idle_minutes":{"type":"integer"}},"required":["allowed_factors","break_glass_owner_ids","mfa_required","mfa_roles","paid_plan_requires_managers","passkey_required_roles","session_absolute_hours","session_idle_minutes"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Change the policy (step-up required)","tags":["identity"]}},"/identity/sessions":{"get":{"description":"Active sessions of the caller.","operationId":"get_identity_sessions","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"aal":{"type":"integer"},"created_at":{"type":"string"},"current":{"type":"boolean"},"device":{"type":"string"},"ip":{"nullable":true,"type":"string"},"last_seen_at":{"type":"string"},"uid":{"type":"string"}},"required":["aal","created_at","current","device","ip","last_seen_at","uid"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Active sessions of the caller","tags":["identity"]}},"/identity/sessions/revoke-all":{"post":{"description":"Revoke every other session of the caller.","operationId":"post_identity_sessions_revoke_all","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"revoked":{"type":"integer"}},"required":["revoked"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Revoke every other session of the caller","tags":["identity"]}},"/identity/sessions/{uid}":{"delete":{"description":"Revoke one of the caller's sessions.","operationId":"delete_identity_sessions_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Revoke one of the caller's sessions","tags":["identity"]}},"/identity/signin/methods":{"get":{"description":"Email with password and passkeys are always listed. Google, Microsoft and Apple are listed only when their credentials are configured in Admin, Config, and each carries its allauth login URL.","operationId":"get_identity_signin_methods","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"email_password":{"type":"boolean"},"passkey":{"type":"boolean"},"social":{"items":{"properties":{"login_url":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"}},"required":["login_url","name","provider"],"type":"object"},"type":"array"}},"required":["email_password","passkey","social"],"type":"object"}}},"description":"Success."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"List enabled sign-in methods","tags":["identity"]}},"/identity/signin/passkey/begin":{"post":{"description":"Return WebAuthn request options for a discoverable credential with user verification required. The challenge is bound to the session and can be used once.","operationId":"post_identity_signin_passkey_begin","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Success."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Start a passkey sign-in","tags":["identity"]}},"/identity/signin/passkey/complete":{"post":{"description":"Verify the assertion, find the owner by credential id and user handle, check the sign count, apply lockout and SSO enforcement, then sign in. The session is AAL2 by passkey. Returns the user and API token.","operationId":"post_identity_signin_passkey_complete","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyCompleteRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PasskeyCompleteRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PasskeyCompleteRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"aal":{"type":"integer"},"token":{"type":"string"},"user":{"properties":{"email":{"type":"string"},"id":{"type":"integer"},"username":{"type":"string"}},"required":["email","id","username"],"type":"object"}},"required":["aal","token","user"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"The caller is not permitted to do this."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Finish a passkey sign-in","tags":["identity"]}},"/identity/sso/discover":{"get":{"description":"Return only whether SSO applies and where to start it.","operationId":"get_identity_sso_discover","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"login_url":{"type":"string"},"name":{"type":"string"},"sso":{"type":"boolean"}},"required":["sso"],"type":"object"}}},"description":"Success."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return only whether SSO applies and where to start it","tags":["identity"]}},"/imports/export/{kind}":{"get":{"description":"Return the CSV (entity scope applies; suppliers are org-wide so restricted members are refused).","operationId":"get_imports_export_kind","parameters":[{"in":"path","name":"kind","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the CSV (entity scope applies; suppliers are org-wide so restricted members are refused)","tags":["EPR"]}},"/imports/jobs":{"get":{"description":"List jobs, newest first (filters: kind, status).","operationId":"get_imports_jobs","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"accepted_rows":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"entity":{"type":"string"},"error_message":{"type":"string"},"filename":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"kind":{"type":"string"},"preset":{"type":"string"},"rejected_rows":{"type":"integer"},"result":{"additionalProperties":true,"type":"object"},"row_count":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"uid":{"type":"string"}},"required":["accepted_rows","created_at","entity","error_message","filename","finished_at","kind","preset","rejected_rows","result","row_count","started_at","status","uid"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List jobs, newest first (filters: kind, status)","tags":["EPR"]},"post":{"description":"Upload a file (multipart: file, kind, preset, entity, mapping, materials) and queue its processing. `materials` carries the material chosen in the preview for each ambiguous name (typed name to code).","operationId":"post_imports_jobs","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"entity":{"type":"string"},"file":{"format":"binary","type":"string"},"kind":{"type":"string"},"mapping":{"type":"string"},"materials":{"type":"string"},"preset":{"type":"string"}},"required":["file","kind","preset"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"accepted_rows":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"entity":{"type":"string"},"error_message":{"type":"string"},"filename":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"kind":{"type":"string"},"preset":{"type":"string"},"rejected_rows":{"type":"integer"},"result":{"additionalProperties":true,"type":"object"},"row_count":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"uid":{"type":"string"}},"required":["accepted_rows","created_at","entity","error_message","filename","finished_at","kind","preset","rejected_rows","result","row_count","started_at","status","uid"],"type":"object"},"duplicate":{"type":"boolean"}},"required":["data","duplicate"],"type":"object"}}},"description":"Success."},"202":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"accepted_rows":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"entity":{"type":"string"},"error_message":{"type":"string"},"filename":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"kind":{"type":"string"},"preset":{"type":"string"},"rejected_rows":{"type":"integer"},"result":{"additionalProperties":true,"type":"object"},"row_count":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"uid":{"type":"string"}},"required":["accepted_rows","created_at","entity","error_message","filename","finished_at","kind","preset","rejected_rows","result","row_count","started_at","status","uid"],"type":"object"},"duplicate":{"type":"boolean"}},"required":["data","duplicate"],"type":"object"}}},"description":"Accepted; the work continues in the background."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Upload a file (multipart: file, kind, preset, entity, mapping, materials) and queue its processing","tags":["EPR"]}},"/imports/jobs/{uid}":{"get":{"description":"Return the job.","operationId":"get_imports_jobs_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"accepted_rows":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"entity":{"type":"string"},"error_message":{"type":"string"},"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"filename":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"kind":{"type":"string"},"preset":{"type":"string"},"rejected_rows":{"type":"integer"},"result":{"additionalProperties":true,"type":"object"},"row_count":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"uid":{"type":"string"}},"required":["accepted_rows","created_at","entity","error_message","errors","filename","finished_at","kind","preset","rejected_rows","result","row_count","started_at","status","uid"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the job","tags":["EPR"]}},"/imports/jobs/{uid}/errors":{"get":{"description":"Download every rejected row of a finished import job as JSON (default) or CSV (?file=csv). The job detail keeps only a capped preview of 500 errors.","operationId":"get_imports_jobs_uid_errors","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"job":{"properties":{"accepted_rows":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"entity":{"type":"string"},"error_message":{"type":"string"},"filename":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"kind":{"type":"string"},"preset":{"type":"string"},"rejected_rows":{"type":"integer"},"result":{"additionalProperties":true,"type":"object"},"row_count":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"uid":{"type":"string"}},"required":["accepted_rows","created_at","entity","error_message","filename","finished_at","kind","preset","rejected_rows","result","row_count","started_at","status","uid"],"type":"object"},"total_errors":{"type":"integer"}},"required":["errors","job","total_errors"],"type":"object"}},"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflicts with the current state."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Download an import job's complete error file","tags":["EPR"]}},"/imports/jobs/{uid}/mapping":{"post":{"description":"Attach the mapping and queue the job again.","operationId":"post_imports_jobs_uid_mapping","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"mapping":{"additionalProperties":{"type":"string"},"type":"object"}},"required":["mapping"],"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"properties":{"mapping":{"type":"string"}},"required":["mapping"],"type":"object"}}}},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"accepted_rows":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"entity":{"type":"string"},"error_message":{"type":"string"},"filename":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"kind":{"type":"string"},"preset":{"type":"string"},"rejected_rows":{"type":"integer"},"result":{"additionalProperties":true,"type":"object"},"row_count":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"uid":{"type":"string"}},"required":["accepted_rows","created_at","entity","error_message","filename","finished_at","kind","preset","rejected_rows","result","row_count","started_at","status","uid"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Accepted; the work continues in the background."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Attach the mapping and queue the job again","tags":["EPR"]}},"/imports/presets":{"get":{"description":"List presets.","operationId":"get_imports_presets","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"csv_kinds":{"items":{"properties":{"columns":{"items":{"type":"string"},"type":"array"},"description":{"type":"string"},"kind":{"type":"string"},"required":{"items":{"type":"string"},"type":"array"}},"required":["columns","description","kind","required"],"type":"object"},"type":"array"},"presets":{"items":{"properties":{"columns":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"delimiter":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"pending_reason":{"type":"string"},"required_fields":{"items":{"type":"string"},"type":"array"},"retrieved_at":{"type":"string"},"source_url":{"type":"string"},"status":{"type":"string"},"vendor":{"type":"string"}},"required":["columns","delimiter","id","kind","label","pending_reason","required_fields","retrieved_at","source_url","status","vendor"],"type":"object"},"type":"array"}},"required":["csv_kinds","presets"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List presets","tags":["EPR"]}},"/imports/preview":{"post":{"description":"Preview a specs, components or other spreadsheet-template table (multipart: file, preset, mapping, materials). Every row is checked exactly as an import would check it and then rolled back. The answer counts the rows it would create, update and reject, lists rows with problems first, and lists each material name that fits no material or several, with the materials to choose from. Send the choices back as `materials` (typed name to material code) on the next preview and on the upload.","operationId":"post_imports_preview","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"},"mapping":{"type":"string"},"materials":{"type":"string"},"preset":{"type":"string"}},"required":["file","preset"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"created":{"type":"integer"},"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"headers":{"items":{"type":"string"},"type":"array"},"kind":{"type":"string"},"materials":{"items":{"properties":{"ambiguous":{"type":"boolean"},"choices":{"items":{"properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"type":"object"},"type":"array"},"message":{"type":"string"},"rows":{"type":"integer"},"value":{"type":"string"}},"required":["ambiguous","choices","message","rows","value"],"type":"object"},"type":"array"},"missing_fields":{"items":{"type":"string"},"type":"array"},"rejected":{"type":"integer"},"row_count":{"type":"integer"},"rows":{"items":{"properties":{"action":{"enum":["create","update","error"],"type":"string"},"message":{"type":"string"},"row":{"type":"integer"},"values":{"additionalProperties":true,"type":"object"}},"required":["action","message","row","values"],"type":"object"},"type":"array"},"updated":{"type":"integer"}},"required":["created","errors","headers","kind","materials","missing_fields","rejected","row_count","rows","updated"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Preview a table file (multipart: file, preset, mapping, materials); nothing is saved","tags":["EPR"]}},"/labelling/certificates/":{"get":{"description":"Return one cursor page of stored certificates, newest first.","operationId":"get_labelling_certificates","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"certificate_number":{"type":"string"},"component_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"expires_on":{"format":"date","nullable":true,"type":"string"},"file_name":{"type":"string"},"has_file":{"type":"boolean"},"id":{"type":"string"},"issued_on":{"format":"date","nullable":true,"type":"string"},"issuer":{"type":"string"},"notes":{"type":"string"},"object":{"type":"string"},"standard":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["certificate_number","component_id","created_at","expires_on","file_name","has_file","id","issued_on","issuer","notes","object","standard","updated_at"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one cursor page of stored certificates, newest first","tags":["labelling"]},"post":{"description":"Store a certificate for a component of the caller's organization.","operationId":"post_labelling_certificates","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/CertificateRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CertificateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"certificate_number":{"type":"string"},"component_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"expires_on":{"format":"date","nullable":true,"type":"string"},"file_name":{"type":"string"},"has_file":{"type":"boolean"},"id":{"type":"string"},"issued_on":{"format":"date","nullable":true,"type":"string"},"issuer":{"type":"string"},"notes":{"type":"string"},"object":{"type":"string"},"standard":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["certificate_number","component_id","created_at","expires_on","file_name","has_file","id","issued_on","issuer","notes","object","standard","updated_at"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Store a certificate for a component of the caller's organization","tags":["labelling"]}},"/labelling/certificates/{uid}/":{"delete":{"description":"Delete a stored certificate and its file.","operationId":"delete_labelling_certificates_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Delete a stored certificate and its file","tags":["labelling"]},"get":{"description":"Return one stored certificate.","operationId":"get_labelling_certificates_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"certificate_number":{"type":"string"},"component_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"expires_on":{"format":"date","nullable":true,"type":"string"},"file_name":{"type":"string"},"has_file":{"type":"boolean"},"id":{"type":"string"},"issued_on":{"format":"date","nullable":true,"type":"string"},"issuer":{"type":"string"},"notes":{"type":"string"},"object":{"type":"string"},"standard":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["certificate_number","component_id","created_at","expires_on","file_name","has_file","id","issued_on","issuer","notes","object","standard","updated_at"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one stored certificate","tags":["labelling"]},"patch":{"description":"Update the fields given; the component cannot change.","operationId":"patch_labelling_certificates_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCertificateRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedCertificateRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedCertificateRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"certificate_number":{"type":"string"},"component_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"expires_on":{"format":"date","nullable":true,"type":"string"},"file_name":{"type":"string"},"has_file":{"type":"boolean"},"id":{"type":"string"},"issued_on":{"format":"date","nullable":true,"type":"string"},"issuer":{"type":"string"},"notes":{"type":"string"},"object":{"type":"string"},"standard":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["certificate_number","component_id","created_at","expires_on","file_name","has_file","id","issued_on","issuer","notes","object","standard","updated_at"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Update the fields given; the component cannot change","tags":["labelling"]}},"/labelling/components/{id}/":{"get":{"description":"Evaluate one component in the requested markets.","operationId":"get_labelling_components_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"component_id":{"type":"integer"},"component_name":{"type":"string"},"markets":{"items":{"properties":{"allowed_claims":{"items":{"type":"string"},"type":"array"},"citations":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"conflicts":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"data_quality":{"additionalProperties":true,"type":"object"},"market":{"type":"string"},"other_rules":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"prohibited_claims":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"required_marks":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["allowed_claims","citations","conflicts","data_quality","market","other_rules","prohibited_claims","required_marks"],"type":"object"},"type":"array"},"note":{"type":"string"},"object":{"type":"string"},"spec_id":{"type":"integer"},"spec_level":{"type":"string"},"spec_name":{"type":"string"}},"required":["component_id","component_name","markets","note","object","spec_id","spec_level","spec_name"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Evaluate one component in the requested markets","tags":["labelling"]}},"/labelling/conflicts/":{"get":{"description":"Return one page of conflicts across the caller's visible components.","operationId":"get_labelling_conflicts","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one page of conflicts across the caller's visible components","tags":["labelling"]}},"/labelling/markets/":{"get":{"description":"List the markets the labelling rules cover.","operationId":"get_labelling_markets","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"market":{"type":"string"},"rules":{"items":{"properties":{"kind":{"type":"string"},"notice":{},"rule":{"type":"string"},"rule_title":{"type":"string"},"status":{}},"required":["kind","rule","rule_title","status"],"type":"object"},"type":"array"}},"required":["market","rules"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List the markets the labelling rules cover","tags":["labelling"]}},"/labelling/skus/{id}/":{"get":{"description":"Evaluate every component of one SKU in the requested markets.","operationId":"get_labelling_skus_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"components":{"items":{"properties":{"component_id":{"type":"integer"},"component_name":{"type":"string"},"markets":{"items":{"properties":{"allowed_claims":{"items":{"type":"string"},"type":"array"},"citations":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"conflicts":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"data_quality":{"additionalProperties":true,"type":"object"},"market":{"type":"string"},"other_rules":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"prohibited_claims":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"required_marks":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["allowed_claims","citations","conflicts","data_quality","market","other_rules","prohibited_claims","required_marks"],"type":"object"},"type":"array"},"note":{"type":"string"},"object":{"type":"string"},"spec_id":{"type":"integer"},"spec_level":{"type":"string"},"spec_name":{"type":"string"}},"required":["component_id","component_name","markets","note","object","spec_id","spec_level","spec_name"],"type":"object"},"type":"array"},"object":{"type":"string"},"sku_code":{"type":"string"},"sku_id":{"type":"integer"},"sku_name":{"type":"string"}},"required":["components","object","sku_code","sku_id","sku_name"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Evaluate every component of one SKU in the requested markets","tags":["labelling"]}},"/mcp/":{"delete":{"description":"No sessions to end: ``405``.","operationId":"delete_mcp","responses":{"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"405":{"description":"Method Not Allowed."}},"security":[{"Bearer":[]}],"summary":"No sessions to end: `405`","tags":["mcp"]},"get":{"description":"No server-initiated stream: ``405`` as the transport allows.","operationId":"get_mcp","responses":{"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"405":{"description":"Method Not Allowed."}},"security":[{"Bearer":[]}],"summary":"No server-initiated stream: `405` as the transport allows","tags":["mcp"]},"post":{"description":"Handle one JSON-RPC message.","operationId":"post_mcp","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"id":{"nullable":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"jsonrpc":{"enum":["2.0"],"type":"string"},"method":{"type":"string"},"params":{"additionalProperties":true,"type":"object"}},"required":["jsonrpc","method"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"id":{"nullable":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"jsonrpc":{"enum":["2.0"],"type":"string"},"result":{"additionalProperties":true,"type":"object"}},"required":["id","jsonrpc"],"type":"object"}}},"description":"Success."},"202":{"content":{"application/json":{"schema":{"maxLength":0,"type":"string"}}},"description":"Accepted; the work continues in the background."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"Bearer":[]}],"summary":"Handle one JSON-RPC message","tags":["mcp"]}},"/mcp/oauth-authorization-server":{"get":{"description":"Endpoints, grants, PKCE methods and scopes of the authorization server (RFC 8414).","operationId":"get_mcp_oauth_authorization_server","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"authorization_endpoint":{"type":"string"},"authorization_response_iss_parameter_supported":{"type":"boolean"},"code_challenge_methods_supported":{"items":{"type":"string"},"type":"array"},"grant_types_supported":{"items":{"type":"string"},"type":"array"},"issuer":{"type":"string"},"registration_endpoint":{"type":"string"},"response_modes_supported":{"items":{"type":"string"},"type":"array"},"response_types_supported":{"items":{"type":"string"},"type":"array"},"revocation_endpoint":{"type":"string"},"revocation_endpoint_auth_methods_supported":{"items":{"type":"string"},"type":"array"},"scopes_supported":{"items":{"type":"string"},"type":"array"},"service_documentation":{"type":"string"},"token_endpoint":{"type":"string"},"token_endpoint_auth_methods_supported":{"items":{"type":"string"},"type":"array"}},"required":["authorization_endpoint","authorization_response_iss_parameter_supported","code_challenge_methods_supported","grant_types_supported","issuer","registration_endpoint","response_modes_supported","response_types_supported","revocation_endpoint","revocation_endpoint_auth_methods_supported","scopes_supported","service_documentation","token_endpoint","token_endpoint_auth_methods_supported"],"type":"object"}}},"description":"Success."}},"summary":"Describe the OAuth authorization server","tags":["mcp"]}},"/mcp/oauth-protected-resource":{"get":{"description":"Describe the resource, its token issuer origin and the scopes it understands.","operationId":"get_mcp_oauth_protected_resource","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"authorization_servers":{"items":{"type":"string"},"type":"array"},"bearer_methods_supported":{"items":{"type":"string"},"type":"array"},"resource":{"type":"string"},"resource_documentation":{"type":"string"},"resource_name":{"type":"string"},"scopes_supported":{"items":{"type":"string"},"type":"array"}},"required":["authorization_servers","bearer_methods_supported","resource","resource_documentation","resource_name","scopes_supported"],"type":"object"}}},"description":"Success."}},"security":[{"Bearer":[]},{}],"summary":"Describe the resource, its token issuer origin and the scopes it understands","tags":["mcp"]}},"/me/organization":{"post":{"description":"Make a member organization active. The target organization's session and MFA policy apply immediately; the response names any MFA step still required. A non-member organization is 404. An optional entity_id opens that client of the target organization at once (422 when it is not one of your clients there).","operationId":"post_me_organization","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"entity_id":{"nullable":true,"type":"integer"},"organization_id":{"type":"integer"}},"required":["organization_id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"continue_url":{"type":"string"},"mfa":{"type":"string"},"organization":{"properties":{"active":{"type":"boolean"},"can_approve_specs":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_edit_catalog":{"type":"boolean"},"can_manage_access":{"type":"boolean"},"can_manage_team":{"type":"boolean"},"can_read_audit_log":{"type":"boolean"},"can_sign_reports":{"type":"boolean"},"entity_scope_restricted":{"type":"boolean"},"id":{"type":"integer"},"is_sandbox":{"type":"boolean"},"name":{"type":"string"},"plan":{"type":"string"},"read_only":{"type":"boolean"},"role":{"type":"string"},"workspace_status":{"type":"string"}},"required":["active","can_approve_specs","can_edit","can_edit_catalog","can_manage_access","can_manage_team","can_read_audit_log","can_sign_reports","entity_scope_restricted","id","is_sandbox","name","plan","read_only","role","workspace_status"],"type":"object"}},"required":["continue_url","mfa","organization"],"type":"object"}}},"description":"Success."},"401":{"description":"Missing or invalid credentials."},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Switch the active organization","tags":["EPR"]}},"/me/organizations":{"get":{"description":"Return the caller's active memberships; the active organization is flagged.","operationId":"get_me_organizations","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"active":{"type":"boolean"},"can_approve_specs":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_edit_catalog":{"type":"boolean"},"can_manage_access":{"type":"boolean"},"can_manage_team":{"type":"boolean"},"can_read_audit_log":{"type":"boolean"},"can_sign_reports":{"type":"boolean"},"entity_scope_restricted":{"type":"boolean"},"id":{"type":"integer"},"is_sandbox":{"type":"boolean"},"name":{"type":"string"},"plan":{"type":"string"},"read_only":{"type":"boolean"},"role":{"type":"string"},"workspace_status":{"type":"string"}},"required":["active","can_approve_specs","can_edit","can_edit_catalog","can_manage_access","can_manage_team","can_read_audit_log","can_sign_reports","entity_scope_restricted","id","is_sandbox","name","plan","read_only","role","workspace_status"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List the caller's organizations and roles","tags":["EPR"]}},"/me/personal-data":{"get":{"description":"Return recent export and deletion requests, any scheduled deletion, and why a deletion is refused.","operationId":"get_me_personal_data","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"deletion_blocker":{"nullable":true,"type":"string"},"deletion_blocker_message":{"nullable":true,"type":"string"},"export_retention_days":{"type":"integer"},"hold_days":{"type":"integer"},"requests":{"items":{"properties":{"cancelled_at":{"format":"date-time","nullable":true,"type":"string"},"completed_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"downloadable":{"type":"boolean"},"error":{"nullable":true,"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"object":{"type":"string"},"result_expires_at":{"format":"date-time","nullable":true,"type":"string"},"scheduled_for":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"}},"required":["cancelled_at","completed_at","created_at","downloadable","error","id","kind","object","result_expires_at","scheduled_for","status"],"type":"object"},"type":"array"},"scheduled_deletion":{"nullable":true,"properties":{"cancelled_at":{"format":"date-time","nullable":true,"type":"string"},"completed_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"downloadable":{"type":"boolean"},"error":{"nullable":true,"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"object":{"type":"string"},"result_expires_at":{"format":"date-time","nullable":true,"type":"string"},"scheduled_for":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"}},"required":["cancelled_at","completed_at","created_at","downloadable","error","id","kind","object","result_expires_at","scheduled_for","status"],"type":"object"}},"required":["deletion_blocker","deletion_blocker_message","export_retention_days","hold_days","requests","scheduled_deletion"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the caller's personal-data requests","tags":["EPR"]}},"/me/personal-data/deletion":{"post":{"description":"Schedule deletion after a 14-day hold the caller can cancel. Refused with 409 when the caller is the only owner of an organization, a legal hold covers one of their organizations, or a deletion is already scheduled.","operationId":"post_me_personal_data_deletion","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"cancelled_at":{"format":"date-time","nullable":true,"type":"string"},"completed_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"downloadable":{"type":"boolean"},"error":{"nullable":true,"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"object":{"type":"string"},"result_expires_at":{"format":"date-time","nullable":true,"type":"string"},"scheduled_for":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"}},"required":["cancelled_at","completed_at","created_at","downloadable","error","id","kind","object","result_expires_at","scheduled_for","status"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Schedule deletion of the caller's account (step-up required)","tags":["EPR"]}},"/me/personal-data/deletion/{uid}/cancel":{"post":{"description":"Cancel a deletion that is still in its hold period.","operationId":"post_me_personal_data_deletion_uid_cancel","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"cancelled_at":{"format":"date-time","nullable":true,"type":"string"},"completed_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"downloadable":{"type":"boolean"},"error":{"nullable":true,"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"object":{"type":"string"},"result_expires_at":{"format":"date-time","nullable":true,"type":"string"},"scheduled_for":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"}},"required":["cancelled_at","completed_at","created_at","downloadable","error","id","kind","object","result_expires_at","scheduled_for","status"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Cancel a scheduled account deletion","tags":["EPR"]}},"/me/personal-data/exports":{"post":{"description":"Build a ZIP of the caller's profile, memberships, support tickets, sessions, passkey details and the audit events they performed. The file can be downloaded for 7 days.","operationId":"post_me_personal_data_exports","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"cancelled_at":{"format":"date-time","nullable":true,"type":"string"},"completed_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"downloadable":{"type":"boolean"},"error":{"nullable":true,"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"object":{"type":"string"},"result_expires_at":{"format":"date-time","nullable":true,"type":"string"},"scheduled_for":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"}},"required":["cancelled_at","completed_at","created_at","downloadable","error","id","kind","object","result_expires_at","scheduled_for","status"],"type":"object"}}},"description":"Accepted; the work continues in the background."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Request a personal data export","tags":["EPR"]}},"/me/personal-data/exports/{uid}/download":{"get":{"description":"Stream the finished ZIP. Refused with 409 while it is being built or after it expires.","operationId":"get_me_personal_data_exports_uid_download","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Download a personal data export","tags":["EPR"]}},"/measurements":{"get":{"description":"Return immutable organization measurements with optional SKU, session, and date filters.","operationId":"get_measurements","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MeasurementRecord"},"type":"array"}}},"description":""},"400":{"description":"Invalid filters"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List EPR measurements","tags":["EPR"]},"post":{"description":"Confirm and attest a packaging measurement atomically, within the plan record limit.","operationId":"post_measurements","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"asset_ids":{"items":{"type":"integer"},"type":"array"},"capture_source":{"description":"How the weight was captured. Required when a person confirms; machine credentials create a proposal instead, and the person who confirms it is recorded with capture_source 'integration'.","enum":["bluetooth_scale","integration","keyboard_scale","manual_entry","photo_read_scale","usb_hid_scale","usb_serial_scale"],"type":"string"},"component_id":{"nullable":true,"type":"integer"},"grams":{"oneOf":[{"type":"number"},{"type":"string"}]},"method":{"description":"How the weight was obtained; required for manual_entry.","type":"string"},"new_component":{"additionalProperties":true,"properties":{"material_category":{"type":"integer"},"sku":{"type":"integer"}},"type":"object"},"scale_device":{"description":"The scale that produced the reading, when a scale was used.","type":"string"},"session_id":{"type":"integer"}},"required":["grams","session_id"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasurementRecord"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"description":"Plan record limit reached or billing restricted"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Confirm an EPR measurement","tags":["EPR"]}},"/measurements/proposals":{"get":{"description":"Return the organization's proposed, confirmed and rejected measurement proposals, newest first.","operationId":"get_measurements_proposals","responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"asset_ids":{"items":{"type":"integer"},"type":"array"},"component":{"type":"integer"},"component_name":{"type":"string"},"confirmed_record":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"grams":{"nullable":true,"type":"string"},"kind":{"type":"string"},"reason":{"type":"string"},"rejection_reason":{"type":"string"},"session":{"type":"integer"},"sku_code":{"type":"string"},"source":{"type":"string"},"status":{"type":"string"},"submitted_by_key":{"nullable":true,"type":"string"},"target_record":{"nullable":true,"type":"string"},"uid":{"type":"string"}},"required":["asset_ids","component","component_name","confirmed_record","created_at","decided_at","grams","kind","reason","rejection_reason","session","sku_code","source","status","submitted_by_key","target_record","uid"],"type":"object"},"type":"array"}}},"description":"Measurement proposals"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List measurement proposals","tags":["EPR"]}},"/measurements/proposals/{uid}":{"get":{"description":"Return one proposal with its decision, if any.","operationId":"get_measurements_proposals_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"asset_ids":{"items":{"type":"integer"},"type":"array"},"component":{"type":"integer"},"component_name":{"type":"string"},"confirmed_record":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"grams":{"nullable":true,"type":"string"},"kind":{"type":"string"},"reason":{"type":"string"},"rejection_reason":{"type":"string"},"session":{"type":"integer"},"sku_code":{"type":"string"},"source":{"type":"string"},"status":{"type":"string"},"submitted_by_key":{"nullable":true,"type":"string"},"target_record":{"nullable":true,"type":"string"},"uid":{"type":"string"}},"required":["asset_ids","component","component_name","confirmed_record","created_at","decided_at","grams","kind","reason","rejection_reason","session","sku_code","source","status","submitted_by_key","target_record","uid"],"type":"object"}}},"description":"The proposal"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Unknown"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Read a measurement proposal","tags":["EPR"]}},"/measurements/proposals/{uid}/confirm":{"post":{"description":"A signed-in person turns the proposal into a signed record attributed to them.","operationId":"post_measurements_proposals_uid_confirm","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"asset_ids":{"items":{"type":"integer"},"type":"array"},"component":{"type":"integer"},"component_name":{"type":"string"},"confirmed_record":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"grams":{"nullable":true,"type":"string"},"kind":{"type":"string"},"reason":{"type":"string"},"rejection_reason":{"type":"string"},"session":{"type":"integer"},"sku_code":{"type":"string"},"source":{"type":"string"},"status":{"type":"string"},"submitted_by_key":{"nullable":true,"type":"string"},"target_record":{"nullable":true,"type":"string"},"uid":{"type":"string"}},"required":["asset_ids","component","component_name","confirmed_record","created_at","decided_at","grams","kind","reason","rejection_reason","session","sku_code","source","status","submitted_by_key","target_record","uid"],"type":"object"}}},"description":"The confirmed proposal"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"description":"Plan record limit reached"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Already decided or no longer applicable"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Confirm a measurement proposal","tags":["EPR"]}},"/measurements/proposals/{uid}/reject":{"post":{"description":"A signed-in person discards the proposal; nothing is recorded as measured.","operationId":"post_measurements_proposals_uid_reject","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reason":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"asset_ids":{"items":{"type":"integer"},"type":"array"},"component":{"type":"integer"},"component_name":{"type":"string"},"confirmed_record":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"grams":{"nullable":true,"type":"string"},"kind":{"type":"string"},"reason":{"type":"string"},"rejection_reason":{"type":"string"},"session":{"type":"integer"},"sku_code":{"type":"string"},"source":{"type":"string"},"status":{"type":"string"},"submitted_by_key":{"nullable":true,"type":"string"},"target_record":{"nullable":true,"type":"string"},"uid":{"type":"string"}},"required":["asset_ids","component","component_name","confirmed_record","created_at","decided_at","grams","kind","reason","rejection_reason","session","sku_code","source","status","submitted_by_key","target_record","uid"],"type":"object"}}},"description":"The rejected proposal"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Decided"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Reject a measurement proposal","tags":["EPR"]}},"/measurements/{uid}/supersede":{"post":{"description":"Create a signed replacement linked to an immutable existing measurement.","operationId":"post_measurements_uid_supersede","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"asset_ids":{"items":{"type":"integer"},"type":"array"},"capture_source":{"description":"How the weight was captured. Required when a person confirms; machine credentials create a proposal instead, and the person who confirms it is recorded with capture_source 'integration'.","enum":["bluetooth_scale","integration","keyboard_scale","manual_entry","photo_read_scale","usb_hid_scale","usb_serial_scale"],"type":"string"},"grams":{"oneOf":[{"type":"number"},{"type":"string"}]},"method":{"description":"How the weight was obtained; required for manual_entry.","type":"string"},"scale_device":{"description":"The scale that produced the reading, when a scale was used.","type":"string"}},"required":["grams"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasurementRecord"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Replacement rejected"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Supersede an EPR measurement","tags":["EPR"]}},"/measurements/{uid}/void":{"post":{"description":"Record a void timestamp and bounded reason while retaining the evidence trail.","operationId":"post_measurements_uid_void","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reason":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasurementRecord"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Void an EPR measurement","tags":["EPR"]}},"/notifications/":{"get":{"description":"List notifications (``?unread=true``, ``limit``, ``cursor``).","operationId":"get_notifications","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"body_key":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"link":{"type":"string"},"params":{"additionalProperties":true,"type":"object"},"read":{"type":"boolean"},"read_at":{"format":"date-time","nullable":true,"type":"string"},"title_key":{"type":"string"}},"required":["body_key","created_at","id","kind","link","params","read","read_at","title_key"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List notifications","tags":["EPR"]}},"/notifications/change-feed/":{"get":{"description":"List change notices.","operationId":"get_notifications_change_feed","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"body_key":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"link":{"type":"string"},"params":{"additionalProperties":true,"type":"object"},"read":{"type":"boolean"},"read_at":{"format":"date-time","nullable":true,"type":"string"},"title_key":{"type":"string"}},"required":["body_key","created_at","id","kind","link","params","read","read_at","title_key"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List change notices","tags":["EPR"]}},"/notifications/preferences/":{"get":{"description":"Return every kind and channel with the caller's effective setting.","operationId":"get_notifications_preferences","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"category":{"type":"string"},"channel":{"type":"string"},"enabled":{"type":"boolean"},"kind":{"type":"string"},"locked":{"type":"boolean"}},"required":["category","channel","enabled","kind","locked"],"type":"object"},"type":"array"},"email_delivery_enabled":{"type":"boolean"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return every kind and channel with the caller's effective setting","tags":["EPR"]},"put":{"description":"Apply preference changes. Required notifications cannot be switched off (422).","operationId":"put_notifications_preferences","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferencesInputRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"category":{"type":"string"},"channel":{"type":"string"},"enabled":{"type":"boolean"},"kind":{"type":"string"},"locked":{"type":"boolean"}},"required":["category","channel","enabled","kind","locked"],"type":"object"},"type":"array"},"email_delivery_enabled":{"type":"boolean"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Apply preference changes","tags":["EPR"]}},"/notifications/read-all/":{"post":{"description":"Mark everything read.","operationId":"post_notifications_read_all","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"marked":{"type":"integer"},"unread":{"type":"integer"}},"required":["marked","unread"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Mark everything read","tags":["EPR"]}},"/notifications/unread-count/":{"get":{"description":"Return the number of unread notifications.","operationId":"get_notifications_unread_count","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"unread":{"type":"integer"}},"required":["unread"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the number of unread notifications","tags":["EPR"]}},"/notifications/{uid}/read/":{"post":{"description":"Mark one notification read; someone else's notification is a 404.","operationId":"post_notifications_uid_read","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"body_key":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"link":{"type":"string"},"params":{"additionalProperties":true,"type":"object"},"read":{"type":"boolean"},"read_at":{"format":"date-time","nullable":true,"type":"string"},"title_key":{"type":"string"}},"required":["body_key","created_at","id","kind","link","params","read","read_at","title_key"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Mark one notification read; someone else's notification is a 404","tags":["EPR"]}},"/oauth/authorize":{"get":{"description":"Validates the client, redirect URI and PKCE parameters and lists the organizations and scopes the signed-in person may delegate. Needs a person's session, never an API key.","operationId":"get_oauth_authorize","parameters":[{"in":"query","name":"client_id","required":true,"schema":{"minLength":1,"type":"string"}},{"in":"query","name":"code_challenge","required":true,"schema":{"minLength":1,"type":"string"}},{"in":"query","name":"code_challenge_method","required":true,"schema":{"minLength":1,"type":"string"}},{"in":"query","name":"redirect_uri","required":true,"schema":{"minLength":1,"type":"string"}},{"in":"query","name":"resource","schema":{"type":"string"}},{"in":"query","name":"response_type","required":true,"schema":{"minLength":1,"type":"string"}},{"in":"query","name":"scope","schema":{"type":"string"}},{"in":"query","name":"state","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeContext"}}},"description":""},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Validate an authorization request for the consent screen","tags":["EPR access"]},"post":{"description":"Records the person's decision. Approving creates a grant for the chosen organization and scopes and returns the redirect URL carrying a single-use code; denying returns a redirect with `access_denied`.","operationId":"post_oauth_authorize","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeDecisionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeRedirect"}}},"description":""},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Approve or deny an authorization request","tags":["EPR access"]}},"/oauth/introspect":{"post":{"description":"The service account that holds a token can ask whether it is still active (RFC 7662).","operationId":"post_oauth_introspect","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokenActionRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/OAuthTokenActionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthIntrospection"}}},"description":""},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"}},"summary":"Introspect an access token","tags":["EPR access"]}},"/oauth/register":{"post":{"description":"Register a public client so a person can approve it with PKCE. Redirect URIs must be https or loopback. Only `token_endpoint_auth_method` none is accepted. Returns the `client_id` (RFC 7591).","operationId":"post_oauth_register","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientRegistrationRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/OAuthClientRegistrationRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClient"}}},"description":""},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}},"summary":"Register an OAuth client (dynamic client registration)","tags":["EPR access"]}},"/oauth/revoke":{"post":{"description":"Revoking an unknown or already revoked token is not an error (RFC 7009).","operationId":"post_oauth_revoke","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokenActionRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/OAuthTokenActionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"description":""},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"}},"summary":"Revoke an access token","tags":["EPR access"]}},"/oauth/token":{"post":{"description":"Exchange a service account's id and secret for a short-lived bearer token. Send the credentials in the body or as HTTP Basic. The token carries a subset of the account's scopes and its entity scope, and expires within one hour. Use it as `Authorization: Bearer iat_...`.","operationId":"post_oauth_token","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokenRequestRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/OAuthTokenRequestRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthToken"}}},"description":""},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}},"summary":"Get an access token (OAuth2 client credentials)","tags":["EPR access"]}},"/obligations/checker-answers/":{"post":{"description":"Save the public checker's places, worldwide revenue and revenue in each place (for the last full year) and brand answer on the default entity, each only where the workspace has no value of its own, then queue an obligations check. When nothing was saved and a check already exists, no new check is queued and run is null. When the workspace has no saved threshold check, one is saved from these places and revenue, so the threshold check opens on its answer.","operationId":"post_obligations_checker_answers","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"adopted":{"type":"boolean"},"run":{"nullable":true,"properties":{"as_of":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"diff":{"additionalProperties":true,"type":"object"},"error":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"rule_versions":{"additionalProperties":true,"type":"object"},"status":{"type":"string"},"trigger":{"type":"string"}},"required":["as_of","created_at","diff","error","finished_at","id","rule_versions","status","trigger"],"type":"object"}},"required":["adopted","run"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Save the checker answers where nothing is saved yet, then queue a check","tags":["obligations"]}},"/obligations/declarations/":{"get":{"description":"Return declarations and revenue for the entities the caller may see, and volume_places: places with sales or shipped orders but no sells-into statement yet, offered as suggestions to confirm.","operationId":"get_obligations_declarations","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"declarations":{"items":{"properties":{"entity_id":{"type":"integer"},"jurisdiction":{"type":"string"},"sells":{"type":"boolean"}},"required":["entity_id","jurisdiction","sells"],"type":"object"},"type":"array"},"revenue":{"items":{"properties":{"amount":{"type":"string"},"currency":{"type":"string"},"entity_id":{"type":"integer"},"jurisdiction":{"type":"string"},"year":{"type":"integer"}},"required":["amount","currency","entity_id","jurisdiction","year"],"type":"object"},"type":"array"},"volume_places":{"items":{"properties":{"entity_id":{"type":"integer"},"jurisdiction":{"type":"string"}},"required":["entity_id","jurisdiction"],"type":"object"},"type":"array"}},"required":["declarations","revenue","volume_places"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return declarations and revenue for the entities the caller may see","tags":["obligations"]},"put":{"description":"Upsert declarations and revenue; a revenue row with a null amount is removed. An entity outside the caller's scope or org is a 404.","operationId":"put_obligations_declarations","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeclarationsWriteRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DeclarationsWriteRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DeclarationsWriteRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"declarations":{"items":{"properties":{"entity_id":{"type":"integer"},"jurisdiction":{"type":"string"},"sells":{"type":"boolean"}},"required":["entity_id","jurisdiction","sells"],"type":"object"},"type":"array"},"revenue":{"items":{"properties":{"amount":{"type":"string"},"currency":{"type":"string"},"entity_id":{"type":"integer"},"jurisdiction":{"type":"string"},"year":{"type":"integer"}},"required":["amount","currency","entity_id","jurisdiction","year"],"type":"object"},"type":"array"},"volume_places":{"items":{"properties":{"entity_id":{"type":"integer"},"jurisdiction":{"type":"string"}},"required":["entity_id","jurisdiction"],"type":"object"},"type":"array"}},"required":["declarations","revenue","volume_places"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Upsert declarations and revenue; an entity outside the caller's scope or org is a 404","tags":["obligations"]}},"/obligations/determinations/":{"get":{"description":"Return the latest run's producer determinations.","operationId":"get_obligations_determinations","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"determinations":{"items":{"properties":{"detail":{"additionalProperties":true,"type":"object"},"entity_id":{"type":"integer"},"entity_name":{"type":"string"},"id":{"type":"integer"},"jurisdiction":{"type":"string"},"level":{"type":"string"},"role":{"type":"string"},"run_id":{"type":"integer"},"sku_ref":{"type":"string"},"status":{"type":"string"}},"required":["detail","entity_id","entity_name","id","jurisdiction","level","role","run_id","sku_ref","status"],"type":"object"},"type":"array"},"run":{"nullable":true,"properties":{"as_of":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"diff":{"additionalProperties":true,"type":"object"},"error":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"rule_versions":{"additionalProperties":true,"type":"object"},"status":{"type":"string"},"trigger":{"type":"string"}},"required":["as_of","created_at","diff","error","finished_at","id","rule_versions","status","trigger"],"type":"object"}},"required":["determinations","run"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the latest run's producer determinations","tags":["obligations"]}},"/obligations/evaluate/":{"post":{"description":"Create a queued run and enqueue it; never evaluates on the request thread.","operationId":"post_obligations_evaluate","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/EvaluateRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/EvaluateRequest"}}}},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"as_of":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"diff":{"additionalProperties":true,"type":"object"},"error":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"rule_versions":{"additionalProperties":true,"type":"object"},"status":{"type":"string"},"trigger":{"type":"string"}},"required":["as_of","created_at","diff","error","finished_at","id","rule_versions","status","trigger"],"type":"object"}}},"description":"Accepted; the work continues in the background."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a queued run and enqueue it; never evaluates on the request thread","tags":["obligations"]}},"/obligations/results/":{"get":{"description":"Return the latest succeeded run with a page of its result rows, ordered by id. Pass `next_cursor` back as `cursor` for the next page. The run's `diff` is sent on the first page only; `include_diff=false` leaves it out (`diff` is then `{}` and `diff_included` is false).","operationId":"get_obligations_results","parameters":[{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"false leaves the run's diff out.","in":"query","name":"include_diff","schema":{"type":"boolean"}},{"description":"Only this place code.","in":"query","name":"jurisdiction","schema":{"type":"string"}},{"description":"Rows per page, 1 to 1000.","in":"query","name":"limit","schema":{"type":"integer"}},{"description":"Only results with this status.","in":"query","name":"status","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"checking":{"type":"boolean"},"checking_run_id":{"nullable":true,"type":"integer"},"diff_included":{"type":"boolean"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"},"results":{"items":{"properties":{"as_of":{"format":"date","type":"string"},"detail":{"additionalProperties":true,"type":"object"},"entity_id":{"type":"integer"},"entity_name":{"type":"string"},"id":{"type":"integer"},"jurisdiction":{"type":"string"},"reason_code":{"type":"string"},"rule_versions":{"additionalProperties":true,"type":"object"},"run_id":{"type":"integer"},"status":{"type":"string"}},"required":["as_of","detail","entity_id","entity_name","id","jurisdiction","reason_code","rule_versions","run_id","status"],"type":"object"},"type":"array"},"run":{"nullable":true,"properties":{"as_of":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"diff":{"additionalProperties":true,"type":"object"},"error":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"rule_versions":{"additionalProperties":true,"type":"object"},"status":{"type":"string"},"trigger":{"type":"string"}},"required":["as_of","created_at","diff","error","finished_at","id","rule_versions","status","trigger"],"type":"object"}},"required":["diff_included","has_more","next_cursor","results","run"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the latest succeeded run with a page of its result rows","tags":["obligations"]}},"/obligations/runs/{run_id}/":{"get":{"description":"Return the run; another organisation's run is a 404.","operationId":"get_obligations_runs_run_id","parameters":[{"in":"path","name":"run_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"as_of":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"diff":{"additionalProperties":true,"type":"object"},"error":{"type":"string"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"rule_versions":{"additionalProperties":true,"type":"object"},"status":{"type":"string"},"trigger":{"type":"string"}},"required":["as_of","created_at","diff","error","finished_at","id","rule_versions","status","trigger"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the run; another organisation's run is a 404","tags":["obligations"]}},"/onboarding/":{"get":{"description":"Return the checklist; a user with no organisation yet gets every step open.","operationId":"get_onboarding","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"brand_list":{"items":{"properties":{"entity_id":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["entity_id","id","name"],"type":"object"},"type":"array"},"brands":{"type":"integer"},"completed":{"type":"integer"},"dismissed":{"type":"boolean"},"dismissed_at":{"format":"date-time","nullable":true,"type":"string"},"entities":{"items":{"properties":{"country_code":{"type":"string"},"id":{"type":"integer"},"is_default":{"type":"boolean"},"legal_name":{"type":"string"},"name":{"type":"string"},"tax_id":{"type":"string"}},"required":["country_code","id","is_default","legal_name","name","tax_id"],"type":"object"},"type":"array"},"has_workspace":{"type":"boolean"},"next_step":{"nullable":true,"type":"string"},"steps":{"items":{"properties":{"complete":{"type":"boolean"},"count":{"type":"integer"},"href":{"type":"string"},"key":{"type":"string"}},"required":["complete","count","href","key"],"type":"object"},"type":"array"},"terms_outdated":{"type":"boolean"},"total":{"type":"integer"}},"required":["brand_list","brands","completed","dismissed","dismissed_at","entities","has_workspace","next_step","steps","terms_outdated","total"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the checklist; a user with no organisation yet gets every step open","tags":["onboarding"]}},"/onboarding/brands/":{"post":{"description":"Create a brand; an entity in another organisation or outside the caller's scope is 404.","operationId":"post_onboarding_brands","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandInputRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/BrandInputRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/BrandInputRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"entity_id":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["entity_id","id","name"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a brand; an entity in another organisation or outside the caller's scope is 404","tags":["onboarding"]}},"/onboarding/dismissal/":{"get":{"description":"Return ``{\"dismissed\": bool, \"dismissed_at\": ISO-8601 string or null}``.","operationId":"get_onboarding_dismissal","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"dismissed":{"type":"boolean"},"dismissed_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["dismissed","dismissed_at"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return ``{\"dismissed\": bool, \"dismissed_at\": ISO-8601 string or null}``","tags":["onboarding"]},"put":{"description":"Set the dismissal from ``{\"dismissed\": bool}`` and return the new state.","operationId":"put_onboarding_dismissal","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"dismissed":{"type":"boolean"}},"required":["dismissed"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"dismissed":{"type":"boolean"},"dismissed_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["dismissed","dismissed_at"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Set the dismissal from ``{\"dismissed\": bool}`` and return the new state","tags":["onboarding"]}},"/onboarding/entities/":{"post":{"description":"Fill the untouched default entity or create a new one, then add the brand when given.","operationId":"post_onboarding_entities","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityInputRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/EntityInputRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/EntityInputRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"brand":{"nullable":true,"properties":{"entity_id":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["entity_id","id","name"],"type":"object"},"entity":{"properties":{"country_code":{"type":"string"},"id":{"type":"integer"},"is_default":{"type":"boolean"},"legal_name":{"type":"string"},"name":{"type":"string"},"tax_id":{"type":"string"}},"required":["country_code","id","is_default","legal_name","name","tax_id"],"type":"object"}},"required":["brand","entity"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Fill the untouched default entity or create a new one, then add the brand when given","tags":["onboarding"]}},"/ops/data-files/":{"get":{"description":"Return every jurisdiction, fee and report-format file.","operationId":"get_ops_data_files","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"id":{"type":"string"},"kind":{"type":"string"},"path":{"type":"string"}},"required":["id","kind","path"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return every jurisdiction, fee and report-format file","tags":["ops"]}},"/ops/data-files/leaves/":{"get":{"description":"Return ``{pointer, value, status}`` for each leaf of ``?path=``.","operationId":"get_ops_data_files_leaves","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"pointer":{"type":"string"},"status":{},"value":{}},"required":["pointer"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return `{pointer, value, status}` for each leaf of `?path=`","tags":["ops"]}},"/ops/data-proposals/":{"get":{"description":"List proposals (``?status=``, ``?mine=1``, ``?path=``).","operationId":"get_ops_data_proposals","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"applied_at":{"format":"date-time","nullable":true,"type":"string"},"applied_via":{"type":"string"},"base_hash":{"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"current_value":{},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"pointer":{"type":"string"},"proposed_leaf":{},"proposer":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"rationale":{"type":"string"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"target_path":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["applied_at","applied_via","base_hash","created_at","current_value","decided_at","id","livemode","object","pointer","proposed_leaf","proposer","rationale","status","submitted_at","target_path","updated_at"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List proposals","tags":["ops"]},"post":{"description":"Create a draft proposal.","operationId":"post_ops_data_proposals","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"pointer":{"type":"string"},"proposed_leaf":{"additionalProperties":true,"type":"object"},"rationale":{"type":"string"},"target_path":{"type":"string"}},"required":["pointer","proposed_leaf","rationale","target_path"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"applied_at":{"format":"date-time","nullable":true,"type":"string"},"applied_diff":{"type":"string"},"applied_via":{"type":"string"},"base_hash":{"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"current_value":{},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"pointer":{"type":"string"},"proposed_leaf":{},"proposer":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"rationale":{"type":"string"},"result_hash":{"type":"string"},"reviews":{"items":{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"decision":{"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"reviewer":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"}},"required":["comment","created_at","decision","id","livemode","object","reviewer"],"type":"object"},"type":"array"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"target_path":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["applied_at","applied_diff","applied_via","base_hash","created_at","current_value","decided_at","id","livemode","object","pointer","proposed_leaf","proposer","rationale","result_hash","reviews","status","submitted_at","target_path","updated_at"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a draft proposal","tags":["ops"]}},"/ops/data-proposals/{uid}/":{"get":{"description":"Return the proposal with its reviews.","operationId":"get_ops_data_proposals_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"applied_at":{"format":"date-time","nullable":true,"type":"string"},"applied_diff":{"type":"string"},"applied_via":{"type":"string"},"base_hash":{"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"current_value":{},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"pointer":{"type":"string"},"proposed_leaf":{},"proposer":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"rationale":{"type":"string"},"result_hash":{"type":"string"},"reviews":{"items":{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"decision":{"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"reviewer":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"}},"required":["comment","created_at","decision","id","livemode","object","reviewer"],"type":"object"},"type":"array"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"target_path":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["applied_at","applied_diff","applied_via","base_hash","created_at","current_value","decided_at","id","livemode","object","pointer","proposed_leaf","proposer","rationale","result_hash","reviews","status","submitted_at","target_path","updated_at"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the proposal with its reviews","tags":["ops"]},"patch":{"description":"Edit a draft or rejected proposal (proposer only); it returns to draft.","operationId":"patch_ops_data_proposals_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"proposed_leaf":{"additionalProperties":true,"type":"object"},"rationale":{"type":"string"}},"required":["proposed_leaf"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"applied_at":{"format":"date-time","nullable":true,"type":"string"},"applied_diff":{"type":"string"},"applied_via":{"type":"string"},"base_hash":{"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"current_value":{},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"pointer":{"type":"string"},"proposed_leaf":{},"proposer":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"rationale":{"type":"string"},"result_hash":{"type":"string"},"reviews":{"items":{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"decision":{"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"reviewer":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"}},"required":["comment","created_at","decision","id","livemode","object","reviewer"],"type":"object"},"type":"array"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"target_path":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["applied_at","applied_diff","applied_via","base_hash","created_at","current_value","decided_at","id","livemode","object","pointer","proposed_leaf","proposer","rationale","result_hash","reviews","status","submitted_at","target_path","updated_at"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Edit a draft or rejected proposal (proposer only); it returns to draft","tags":["ops"]}},"/ops/data-proposals/{uid}/apply/":{"post":{"description":"Return the diff and patched file text; an engineer lands them through a normal commit.","operationId":"post_ops_data_proposals_uid_apply","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"diff":{"type":"string"},"patched_content":{"type":"string"},"proposal":{"properties":{"applied_at":{"format":"date-time","nullable":true,"type":"string"},"applied_diff":{"type":"string"},"applied_via":{"type":"string"},"base_hash":{"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"current_value":{},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"pointer":{"type":"string"},"proposed_leaf":{},"proposer":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"rationale":{"type":"string"},"result_hash":{"type":"string"},"reviews":{"items":{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"decision":{"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"reviewer":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"}},"required":["comment","created_at","decision","id","livemode","object","reviewer"],"type":"object"},"type":"array"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"target_path":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["applied_at","applied_diff","applied_via","base_hash","created_at","current_value","decided_at","id","livemode","object","pointer","proposed_leaf","proposer","rationale","result_hash","reviews","status","submitted_at","target_path","updated_at"],"type":"object"}},"required":["diff","patched_content","proposal"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the diff and patched file text; an engineer lands them through a normal commit","tags":["ops"]}},"/ops/data-proposals/{uid}/approve/":{"post":{"description":"Approve; the two-person rule is enforced server-side.","operationId":"post_ops_data_proposals_uid_approve","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"comment":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"applied_at":{"format":"date-time","nullable":true,"type":"string"},"applied_diff":{"type":"string"},"applied_via":{"type":"string"},"base_hash":{"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"current_value":{},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"pointer":{"type":"string"},"proposed_leaf":{},"proposer":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"rationale":{"type":"string"},"result_hash":{"type":"string"},"reviews":{"items":{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"decision":{"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"reviewer":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"}},"required":["comment","created_at","decision","id","livemode","object","reviewer"],"type":"object"},"type":"array"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"target_path":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["applied_at","applied_diff","applied_via","base_hash","created_at","current_value","decided_at","id","livemode","object","pointer","proposed_leaf","proposer","rationale","result_hash","reviews","status","submitted_at","target_path","updated_at"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Approve; the two-person rule is enforced server-side","tags":["ops"]}},"/ops/data-proposals/{uid}/diff/":{"get":{"description":"Return the diff (stored for an applied proposal); 409 ``stale`` when the file changed.","operationId":"get_ops_data_proposals_uid_diff","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"diff":{"type":"string"},"file_hash":{"type":"string"},"patched_content":{"nullable":true,"type":"string"}},"required":["diff","file_hash","patched_content"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the diff (stored for an applied proposal); 409 `stale` when the file changed","tags":["ops"]}},"/ops/data-proposals/{uid}/download/":{"get":{"description":"Return an attachment.","operationId":"get_ops_data_proposals_uid_download","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"text/plain":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return an attachment","tags":["ops"]}},"/ops/data-proposals/{uid}/reject/":{"post":{"description":"Reject with a comment; the two-person rule is enforced server-side.","operationId":"post_ops_data_proposals_uid_reject","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"comment":{"type":"string"}},"required":["comment"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"applied_at":{"format":"date-time","nullable":true,"type":"string"},"applied_diff":{"type":"string"},"applied_via":{"type":"string"},"base_hash":{"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"current_value":{},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"pointer":{"type":"string"},"proposed_leaf":{},"proposer":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"rationale":{"type":"string"},"result_hash":{"type":"string"},"reviews":{"items":{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"decision":{"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"reviewer":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"}},"required":["comment","created_at","decision","id","livemode","object","reviewer"],"type":"object"},"type":"array"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"target_path":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["applied_at","applied_diff","applied_via","base_hash","created_at","current_value","decided_at","id","livemode","object","pointer","proposed_leaf","proposer","rationale","result_hash","reviews","status","submitted_at","target_path","updated_at"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Reject with a comment; the two-person rule is enforced server-side","tags":["ops"]}},"/ops/data-proposals/{uid}/submit/":{"post":{"description":"Move a draft to submitted (proposer only).","operationId":"post_ops_data_proposals_uid_submit","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"applied_at":{"format":"date-time","nullable":true,"type":"string"},"applied_diff":{"type":"string"},"applied_via":{"type":"string"},"base_hash":{"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"current_value":{},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"pointer":{"type":"string"},"proposed_leaf":{},"proposer":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"rationale":{"type":"string"},"result_hash":{"type":"string"},"reviews":{"items":{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"decision":{"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"reviewer":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"}},"required":["comment","created_at","decision","id","livemode","object","reviewer"],"type":"object"},"type":"array"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"target_path":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["applied_at","applied_diff","applied_via","base_hash","created_at","current_value","decided_at","id","livemode","object","pointer","proposed_leaf","proposer","rationale","result_hash","reviews","status","submitted_at","target_path","updated_at"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Move a draft to submitted (proposer only)","tags":["ops"]}},"/ops/impersonation/":{"get":{"description":"Cursor-paged history, newest first.","operationId":"get_ops_impersonation","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"end_reason":{"type":"string"},"ended_at":{"format":"date-time","nullable":true,"type":"string"},"ended_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"expires_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"organization":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"read_only":{"type":"boolean"},"reason":{"type":"string"},"staff":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"target_user":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"}},"required":["end_reason","ended_at","ended_by","expires_at","id","livemode","object","organization","read_only","reason","staff","started_at","target_user"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Cursor-paged history, newest first","tags":["ops"]}},"/ops/impersonation/current/":{"get":{"description":"Return the open session or ``{\"session\": null}``; expired sessions are closed here.","operationId":"get_ops_impersonation_current","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"session":{"nullable":true,"properties":{"end_reason":{"type":"string"},"ended_at":{"format":"date-time","nullable":true,"type":"string"},"ended_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"expires_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"organization":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"read_only":{"type":"boolean"},"reason":{"type":"string"},"staff":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"target_user":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"}},"required":["end_reason","ended_at","ended_by","expires_at","id","livemode","object","organization","read_only","reason","staff","started_at","target_user"],"type":"object"}},"required":["session"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the open session or ``{\"session\": null}``; expired sessions are closed here","tags":["ops"]}},"/ops/impersonation/end/":{"post":{"description":"Close the session and audit it.","operationId":"post_ops_impersonation_end","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"end_reason":{"type":"string"},"ended_at":{"format":"date-time","nullable":true,"type":"string"},"ended_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"expires_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"organization":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"read_only":{"type":"boolean"},"reason":{"type":"string"},"staff":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"target_user":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"}},"required":["end_reason","ended_at","ended_by","expires_at","id","livemode","object","organization","read_only","reason","staff","started_at","target_user"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Close the session and audit it","tags":["ops"]}},"/ops/impersonation/start/":{"post":{"description":"Open a session on the user named by ``user_id`` or ``email``; ``reason`` is required.","operationId":"post_ops_impersonation_start","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"type":"string"},"reason":{"type":"string"},"user_id":{"type":"integer"}},"required":["reason"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"end_reason":{"type":"string"},"ended_at":{"format":"date-time","nullable":true,"type":"string"},"ended_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"expires_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"livemode":{"type":"boolean"},"object":{"type":"string"},"organization":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"read_only":{"type":"boolean"},"reason":{"type":"string"},"staff":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"target_user":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"}},"required":["end_reason","ended_at","ended_by","expires_at","id","livemode","object","organization","read_only","reason","staff","started_at","target_user"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Open a session on the user named by `user_id` or `email`; `reason` is required","tags":["ops"]}},"/ops/regulatory/changes/":{"get":{"description":"List changes (``?status=``, ``?jurisdiction=``, ``updated_since``).","operationId":"get_ops_regulatory_changes","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"added_lines":{"type":"integer"},"affected_jurisdictions":{"items":{"type":"string"},"type":"array"},"affected_programmes":{"items":{"type":"string"},"type":"array"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"decided_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"decision_comment":{"type":"string"},"enacted":{"type":"boolean"},"id":{"type":"string"},"livemode":{"type":"boolean"},"notices_sent_at":{"format":"date-time","nullable":true,"type":"string"},"object":{"type":"string"},"removed_lines":{"type":"integer"},"source":{"properties":{"active":{"type":"boolean"},"consecutive_failures":{"type":"integer"},"id":{"type":"string"},"jurisdiction":{"type":"string"},"key":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"last_changed_at":{"format":"date-time","nullable":true,"type":"string"},"last_error":{"type":"string"},"last_fetched_at":{"format":"date-time","nullable":true,"type":"string"},"last_http_status":{"nullable":true,"type":"integer"},"livemode":{"type":"boolean"},"object":{"type":"string"},"programme":{"type":"string"},"role":{"type":"string"},"url":{"type":"string"},"watchlist_bill":{"type":"string"}},"required":["active","consecutive_failures","id","jurisdiction","key","kind","label","last_changed_at","last_error","last_fetched_at","last_http_status","livemode","object","programme","role","url","watchlist_bill"],"type":"object"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"submitted_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"what_to_redo":{"type":"string"}},"required":["added_lines","affected_jurisdictions","affected_programmes","created_at","decided_at","decided_by","decision_comment","enacted","id","livemode","notices_sent_at","object","removed_lines","source","status","submitted_at","submitted_by","summary","updated_at","what_to_redo"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List changes","tags":["ops"]}},"/ops/regulatory/changes/{uid}/":{"get":{"description":"Return one change with its diff.","operationId":"get_ops_regulatory_changes_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"activations":{"items":{"properties":{"bill":{"type":"string"},"id":{"type":"string"},"jurisdiction":{"type":"string"},"note":{"type":"string"},"status":{"type":"string"},"target_path":{"type":"string"}},"required":["bill","id","jurisdiction","note","status","target_path"],"type":"object"},"type":"array"},"added_lines":{"type":"integer"},"affected_jurisdictions":{"items":{"type":"string"},"type":"array"},"affected_programmes":{"items":{"type":"string"},"type":"array"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"decided_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"decision_comment":{"type":"string"},"diff":{"type":"string"},"enacted":{"type":"boolean"},"id":{"type":"string"},"livemode":{"type":"boolean"},"notices_sent_at":{"format":"date-time","nullable":true,"type":"string"},"object":{"type":"string"},"removed_lines":{"type":"integer"},"source":{"properties":{"active":{"type":"boolean"},"consecutive_failures":{"type":"integer"},"id":{"type":"string"},"jurisdiction":{"type":"string"},"key":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"last_changed_at":{"format":"date-time","nullable":true,"type":"string"},"last_error":{"type":"string"},"last_fetched_at":{"format":"date-time","nullable":true,"type":"string"},"last_http_status":{"nullable":true,"type":"integer"},"livemode":{"type":"boolean"},"object":{"type":"string"},"programme":{"type":"string"},"role":{"type":"string"},"url":{"type":"string"},"watchlist_bill":{"type":"string"}},"required":["active","consecutive_failures","id","jurisdiction","key","kind","label","last_changed_at","last_error","last_fetched_at","last_http_status","livemode","object","programme","role","url","watchlist_bill"],"type":"object"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"submitted_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"what_to_redo":{"type":"string"}},"required":["activations","added_lines","affected_jurisdictions","affected_programmes","created_at","decided_at","decided_by","decision_comment","diff","enacted","id","livemode","notices_sent_at","object","removed_lines","source","status","submitted_at","submitted_by","summary","updated_at","what_to_redo"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one change with its diff","tags":["ops"]}},"/ops/regulatory/changes/{uid}/approve/":{"post":{"description":"Approve as a second staff member; affected organizations are notified.","operationId":"post_ops_regulatory_changes_uid_approve","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"comment":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"activations":{"items":{"properties":{"bill":{"type":"string"},"id":{"type":"string"},"jurisdiction":{"type":"string"},"note":{"type":"string"},"status":{"type":"string"},"target_path":{"type":"string"}},"required":["bill","id","jurisdiction","note","status","target_path"],"type":"object"},"type":"array"},"added_lines":{"type":"integer"},"affected_jurisdictions":{"items":{"type":"string"},"type":"array"},"affected_programmes":{"items":{"type":"string"},"type":"array"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"decided_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"decision_comment":{"type":"string"},"diff":{"type":"string"},"enacted":{"type":"boolean"},"id":{"type":"string"},"livemode":{"type":"boolean"},"notices_sent_at":{"format":"date-time","nullable":true,"type":"string"},"object":{"type":"string"},"removed_lines":{"type":"integer"},"source":{"properties":{"active":{"type":"boolean"},"consecutive_failures":{"type":"integer"},"id":{"type":"string"},"jurisdiction":{"type":"string"},"key":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"last_changed_at":{"format":"date-time","nullable":true,"type":"string"},"last_error":{"type":"string"},"last_fetched_at":{"format":"date-time","nullable":true,"type":"string"},"last_http_status":{"nullable":true,"type":"integer"},"livemode":{"type":"boolean"},"object":{"type":"string"},"programme":{"type":"string"},"role":{"type":"string"},"url":{"type":"string"},"watchlist_bill":{"type":"string"}},"required":["active","consecutive_failures","id","jurisdiction","key","kind","label","last_changed_at","last_error","last_fetched_at","last_http_status","livemode","object","programme","role","url","watchlist_bill"],"type":"object"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"submitted_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"what_to_redo":{"type":"string"}},"required":["activations","added_lines","affected_jurisdictions","affected_programmes","created_at","decided_at","decided_by","decision_comment","diff","enacted","id","livemode","notices_sent_at","object","removed_lines","source","status","submitted_at","submitted_by","summary","updated_at","what_to_redo"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Approve as a second staff member; affected organizations are notified","tags":["ops"]}},"/ops/regulatory/changes/{uid}/diff/":{"get":{"description":"Return only the unified diff of one change.","operationId":"get_ops_regulatory_changes_uid_diff","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"added_lines":{"type":"integer"},"diff":{"type":"string"},"id":{"type":"string"},"object":{"type":"string"},"removed_lines":{"type":"integer"},"source_url":{"type":"string"}},"required":["added_lines","diff","id","object","removed_lines","source_url"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return only the unified diff of one change","tags":["ops"]}},"/ops/regulatory/changes/{uid}/dismiss/":{"post":{"description":"Dismiss a change as noise.","operationId":"post_ops_regulatory_changes_uid_dismiss","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"comment":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"activations":{"items":{"properties":{"bill":{"type":"string"},"id":{"type":"string"},"jurisdiction":{"type":"string"},"note":{"type":"string"},"status":{"type":"string"},"target_path":{"type":"string"}},"required":["bill","id","jurisdiction","note","status","target_path"],"type":"object"},"type":"array"},"added_lines":{"type":"integer"},"affected_jurisdictions":{"items":{"type":"string"},"type":"array"},"affected_programmes":{"items":{"type":"string"},"type":"array"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"decided_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"decision_comment":{"type":"string"},"diff":{"type":"string"},"enacted":{"type":"boolean"},"id":{"type":"string"},"livemode":{"type":"boolean"},"notices_sent_at":{"format":"date-time","nullable":true,"type":"string"},"object":{"type":"string"},"removed_lines":{"type":"integer"},"source":{"properties":{"active":{"type":"boolean"},"consecutive_failures":{"type":"integer"},"id":{"type":"string"},"jurisdiction":{"type":"string"},"key":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"last_changed_at":{"format":"date-time","nullable":true,"type":"string"},"last_error":{"type":"string"},"last_fetched_at":{"format":"date-time","nullable":true,"type":"string"},"last_http_status":{"nullable":true,"type":"integer"},"livemode":{"type":"boolean"},"object":{"type":"string"},"programme":{"type":"string"},"role":{"type":"string"},"url":{"type":"string"},"watchlist_bill":{"type":"string"}},"required":["active","consecutive_failures","id","jurisdiction","key","kind","label","last_changed_at","last_error","last_fetched_at","last_http_status","livemode","object","programme","role","url","watchlist_bill"],"type":"object"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"submitted_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"what_to_redo":{"type":"string"}},"required":["activations","added_lines","affected_jurisdictions","affected_programmes","created_at","decided_at","decided_by","decision_comment","diff","enacted","id","livemode","notices_sent_at","object","removed_lines","source","status","submitted_at","submitted_by","summary","updated_at","what_to_redo"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Dismiss a change as noise","tags":["ops"]}},"/ops/regulatory/changes/{uid}/reject/":{"post":{"description":"Reject an in-review change (a comment is required); nobody is notified.","operationId":"post_ops_regulatory_changes_uid_reject","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"comment":{"type":"string"}},"required":["comment"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"activations":{"items":{"properties":{"bill":{"type":"string"},"id":{"type":"string"},"jurisdiction":{"type":"string"},"note":{"type":"string"},"status":{"type":"string"},"target_path":{"type":"string"}},"required":["bill","id","jurisdiction","note","status","target_path"],"type":"object"},"type":"array"},"added_lines":{"type":"integer"},"affected_jurisdictions":{"items":{"type":"string"},"type":"array"},"affected_programmes":{"items":{"type":"string"},"type":"array"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"decided_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"decision_comment":{"type":"string"},"diff":{"type":"string"},"enacted":{"type":"boolean"},"id":{"type":"string"},"livemode":{"type":"boolean"},"notices_sent_at":{"format":"date-time","nullable":true,"type":"string"},"object":{"type":"string"},"removed_lines":{"type":"integer"},"source":{"properties":{"active":{"type":"boolean"},"consecutive_failures":{"type":"integer"},"id":{"type":"string"},"jurisdiction":{"type":"string"},"key":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"last_changed_at":{"format":"date-time","nullable":true,"type":"string"},"last_error":{"type":"string"},"last_fetched_at":{"format":"date-time","nullable":true,"type":"string"},"last_http_status":{"nullable":true,"type":"integer"},"livemode":{"type":"boolean"},"object":{"type":"string"},"programme":{"type":"string"},"role":{"type":"string"},"url":{"type":"string"},"watchlist_bill":{"type":"string"}},"required":["active","consecutive_failures","id","jurisdiction","key","kind","label","last_changed_at","last_error","last_fetched_at","last_http_status","livemode","object","programme","role","url","watchlist_bill"],"type":"object"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"submitted_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"what_to_redo":{"type":"string"}},"required":["activations","added_lines","affected_jurisdictions","affected_programmes","created_at","decided_at","decided_by","decision_comment","diff","enacted","id","livemode","notices_sent_at","object","removed_lines","source","status","submitted_at","submitted_by","summary","updated_at","what_to_redo"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Reject an in-review change (a comment is required); nobody is notified","tags":["ops"]}},"/ops/regulatory/changes/{uid}/submit/":{"post":{"description":"Put an open change into review with a plain-language summary.","operationId":"post_ops_regulatory_changes_uid_submit","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"affected_jurisdictions":{"items":{"type":"string"},"nullable":true,"type":"array"},"enacted":{"type":"boolean"},"summary":{"type":"string"},"what_to_redo":{"type":"string"}},"required":["summary"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"activations":{"items":{"properties":{"bill":{"type":"string"},"id":{"type":"string"},"jurisdiction":{"type":"string"},"note":{"type":"string"},"status":{"type":"string"},"target_path":{"type":"string"}},"required":["bill","id","jurisdiction","note","status","target_path"],"type":"object"},"type":"array"},"added_lines":{"type":"integer"},"affected_jurisdictions":{"items":{"type":"string"},"type":"array"},"affected_programmes":{"items":{"type":"string"},"type":"array"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"decided_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"decision_comment":{"type":"string"},"diff":{"type":"string"},"enacted":{"type":"boolean"},"id":{"type":"string"},"livemode":{"type":"boolean"},"notices_sent_at":{"format":"date-time","nullable":true,"type":"string"},"object":{"type":"string"},"removed_lines":{"type":"integer"},"source":{"properties":{"active":{"type":"boolean"},"consecutive_failures":{"type":"integer"},"id":{"type":"string"},"jurisdiction":{"type":"string"},"key":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"last_changed_at":{"format":"date-time","nullable":true,"type":"string"},"last_error":{"type":"string"},"last_fetched_at":{"format":"date-time","nullable":true,"type":"string"},"last_http_status":{"nullable":true,"type":"integer"},"livemode":{"type":"boolean"},"object":{"type":"string"},"programme":{"type":"string"},"role":{"type":"string"},"url":{"type":"string"},"watchlist_bill":{"type":"string"}},"required":["active","consecutive_failures","id","jurisdiction","key","kind","label","last_changed_at","last_error","last_fetched_at","last_http_status","livemode","object","programme","role","url","watchlist_bill"],"type":"object"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"submitted_by":{"nullable":true,"properties":{"email":{"type":"string"},"id":{"type":"integer"}},"required":["email","id"],"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"what_to_redo":{"type":"string"}},"required":["activations","added_lines","affected_jurisdictions","affected_programmes","created_at","decided_at","decided_by","decision_comment","diff","enacted","id","livemode","notices_sent_at","object","removed_lines","source","status","submitted_at","submitted_by","summary","updated_at","what_to_redo"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Put an open change into review with a plain-language summary","tags":["ops"]}},"/ops/regulatory/run/":{"post":{"description":"Queue a watch run (optionally for some source keys); returns 202.","operationId":"post_ops_regulatory_run","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"keys":{"items":{"type":"string"},"nullable":true,"type":"array"}},"type":"object"}}}},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"keys":{"items":{"type":"string"},"type":"array"},"object":{"type":"string"},"status":{"type":"string"}},"required":["keys","object","status"],"type":"object"}}},"description":"Accepted; the work continues in the background."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Queue a watch run (optionally for some source keys); returns 202","tags":["ops"]}},"/ops/regulatory/sources/":{"get":{"description":"List watched sources (``?jurisdiction=``, ``?failing=1``, ``updated_since``).","operationId":"get_ops_regulatory_sources","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"active":{"type":"boolean"},"consecutive_failures":{"type":"integer"},"id":{"type":"string"},"jurisdiction":{"type":"string"},"key":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"last_changed_at":{"format":"date-time","nullable":true,"type":"string"},"last_error":{"type":"string"},"last_fetched_at":{"format":"date-time","nullable":true,"type":"string"},"last_http_status":{"nullable":true,"type":"integer"},"livemode":{"type":"boolean"},"object":{"type":"string"},"programme":{"type":"string"},"role":{"type":"string"},"url":{"type":"string"},"watchlist_bill":{"type":"string"}},"required":["active","consecutive_failures","id","jurisdiction","key","kind","label","last_changed_at","last_error","last_fetched_at","last_http_status","livemode","object","programme","role","url","watchlist_bill"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List watched sources","tags":["ops"]}},"/preferences/ai-assist/":{"get":{"description":"Return the caller's AI assist override, the organisation default and the effective value.","operationId":"get_preferences_ai_assist","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"effective":{"type":"boolean"},"org_default":{"type":"boolean"},"override":{"nullable":true,"type":"boolean"}},"required":["effective","org_default","override"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the caller's AI assist override, the organisation default and the effective value","tags":["onboarding"]},"patch":{"description":"Set the caller's override from ``{\"override\": true | false | null}``; null follows the organisation default.","operationId":"patch_preferences_ai_assist","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"override":{"nullable":true,"type":"boolean"}},"required":["override"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"effective":{"type":"boolean"},"org_default":{"type":"boolean"},"override":{"nullable":true,"type":"boolean"}},"required":["effective","org_default","override"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Set the caller's override from ``{\"override\": true | false | null}``","tags":["onboarding"]}},"/preferences/shortcuts/":{"get":{"description":"Return whether the caller's single-key keyboard shortcuts are on; they are on until turned off.","operationId":"get_preferences_shortcuts","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"character_key_shortcuts":{"type":"boolean"}},"required":["character_key_shortcuts"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return whether the caller's single-key keyboard shortcuts are on","tags":["onboarding"]},"patch":{"description":"Turn the caller's single-key shortcuts on or off from ``{\"character_key_shortcuts\": true | false}``.","operationId":"patch_preferences_shortcuts","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"character_key_shortcuts":{"type":"boolean"}},"required":["character_key_shortcuts"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"character_key_shortcuts":{"type":"boolean"}},"required":["character_key_shortcuts"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Turn the caller's single-key shortcuts on or off from ``{\"character_key_shortcuts\": bool}``","tags":["onboarding"]}},"/public/calendar/{token}.ics":{"get":{"description":"An iCalendar (RFC 5545) document of upcoming deadlines. Unknown or revoked tokens are 404.","operationId":"get_public_calendar_token_ics","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/calendar":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"404":{"description":"Not found in the caller's organization."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return the deadline calendar for a feed token","tags":["public"]}},"/public/jwks":{"get":{"description":"Ed25519 public keys (RFC 8037 OKP) for every key that has signed a sealed report, a measurement record or an evidence archive manifest, plus the active signing key. Keys rotated out stay published with ``status`` ``retired`` and ``retired_at``, so older signatures still verify. Only public key material is returned.","operationId":"get_public_jwks","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"keys":{"items":{"properties":{"alg":{"type":"string"},"crv":{"type":"string"},"first_signed_at":{"format":"date-time","type":"string"},"kid":{"type":"string"},"kty":{"type":"string"},"retired_at":{"format":"date-time","type":"string"},"status":{"enum":["active","retired"],"type":"string"},"use":{"type":"string"},"x":{"type":"string"}},"required":["alg","crv","kid","kty","status","use","x"],"type":"object"},"type":"array"}},"required":["keys"],"type":"object"}}},"description":"Success."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return the JWKS of every public key that has signed EPR output","tags":["public"]}},"/public/jwks/":{"get":{"description":"Ed25519 public keys (RFC 8037 OKP) for every key that has signed a sealed report, a measurement record or an evidence archive manifest, plus the active signing key. Keys rotated out stay published with ``status`` ``retired`` and ``retired_at``, so older signatures still verify. Only public key material is returned.","operationId":"get_public_jwks_2","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"keys":{"items":{"properties":{"alg":{"type":"string"},"crv":{"type":"string"},"first_signed_at":{"format":"date-time","type":"string"},"kid":{"type":"string"},"kty":{"type":"string"},"retired_at":{"format":"date-time","type":"string"},"status":{"enum":["active","retired"],"type":"string"},"use":{"type":"string"},"x":{"type":"string"}},"required":["alg","crv","kid","kty","status","use","x"],"type":"object"},"type":"array"}},"required":["keys"],"type":"object"}}},"description":"Success."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return the JWKS of every public key that has signed EPR output","tags":["public"]}},"/public/obligations/preview":{"post":{"description":"Evaluate one anonymous entity against the requested regions.","operationId":"post_public_obligations_preview","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"disclaimer":{"type":"string"},"fx":{"nullable":true,"properties":{"from_currency":{"type":"string"},"publisher":{"type":"string"},"rate":{"type":"string"},"retrieved_at":{"type":"string"},"source_url":{"type":"string"},"to_currency":{"type":"string"},"year":{"type":"integer"}},"required":["from_currency","publisher","rate","retrieved_at","source_url","to_currency","year"],"type":"object"},"preliminary":{"type":"boolean"},"results":{"items":{"properties":{"caveats":{"items":{"type":"string"},"type":"array"},"citations":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"deadlines":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"determinations":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"entity_id":{"type":"string"},"entity_name":{"type":"string"},"exemptions":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"findings":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"headline":{"type":"string"},"in_force":{},"jurisdiction":{"type":"string"},"jurisdiction_name":{"type":"string"},"missing_data":{"items":{"type":"string"},"type":"array"},"organisation":{},"reason_code":{"type":"string"},"registrations":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"required_actions":{"items":{"type":"string"},"type":"array"},"scope":{},"starts_on":{"format":"date","nullable":true,"type":"string"},"status":{"type":"string"},"steps":{"items":{"type":"string"},"type":"array"}},"required":["caveats","citations","deadlines","determinations","entity_id","entity_name","exemptions","findings","headline","in_force","jurisdiction","jurisdiction_name","missing_data","organisation","reason_code","registrations","required_actions","scope","starts_on","status","steps"],"type":"object"},"type":"array"}},"required":["disclaimer","fx","preliminary","results"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Evaluate one anonymous entity against the requested regions","tags":["EPR"]}},"/public/obligations/preview/":{"post":{"description":"Evaluate one anonymous entity against the requested regions.","operationId":"post_public_obligations_preview_2","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"disclaimer":{"type":"string"},"fx":{"nullable":true,"properties":{"from_currency":{"type":"string"},"publisher":{"type":"string"},"rate":{"type":"string"},"retrieved_at":{"type":"string"},"source_url":{"type":"string"},"to_currency":{"type":"string"},"year":{"type":"integer"}},"required":["from_currency","publisher","rate","retrieved_at","source_url","to_currency","year"],"type":"object"},"preliminary":{"type":"boolean"},"results":{"items":{"properties":{"caveats":{"items":{"type":"string"},"type":"array"},"citations":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"deadlines":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"determinations":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"entity_id":{"type":"string"},"entity_name":{"type":"string"},"exemptions":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"findings":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"headline":{"type":"string"},"in_force":{},"jurisdiction":{"type":"string"},"jurisdiction_name":{"type":"string"},"missing_data":{"items":{"type":"string"},"type":"array"},"organisation":{},"reason_code":{"type":"string"},"registrations":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"required_actions":{"items":{"type":"string"},"type":"array"},"scope":{},"starts_on":{"format":"date","nullable":true,"type":"string"},"status":{"type":"string"},"steps":{"items":{"type":"string"},"type":"array"}},"required":["caveats","citations","deadlines","determinations","entity_id","entity_name","exemptions","findings","headline","in_force","jurisdiction","jurisdiction_name","missing_data","organisation","reason_code","registrations","required_actions","scope","starts_on","status","steps"],"type":"object"},"type":"array"}},"required":["disclaimer","fx","preliminary","results"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Evaluate one anonymous entity against the requested regions","tags":["EPR"]}},"/public/plan-catalog":{"get":{"description":"Prices are integer cents in ``currency`` and exclude tax. ``null`` means unlimited for ``max_*`` fields and not offered for prices and overage. ``plan_gated_capabilities`` lists each capability only some plans include. The document depends only on the release, not on Stripe configuration.","operationId":"get_public_plan_catalog","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"api_rate_limits_per_minute":{"additionalProperties":{"type":"integer"},"type":"object"},"currency":{"type":"string"},"generated_by":{"type":"string"},"null_means":{"type":"string"},"plan_gated_capabilities":{"items":{"properties":{"description":{"type":"string"},"key":{"type":"string"},"plans":{"items":{"type":"string"},"type":"array"}},"required":["description","key","plans"],"type":"object"},"type":"array"},"plan_order":{"items":{"type":"string"},"type":"array"},"plans":{"items":{"properties":{"annual_cents":{"nullable":true,"type":"integer"},"api_tier":{"type":"string"},"included_records":{"type":"integer"},"max_entities":{"nullable":true,"type":"integer"},"max_seats":{"nullable":true,"type":"integer"},"monthly_cents":{"nullable":true,"type":"integer"},"name":{"type":"string"},"overage_cents":{"nullable":true,"type":"integer"},"priority_support":{"type":"boolean"},"records_window":{"type":"string"},"scim":{"type":"boolean"},"slug":{"type":"string"},"sso":{"type":"boolean"}},"required":["annual_cents","api_tier","included_records","max_entities","max_seats","monthly_cents","name","overage_cents","priority_support","records_window","scim","slug","sso"],"type":"object"},"type":"array"},"prices_exclude_tax":{"type":"boolean"},"schema_version":{"type":"integer"}},"required":["api_rate_limits_per_minute","currency","generated_by","null_means","plan_gated_capabilities","plan_order","plans","prices_exclude_tax","schema_version"],"type":"object"}}},"description":"Success."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return the EPR plan catalog document: prices, limits and plan-gated capabilities","tags":["public"]}},"/public/plan-catalog/":{"get":{"description":"Prices are integer cents in ``currency`` and exclude tax. ``null`` means unlimited for ``max_*`` fields and not offered for prices and overage. ``plan_gated_capabilities`` lists each capability only some plans include. The document depends only on the release, not on Stripe configuration.","operationId":"get_public_plan_catalog_2","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"api_rate_limits_per_minute":{"additionalProperties":{"type":"integer"},"type":"object"},"currency":{"type":"string"},"generated_by":{"type":"string"},"null_means":{"type":"string"},"plan_gated_capabilities":{"items":{"properties":{"description":{"type":"string"},"key":{"type":"string"},"plans":{"items":{"type":"string"},"type":"array"}},"required":["description","key","plans"],"type":"object"},"type":"array"},"plan_order":{"items":{"type":"string"},"type":"array"},"plans":{"items":{"properties":{"annual_cents":{"nullable":true,"type":"integer"},"api_tier":{"type":"string"},"included_records":{"type":"integer"},"max_entities":{"nullable":true,"type":"integer"},"max_seats":{"nullable":true,"type":"integer"},"monthly_cents":{"nullable":true,"type":"integer"},"name":{"type":"string"},"overage_cents":{"nullable":true,"type":"integer"},"priority_support":{"type":"boolean"},"records_window":{"type":"string"},"scim":{"type":"boolean"},"slug":{"type":"string"},"sso":{"type":"boolean"}},"required":["annual_cents","api_tier","included_records","max_entities","max_seats","monthly_cents","name","overage_cents","priority_support","records_window","scim","slug","sso"],"type":"object"},"type":"array"},"prices_exclude_tax":{"type":"boolean"},"schema_version":{"type":"integer"}},"required":["api_rate_limits_per_minute","currency","generated_by","null_means","plan_gated_capabilities","plan_order","plans","prices_exclude_tax","schema_version"],"type":"object"}}},"description":"Success."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return the EPR plan catalog document: prices, limits and plan-gated capabilities","tags":["public"]}},"/public/plans":{"get":{"description":"The same plans, prices, included records and purchasability the billing page shows. ``purchasable`` is false for a plan that cannot be bought yet (for example, no Stripe price is configured). ``indicative_cad`` is the Bank of Canada annual USD/CAD average on file, for the indicative Canadian-dollar amounts a Canadian French reader sees beside the US-dollar prices; null when none is.","operationId":"get_public_plans","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"indicative_cad":{"nullable":true,"properties":{"from_currency":{"type":"string"},"publisher":{"type":"string"},"rate":{"type":"string"},"retrieved_at":{"type":"string"},"source_url":{"type":"string"},"to_currency":{"type":"string"},"year":{"type":"integer"}},"required":["from_currency","publisher","rate","retrieved_at","source_url","to_currency","year"],"type":"object"},"plans":{"items":{"properties":{"annual_cents":{"nullable":true,"type":"integer"},"api_tier":{"type":"string"},"included_records":{"type":"integer"},"max_entities":{"nullable":true,"type":"integer"},"max_seats":{"nullable":true,"type":"integer"},"monthly_cents":{"nullable":true,"type":"integer"},"name":{"type":"string"},"overage_cents":{"nullable":true,"type":"integer"},"priority_support":{"type":"boolean"},"purchasable":{"type":"boolean"},"purchasable_month":{"type":"boolean"},"purchasable_year":{"type":"boolean"},"records_window":{"type":"string"},"scim":{"type":"boolean"},"slug":{"type":"string"},"sso":{"type":"boolean"}},"required":["annual_cents","api_tier","included_records","max_entities","max_seats","monthly_cents","name","overage_cents","priority_support","purchasable","purchasable_month","purchasable_year","records_window","scim","slug","sso"],"type":"object"},"type":"array"}},"required":["indicative_cad","plans"],"type":"object"}}},"description":"Success."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return the EPR plan catalog with prices in integer cents","tags":["public"]}},"/public/plans/":{"get":{"description":"The same plans, prices, included records and purchasability the billing page shows. ``purchasable`` is false for a plan that cannot be bought yet (for example, no Stripe price is configured). ``indicative_cad`` is the Bank of Canada annual USD/CAD average on file, for the indicative Canadian-dollar amounts a Canadian French reader sees beside the US-dollar prices; null when none is.","operationId":"get_public_plans_2","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"indicative_cad":{"nullable":true,"properties":{"from_currency":{"type":"string"},"publisher":{"type":"string"},"rate":{"type":"string"},"retrieved_at":{"type":"string"},"source_url":{"type":"string"},"to_currency":{"type":"string"},"year":{"type":"integer"}},"required":["from_currency","publisher","rate","retrieved_at","source_url","to_currency","year"],"type":"object"},"plans":{"items":{"properties":{"annual_cents":{"nullable":true,"type":"integer"},"api_tier":{"type":"string"},"included_records":{"type":"integer"},"max_entities":{"nullable":true,"type":"integer"},"max_seats":{"nullable":true,"type":"integer"},"monthly_cents":{"nullable":true,"type":"integer"},"name":{"type":"string"},"overage_cents":{"nullable":true,"type":"integer"},"priority_support":{"type":"boolean"},"purchasable":{"type":"boolean"},"purchasable_month":{"type":"boolean"},"purchasable_year":{"type":"boolean"},"records_window":{"type":"string"},"scim":{"type":"boolean"},"slug":{"type":"string"},"sso":{"type":"boolean"}},"required":["annual_cents","api_tier","included_records","max_entities","max_seats","monthly_cents","name","overage_cents","priority_support","purchasable","purchasable_month","purchasable_year","records_window","scim","slug","sso"],"type":"object"},"type":"array"}},"required":["indicative_cad","plans"],"type":"object"}}},"description":"Success."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return the EPR plan catalog with prices in integer cents","tags":["public"]}},"/public/status":{"get":{"description":"Overall state, then for each check (web app, API, application server, database and cache) its latest result, its uptime over the last 90 days and a per-day breakdown. A minute with no result counts as down. Rebuilt at most once a minute.","operationId":"get_public_status","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"checks":{"items":{"properties":{"days":{"items":{"properties":{"date":{"format":"date","type":"string"},"uptime_percent":{"nullable":true,"type":"number"}},"required":["date"],"type":"object"},"type":"array"},"label":{"type":"string"},"last_checked_at":{"format":"date-time","nullable":true,"type":"string"},"last_latency_ms":{"nullable":true,"type":"integer"},"name":{"enum":["app","api","healthz","readyz"],"type":"string"},"state":{"enum":["up","down","unknown"],"type":"string"},"uptime_percent":{"nullable":true,"type":"number"}},"required":["days","label","last_checked_at","last_latency_ms","name","state","uptime_percent"],"type":"object"},"type":"array"},"generated_at":{"format":"date-time","type":"string"},"state":{"enum":["operational","degraded","unknown"],"type":"string"},"window_days":{"type":"integer"}},"required":["checks","generated_at","state","window_days"],"type":"object"}}},"description":"Success."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return the public service status","tags":["public"]}},"/public/status/":{"get":{"description":"Overall state, then for each check (web app, API, application server, database and cache) its latest result, its uptime over the last 90 days and a per-day breakdown. A minute with no result counts as down. Rebuilt at most once a minute.","operationId":"get_public_status_2","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"checks":{"items":{"properties":{"days":{"items":{"properties":{"date":{"format":"date","type":"string"},"uptime_percent":{"nullable":true,"type":"number"}},"required":["date"],"type":"object"},"type":"array"},"label":{"type":"string"},"last_checked_at":{"format":"date-time","nullable":true,"type":"string"},"last_latency_ms":{"nullable":true,"type":"integer"},"name":{"enum":["app","api","healthz","readyz"],"type":"string"},"state":{"enum":["up","down","unknown"],"type":"string"},"uptime_percent":{"nullable":true,"type":"number"}},"required":["days","label","last_checked_at","last_latency_ms","name","state","uptime_percent"],"type":"object"},"type":"array"},"generated_at":{"format":"date-time","type":"string"},"state":{"enum":["operational","degraded","unknown"],"type":"string"},"window_days":{"type":"integer"}},"required":["checks","generated_at","state","window_days"],"type":"object"}}},"description":"Success."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return the public service status","tags":["public"]}},"/public/supply/{token}":{"get":{"description":"Return the request contract: who asks, until when, and for which components.","operationId":"get_public_supply_token","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"components":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"sku_name":{"nullable":true,"type":"string"}},"required":["id","name","sku_name"],"type":"object"},"type":"array"},"documents":{"items":{"properties":{"component_id":{"nullable":true,"type":"integer"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"size_bytes":{"type":"integer"},"uploaded_at":{"format":"date-time","type":"string"}},"required":["component_id","content_type","id","name","size_bytes","uploaded_at"],"type":"object"},"type":"array"},"expires_at":{"format":"date-time","type":"string"},"requester_name":{"type":"string"}},"required":["components","documents","expires_at","requester_name"],"type":"object"}}},"description":"Success."},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return the request contract: who asks, until when, and for which components","tags":["public"]},"post":{"description":"Store the supplier's answer as proposals awaiting the customer's confirmation.","operationId":"post_public_supply_token","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"contact_name":{"type":"string"},"declarations":{"items":{"properties":{"component_id":{"type":"integer"},"document_id":{"nullable":true,"type":"integer"},"material":{"type":"string"},"notes":{"type":"string"},"recycled_content_percent":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"number"},{"type":"string"}]},"unit_grams":{"oneOf":[{"type":"integer"},{"type":"number"},{"type":"string"}]}},"required":["component_id","material","unit_grams"],"type":"object"},"type":"array"}},"required":["contact_name","declarations"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"received_count":{"type":"integer"}},"required":["received_count"],"type":"object"}}},"description":"Created."},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Store the supplier's answer as proposals awaiting the customer's confirmation","tags":["public"]}},"/public/supply/{token}/":{"get":{"description":"Return the request contract: who asks, until when, and for which components.","operationId":"get_public_supply_token_2","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"components":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"sku_name":{"nullable":true,"type":"string"}},"required":["id","name","sku_name"],"type":"object"},"type":"array"},"documents":{"items":{"properties":{"component_id":{"nullable":true,"type":"integer"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"size_bytes":{"type":"integer"},"uploaded_at":{"format":"date-time","type":"string"}},"required":["component_id","content_type","id","name","size_bytes","uploaded_at"],"type":"object"},"type":"array"},"expires_at":{"format":"date-time","type":"string"},"requester_name":{"type":"string"}},"required":["components","documents","expires_at","requester_name"],"type":"object"}}},"description":"Success."},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return the request contract: who asks, until when, and for which components","tags":["public"]},"post":{"description":"Store the supplier's answer as proposals awaiting the customer's confirmation.","operationId":"post_public_supply_token_2","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"contact_name":{"type":"string"},"declarations":{"items":{"properties":{"component_id":{"type":"integer"},"document_id":{"nullable":true,"type":"integer"},"material":{"type":"string"},"notes":{"type":"string"},"recycled_content_percent":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"number"},{"type":"string"}]},"unit_grams":{"oneOf":[{"type":"integer"},{"type":"number"},{"type":"string"}]}},"required":["component_id","material","unit_grams"],"type":"object"},"type":"array"}},"required":["contact_name","declarations"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"received_count":{"type":"integer"}},"required":["received_count"],"type":"object"}}},"description":"Created."},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Store the supplier's answer as proposals awaiting the customer's confirmation","tags":["public"]}},"/public/supply/{token}/documents":{"post":{"description":"Store a supporting file for the request after checking it is an inert PDF or image. Multipart fields: ``file`` (PDF, PNG, JPEG or WebP, 10 MB at most) and optional ``component_id``. The same file uploaded again returns the earlier record with 200.","operationId":"post_public_supply_token_documents","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"component_id":{"type":"integer"},"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"component_id":{"nullable":true,"type":"integer"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"size_bytes":{"type":"integer"},"uploaded_at":{"format":"date-time","type":"string"}},"required":["component_id","content_type","id","name","size_bytes","uploaded_at"],"type":"object"}}},"description":"Success."},"201":{"content":{"application/json":{"schema":{"properties":{"component_id":{"nullable":true,"type":"integer"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"size_bytes":{"type":"integer"},"uploaded_at":{"format":"date-time","type":"string"}},"required":["component_id","content_type","id","name","size_bytes","uploaded_at"],"type":"object"}}},"description":"Created."},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Store a supporting file for the request after checking it is an inert PDF or image","tags":["public"]}},"/public/supply/{token}/documents/":{"post":{"description":"Store a supporting file for the request after checking it is an inert PDF or image. Multipart fields: ``file`` (PDF, PNG, JPEG or WebP, 10 MB at most) and optional ``component_id``. The same file uploaded again returns the earlier record with 200.","operationId":"post_public_supply_token_documents_2","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"component_id":{"type":"integer"},"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"component_id":{"nullable":true,"type":"integer"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"size_bytes":{"type":"integer"},"uploaded_at":{"format":"date-time","type":"string"}},"required":["component_id","content_type","id","name","size_bytes","uploaded_at"],"type":"object"}}},"description":"Success."},"201":{"content":{"application/json":{"schema":{"properties":{"component_id":{"nullable":true,"type":"integer"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"size_bytes":{"type":"integer"},"uploaded_at":{"format":"date-time","type":"string"}},"required":["component_id","content_type","id","name","size_bytes","uploaded_at"],"type":"object"}}},"description":"Created."},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Store a supporting file for the request after checking it is an inert PDF or image","tags":["public"]}},"/public/terms":{"get":{"description":"The version that ``accept-terms`` records, with its status. ``draft`` means the text has not been finalised and must not be presented as in force; ``effective_date`` is null until it is final. ``language`` is the language of ``body_markdown`` (English when there is no translation); the ``governing_language`` text governs any translation.","operationId":"get_public_terms","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"body_markdown":{"type":"string"},"effective_date":{"format":"date","nullable":true,"type":"string"},"governing_language":{"enum":["en-US","es-419","pt-BR","de","fr","fr-CA","zh-Hans"],"type":"string"},"language":{"enum":["en-US","es-419","pt-BR","de","fr","fr-CA","zh-Hans"],"type":"string"},"status":{"enum":["draft","final"],"type":"string"},"version":{"type":"string"}},"required":["body_markdown","effective_date","governing_language","language","status","version"],"type":"object"}}},"description":"Success."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return the current EPR terms document","tags":["public"]}},"/public/terms/":{"get":{"description":"The version that ``accept-terms`` records, with its status. ``draft`` means the text has not been finalised and must not be presented as in force; ``effective_date`` is null until it is final. ``language`` is the language of ``body_markdown`` (English when there is no translation); the ``governing_language`` text governs any translation.","operationId":"get_public_terms_2","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"body_markdown":{"type":"string"},"effective_date":{"format":"date","nullable":true,"type":"string"},"governing_language":{"enum":["en-US","es-419","pt-BR","de","fr","fr-CA","zh-Hans"],"type":"string"},"language":{"enum":["en-US","es-419","pt-BR","de","fr","fr-CA","zh-Hans"],"type":"string"},"status":{"enum":["draft","final"],"type":"string"},"version":{"type":"string"}},"required":["body_markdown","effective_date","governing_language","language","status","version"],"type":"object"}}},"description":"Success."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return the current EPR terms document","tags":["public"]}},"/public/trust":{"get":{"description":"Each document's slug, title, one-line summary, the date it was last updated, the language it is served in and whether it is contractual (its English version governs).","operationId":"get_public_trust","parameters":[{"description":"Language to read the document in. Served in English when it has no current translation; `locale` in the response says which language was served. The English (`governing_locale`) governs.","in":"query","name":"locale","schema":{"enum":["de","en-US","es-419","fr","fr-CA","pt-BR","zh-Hans"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"documents":{"items":{"properties":{"contractual":{"type":"boolean"},"governing_locale":{"enum":["en-US","es-419","pt-BR","de","fr","fr-CA","zh-Hans"],"type":"string"},"locale":{"enum":["en-US","es-419","pt-BR","de","fr","fr-CA","zh-Hans"],"type":"string"},"slug":{"enum":["subprocessors","dpa","accessibility","sla","incident-notification","data-residency","security-questionnaire","self-attestation","vulnerability-disclosure"],"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"updated":{"format":"date","type":"string"}},"required":["contractual","governing_locale","locale","slug","summary","title","updated"],"type":"object"},"type":"array"}},"required":["documents"],"type":"object"}}},"description":"Success."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"List the public trust documents","tags":["public"]}},"/public/trust/":{"get":{"description":"Each document's slug, title, one-line summary, the date it was last updated, the language it is served in and whether it is contractual (its English version governs).","operationId":"get_public_trust_2","parameters":[{"description":"Language to read the document in. Served in English when it has no current translation; `locale` in the response says which language was served. The English (`governing_locale`) governs.","in":"query","name":"locale","schema":{"enum":["de","en-US","es-419","fr","fr-CA","pt-BR","zh-Hans"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"documents":{"items":{"properties":{"contractual":{"type":"boolean"},"governing_locale":{"enum":["en-US","es-419","pt-BR","de","fr","fr-CA","zh-Hans"],"type":"string"},"locale":{"enum":["en-US","es-419","pt-BR","de","fr","fr-CA","zh-Hans"],"type":"string"},"slug":{"enum":["subprocessors","dpa","accessibility","sla","incident-notification","data-residency","security-questionnaire","self-attestation","vulnerability-disclosure"],"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"updated":{"format":"date","type":"string"}},"required":["contractual","governing_locale","locale","slug","summary","title","updated"],"type":"object"},"type":"array"}},"required":["documents"],"type":"object"}}},"description":"Success."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"List the public trust documents","tags":["public"]}},"/public/trust/{slug}":{"get":{"description":"The document's front matter and Markdown body, in the requested language when a current translation exists. Unknown slugs are 404.","operationId":"get_public_trust_slug","parameters":[{"description":"Language to read the document in. Served in English when it has no current translation; `locale` in the response says which language was served. The English (`governing_locale`) governs.","in":"query","name":"locale","schema":{"enum":["de","en-US","es-419","fr","fr-CA","pt-BR","zh-Hans"],"type":"string"}},{"in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"body_markdown":{"type":"string"},"contractual":{"type":"boolean"},"governing_locale":{"enum":["en-US","es-419","pt-BR","de","fr","fr-CA","zh-Hans"],"type":"string"},"locale":{"enum":["en-US","es-419","pt-BR","de","fr","fr-CA","zh-Hans"],"type":"string"},"slug":{"enum":["subprocessors","dpa","accessibility","sla","incident-notification","data-residency","security-questionnaire","self-attestation","vulnerability-disclosure"],"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"updated":{"format":"date","type":"string"}},"required":["body_markdown","contractual","governing_locale","locale","slug","summary","title","updated"],"type":"object"}}},"description":"Success."},"404":{"description":"Not found in the caller's organization."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return one trust document, or 404 `trust_document_not_found`","tags":["public"]}},"/public/trust/{slug}/":{"get":{"description":"The document's front matter and Markdown body, in the requested language when a current translation exists. Unknown slugs are 404.","operationId":"get_public_trust_slug_2","parameters":[{"description":"Language to read the document in. Served in English when it has no current translation; `locale` in the response says which language was served. The English (`governing_locale`) governs.","in":"query","name":"locale","schema":{"enum":["de","en-US","es-419","fr","fr-CA","pt-BR","zh-Hans"],"type":"string"}},{"in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"body_markdown":{"type":"string"},"contractual":{"type":"boolean"},"governing_locale":{"enum":["en-US","es-419","pt-BR","de","fr","fr-CA","zh-Hans"],"type":"string"},"locale":{"enum":["en-US","es-419","pt-BR","de","fr","fr-CA","zh-Hans"],"type":"string"},"slug":{"enum":["subprocessors","dpa","accessibility","sla","incident-notification","data-residency","security-questionnaire","self-attestation","vulnerability-disclosure"],"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"updated":{"format":"date","type":"string"}},"required":["body_markdown","contractual","governing_locale","locale","slug","summary","title","updated"],"type":"object"}}},"description":"Success."},"404":{"description":"Not found in the caller's organization."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return one trust document, or 404 `trust_document_not_found`","tags":["public"]}},"/public/verify/{report_hash}":{"get":{"description":"Return the verification payload, or 404 ``report_not_found``.","operationId":"get_public_verify_report_hash","parameters":[{"in":"path","name":"report_hash","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"jurisdiction_code":{"type":"string"},"jurisdiction_name":{"type":"string"},"matched_on":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"prepared_at":{"format":"date-time","type":"string"},"report_hash":{"type":"string"},"signature":{"nullable":true,"properties":{"algorithm":{"type":"string"},"jwks_url":{"type":"string"},"key_id":{"type":"string"},"public_key":{"nullable":true,"properties":{"alg":{"type":"string"},"crv":{"type":"string"},"first_signed_at":{"format":"date-time","type":"string"},"kid":{"type":"string"},"kty":{"type":"string"},"retired_at":{"format":"date-time","type":"string"},"status":{"enum":["active","retired"],"type":"string"},"use":{"type":"string"},"x":{"type":"string"}},"required":["crv","kid","kty","use","x"],"type":"object"},"second_approval":{"nullable":true,"properties":{"approved_at":{"type":"string"},"approver_name":{"type":"string"},"approver_title":{"type":"string"}},"type":"object"},"signature":{"type":"string"},"signed_message":{"type":"string"},"signed_payload":{"additionalProperties":true,"type":"object"}},"required":["algorithm","jwks_url","key_id","public_key","signature","signed_message","signed_payload"],"type":"object"},"signed_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"superseded_by_hash":{"nullable":true,"type":"string"},"version":{"type":"integer"}},"required":["jurisdiction_code","jurisdiction_name","matched_on","period_end","period_start","prepared_at","report_hash","signature","signed_at","status","superseded_by_hash","version"],"type":"object"}}},"description":"Success."},"404":{"description":"Not found in the caller's organization."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return the verification payload, or 404 `report_not_found`","tags":["public"]}},"/public/verify/{report_hash}/":{"get":{"description":"Return the verification payload, or 404 ``report_not_found``.","operationId":"get_public_verify_report_hash_2","parameters":[{"in":"path","name":"report_hash","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"jurisdiction_code":{"type":"string"},"jurisdiction_name":{"type":"string"},"matched_on":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"prepared_at":{"format":"date-time","type":"string"},"report_hash":{"type":"string"},"signature":{"nullable":true,"properties":{"algorithm":{"type":"string"},"jwks_url":{"type":"string"},"key_id":{"type":"string"},"public_key":{"nullable":true,"properties":{"alg":{"type":"string"},"crv":{"type":"string"},"first_signed_at":{"format":"date-time","type":"string"},"kid":{"type":"string"},"kty":{"type":"string"},"retired_at":{"format":"date-time","type":"string"},"status":{"enum":["active","retired"],"type":"string"},"use":{"type":"string"},"x":{"type":"string"}},"required":["crv","kid","kty","use","x"],"type":"object"},"second_approval":{"nullable":true,"properties":{"approved_at":{"type":"string"},"approver_name":{"type":"string"},"approver_title":{"type":"string"}},"type":"object"},"signature":{"type":"string"},"signed_message":{"type":"string"},"signed_payload":{"additionalProperties":true,"type":"object"}},"required":["algorithm","jwks_url","key_id","public_key","signature","signed_message","signed_payload"],"type":"object"},"signed_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"superseded_by_hash":{"nullable":true,"type":"string"},"version":{"type":"integer"}},"required":["jurisdiction_code","jurisdiction_name","matched_on","period_end","period_start","prepared_at","report_hash","signature","signed_at","status","superseded_by_hash","version"],"type":"object"}}},"description":"Success."},"404":{"description":"Not found in the caller's organization."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Return the verification payload, or 404 `report_not_found`","tags":["public"]}},"/quality/access":{"get":{"description":"Return role, read-only status, AI-assist state and the check catalogue.","operationId":"get_quality_access","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ai_assist":{"type":"boolean"},"can_write":{"type":"boolean"},"checks":{"items":{"properties":{"code":{"type":"string"},"method":{"type":"string"}},"required":["code","method"],"type":"object"},"type":"array"},"outlier_method":{"type":"string"},"read_only":{"type":"boolean"},"role":{"type":"string"},"sampling_formula":{"type":"string"}},"required":["ai_assist","can_write","checks","outlier_method","read_only","role","sampling_formula"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return role, read-only status, AI-assist state and the check catalogue","tags":["EPR"]}},"/quality/flags":{"get":{"description":"List flags (``?status=``, ``?severity=``, ``?check=``, ``?component=``).","operationId":"get_quality_flags","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"assignee_id":{"nullable":true,"type":"integer"},"check":{"type":"string"},"component_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"details":{"additionalProperties":true,"type":"object"},"id":{"type":"integer"},"kind":{"type":"string"},"measurement_id":{"nullable":true,"type":"integer"},"message":{"type":"string"},"method":{"type":"string"},"period_id":{"nullable":true,"type":"integer"},"resolution_note":{"type":"string"},"resolved_at":{"format":"date-time","nullable":true,"type":"string"},"resolved_by":{"nullable":true,"type":"string"},"severity":{"type":"string"},"sku_id":{"nullable":true,"type":"integer"},"status":{"type":"string"}},"required":["assignee_id","check","component_id","created_at","details","id","kind","measurement_id","message","method","period_id","resolution_note","resolved_at","resolved_by","severity","sku_id","status"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"},"open_count":{"type":"integer"}},"required":["data","has_more","next_cursor","open_count"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List flags","tags":["EPR"]}},"/quality/flags/{id}":{"get":{"description":"Return one flag with its check numbers.","operationId":"get_quality_flags_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignee_id":{"nullable":true,"type":"integer"},"check":{"type":"string"},"component_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"details":{"additionalProperties":true,"type":"object"},"id":{"type":"integer"},"kind":{"type":"string"},"measurement_id":{"nullable":true,"type":"integer"},"message":{"type":"string"},"method":{"type":"string"},"period_id":{"nullable":true,"type":"integer"},"resolution_note":{"type":"string"},"resolved_at":{"format":"date-time","nullable":true,"type":"string"},"resolved_by":{"nullable":true,"type":"string"},"severity":{"type":"string"},"sku_id":{"nullable":true,"type":"integer"},"status":{"type":"string"}},"required":["assignee_id","check","component_id","created_at","details","id","kind","measurement_id","message","method","period_id","resolution_note","resolved_at","resolved_by","severity","sku_id","status"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one flag with its check numbers","tags":["EPR"]}},"/quality/flags/{id}/assign":{"post":{"description":"Assign (or clear with ``assignee_id: null``) the flag's assignee.","operationId":"post_quality_flags_id_assign","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"assignee_id":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"string"}]}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignee_id":{"nullable":true,"type":"integer"},"check":{"type":"string"},"component_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"details":{"additionalProperties":true,"type":"object"},"id":{"type":"integer"},"kind":{"type":"string"},"measurement_id":{"nullable":true,"type":"integer"},"message":{"type":"string"},"method":{"type":"string"},"period_id":{"nullable":true,"type":"integer"},"resolution_note":{"type":"string"},"resolved_at":{"format":"date-time","nullable":true,"type":"string"},"resolved_by":{"nullable":true,"type":"string"},"severity":{"type":"string"},"sku_id":{"nullable":true,"type":"integer"},"status":{"type":"string"}},"required":["assignee_id","check","component_id","created_at","details","id","kind","measurement_id","message","method","period_id","resolution_note","resolved_at","resolved_by","severity","sku_id","status"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Assign (or clear with `assignee_id: null`) the flag's assignee","tags":["EPR"]}},"/quality/flags/{id}/explain":{"post":{"description":"Explain a flag; the explanation must be substantive.","operationId":"post_quality_flags_id_explain","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"note":{"type":"string"}},"required":["note"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignee_id":{"nullable":true,"type":"integer"},"check":{"type":"string"},"component_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"details":{"additionalProperties":true,"type":"object"},"id":{"type":"integer"},"kind":{"type":"string"},"measurement_id":{"nullable":true,"type":"integer"},"message":{"type":"string"},"method":{"type":"string"},"period_id":{"nullable":true,"type":"integer"},"resolution_note":{"type":"string"},"resolved_at":{"format":"date-time","nullable":true,"type":"string"},"resolved_by":{"nullable":true,"type":"string"},"severity":{"type":"string"},"sku_id":{"nullable":true,"type":"integer"},"status":{"type":"string"}},"required":["assignee_id","check","component_id","created_at","details","id","kind","measurement_id","message","method","period_id","resolution_note","resolved_at","resolved_by","severity","sku_id","status"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Explain a flag; the explanation must be substantive","tags":["EPR"]}},"/quality/flags/{id}/reopen":{"post":{"description":"Reopen a resolved or explained flag with a reason.","operationId":"post_quality_flags_id_reopen","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reason":{"type":"string"}},"required":["reason"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignee_id":{"nullable":true,"type":"integer"},"check":{"type":"string"},"component_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"details":{"additionalProperties":true,"type":"object"},"id":{"type":"integer"},"kind":{"type":"string"},"measurement_id":{"nullable":true,"type":"integer"},"message":{"type":"string"},"method":{"type":"string"},"period_id":{"nullable":true,"type":"integer"},"resolution_note":{"type":"string"},"resolved_at":{"format":"date-time","nullable":true,"type":"string"},"resolved_by":{"nullable":true,"type":"string"},"severity":{"type":"string"},"sku_id":{"nullable":true,"type":"integer"},"status":{"type":"string"}},"required":["assignee_id","check","component_id","created_at","details","id","kind","measurement_id","message","method","period_id","resolution_note","resolved_at","resolved_by","severity","sku_id","status"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Reopen a resolved or explained flag with a reason","tags":["EPR"]}},"/quality/flags/{id}/resolve":{"post":{"description":"Resolve a flag; a note saying what changed is required.","operationId":"post_quality_flags_id_resolve","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"note":{"type":"string"}},"required":["note"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignee_id":{"nullable":true,"type":"integer"},"check":{"type":"string"},"component_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"details":{"additionalProperties":true,"type":"object"},"id":{"type":"integer"},"kind":{"type":"string"},"measurement_id":{"nullable":true,"type":"integer"},"message":{"type":"string"},"method":{"type":"string"},"period_id":{"nullable":true,"type":"integer"},"resolution_note":{"type":"string"},"resolved_at":{"format":"date-time","nullable":true,"type":"string"},"resolved_by":{"nullable":true,"type":"string"},"severity":{"type":"string"},"sku_id":{"nullable":true,"type":"integer"},"status":{"type":"string"}},"required":["assignee_id","check","component_id","created_at","details","id","kind","measurement_id","message","method","period_id","resolution_note","resolved_at","resolved_by","severity","sku_id","status"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Resolve a flag; a note saying what changed is required","tags":["EPR"]}},"/quality/periods/{id}/gate":{"get":{"description":"Return the flags that stop the period locking (empty means it can lock).","operationId":"get_quality_periods_id_gate","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"can_lock":{"type":"boolean"},"period_id":{"type":"integer"},"unresolved":{"items":{"properties":{"assignee_id":{"nullable":true,"type":"integer"},"check":{"type":"string"},"component_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"details":{"additionalProperties":true,"type":"object"},"id":{"type":"integer"},"kind":{"type":"string"},"measurement_id":{"nullable":true,"type":"integer"},"message":{"type":"string"},"method":{"type":"string"},"period_id":{"nullable":true,"type":"integer"},"resolution_note":{"type":"string"},"resolved_at":{"format":"date-time","nullable":true,"type":"string"},"resolved_by":{"nullable":true,"type":"string"},"severity":{"type":"string"},"sku_id":{"nullable":true,"type":"integer"},"status":{"type":"string"}},"required":["assignee_id","check","component_id","created_at","details","id","kind","measurement_id","message","method","period_id","resolution_note","resolved_at","resolved_by","severity","sku_id","status"],"type":"object"},"type":"array"}},"required":["can_lock","period_id","unresolved"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the flags that stop the period locking (empty means it can lock)","tags":["EPR"]}},"/quality/runs":{"get":{"description":"List recent runs.","operationId":"get_quality_runs","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"ai_assist":{"type":"boolean"},"ai_calls":{"type":"integer"},"ai_skipped_reason":{"type":"string"},"checks":{"items":{"type":"string"},"type":"array"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"flags_opened":{"type":"integer"},"id":{"type":"integer"},"method_note":{"type":"string"},"started_at":{"format":"date-time","type":"string"},"subjects_checked":{"type":"integer"},"trigger":{"type":"string"}},"required":["ai_assist","ai_calls","ai_skipped_reason","checks","finished_at","flags_opened","id","method_note","started_at","subjects_checked","trigger"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List recent runs","tags":["EPR"]},"post":{"description":"Run the checks now (optionally for one SKU); AI runs only when AI assist is on.","operationId":"post_quality_runs","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"checks":{"items":{"type":"string"},"nullable":true,"type":"array"},"include_ai":{"nullable":true,"type":"boolean"},"sku_id":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"string"}]}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"ai_assist":{"type":"boolean"},"ai_calls":{"type":"integer"},"ai_skipped_reason":{"type":"string"},"checks":{"items":{"type":"string"},"type":"array"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"flags_opened":{"type":"integer"},"id":{"type":"integer"},"method_note":{"type":"string"},"started_at":{"format":"date-time","type":"string"},"subjects_checked":{"type":"integer"},"trigger":{"type":"string"}},"required":["ai_assist","ai_calls","ai_skipped_reason","checks","finished_at","flags_opened","id","method_note","started_at","subjects_checked","trigger"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Run the checks now (optionally for one SKU); AI runs only when AI assist is on","tags":["EPR"]}},"/registration-packs":{"get":{"description":"List stored packs (``?entity_id=``).","operationId":"get_registration_packs","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"entity_id":{"type":"integer"},"entity_name":{"type":"string"},"gap_count":{"type":"integer"},"gaps":{"items":{"type":"string"},"type":"array"},"id":{"type":"integer"},"jurisdiction_code":{"type":"string"},"payload_sha256":{"type":"string"},"reporting_year":{"type":"integer"}},"required":["created_at","entity_id","entity_name","gap_count","gaps","id","jurisdiction_code","payload_sha256","reporting_year"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List stored packs","tags":["EPR"]},"post":{"description":"Generate a pack for an entity, jurisdiction and year.","operationId":"post_registration_packs","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"entity_id":{"type":"integer"},"jurisdiction_code":{"type":"string"},"reporting_year":{"type":"integer"}},"required":["entity_id","reporting_year"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"entity_id":{"type":"integer"},"entity_name":{"type":"string"},"gap_count":{"type":"integer"},"gaps":{"items":{"type":"string"},"type":"array"},"id":{"type":"integer"},"jurisdiction":{"additionalProperties":true,"type":"object"},"jurisdiction_code":{"type":"string"},"payload_sha256":{"type":"string"},"reporting_year":{"type":"integer"},"sections":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["created_at","entity_id","entity_name","gap_count","gaps","id","jurisdiction","jurisdiction_code","payload_sha256","reporting_year","sections"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Generate a pack for an entity, jurisdiction and year","tags":["EPR"]}},"/registration-packs/{id}":{"get":{"description":"Return the pack with its sections and gaps.","operationId":"get_registration_packs_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"entity_id":{"type":"integer"},"entity_name":{"type":"string"},"gap_count":{"type":"integer"},"gaps":{"items":{"type":"string"},"type":"array"},"id":{"type":"integer"},"jurisdiction":{"additionalProperties":true,"type":"object"},"jurisdiction_code":{"type":"string"},"payload_sha256":{"type":"string"},"reporting_year":{"type":"integer"},"sections":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["created_at","entity_id","entity_name","gap_count","gaps","id","jurisdiction","jurisdiction_code","payload_sha256","reporting_year","sections"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the pack with its sections and gaps","tags":["EPR"]}},"/registration-packs/{id}/download":{"get":{"description":"Return the pack file (``?file_format=csv|xlsx``, default csv).","operationId":"get_registration_packs_id_download","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}},"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the pack file","tags":["EPR"]}},"/registrations":{"get":{"description":"List registration numbers (``?entity_id=``, ``?jurisdiction_code=``).","operationId":"get_registrations","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"entity_id":{"type":"integer"},"entity_name":{"type":"string"},"evidence_reference":{"type":"string"},"id":{"type":"integer"},"is_sandbox":{"type":"boolean"},"jurisdiction_code":{"type":"string"},"registration_number":{"type":"string"},"registry_name":{"type":"string"},"status":{"type":"string"},"valid_from":{"format":"date","nullable":true,"type":"string"},"valid_to":{"format":"date","nullable":true,"type":"string"}},"required":["created_at","entity_id","entity_name","evidence_reference","id","is_sandbox","jurisdiction_code","registration_number","registry_name","status","valid_from","valid_to"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List registration numbers","tags":["EPR"]},"post":{"description":"Record a registration number the customer received.","operationId":"post_registrations","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"entity_id":{"type":"integer"},"evidence_reference":{"nullable":true,"type":"string"},"jurisdiction_code":{"type":"string"},"registration_number":{"type":"string"},"registry_name":{"nullable":true,"type":"string"},"status":{"enum":["pending","active","lapsed"],"type":"string"},"valid_from":{"format":"date","nullable":true,"type":"string"},"valid_to":{"format":"date","nullable":true,"type":"string"}},"required":["entity_id","jurisdiction_code","registration_number"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"entity_id":{"type":"integer"},"entity_name":{"type":"string"},"evidence_reference":{"type":"string"},"id":{"type":"integer"},"is_sandbox":{"type":"boolean"},"jurisdiction_code":{"type":"string"},"registration_number":{"type":"string"},"registry_name":{"type":"string"},"status":{"type":"string"},"valid_from":{"format":"date","nullable":true,"type":"string"},"valid_to":{"format":"date","nullable":true,"type":"string"}},"required":["created_at","entity_id","entity_name","evidence_reference","id","is_sandbox","jurisdiction_code","registration_number","registry_name","status","valid_from","valid_to"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Record a registration number the customer received","tags":["EPR"]}},"/registrations/options":{"get":{"description":"Return in-scope entities and every jurisdiction we hold data for.","operationId":"get_registrations_options","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"entities":{"items":{"properties":{"country_code":{"type":"string"},"id":{"type":"integer"},"is_default":{"type":"boolean"},"name":{"type":"string"}},"required":["country_code","id","is_default","name"],"type":"object"},"type":"array"},"jurisdictions":{"items":{"properties":{"code":{"type":"string"},"mine":{"type":"boolean"},"name":{"type":"string"}},"required":["code","mine","name"],"type":"object"},"type":"array"}},"required":["entities","jurisdictions"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return in-scope entities and every jurisdiction we hold data for","tags":["EPR"]}},"/registrations/{id}":{"delete":{"description":"Remove a registration that was entered by mistake.","operationId":"delete_registrations_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Remove a registration that was entered by mistake","tags":["EPR"]},"get":{"description":"Return one registration.","operationId":"get_registrations_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"entity_id":{"type":"integer"},"entity_name":{"type":"string"},"evidence_reference":{"type":"string"},"id":{"type":"integer"},"is_sandbox":{"type":"boolean"},"jurisdiction_code":{"type":"string"},"registration_number":{"type":"string"},"registry_name":{"type":"string"},"status":{"type":"string"},"valid_from":{"format":"date","nullable":true,"type":"string"},"valid_to":{"format":"date","nullable":true,"type":"string"}},"required":["created_at","entity_id","entity_name","evidence_reference","id","is_sandbox","jurisdiction_code","registration_number","registry_name","status","valid_from","valid_to"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one registration","tags":["EPR"]},"patch":{"description":"Change a registration.","operationId":"patch_registrations_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"evidence_reference":{"nullable":true,"type":"string"},"registration_number":{"type":"string"},"registry_name":{"nullable":true,"type":"string"},"status":{"enum":["pending","active","lapsed"],"type":"string"},"valid_from":{"format":"date","nullable":true,"type":"string"},"valid_to":{"format":"date","nullable":true,"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"entity_id":{"type":"integer"},"entity_name":{"type":"string"},"evidence_reference":{"type":"string"},"id":{"type":"integer"},"is_sandbox":{"type":"boolean"},"jurisdiction_code":{"type":"string"},"registration_number":{"type":"string"},"registry_name":{"type":"string"},"status":{"type":"string"},"valid_from":{"format":"date","nullable":true,"type":"string"},"valid_to":{"format":"date","nullable":true,"type":"string"}},"required":["created_at","entity_id","entity_name","evidence_reference","id","is_sandbox","jurisdiction_code","registration_number","registry_name","status","valid_from","valid_to"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Change a registration","tags":["EPR"]}},"/regulatory-updates/":{"get":{"description":"List the organization's change notices (``?unread=true``, ``updated_since`` is not offered: notices are immutable).","operationId":"get_regulatory_updates","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"id":{"type":"string"},"jurisdictions":{"items":{"type":"string"},"type":"array"},"livemode":{"type":"boolean"},"object":{"type":"string"},"read":{"type":"boolean"},"read_at":{"format":"date-time","nullable":true,"type":"string"},"sent_at":{"format":"date-time","nullable":true,"type":"string"},"source_url":{"type":"string"},"summary":{"type":"string"},"what_to_redo":{"type":"string"}},"required":["id","jurisdictions","livemode","object","read","read_at","sent_at","source_url","summary","what_to_redo"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List the organization's change notices","tags":["EPR"]}},"/regulatory-updates/read-all/":{"post":{"description":"Mark every notice of the organization read.","operationId":"post_regulatory_updates_read_all","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"marked":{"type":"integer"}},"required":["marked"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Mark every notice of the organization read","tags":["EPR"]}},"/regulatory-updates/unread-count/":{"get":{"description":"Return how many notices are unread.","operationId":"get_regulatory_updates_unread_count","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"unread":{"type":"integer"}},"required":["unread"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return how many notices are unread","tags":["EPR"]}},"/regulatory-updates/{uid}/read/":{"post":{"description":"Mark one notice read; another organization's notice is a 404.","operationId":"post_regulatory_updates_uid_read","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"jurisdictions":{"items":{"type":"string"},"type":"array"},"livemode":{"type":"boolean"},"object":{"type":"string"},"read":{"type":"boolean"},"read_at":{"format":"date-time","nullable":true,"type":"string"},"sent_at":{"format":"date-time","nullable":true,"type":"string"},"source_url":{"type":"string"},"summary":{"type":"string"},"what_to_redo":{"type":"string"}},"required":["id","jurisdictions","livemode","object","read","read_at","sent_at","source_url","summary","what_to_redo"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Mark one notice read; another organization's notice is a 404","tags":["EPR"]}},"/reports/periods/":{"get":{"description":"Return periods for the entities the caller may see, filterable by status and jurisdiction.","operationId":"get_reports_periods","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"entities":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":"array"},"jurisdictions":{"items":{"properties":{"categories_ready":{"type":"boolean"},"code":{"type":"string"},"formats":{"items":{"properties":{"file_kind":{"enum":["upload","worksheet","figures"],"type":"string"},"id":{"type":"string"},"name":{"type":"string"}},"required":["file_kind","id","name"],"type":"object"},"type":"array"},"mine":{"type":"boolean"},"name":{"type":"string"}},"required":["categories_ready","code","formats","mine","name"],"type":"object"},"type":"array"},"periods":{"items":{"properties":{"checks":{"items":{"properties":{"blocking_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"format_id":{"type":"string"},"generation_status":{"type":"string"},"id":{"type":"integer"},"info_count":{"type":"integer"},"kind":{"type":"string"},"unchecked_rules":{"items":{"type":"string"},"type":"array"},"warning_count":{"type":"integer"}},"required":["blocking_count","created_at","format_id","generation_status","id","info_count","kind","unchecked_rules","warning_count"],"type":"object"},"type":"array"},"due_date":{"format":"date","nullable":true,"type":"string"},"entity_id":{"type":"integer"},"entity_name":{"type":"string"},"format_ids":{"items":{"type":"string"},"type":"array"},"formats":{"items":{"properties":{"file_kind":{"enum":["upload","worksheet","figures"],"type":"string"},"id":{"type":"string"},"name":{"type":"string"}},"required":["file_kind","id","name"],"type":"object"},"type":"array"},"id":{"type":"integer"},"inputs":{"additionalProperties":{"type":"string"},"type":"object"},"jurisdiction_code":{"type":"string"},"jurisdiction_name":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"stale_figures":{"nullable":true,"properties":{"detected_at":{"format":"date-time","type":"string"},"flag_id":{"type":"integer"},"formats":{"items":{"properties":{"added":{"type":"integer"},"changed":{"type":"integer"},"context":{"type":"integer"},"format_id":{"type":"string"},"removed":{"type":"integer"},"version_id":{"type":"integer"},"version_number":{"type":"integer"}},"required":["added","changed","context","format_id","removed","version_id","version_number"],"type":"object"},"type":"array"},"message":{"type":"string"}},"required":["detected_at","flag_id","formats","message"],"type":"object"},"status":{"type":"string"},"versions":{"items":{"properties":{"attestation_statement":{"properties":{"text":{"type":"string"},"version":{"type":"string"}},"required":["text","version"],"type":"object"},"attestations":{"items":{"properties":{"attested_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"signature_font":{"type":"string"},"signature_image":{"nullable":true,"type":"string"},"signature_method":{"type":"string"},"signer_name":{"type":"string"},"signer_title":{"type":"string"},"statement":{"type":"string"},"statement_version":{"type":"string"}},"required":["attested_at","id","signature_font","signature_image","signature_method","signer_name","signer_title","statement","statement_version"],"type":"object"},"type":"array"},"file_content_type":{"nullable":true,"type":"string"},"file_kind":{"type":"string"},"file_name":{"nullable":true,"type":"string"},"file_sha256":{"nullable":true,"type":"string"},"format_id":{"type":"string"},"format_name":{"type":"string"},"has_file":{"type":"boolean"},"has_pdf":{"type":"boolean"},"id":{"type":"integer"},"layout":{"additionalProperties":true,"type":"object"},"locked_at":{"format":"date-time","type":"string"},"period_id":{"type":"integer"},"row_count":{"type":"integer"},"seal_status":{"type":"string"},"signature":{"nullable":true,"properties":{"algorithm":{"type":"string"},"key_id":{"type":"string"}},"type":"object"},"snapshot_sha256":{"type":"string"},"superseded_by":{"nullable":true,"type":"integer"},"verify_path":{"type":"string"},"version_number":{"type":"integer"}},"required":["attestation_statement","attestations","file_content_type","file_kind","file_name","file_sha256","format_id","format_name","has_file","has_pdf","id","layout","locked_at","period_id","row_count","seal_status","signature","snapshot_sha256","superseded_by","verify_path","version_number"],"type":"object"},"type":"array"}},"required":["checks","due_date","entity_id","entity_name","format_ids","formats","id","inputs","jurisdiction_code","jurisdiction_name","period_end","period_start","stale_figures","status","versions"],"type":"object"},"type":"array"}},"required":["entities","jurisdictions","periods"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return periods for the entities the caller may see, filterable by status and jurisdiction","tags":["reports"]},"post":{"description":"Open a period; an entity outside the caller's organisation or scope is a 404.","operationId":"post_reports_periods","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodCreateRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PeriodCreateRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PeriodCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"checks":{"items":{"properties":{"blocking_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"format_id":{"type":"string"},"generation_status":{"type":"string"},"id":{"type":"integer"},"info_count":{"type":"integer"},"kind":{"type":"string"},"unchecked_rules":{"items":{"type":"string"},"type":"array"},"warning_count":{"type":"integer"}},"required":["blocking_count","created_at","format_id","generation_status","id","info_count","kind","unchecked_rules","warning_count"],"type":"object"},"type":"array"},"due_date":{"format":"date","nullable":true,"type":"string"},"entity_id":{"type":"integer"},"entity_name":{"type":"string"},"format_ids":{"items":{"type":"string"},"type":"array"},"formats":{"items":{"properties":{"file_kind":{"enum":["upload","worksheet","figures"],"type":"string"},"id":{"type":"string"},"name":{"type":"string"}},"required":["file_kind","id","name"],"type":"object"},"type":"array"},"id":{"type":"integer"},"inputs":{"additionalProperties":{"type":"string"},"type":"object"},"jurisdiction_code":{"type":"string"},"jurisdiction_name":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"stale_figures":{"nullable":true,"properties":{"detected_at":{"format":"date-time","type":"string"},"flag_id":{"type":"integer"},"formats":{"items":{"properties":{"added":{"type":"integer"},"changed":{"type":"integer"},"context":{"type":"integer"},"format_id":{"type":"string"},"removed":{"type":"integer"},"version_id":{"type":"integer"},"version_number":{"type":"integer"}},"required":["added","changed","context","format_id","removed","version_id","version_number"],"type":"object"},"type":"array"},"message":{"type":"string"}},"required":["detected_at","flag_id","formats","message"],"type":"object"},"status":{"type":"string"},"versions":{"items":{"properties":{"attestation_statement":{"properties":{"text":{"type":"string"},"version":{"type":"string"}},"required":["text","version"],"type":"object"},"attestations":{"items":{"properties":{"attested_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"signature_font":{"type":"string"},"signature_image":{"nullable":true,"type":"string"},"signature_method":{"type":"string"},"signer_name":{"type":"string"},"signer_title":{"type":"string"},"statement":{"type":"string"},"statement_version":{"type":"string"}},"required":["attested_at","id","signature_font","signature_image","signature_method","signer_name","signer_title","statement","statement_version"],"type":"object"},"type":"array"},"file_content_type":{"nullable":true,"type":"string"},"file_kind":{"type":"string"},"file_name":{"nullable":true,"type":"string"},"file_sha256":{"nullable":true,"type":"string"},"format_id":{"type":"string"},"format_name":{"type":"string"},"has_file":{"type":"boolean"},"has_pdf":{"type":"boolean"},"id":{"type":"integer"},"layout":{"additionalProperties":true,"type":"object"},"locked_at":{"format":"date-time","type":"string"},"period_id":{"type":"integer"},"row_count":{"type":"integer"},"seal_status":{"type":"string"},"signature":{"nullable":true,"properties":{"algorithm":{"type":"string"},"key_id":{"type":"string"}},"type":"object"},"snapshot_sha256":{"type":"string"},"superseded_by":{"nullable":true,"type":"integer"},"verify_path":{"type":"string"},"version_number":{"type":"integer"}},"required":["attestation_statement","attestations","file_content_type","file_kind","file_name","file_sha256","format_id","format_name","has_file","has_pdf","id","layout","locked_at","period_id","row_count","seal_status","signature","snapshot_sha256","superseded_by","verify_path","version_number"],"type":"object"},"type":"array"}},"required":["checks","due_date","entity_id","entity_name","format_ids","formats","id","inputs","jurisdiction_code","jurisdiction_name","period_end","period_start","stale_figures","status","versions"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Open a period; an entity outside the caller's organisation or scope is a 404","tags":["reports"]}},"/reports/periods/{period_id}/":{"get":{"description":"Return the period; another organisation's period is a 404.","operationId":"get_reports_periods_period_id","parameters":[{"in":"path","name":"period_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"checks":{"items":{"properties":{"blocking_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"format_id":{"type":"string"},"generation_status":{"type":"string"},"id":{"type":"integer"},"info_count":{"type":"integer"},"kind":{"type":"string"},"unchecked_rules":{"items":{"type":"string"},"type":"array"},"warning_count":{"type":"integer"}},"required":["blocking_count","created_at","format_id","generation_status","id","info_count","kind","unchecked_rules","warning_count"],"type":"object"},"type":"array"},"due_date":{"format":"date","nullable":true,"type":"string"},"entity_id":{"type":"integer"},"entity_name":{"type":"string"},"format_ids":{"items":{"type":"string"},"type":"array"},"formats":{"items":{"properties":{"file_kind":{"enum":["upload","worksheet","figures"],"type":"string"},"id":{"type":"string"},"name":{"type":"string"}},"required":["file_kind","id","name"],"type":"object"},"type":"array"},"id":{"type":"integer"},"inputs":{"additionalProperties":{"type":"string"},"type":"object"},"jurisdiction_code":{"type":"string"},"jurisdiction_name":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"stale_figures":{"nullable":true,"properties":{"detected_at":{"format":"date-time","type":"string"},"flag_id":{"type":"integer"},"formats":{"items":{"properties":{"added":{"type":"integer"},"changed":{"type":"integer"},"context":{"type":"integer"},"format_id":{"type":"string"},"removed":{"type":"integer"},"version_id":{"type":"integer"},"version_number":{"type":"integer"}},"required":["added","changed","context","format_id","removed","version_id","version_number"],"type":"object"},"type":"array"},"message":{"type":"string"}},"required":["detected_at","flag_id","formats","message"],"type":"object"},"status":{"type":"string"},"versions":{"items":{"properties":{"attestation_statement":{"properties":{"text":{"type":"string"},"version":{"type":"string"}},"required":["text","version"],"type":"object"},"attestations":{"items":{"properties":{"attested_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"signature_font":{"type":"string"},"signature_image":{"nullable":true,"type":"string"},"signature_method":{"type":"string"},"signer_name":{"type":"string"},"signer_title":{"type":"string"},"statement":{"type":"string"},"statement_version":{"type":"string"}},"required":["attested_at","id","signature_font","signature_image","signature_method","signer_name","signer_title","statement","statement_version"],"type":"object"},"type":"array"},"file_content_type":{"nullable":true,"type":"string"},"file_kind":{"type":"string"},"file_name":{"nullable":true,"type":"string"},"file_sha256":{"nullable":true,"type":"string"},"format_id":{"type":"string"},"format_name":{"type":"string"},"has_file":{"type":"boolean"},"has_pdf":{"type":"boolean"},"id":{"type":"integer"},"layout":{"additionalProperties":true,"type":"object"},"locked_at":{"format":"date-time","type":"string"},"period_id":{"type":"integer"},"row_count":{"type":"integer"},"seal_status":{"type":"string"},"signature":{"nullable":true,"properties":{"algorithm":{"type":"string"},"key_id":{"type":"string"}},"type":"object"},"snapshot_sha256":{"type":"string"},"superseded_by":{"nullable":true,"type":"integer"},"verify_path":{"type":"string"},"version_number":{"type":"integer"}},"required":["attestation_statement","attestations","file_content_type","file_kind","file_name","file_sha256","format_id","format_name","has_file","has_pdf","id","layout","locked_at","period_id","row_count","seal_status","signature","snapshot_sha256","superseded_by","verify_path","version_number"],"type":"object"},"type":"array"}},"required":["checks","due_date","entity_id","entity_name","format_ids","formats","id","inputs","jurisdiction_code","jurisdiction_name","period_end","period_start","stale_figures","status","versions"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the period; another organisation's period is a 404","tags":["reports"]}},"/reports/periods/{period_id}/amend/":{"post":{"description":"Create the amended version; an identical result is refused as ``no_changes``.","operationId":"post_reports_periods_period_id_amend","parameters":[{"in":"path","name":"period_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmendRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/AmendRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AmendRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"diff":{"properties":{"created_at":{"format":"date-time","type":"string"},"diff":{"additionalProperties":true,"type":"object"},"from_number":{"type":"integer"},"from_version":{"type":"integer"},"reason":{"type":"string"},"to_number":{"type":"integer"},"to_version":{"type":"integer"}},"required":["created_at","diff","from_number","from_version","reason","to_number","to_version"],"type":"object"},"version":{"properties":{"attestation_statement":{"properties":{"text":{"type":"string"},"version":{"type":"string"}},"required":["text","version"],"type":"object"},"attestations":{"items":{"properties":{"attested_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"signature_font":{"type":"string"},"signature_image":{"nullable":true,"type":"string"},"signature_method":{"type":"string"},"signer_name":{"type":"string"},"signer_title":{"type":"string"},"statement":{"type":"string"},"statement_version":{"type":"string"}},"required":["attested_at","id","signature_font","signature_image","signature_method","signer_name","signer_title","statement","statement_version"],"type":"object"},"type":"array"},"file_content_type":{"nullable":true,"type":"string"},"file_kind":{"type":"string"},"file_name":{"nullable":true,"type":"string"},"file_sha256":{"nullable":true,"type":"string"},"format_id":{"type":"string"},"format_name":{"type":"string"},"has_file":{"type":"boolean"},"has_pdf":{"type":"boolean"},"id":{"type":"integer"},"layout":{"additionalProperties":true,"type":"object"},"locked_at":{"format":"date-time","type":"string"},"period_id":{"type":"integer"},"row_count":{"type":"integer"},"seal_status":{"type":"string"},"signature":{"nullable":true,"properties":{"algorithm":{"type":"string"},"key_id":{"type":"string"}},"type":"object"},"snapshot_sha256":{"type":"string"},"superseded_by":{"nullable":true,"type":"integer"},"verify_path":{"type":"string"},"version_number":{"type":"integer"}},"required":["attestation_statement","attestations","file_content_type","file_kind","file_name","file_sha256","format_id","format_name","has_file","has_pdf","id","layout","locked_at","period_id","row_count","seal_status","signature","snapshot_sha256","superseded_by","verify_path","version_number"],"type":"object"}},"required":["diff","version"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create the amended version; an identical result is refused as `no_changes`","tags":["reports"]}},"/reports/periods/{period_id}/approvals/":{"get":{"description":"List approval requests for the period's figures. Requests whose figures have since changed are marked superseded. ``required`` says whether the organization needs an approval before locking.","operationId":"get_reports_periods_period_id_approvals","parameters":[{"in":"path","name":"period_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"can_approve":{"type":"boolean"},"can_request":{"type":"boolean"},"data":{"items":{"properties":{"approver_id":{"nullable":true,"type":"integer"},"approver_name":{"type":"string"},"approver_title":{"type":"string"},"can_decide":{"type":"boolean"},"content_sha256":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"note":{"type":"string"},"proposed_inputs":{"additionalProperties":{"type":"string"},"type":"object"},"requested_at":{"format":"date-time","type":"string"},"requested_by_id":{"nullable":true,"type":"integer"},"requested_by_name":{"type":"string"},"status":{"type":"string"},"subject_id":{"type":"integer"},"subject_type":{"type":"string"},"uid":{"type":"string"}},"required":["approver_id","approver_name","approver_title","can_decide","content_sha256","decided_at","note","proposed_inputs","requested_at","requested_by_id","requested_by_name","status","subject_id","subject_type","uid"],"type":"object"},"type":"array"},"required":{"type":"boolean"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"404":{"description":"Not found in the caller's organization."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List approval requests for the period's figures","tags":["reports"]},"post":{"description":"Ask a second person to approve the figures the period would seal now. An identical open request is returned instead of a new one. On a sealed period the request covers an amendment: the figures an amendment with ``inputs`` would seal (refused as ``period_locked`` when nothing would change).","operationId":"post_reports_periods_period_id_approvals","parameters":[{"in":"path","name":"period_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"inputs":{"additionalProperties":{"type":"string"},"type":"object"},"note":{"type":"string"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"approver_id":{"nullable":true,"type":"integer"},"approver_name":{"type":"string"},"approver_title":{"type":"string"},"can_decide":{"type":"boolean"},"content_sha256":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"note":{"type":"string"},"proposed_inputs":{"additionalProperties":{"type":"string"},"type":"object"},"requested_at":{"format":"date-time","type":"string"},"requested_by_id":{"nullable":true,"type":"integer"},"requested_by_name":{"type":"string"},"status":{"type":"string"},"subject_id":{"type":"integer"},"subject_type":{"type":"string"},"uid":{"type":"string"}},"required":["approver_id","approver_name","approver_title","can_decide","content_sha256","decided_at","note","proposed_inputs","requested_at","requested_by_id","requested_by_name","status","subject_id","subject_type","uid"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Ask a second person to approve the figures the period would seal now","tags":["reports"]}},"/reports/periods/{period_id}/approvals/{uid}/approve/":{"post":{"description":"Approve the period's figures as the second person. Refused for the person who asked, for anyone without the signing right, and when the figures changed since the request (``figures_changed``).","operationId":"post_reports_periods_period_id_approvals_uid_approve","parameters":[{"in":"path","name":"period_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"approver_name":{"type":"string"},"approver_title":{"type":"string"},"note":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"approver_id":{"nullable":true,"type":"integer"},"approver_name":{"type":"string"},"approver_title":{"type":"string"},"can_decide":{"type":"boolean"},"content_sha256":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"note":{"type":"string"},"proposed_inputs":{"additionalProperties":{"type":"string"},"type":"object"},"requested_at":{"format":"date-time","type":"string"},"requested_by_id":{"nullable":true,"type":"integer"},"requested_by_name":{"type":"string"},"status":{"type":"string"},"subject_id":{"type":"integer"},"subject_type":{"type":"string"},"uid":{"type":"string"}},"required":["approver_id","approver_name","approver_title","can_decide","content_sha256","decided_at","note","proposed_inputs","requested_at","requested_by_id","requested_by_name","status","subject_id","subject_type","uid"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Approve the period's figures as the second person","tags":["reports"]}},"/reports/periods/{period_id}/approvals/{uid}/reject/":{"post":{"description":"Send the period's figures back with a note saying what needs to change.","operationId":"post_reports_periods_period_id_approvals_uid_reject","parameters":[{"in":"path","name":"period_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"approver_name":{"type":"string"},"approver_title":{"type":"string"},"note":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"approver_id":{"nullable":true,"type":"integer"},"approver_name":{"type":"string"},"approver_title":{"type":"string"},"can_decide":{"type":"boolean"},"content_sha256":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"note":{"type":"string"},"proposed_inputs":{"additionalProperties":{"type":"string"},"type":"object"},"requested_at":{"format":"date-time","type":"string"},"requested_by_id":{"nullable":true,"type":"integer"},"requested_by_name":{"type":"string"},"status":{"type":"string"},"subject_id":{"type":"integer"},"subject_type":{"type":"string"},"uid":{"type":"string"}},"required":["approver_id","approver_name","approver_title","can_decide","content_sha256","decided_at","note","proposed_inputs","requested_at","requested_by_id","requested_by_name","status","subject_id","subject_type","uid"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Send the period's figures back with a note","tags":["reports"]}},"/reports/periods/{period_id}/checks/":{"post":{"description":"Store a fresh set of findings and return them.","operationId":"post_reports_periods_period_id_checks","parameters":[{"in":"path","name":"period_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"period_status":{"type":"string"},"runs":{"items":{"properties":{"blocking_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"findings":{"items":{"properties":{"acknowledgement":{"nullable":true,"properties":{"at":{"format":"date-time","type":"string"},"by":{"type":"string"},"note":{"type":"string"}},"required":["at","by","note"],"type":"object"},"can_acknowledge":{"type":"boolean"},"code":{"type":"string"},"id":{"type":"integer"},"message":{"type":"string"},"record_id":{"type":"string"},"record_link":{"type":"string"},"record_type":{"type":"string"},"severity":{"type":"string"},"sku_code":{"type":"string"}},"required":["acknowledgement","can_acknowledge","code","id","message","record_id","record_link","record_type","severity","sku_code"],"type":"object"},"type":"array"},"format_id":{"type":"string"},"generation_status":{"type":"string"},"id":{"type":"integer"},"info_count":{"type":"integer"},"kind":{"type":"string"},"unchecked_rules":{"items":{"type":"string"},"type":"array"},"warning_count":{"type":"integer"}},"required":["blocking_count","created_at","findings","format_id","generation_status","id","info_count","kind","unchecked_rules","warning_count"],"type":"object"},"type":"array"}},"required":["period_status","runs"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Store a fresh set of findings and return them","tags":["reports"]}},"/reports/periods/{period_id}/findings/":{"get":{"description":"Return the newest run per format, each with its findings.","operationId":"get_reports_periods_period_id_findings","parameters":[{"in":"path","name":"period_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"runs":{"items":{"properties":{"blocking_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"findings":{"items":{"properties":{"acknowledgement":{"nullable":true,"properties":{"at":{"format":"date-time","type":"string"},"by":{"type":"string"},"note":{"type":"string"}},"required":["at","by","note"],"type":"object"},"can_acknowledge":{"type":"boolean"},"code":{"type":"string"},"id":{"type":"integer"},"message":{"type":"string"},"record_id":{"type":"string"},"record_link":{"type":"string"},"record_type":{"type":"string"},"severity":{"type":"string"},"sku_code":{"type":"string"}},"required":["acknowledgement","can_acknowledge","code","id","message","record_id","record_link","record_type","severity","sku_code"],"type":"object"},"type":"array"},"format_id":{"type":"string"},"generation_status":{"type":"string"},"id":{"type":"integer"},"info_count":{"type":"integer"},"kind":{"type":"string"},"unchecked_rules":{"items":{"type":"string"},"type":"array"},"warning_count":{"type":"integer"}},"required":["blocking_count","created_at","findings","format_id","generation_status","id","info_count","kind","unchecked_rules","warning_count"],"type":"object"},"type":"array"}},"required":["runs"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the newest run per format, each with its findings","tags":["reports"]}},"/reports/periods/{period_id}/findings/{finding_id}/acknowledge/":{"post":{"description":"Record that a reviewer read a warning or note from the latest checks and why it is accepted. The note is audited and stays with the finding on later check runs. A blocking finding answers 400 ``finding_blocking``, a finding not in the latest checks 404 ``finding_not_found`` and a locked period 409 ``record_locked``.","operationId":"post_reports_periods_period_id_findings_finding_id_acknowledge","parameters":[{"in":"path","name":"finding_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"period_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcknowledgeRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/AcknowledgeRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AcknowledgeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"acknowledgement":{"nullable":true,"properties":{"at":{"format":"date-time","type":"string"},"by":{"type":"string"},"note":{"type":"string"}},"required":["at","by","note"],"type":"object"},"can_acknowledge":{"type":"boolean"},"code":{"type":"string"},"id":{"type":"integer"},"message":{"type":"string"},"record_id":{"type":"string"},"record_link":{"type":"string"},"record_type":{"type":"string"},"severity":{"type":"string"},"sku_code":{"type":"string"}},"required":["acknowledgement","can_acknowledge","code","id","message","record_id","record_link","record_type","severity","sku_code"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Acknowledge a warning or note with a note; blocking findings and locked periods are refused","tags":["reports"]}},"/reports/periods/{period_id}/inputs/":{"get":{"description":"Return the recorded header values.","operationId":"get_reports_periods_period_id_inputs","parameters":[{"in":"path","name":"period_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"values":{"additionalProperties":{"type":"string"},"type":"object"}},"required":["values"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the recorded header values","tags":["reports"]},"put":{"description":"Set or clear header values; a locked period answers 409 ``record_locked``.","operationId":"put_reports_periods_period_id_inputs","parameters":[{"in":"path","name":"period_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InputsWriteRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/InputsWriteRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InputsWriteRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"values":{"additionalProperties":{"type":"string"},"type":"object"}},"required":["values"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Set or clear header values; a locked period answers 409 `record_locked`","tags":["reports"]}},"/reports/periods/{period_id}/journal/{tool}/":{"get":{"description":"Download the period's estimated fee accrual as a manual-journal CSV in the tool's import format. Optional query parameters: expense_account, liability_account, date_style (dmy, mdy or iso).","operationId":"get_reports_periods_period_id_journal_tool","parameters":[{"in":"path","name":"period_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"tool","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Download a period's fee accrual journal for Xero, QuickBooks Online or NetSuite","tags":["EPR"]}},"/reports/periods/{period_id}/lock/":{"post":{"description":"Seal one version per format and return them.","operationId":"post_reports_periods_period_id_lock","parameters":[{"in":"path","name":"period_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"period_status":{"type":"string"},"versions":{"items":{"properties":{"attestation_statement":{"properties":{"text":{"type":"string"},"version":{"type":"string"}},"required":["text","version"],"type":"object"},"attestations":{"items":{"properties":{"attested_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"signature_font":{"type":"string"},"signature_image":{"nullable":true,"type":"string"},"signature_method":{"type":"string"},"signer_name":{"type":"string"},"signer_title":{"type":"string"},"statement":{"type":"string"},"statement_version":{"type":"string"}},"required":["attested_at","id","signature_font","signature_image","signature_method","signer_name","signer_title","statement","statement_version"],"type":"object"},"type":"array"},"file_content_type":{"nullable":true,"type":"string"},"file_kind":{"type":"string"},"file_name":{"nullable":true,"type":"string"},"file_sha256":{"nullable":true,"type":"string"},"format_id":{"type":"string"},"format_name":{"type":"string"},"has_file":{"type":"boolean"},"has_pdf":{"type":"boolean"},"id":{"type":"integer"},"layout":{"additionalProperties":true,"type":"object"},"locked_at":{"format":"date-time","type":"string"},"period_id":{"type":"integer"},"row_count":{"type":"integer"},"seal_status":{"type":"string"},"signature":{"nullable":true,"properties":{"algorithm":{"type":"string"},"key_id":{"type":"string"}},"type":"object"},"snapshot_sha256":{"type":"string"},"superseded_by":{"nullable":true,"type":"integer"},"verify_path":{"type":"string"},"version_number":{"type":"integer"}},"required":["attestation_statement","attestations","file_content_type","file_kind","file_name","file_sha256","format_id","format_name","has_file","has_pdf","id","layout","locked_at","period_id","row_count","seal_status","signature","snapshot_sha256","superseded_by","verify_path","version_number"],"type":"object"},"type":"array"}},"required":["period_status","versions"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Seal one version per format and return them","tags":["reports"]}},"/reports/periods/{period_id}/methodology/":{"get":{"description":"Return the document as JSON (default), HTML or PDF; ``file_format`` is accepted as an alias of ``kind``.\n\nA locked, submitted or closed period answers with the document sealed with its latest version, not one rebuilt from today's evidence.\n\nWith ``display=reader`` the JSON is the screen's copy: each gap gains ``display_message`` in the request's language. The download without it stays the sealed English document.\n\nAn unknown kind is 400 ``unsupported_format``; a PDF that could not be rendered is 409 ``pdf_unavailable``.","operationId":"get_reports_periods_period_id_methodology","parameters":[{"in":"path","name":"period_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"allocation":{},"assumptions":{},"content_sha256":{"type":"string"},"entity":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"estimation":{},"formats":{},"gaps":{},"jurisdiction":{"properties":{"code":{"type":"string"}},"type":"object"},"lines":{},"methodology_version":{"type":"string"},"period":{"properties":{"end":{"type":"string"},"start":{"type":"string"}},"type":"object"},"quality":{},"rule_references":{},"sampling":{},"sources":{},"statement":{"type":"string"},"unit_conversions":{}},"required":["content_sha256","entity","jurisdiction","methodology_version","period","statement"],"type":"object"}},"application/pdf":{"schema":{"format":"binary","type":"string"}},"text/html":{"schema":{"type":"string"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflicts with the current state."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the document as JSON (default), HTML or PDF","tags":["reports"]}},"/reports/second-approval/":{"get":{"description":"Return whether a second approval is required before locking a report or exporting an estimate.","operationId":"get_reports_second_approval","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"require_second_approval":{"type":"boolean"}},"required":["require_second_approval"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return whether a second approval is required","tags":["reports"]},"put":{"description":"Turn the second-approval requirement on or off. The change is recorded in the audit log.","operationId":"put_reports_second_approval","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"require_second_approval":{"type":"boolean"}},"required":["require_second_approval"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"require_second_approval":{"type":"boolean"}},"required":["require_second_approval"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Turn the second-approval requirement on or off","tags":["reports"]}},"/reports/versions/{version_id}/":{"get":{"description":"Return the version; another organisation's version is a 404.","operationId":"get_reports_versions_version_id","parameters":[{"in":"path","name":"version_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attestation_statement":{"properties":{"text":{"type":"string"},"version":{"type":"string"}},"required":["text","version"],"type":"object"},"attestations":{"items":{"properties":{"attested_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"signature_font":{"type":"string"},"signature_image":{"nullable":true,"type":"string"},"signature_method":{"type":"string"},"signer_name":{"type":"string"},"signer_title":{"type":"string"},"statement":{"type":"string"},"statement_version":{"type":"string"}},"required":["attested_at","id","signature_font","signature_image","signature_method","signer_name","signer_title","statement","statement_version"],"type":"object"},"type":"array"},"file_content_type":{"nullable":true,"type":"string"},"file_kind":{"type":"string"},"file_name":{"nullable":true,"type":"string"},"file_sha256":{"nullable":true,"type":"string"},"format_id":{"type":"string"},"format_name":{"type":"string"},"has_file":{"type":"boolean"},"has_pdf":{"type":"boolean"},"id":{"type":"integer"},"layout":{"additionalProperties":true,"type":"object"},"locked_at":{"format":"date-time","type":"string"},"period_id":{"type":"integer"},"row_count":{"type":"integer"},"seal_status":{"type":"string"},"signature":{"nullable":true,"properties":{"algorithm":{"type":"string"},"key_id":{"type":"string"}},"type":"object"},"snapshot":{},"snapshot_sha256":{"type":"string"},"superseded_by":{"nullable":true,"type":"integer"},"verify_path":{"type":"string"},"version_number":{"type":"integer"}},"required":["attestation_statement","attestations","file_content_type","file_kind","file_name","file_sha256","format_id","format_name","has_file","has_pdf","id","layout","locked_at","period_id","row_count","seal_status","signature","snapshot","snapshot_sha256","superseded_by","verify_path","version_number"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the version; another organisation's version is a 404","tags":["reports"]}},"/reports/versions/{version_id}/attest/":{"post":{"description":"Record name, title, drawn or typed signature and time; needs the signing right (403 ``signer_not_authorised`` otherwise) and a paid plan (402 ``plan_required`` on Free). A refused signature is 400 (``signature_blank``, ``signature_image_invalid``, ``signature_name_mismatch``). Send the ``statement_version`` you showed the signer; a statement that changed since is 409 ``statement_changed``.","operationId":"post_reports_versions_version_id_attest","parameters":[{"in":"path","name":"version_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/AttestRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AttestRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attested_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"signature_font":{"type":"string"},"signature_image":{"nullable":true,"type":"string"},"signature_method":{"type":"string"},"signer_name":{"type":"string"},"signer_title":{"type":"string"},"statement":{"type":"string"},"statement_version":{"type":"string"}},"required":["attested_at","id","signature_font","signature_image","signature_method","signer_name","signer_title","statement","statement_version"],"type":"object"}}},"description":"Created."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"description":"The current plan does not allow this."},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Record name, title, signature and time; needs the signing right (403 `signer_not_authorised`) and a paid plan (402)","tags":["reports"]}},"/reports/versions/{version_id}/diff/":{"get":{"description":"Return the stored diff, or 404 when this is the first version.","operationId":"get_reports_versions_version_id_diff","parameters":[{"in":"path","name":"version_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"diff":{"additionalProperties":true,"type":"object"},"from_number":{"type":"integer"},"from_version":{"type":"integer"},"reason":{"type":"string"},"to_number":{"type":"integer"},"to_version":{"type":"integer"}},"required":["created_at","diff","from_number","from_version","reason","to_number","to_version"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the stored diff, or 404 when this is the first version","tags":["reports"]}},"/reports/versions/{version_id}/file/":{"get":{"description":"Stream the prepared file and audit the export.","operationId":"get_reports_versions_version_id_file","parameters":[{"in":"path","name":"version_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"description":"The current plan does not allow this."},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflicts with the current state."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Stream the prepared file and audit the export","tags":["reports"]}},"/reports/versions/{version_id}/methodology/":{"get":{"description":"Return the note as Markdown (default), HTML or PDF; PDF is 409 when it could not be rendered.","operationId":"get_reports_versions_version_id_methodology","parameters":[{"in":"path","name":"version_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}},"text/html":{"schema":{"format":"binary","type":"string"}},"text/markdown":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the note as Markdown (default), HTML or PDF; PDF is 409 when it could not be rendered","tags":["reports"]}},"/reusable-supply":{"get":{"description":"List the new units of reusable components first supplied in a period. Great Britain counts reusable packaging when it is first supplied, so these rows replace units sold.","operationId":"get_reusable_supply","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"component":{"type":"integer"},"component_name":{"type":"string"},"id":{"type":"integer"},"jurisdiction_code":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"spec":{"type":"integer"},"spec_name":{"type":"string"},"units_supplied":{"type":"integer"}},"required":["component","component_name","id","jurisdiction_code","period_end","period_start","spec","spec_name","units_supplied"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List the reusable units first supplied","tags":["EPR"]},"post":{"description":"Record the new units of one reusable component first supplied into a place in a period.","operationId":"post_reusable_supply","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReusableSupplyInputRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ReusableSupplyInputRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ReusableSupplyInputRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"component":{"type":"integer"},"component_name":{"type":"string"},"id":{"type":"integer"},"jurisdiction_code":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"spec":{"type":"integer"},"spec_name":{"type":"string"},"units_supplied":{"type":"integer"}},"required":["component","component_name","id","jurisdiction_code","period_end","period_start","spec","spec_name","units_supplied"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Record reusable units first supplied","tags":["EPR"]}},"/reusable-supply/{id}":{"delete":{"description":"Delete one reusable supply row.","operationId":"delete_reusable_supply_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Delete reusable units first supplied","tags":["EPR"]},"patch":{"description":"Edit the component, place, period or units of one reusable supply row.","operationId":"patch_reusable_supply_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedReusableSupplyInputRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedReusableSupplyInputRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedReusableSupplyInputRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"component":{"type":"integer"},"component_name":{"type":"string"},"id":{"type":"integer"},"jurisdiction_code":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"spec":{"type":"integer"},"spec_name":{"type":"string"},"units_supplied":{"type":"integer"}},"required":["component","component_name","id","jurisdiction_code","period_end","period_start","spec","spec_name","units_supplied"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Edit reusable units first supplied","tags":["EPR"]}},"/sampling/estimates":{"get":{"description":"List estimates (``?component=``).","operationId":"get_sampling_estimates","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"basis":{"additionalProperties":true,"type":"object"},"component_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"data_quality_tier":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"grams":{"type":"string"},"id":{"type":"integer"},"kind":{"type":"string"},"method":{"type":"string"},"source_url":{"type":"string"},"status":{"type":"string"}},"required":["basis","component_id","created_at","data_quality_tier","decided_at","grams","id","kind","method","source_url","status"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List estimates","tags":["EPR"]},"post":{"description":"Propose an estimate for a component from ``supplier_declaration`` or ``similar_component``. No cited industry-average table ships, so no industry-average proposal is offered.","operationId":"post_sampling_estimates","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"component_id":{"oneOf":[{"type":"integer"},{"type":"string"}]},"kind":{"enum":["supplier_declaration","similar_component"],"type":"string"}},"required":["component_id","kind"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"estimate":{"additionalProperties":true,"nullable":true,"type":"object"},"missing":{"type":"string"},"status":{"type":"string"}},"required":["estimate","missing","status"],"type":"object"}}},"description":"Success."},"201":{"content":{"application/json":{"schema":{"properties":{"estimate":{"properties":{"basis":{"additionalProperties":true,"type":"object"},"component_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"data_quality_tier":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"grams":{"type":"string"},"id":{"type":"integer"},"kind":{"type":"string"},"method":{"type":"string"},"source_url":{"type":"string"},"status":{"type":"string"}},"required":["basis","component_id","created_at","data_quality_tier","decided_at","grams","id","kind","method","source_url","status"],"type":"object"},"missing":{"type":"string"},"status":{"type":"string"}},"required":["estimate","missing","status"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Propose an estimate for a component from `supplier_declaration`","tags":["EPR"]}},"/sampling/estimates/{id}/accept":{"post":{"description":"Apply the estimate to the component (never over a measured weight).","operationId":"post_sampling_estimates_id_accept","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"basis":{"additionalProperties":true,"type":"object"},"component_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"data_quality_tier":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"grams":{"type":"string"},"id":{"type":"integer"},"kind":{"type":"string"},"method":{"type":"string"},"source_url":{"type":"string"},"status":{"type":"string"}},"required":["basis","component_id","created_at","data_quality_tier","decided_at","grams","id","kind","method","source_url","status"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Apply the estimate to the component (never over a measured weight)","tags":["EPR"]}},"/sampling/estimates/{id}/reject":{"post":{"description":"Reject the estimate; the component is untouched.","operationId":"post_sampling_estimates_id_reject","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"basis":{"additionalProperties":true,"type":"object"},"component_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"data_quality_tier":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"grams":{"type":"string"},"id":{"type":"integer"},"kind":{"type":"string"},"method":{"type":"string"},"source_url":{"type":"string"},"status":{"type":"string"}},"required":["basis","component_id","created_at","data_quality_tier","decided_at","grams","id","kind","method","source_url","status"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Reject the estimate; the component is untouched","tags":["EPR"]}},"/sampling/plans":{"get":{"description":"List plans.","operationId":"get_sampling_plans","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"assumed_cv":{"nullable":true,"type":"string"},"baseline_at":{"format":"date-time","nullable":true,"type":"string"},"confidence_percent":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"drift_z_threshold":{"nullable":true,"type":"string"},"extrapolated_tier":{"type":"string"},"family_id":{"nullable":true,"type":"integer"},"formula":{"type":"string"},"id":{"type":"integer"},"margin_percent":{"nullable":true,"type":"string"},"method":{"type":"string"},"name":{"type":"string"},"population_size":{"type":"integer"},"rationale":{"type":"string"},"sample_size":{"type":"integer"},"spec_id":{"nullable":true,"type":"integer"},"status":{"type":"string"},"strata":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["assumed_cv","baseline_at","confidence_percent","created_at","drift_z_threshold","extrapolated_tier","family_id","formula","id","margin_percent","method","name","population_size","rationale","sample_size","spec_id","status","strata"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List plans","tags":["EPR"]},"post":{"description":"Create a plan; strata and sizes follow the stated formula.","operationId":"post_sampling_plans","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"assumed_cv":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"string"}]},"confidence_percent":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"string"}]},"drift_z_threshold":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"string"}]},"family_id":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"string"}]},"margin_percent":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"string"}]},"name":{"type":"string"},"spec_id":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"string"}]}},"required":["name"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"assumed_cv":{"nullable":true,"type":"string"},"baseline_at":{"format":"date-time","nullable":true,"type":"string"},"confidence_percent":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"drift_z_threshold":{"nullable":true,"type":"string"},"extrapolated_tier":{"type":"string"},"family_id":{"nullable":true,"type":"integer"},"formula":{"type":"string"},"id":{"type":"integer"},"margin_percent":{"nullable":true,"type":"string"},"method":{"type":"string"},"name":{"type":"string"},"population_size":{"type":"integer"},"rationale":{"type":"string"},"sample_size":{"type":"integer"},"spec_id":{"nullable":true,"type":"integer"},"status":{"type":"string"},"strata":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["assumed_cv","baseline_at","confidence_percent","created_at","drift_z_threshold","extrapolated_tier","family_id","formula","id","margin_percent","method","name","population_size","rationale","sample_size","spec_id","status","strata"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a plan; strata and sizes follow the stated formula","tags":["EPR"]}},"/sampling/plans/{id}":{"get":{"description":"Return the plan, its draws, per-stratum variance, open triggers and the tier rollup.","operationId":"get_sampling_plans_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assumed_cv":{"nullable":true,"type":"string"},"baseline_at":{"format":"date-time","nullable":true,"type":"string"},"confidence_percent":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"draws":{"items":{"properties":{"component_id":{"type":"integer"},"component_name":{"type":"string"},"grams":{"nullable":true,"type":"string"},"id":{"type":"integer"},"measurement_id":{"nullable":true,"type":"integer"},"status":{"type":"string"},"stratum_key":{"type":"string"}},"required":["component_id","component_name","grams","id","measurement_id","status","stratum_key"],"type":"object"},"type":"array"},"drift_z_threshold":{"nullable":true,"type":"string"},"extrapolated_tier":{"type":"string"},"family_id":{"nullable":true,"type":"integer"},"formula":{"type":"string"},"id":{"type":"integer"},"margin_percent":{"nullable":true,"type":"string"},"method":{"type":"string"},"name":{"type":"string"},"population_size":{"type":"integer"},"rationale":{"type":"string"},"sample_size":{"type":"integer"},"spec_id":{"nullable":true,"type":"integer"},"status":{"type":"string"},"strata":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"tier_rollup":{"properties":{"counts":{"additionalProperties":{"type":"integer"},"type":"object"},"missing":{"type":"integer"},"tier":{"type":"string"}},"required":["counts","missing","tier"],"type":"object"},"triggers":{"items":{"properties":{"clear_note":{"type":"string"},"cleared_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"detail":{"additionalProperties":true,"type":"object"},"flag_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"plan_id":{"nullable":true,"type":"integer"},"reason":{"type":"string"},"stratum_key":{"type":"string"}},"required":["clear_note","cleared_at","created_at","detail","flag_id","id","plan_id","reason","stratum_key"],"type":"object"},"type":"array"},"variance":{"items":{"properties":{"cv":{"nullable":true,"type":"string"},"key":{"type":"string"},"mean":{"nullable":true,"type":"string"},"measured":{"type":"integer"},"planned":{"type":"integer"},"population":{"type":"integer"},"required_at_observed_cv":{"nullable":true,"type":"integer"},"sd":{"nullable":true,"type":"string"},"sufficient":{"type":"boolean"}},"required":["cv","key","mean","measured","planned","population","required_at_observed_cv","sd","sufficient"],"type":"object"},"type":"array"}},"required":["assumed_cv","baseline_at","confidence_percent","created_at","draws","drift_z_threshold","extrapolated_tier","family_id","formula","id","margin_percent","method","name","population_size","rationale","sample_size","spec_id","status","strata","tier_rollup","triggers","variance"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the plan, its draws, per-stratum variance, open triggers and the tier rollup","tags":["EPR"]}},"/sampling/plans/{id}/baseline":{"post":{"description":"Freeze the current statistics as the baseline.","operationId":"post_sampling_plans_id_baseline","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assumed_cv":{"nullable":true,"type":"string"},"baseline_at":{"format":"date-time","nullable":true,"type":"string"},"confidence_percent":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"drift_z_threshold":{"nullable":true,"type":"string"},"extrapolated_tier":{"type":"string"},"family_id":{"nullable":true,"type":"integer"},"formula":{"type":"string"},"id":{"type":"integer"},"margin_percent":{"nullable":true,"type":"string"},"method":{"type":"string"},"name":{"type":"string"},"population_size":{"type":"integer"},"rationale":{"type":"string"},"sample_size":{"type":"integer"},"spec_id":{"nullable":true,"type":"integer"},"status":{"type":"string"},"strata":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["assumed_cv","baseline_at","confidence_percent","created_at","drift_z_threshold","extrapolated_tier","family_id","formula","id","margin_percent","method","name","population_size","rationale","sample_size","spec_id","status","strata"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Freeze the current statistics as the baseline","tags":["EPR"]}},"/sampling/plans/{id}/check":{"post":{"description":"Compare strata to the baseline and open re-measure triggers.","operationId":"post_sampling_plans_id_check","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"opened":{"items":{"properties":{"clear_note":{"type":"string"},"cleared_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"detail":{"additionalProperties":true,"type":"object"},"flag_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"plan_id":{"nullable":true,"type":"integer"},"reason":{"type":"string"},"stratum_key":{"type":"string"}},"required":["clear_note","cleared_at","created_at","detail","flag_id","id","plan_id","reason","stratum_key"],"type":"object"},"type":"array"}},"required":["opened"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Compare strata to the baseline and open re-measure triggers","tags":["EPR"]}},"/sampling/plans/{id}/draw":{"post":{"description":"Draw (or top up) the deterministic sample for each stratum.","operationId":"post_sampling_plans_id_draw","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"component_id":{"type":"integer"},"component_name":{"type":"string"},"grams":{"nullable":true,"type":"string"},"id":{"type":"integer"},"measurement_id":{"nullable":true,"type":"integer"},"status":{"type":"string"},"stratum_key":{"type":"string"}},"required":["component_id","component_name","grams","id","measurement_id","status","stratum_key"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Draw (or top up) the deterministic sample for each stratum","tags":["EPR"]}},"/sampling/plans/{id}/sync":{"post":{"description":"Link pending draws to measurements confirmed since they were drawn.","operationId":"post_sampling_plans_id_sync","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"linked":{"type":"integer"}},"required":["linked"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Link pending draws to measurements confirmed since they were drawn","tags":["EPR"]}},"/sampling/triggers":{"get":{"description":"List triggers (``?open=true`` for uncleared only).","operationId":"get_sampling_triggers","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"clear_note":{"type":"string"},"cleared_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"detail":{"additionalProperties":true,"type":"object"},"flag_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"plan_id":{"nullable":true,"type":"integer"},"reason":{"type":"string"},"stratum_key":{"type":"string"}},"required":["clear_note","cleared_at","created_at","detail","flag_id","id","plan_id","reason","stratum_key"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List triggers","tags":["EPR"]}},"/sampling/triggers/{id}/clear":{"post":{"description":"Clear with a note (re-measured, or why the change does not matter).","operationId":"post_sampling_triggers_id_clear","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"note":{"type":"string"}},"required":["note"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"clear_note":{"type":"string"},"cleared_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"detail":{"additionalProperties":true,"type":"object"},"flag_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"plan_id":{"nullable":true,"type":"integer"},"reason":{"type":"string"},"stratum_key":{"type":"string"}},"required":["clear_note","cleared_at","created_at","detail","flag_id","id","plan_id","reason","stratum_key"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Clear with a note (re-measured, or why the change does not matter)","tags":["EPR"]}},"/sampling/triggers/{id}/remeasure":{"post":{"description":"Put the stratum's draws back to pending.","operationId":"post_sampling_triggers_id_remeasure","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"requeued":{"type":"integer"}},"required":["requeued"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Put the stratum's draws back to pending","tags":["EPR"]}},"/sandbox":{"get":{"description":"Return the sandbox, or null when none has been created yet.","operationId":"get_sandbox","responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Sandbox"}],"nullable":true}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Get the sandbox organization","tags":["EPR access"]},"post":{"description":"Creates an isolated sandbox for test-mode keys (`ik_test_`). Sandbox data never mixes with live data, is never billed and is never submitted. Returns the existing sandbox when one exists.","operationId":"post_sandbox","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}},"description":""},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create the sandbox organization","tags":["EPR access"]}},"/scim/v2/Groups":{"get":{"description":"List groups.","operationId":"get_scim_v2_Groups","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"Resources":{"items":{"properties":{"displayName":{"type":"string"},"externalId":{"type":"string"},"id":{"type":"string"},"members":{"items":{"properties":{"display":{"type":"string"},"value":{"type":"string"}},"required":["display","value"],"type":"object"},"type":"array"},"meta":{"properties":{"resourceType":{"type":"string"}},"required":["resourceType"],"type":"object"},"schemas":{"items":{"type":"string"},"type":"array"}},"required":["displayName","externalId","id","members","meta","schemas"],"type":"object"},"type":"array"},"itemsPerPage":{"type":"integer"},"schemas":{"items":{"type":"string"},"type":"array"},"startIndex":{"type":"integer"},"totalResults":{"type":"integer"}},"required":["Resources","itemsPerPage","schemas","startIndex","totalResults"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List groups","tags":["scim"]},"post":{"description":"Create a group.","operationId":"post_scim_v2_Groups","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"displayName":{"type":"string"},"externalId":{"type":"string"},"members":{"items":{"additionalProperties":true,"properties":{"display":{"type":"string"},"value":{"type":"string"}},"required":["value"],"type":"object"},"type":"array"},"schemas":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"application/scim+json":{"schema":{"additionalProperties":true,"properties":{"displayName":{"type":"string"},"externalId":{"type":"string"},"members":{"items":{"additionalProperties":true,"properties":{"display":{"type":"string"},"value":{"type":"string"}},"required":["value"],"type":"object"},"type":"array"},"schemas":{"items":{"type":"string"},"type":"array"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"displayName":{"type":"string"},"externalId":{"type":"string"},"id":{"type":"string"},"members":{"items":{"properties":{"display":{"type":"string"},"value":{"type":"string"}},"required":["display","value"],"type":"object"},"type":"array"},"meta":{"properties":{"resourceType":{"type":"string"}},"required":["resourceType"],"type":"object"},"schemas":{"items":{"type":"string"},"type":"array"}},"required":["displayName","externalId","id","members","meta","schemas"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a group","tags":["scim"]}},"/scim/v2/Groups/{uid}":{"delete":{"description":"Delete the group (members keep their memberships).","operationId":"delete_scim_v2_Groups_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Delete the group (members keep their memberships)","tags":["scim"]},"get":{"description":"One group.","operationId":"get_scim_v2_Groups_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"displayName":{"type":"string"},"externalId":{"type":"string"},"id":{"type":"string"},"members":{"items":{"properties":{"display":{"type":"string"},"value":{"type":"string"}},"required":["display","value"],"type":"object"},"type":"array"},"meta":{"properties":{"resourceType":{"type":"string"}},"required":["resourceType"],"type":"object"},"schemas":{"items":{"type":"string"},"type":"array"}},"required":["displayName","externalId","id","members","meta","schemas"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Get a SCIM group","tags":["scim"]},"patch":{"description":"Patch.","operationId":"patch_scim_v2_Groups_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"Operations":{"items":{"additionalProperties":true,"properties":{"op":{"type":"string"},"path":{"type":"string"},"value":{}},"required":["op"],"type":"object"},"type":"array"},"schemas":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"application/scim+json":{"schema":{"additionalProperties":true,"properties":{"Operations":{"items":{"additionalProperties":true,"properties":{"op":{"type":"string"},"path":{"type":"string"},"value":{}},"required":["op"],"type":"object"},"type":"array"},"schemas":{"items":{"type":"string"},"type":"array"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"displayName":{"type":"string"},"externalId":{"type":"string"},"id":{"type":"string"},"members":{"items":{"properties":{"display":{"type":"string"},"value":{"type":"string"}},"required":["display","value"],"type":"object"},"type":"array"},"meta":{"properties":{"resourceType":{"type":"string"}},"required":["resourceType"],"type":"object"},"schemas":{"items":{"type":"string"},"type":"array"}},"required":["displayName","externalId","id","members","meta","schemas"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Patch a SCIM group","tags":["scim"]},"put":{"description":"Replace.","operationId":"put_scim_v2_Groups_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"displayName":{"type":"string"},"externalId":{"type":"string"},"members":{"items":{"additionalProperties":true,"properties":{"display":{"type":"string"},"value":{"type":"string"}},"required":["value"],"type":"object"},"type":"array"},"schemas":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"application/scim+json":{"schema":{"additionalProperties":true,"properties":{"displayName":{"type":"string"},"externalId":{"type":"string"},"members":{"items":{"additionalProperties":true,"properties":{"display":{"type":"string"},"value":{"type":"string"}},"required":["value"],"type":"object"},"type":"array"},"schemas":{"items":{"type":"string"},"type":"array"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"displayName":{"type":"string"},"externalId":{"type":"string"},"id":{"type":"string"},"members":{"items":{"properties":{"display":{"type":"string"},"value":{"type":"string"}},"required":["display","value"],"type":"object"},"type":"array"},"meta":{"properties":{"resourceType":{"type":"string"}},"required":["resourceType"],"type":"object"},"schemas":{"items":{"type":"string"},"type":"array"}},"required":["displayName","externalId","id","members","meta","schemas"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Replace a SCIM group","tags":["scim"]}},"/scim/v2/ResourceTypes":{"get":{"description":"Resource types.","operationId":"get_scim_v2_ResourceTypes","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"Resources":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"itemsPerPage":{"type":"integer"},"schemas":{"items":{"type":"string"},"type":"array"},"startIndex":{"type":"integer"},"totalResults":{"type":"integer"}},"required":["Resources","itemsPerPage","schemas","startIndex","totalResults"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Resource types","tags":["scim"]}},"/scim/v2/Schemas":{"get":{"description":"Schemas.","operationId":"get_scim_v2_Schemas","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"Resources":{"items":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"},"itemsPerPage":{"type":"integer"},"schemas":{"items":{"type":"string"},"type":"array"},"startIndex":{"type":"integer"},"totalResults":{"type":"integer"}},"required":["Resources","itemsPerPage","schemas","startIndex","totalResults"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List the SCIM schemas","tags":["scim"]}},"/scim/v2/ServiceProviderConfig":{"get":{"description":"Capabilities.","operationId":"get_scim_v2_ServiceProviderConfig","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Capabilities","tags":["scim"]}},"/scim/v2/Users":{"get":{"description":"List provisioned users.","operationId":"get_scim_v2_Users","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"Resources":{"items":{"properties":{"active":{"type":"boolean"},"emails":{"items":{"properties":{"primary":{"type":"boolean"},"value":{"type":"string"}},"required":["primary","value"],"type":"object"},"type":"array"},"externalId":{"type":"string"},"id":{"type":"string"},"meta":{"properties":{"resourceType":{"type":"string"}},"required":["resourceType"],"type":"object"},"name":{"properties":{"familyName":{"type":"string"},"givenName":{"type":"string"}},"required":["familyName","givenName"],"type":"object"},"schemas":{"items":{"type":"string"},"type":"array"},"userName":{"type":"string"}},"required":["active","emails","externalId","id","meta","name","schemas","userName"],"type":"object"},"type":"array"},"itemsPerPage":{"type":"integer"},"schemas":{"items":{"type":"string"},"type":"array"},"startIndex":{"type":"integer"},"totalResults":{"type":"integer"}},"required":["Resources","itemsPerPage","schemas","startIndex","totalResults"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List provisioned users","tags":["scim"]},"post":{"description":"Provision a user.","operationId":"post_scim_v2_Users","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"active":{"type":"boolean"},"emails":{"items":{"additionalProperties":true,"properties":{"primary":{"type":"boolean"},"value":{"type":"string"}},"type":"object"},"type":"array"},"externalId":{"type":"string"},"name":{"additionalProperties":true,"properties":{"familyName":{"type":"string"},"givenName":{"type":"string"}},"type":"object"},"schemas":{"items":{"type":"string"},"type":"array"},"userName":{"type":"string"}},"type":"object"}},"application/scim+json":{"schema":{"additionalProperties":true,"properties":{"active":{"type":"boolean"},"emails":{"items":{"additionalProperties":true,"properties":{"primary":{"type":"boolean"},"value":{"type":"string"}},"type":"object"},"type":"array"},"externalId":{"type":"string"},"name":{"additionalProperties":true,"properties":{"familyName":{"type":"string"},"givenName":{"type":"string"}},"type":"object"},"schemas":{"items":{"type":"string"},"type":"array"},"userName":{"type":"string"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"active":{"type":"boolean"},"emails":{"items":{"properties":{"primary":{"type":"boolean"},"value":{"type":"string"}},"required":["primary","value"],"type":"object"},"type":"array"},"externalId":{"type":"string"},"id":{"type":"string"},"meta":{"properties":{"resourceType":{"type":"string"}},"required":["resourceType"],"type":"object"},"name":{"properties":{"familyName":{"type":"string"},"givenName":{"type":"string"}},"required":["familyName","givenName"],"type":"object"},"schemas":{"items":{"type":"string"},"type":"array"},"userName":{"type":"string"}},"required":["active","emails","externalId","id","meta","name","schemas","userName"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Provision a user","tags":["scim"]}},"/scim/v2/Users/{uid}":{"delete":{"description":"Deprovision (deactivate, never delete data).","operationId":"delete_scim_v2_Users_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Deprovision (deactivate, never delete data)","tags":["scim"]},"get":{"description":"One user.","operationId":"get_scim_v2_Users_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"active":{"type":"boolean"},"emails":{"items":{"properties":{"primary":{"type":"boolean"},"value":{"type":"string"}},"required":["primary","value"],"type":"object"},"type":"array"},"externalId":{"type":"string"},"id":{"type":"string"},"meta":{"properties":{"resourceType":{"type":"string"}},"required":["resourceType"],"type":"object"},"name":{"properties":{"familyName":{"type":"string"},"givenName":{"type":"string"}},"required":["familyName","givenName"],"type":"object"},"schemas":{"items":{"type":"string"},"type":"array"},"userName":{"type":"string"}},"required":["active","emails","externalId","id","meta","name","schemas","userName"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Get a SCIM user","tags":["scim"]},"patch":{"description":"Patch.","operationId":"patch_scim_v2_Users_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"Operations":{"items":{"additionalProperties":true,"properties":{"op":{"type":"string"},"path":{"type":"string"},"value":{}},"required":["op"],"type":"object"},"type":"array"},"schemas":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"application/scim+json":{"schema":{"additionalProperties":true,"properties":{"Operations":{"items":{"additionalProperties":true,"properties":{"op":{"type":"string"},"path":{"type":"string"},"value":{}},"required":["op"],"type":"object"},"type":"array"},"schemas":{"items":{"type":"string"},"type":"array"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"active":{"type":"boolean"},"emails":{"items":{"properties":{"primary":{"type":"boolean"},"value":{"type":"string"}},"required":["primary","value"],"type":"object"},"type":"array"},"externalId":{"type":"string"},"id":{"type":"string"},"meta":{"properties":{"resourceType":{"type":"string"}},"required":["resourceType"],"type":"object"},"name":{"properties":{"familyName":{"type":"string"},"givenName":{"type":"string"}},"required":["familyName","givenName"],"type":"object"},"schemas":{"items":{"type":"string"},"type":"array"},"userName":{"type":"string"}},"required":["active","emails","externalId","id","meta","name","schemas","userName"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Patch a SCIM user","tags":["scim"]},"put":{"description":"Replace.","operationId":"put_scim_v2_Users_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"active":{"type":"boolean"},"emails":{"items":{"additionalProperties":true,"properties":{"primary":{"type":"boolean"},"value":{"type":"string"}},"type":"object"},"type":"array"},"externalId":{"type":"string"},"name":{"additionalProperties":true,"properties":{"familyName":{"type":"string"},"givenName":{"type":"string"}},"type":"object"},"schemas":{"items":{"type":"string"},"type":"array"},"userName":{"type":"string"}},"type":"object"}},"application/scim+json":{"schema":{"additionalProperties":true,"properties":{"active":{"type":"boolean"},"emails":{"items":{"additionalProperties":true,"properties":{"primary":{"type":"boolean"},"value":{"type":"string"}},"type":"object"},"type":"array"},"externalId":{"type":"string"},"name":{"additionalProperties":true,"properties":{"familyName":{"type":"string"},"givenName":{"type":"string"}},"type":"object"},"schemas":{"items":{"type":"string"},"type":"array"},"userName":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"active":{"type":"boolean"},"emails":{"items":{"properties":{"primary":{"type":"boolean"},"value":{"type":"string"}},"required":["primary","value"],"type":"object"},"type":"array"},"externalId":{"type":"string"},"id":{"type":"string"},"meta":{"properties":{"resourceType":{"type":"string"}},"required":["resourceType"],"type":"object"},"name":{"properties":{"familyName":{"type":"string"},"givenName":{"type":"string"}},"required":["familyName","givenName"],"type":"object"},"schemas":{"items":{"type":"string"},"type":"array"},"userName":{"type":"string"}},"required":["active","emails","externalId","id","meta","name","schemas","userName"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Replace a SCIM user","tags":["scim"]}},"/service-accounts":{"get":{"description":"List service accounts.","operationId":"get_service_accounts","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyList"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List service accounts","tags":["EPR access"]},"post":{"description":"Create a service account.","operationId":"post_service_accounts","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a service account","tags":["EPR access"]}},"/service-accounts/{uid}":{"delete":{"description":"Revoke a service account.","operationId":"delete_service_accounts_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Revoke a service account","tags":["EPR access"]},"get":{"description":"Return one service account.","operationId":"get_service_accounts_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Get a service account","tags":["EPR access"]}},"/service-accounts/{uid}/rotate":{"post":{"description":"Rotate a service account.","operationId":"post_service_accounts_uid_rotate","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"$ref":"#/components/responses/Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Rotate a service account","tags":["EPR access"]}},"/shipping-profiles":{"get":{"description":"List the organization's shipping profiles with the grams per shipment each implies.","operationId":"get_shipping_profiles","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"attach_rate":{"type":"string"},"data_quality_tier":{"type":"string"},"effective_from":{"nullable":true,"type":"string"},"effective_to":{"nullable":true,"type":"string"},"grams_by_material":{"additionalProperties":{"type":"string"},"type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"jurisdiction_code":{"type":"string"},"missing_components":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"sku":{"nullable":true,"type":"integer"},"sku_code":{"type":"string"},"spec":{"type":"integer"},"spec_name":{"type":"string"},"weight_tier":{"type":"string"}},"required":["attach_rate","data_quality_tier","effective_from","effective_to","grams_by_material","id","is_active","jurisdiction_code","missing_components","name","sku","sku_code","spec","spec_name","weight_tier"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List the organization's shipping profiles with the grams per shipment each implies","tags":["EPR"]},"post":{"description":"Create a shipping profile.","operationId":"post_shipping_profiles","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingProfileInputRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ShippingProfileInputRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ShippingProfileInputRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"attach_rate":{"type":"string"},"data_quality_tier":{"type":"string"},"effective_from":{"nullable":true,"type":"string"},"effective_to":{"nullable":true,"type":"string"},"grams_by_material":{"additionalProperties":{"type":"string"},"type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"jurisdiction_code":{"type":"string"},"missing_components":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"sku":{"nullable":true,"type":"integer"},"sku_code":{"type":"string"},"spec":{"type":"integer"},"spec_name":{"type":"string"},"weight_tier":{"type":"string"}},"required":["attach_rate","data_quality_tier","effective_from","effective_to","grams_by_material","id","is_active","jurisdiction_code","missing_components","name","sku","sku_code","spec","spec_name","weight_tier"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a shipping profile","tags":["EPR"]}},"/shipping-profiles/{id}":{"delete":{"description":"Delete a shipping profile.","operationId":"delete_shipping_profiles_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Delete a shipping profile","tags":["EPR"]},"patch":{"description":"Edit a shipping profile.","operationId":"patch_shipping_profiles_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedShippingProfileInputRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedShippingProfileInputRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedShippingProfileInputRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"attach_rate":{"type":"string"},"data_quality_tier":{"type":"string"},"effective_from":{"nullable":true,"type":"string"},"effective_to":{"nullable":true,"type":"string"},"grams_by_material":{"additionalProperties":{"type":"string"},"type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"jurisdiction_code":{"type":"string"},"missing_components":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"sku":{"nullable":true,"type":"integer"},"sku_code":{"type":"string"},"spec":{"type":"integer"},"spec_name":{"type":"string"},"weight_tier":{"type":"string"}},"required":["attach_rate","data_quality_tier","effective_from","effective_to","grams_by_material","id","is_active","jurisdiction_code","missing_components","name","sku","sku_code","spec","spec_name","weight_tier"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Edit a shipping profile","tags":["EPR"]}},"/shipping-tonnage":{"get":{"description":"Return tonnage rows plus what is missing (filters: period_start, period_end, jurisdiction).","operationId":"get_shipping_tonnage","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"missing":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"orders_without_profile":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"over_attached":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"rows":{"items":{"properties":{"data_quality_tier":{"type":"string"},"grams":{"type":"string"},"jurisdiction_code":{"type":"string"},"material_code":{"type":"string"},"orders":{"type":"integer"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"}},"required":["data_quality_tier","grams","jurisdiction_code","material_code","orders","period_end","period_start"],"type":"object"},"type":"array"},"skipped_profiles":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["missing","orders_without_profile","rows","skipped_profiles"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return tonnage rows plus what is missing (filters: period_start, period_end, jurisdiction)","tags":["EPR"]}},"/skus":{"get":{"description":"Return active organization-owned packaging SKUs matching an optional query, newest first, in the cursor envelope every EPR list uses: pass ``next_cursor`` back as ``cursor`` until ``has_more`` is false.","operationId":"get_skus","parameters":[{"description":"The ``next_cursor`` of the previous page.","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"Rows per page, 1 to 500; 100 by default.","in":"query","name":"limit","schema":{"type":"integer"}},{"description":"Match the SKU code, name or GTIN.","in":"query","name":"q","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackagingSkuPage"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List packaging SKUs","tags":["EPR"]},"post":{"description":"Create a packaging SKU for the current producer organization.","operationId":"post_skus","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackagingSkuRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PackagingSkuRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PackagingSkuRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackagingSku"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a packaging SKU","tags":["EPR"]}},"/skus/import":{"post":{"description":"Process a bounded CSV or XLSX immediately or enqueue a large organization-scoped import. `mapping` (JSON field to header) overrides the header names; `dry_run` previews without writing. The same rows and mapping are imported once: a repeat returns the first job's result with `duplicate` true unless `reimport` is set.","operationId":"post_skus_import","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"dry_run":{"description":"Send true to validate the file and preview its rows without saving anything.","enum":["true","false"],"type":"string"},"file":{"format":"binary","type":"string"},"mapping":{"description":"JSON object of import field to the file's column header.","type":"string"},"reimport":{"description":"Apply a file that was already imported again.","type":"boolean"}},"required":["file"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"dry_run":{"description":"Send true to validate the file and preview its rows without saving anything.","enum":["true","false"],"type":"string"},"file":{"format":"binary","type":"string"},"mapping":{"description":"JSON object of import field to the file's column header.","type":"string"},"reimport":{"description":"Apply a file that was already imported again.","type":"boolean"}},"required":["file"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"columns":{"additionalProperties":{"type":"string"},"type":"object"},"dry_run":{"type":"boolean"},"duplicate":{"type":"boolean"},"errors":{"items":{"properties":{"column":{"type":"string"},"detail":{"type":"string"},"row":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"type":"array"},"headers":{"items":{"type":"string"},"type":"array"},"imported":{"type":"integer"},"job_id":{"type":"string"},"preview":{"items":{"properties":{"action":{"enum":["create","update","unchanged"],"type":"string"},"entity":{"type":"string"},"name":{"type":"string"},"row":{"type":"integer"},"sku_code":{"type":"string"},"state":{"type":"string"},"units_sold":{"type":["integer","null"]},"year":{"type":["integer","null"]}},"type":"object"},"type":"array"},"skus":{"type":"integer"},"unchanged":{"description":"Accepted rows that match what is already saved; when it equals `imported`, nothing would change.","type":"integer"}},"required":["errors","imported"],"type":"object"}}},"description":"Import completed"},"202":{"content":{"application/json":{"schema":{"properties":{"detail":{"type":"string"},"duplicate":{"type":"boolean"},"job_id":{"type":"string"},"status":{"type":"string"},"task_id":{"type":"string"}},"required":["detail","status","task_id"],"type":"object"}}},"description":"Accepted; the work continues in the background."},"207":{"content":{"application/json":{"schema":{"properties":{"columns":{"additionalProperties":{"type":"string"},"type":"object"},"dry_run":{"type":"boolean"},"duplicate":{"type":"boolean"},"errors":{"items":{"properties":{"column":{"type":"string"},"detail":{"type":"string"},"row":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"type":"array"},"headers":{"items":{"type":"string"},"type":"array"},"imported":{"type":"integer"},"job_id":{"type":"string"},"preview":{"items":{"properties":{"action":{"enum":["create","update","unchanged"],"type":"string"},"entity":{"type":"string"},"name":{"type":"string"},"row":{"type":"integer"},"sku_code":{"type":"string"},"state":{"type":"string"},"units_sold":{"type":["integer","null"]},"year":{"type":["integer","null"]}},"type":"object"},"type":"array"},"skus":{"type":"integer"},"unchanged":{"description":"Accepted rows that match what is already saved; when it equals `imported`, nothing would change.","type":"integer"}},"required":["errors","imported"],"type":"object"}}},"description":"Import completed"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"The header row is missing a required column (code `missing_columns`); nothing is imported and no job is written. `error.errors`, `error.headers` and `error.columns` say which."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Import packaging SKUs","tags":["EPR"]}},"/skus/{id}":{"delete":{"description":"Soft-retire an organization-owned packaging SKU while retaining history.","operationId":"delete_skus_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"No response body"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Retire a packaging SKU","tags":["EPR"]},"get":{"description":"Return one organization-owned packaging SKU and its components.","operationId":"get_skus_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackagingSku"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found; `owner` names the client when only the chosen client hides it"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Get a packaging SKU","tags":["EPR"]},"patch":{"description":"Partially update an active organization-owned packaging SKU.","operationId":"patch_skus_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPackagingSkuRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedPackagingSkuRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedPackagingSkuRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackagingSku"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"SKU is inactive"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Update a packaging SKU","tags":["EPR"]}},"/skus/{sku_id}/bundle-components":{"get":{"description":"List what the SKU contains, and which bundles contain it.","operationId":"get_skus_sku_id_bundle_components","parameters":[{"in":"path","name":"sku_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"contained_in":{"items":{"properties":{"bundle_id":{"type":"integer"},"bundle_sku_code":{"type":"string"},"component_id":{"type":"integer"},"component_name":{"type":"string"},"component_sku_code":{"type":"string"},"effective_from":{"format":"date","nullable":true,"type":"string"},"effective_to":{"format":"date","nullable":true,"type":"string"},"quantity":{"type":"integer"}},"required":["bundle_id","bundle_sku_code","component_id","component_name","component_sku_code","effective_from","effective_to","quantity"],"type":"object"},"type":"array"},"contents":{"items":{"properties":{"bundle_id":{"type":"integer"},"bundle_sku_code":{"type":"string"},"component_id":{"type":"integer"},"component_name":{"type":"string"},"component_sku_code":{"type":"string"},"effective_from":{"format":"date","nullable":true,"type":"string"},"effective_to":{"format":"date","nullable":true,"type":"string"},"quantity":{"type":"integer"}},"required":["bundle_id","bundle_sku_code","component_id","component_name","component_sku_code","effective_from","effective_to","quantity"],"type":"object"},"type":"array"}},"required":["contained_in","contents"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List what the SKU contains, and which bundles contain it","tags":["EPR"]}},"/skus/{sku_id}/bundle-components/{component_id}":{"delete":{"description":"Remove a component from the bundle. ``effective_from=YYYY-MM-DD`` picks one dated row; without it the undated row is removed.","operationId":"delete_skus_sku_id_bundle_components_component_id","parameters":[{"in":"path","name":"component_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"sku_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Remove a component from the bundle (``effective_from`` picks one dated row)","tags":["EPR"]},"put":{"description":"Add a component to the bundle, or change its quantity or dates. The row is keyed by the component and ``effective_from``; a bundle that would contain itself, directly or through other bundles, is refused with ``bundle_cycle``.","operationId":"put_skus_sku_id_bundle_components_component_id","parameters":[{"in":"path","name":"component_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"sku_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BundleComponentInputRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/BundleComponentInputRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/BundleComponentInputRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"bundle_id":{"type":"integer"},"bundle_sku_code":{"type":"string"},"component_id":{"type":"integer"},"component_name":{"type":"string"},"component_sku_code":{"type":"string"},"effective_from":{"format":"date","nullable":true,"type":"string"},"effective_to":{"format":"date","nullable":true,"type":"string"},"quantity":{"type":"integer"}},"required":["bundle_id","bundle_sku_code","component_id","component_name","component_sku_code","effective_from","effective_to","quantity"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Add a component to the bundle, or change its quantity or dates","tags":["EPR"]}},"/skus/{sku_id}/components":{"get":{"description":"Return active packaging components belonging to one organization-owned SKU.","operationId":"get_skus_sku_id_components","parameters":[{"in":"path","name":"sku_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PackagingComponent"},"type":"array"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List packaging components","tags":["EPR"]},"post":{"description":"Create a component on an organization-owned SKU using an active material category.","operationId":"post_skus_sku_id_components","parameters":[{"in":"path","name":"sku_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackagingComponentRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PackagingComponentRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PackagingComponentRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackagingComponent"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"Inactive material"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a packaging component","tags":["EPR"]}},"/skus/{sku_id}/spec-links/{spec_id}":{"delete":{"description":"Unlink a shared spec from the SKU (a SKU's own private spec cannot be unlinked).","operationId":"delete_skus_sku_id_spec_links_spec_id","parameters":[{"in":"path","name":"sku_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"spec_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Unlink a shared spec from the SKU (a SKU's own private spec cannot be unlinked)","tags":["EPR"]},"put":{"description":"Link the spec to the SKU, or change the units per SKU.","operationId":"put_skus_sku_id_spec_links_spec_id","parameters":[{"in":"path","name":"sku_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"spec_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkInputRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/LinkInputRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/LinkInputRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"effective_from":{"format":"date","nullable":true,"type":"string"},"effective_to":{"format":"date","nullable":true,"type":"string"},"sku_id":{"type":"integer"},"spec_id":{"type":"integer"},"units_per_sku":{"type":"integer"}},"required":["effective_from","effective_to","sku_id","spec_id","units_per_sku"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Link the spec to the SKU, or change the units per SKU","tags":["EPR"]}},"/skus/{sku_id}/volumes":{"get":{"description":"Return annual unit volumes by state for one organization-owned SKU.","operationId":"get_skus_sku_id_volumes","parameters":[{"in":"path","name":"sku_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SkuStateVolume"},"type":"array"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List SKU state volumes","tags":["EPR"]},"put":{"description":"Validate and upsert annual state volume rows for one organization-owned SKU. A row whose `units_sold` is null removes the figure typed for that place and year.","operationId":"put_skus_sku_id_volumes","parameters":[{"in":"path","name":"sku_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SkuStateVolumeRequest"},"type":"array"}},"application/x-www-form-urlencoded":{"schema":{"items":{"$ref":"#/components/schemas/SkuStateVolumeRequest"},"type":"array"}},"multipart/form-data":{"schema":{"items":{"$ref":"#/components/schemas/SkuStateVolumeRequest"},"type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SkuStateVolume"},"type":"array"}}},"description":""},"400":{"description":"Invalid rows"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Replace SKU state volumes","tags":["EPR"]}},"/small-business/calendar-feed/":{"delete":{"description":"Turn the calendar link off; calendar apps stop receiving updates.","operationId":"delete_small_business_calendar_feed","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Turn the calendar link off","tags":["small business"]},"get":{"description":"Whether a calendar link is live, with the last characters of its token. The link is shown once.","operationId":"get_small_business_calendar_feed","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"active":{"type":"boolean"},"created_at":{"nullable":true,"type":"string"},"last_fetched_at":{"nullable":true,"type":"string"},"token":{"nullable":true,"type":"string"},"token_hint":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["active","created_at","last_fetched_at","token","token_hint","url"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Read the calendar feed state","tags":["small business"]},"post":{"description":"Make a new calendar link. The full link is returned once; any earlier link stops working.","operationId":"post_small_business_calendar_feed","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"active":{"type":"boolean"},"created_at":{"nullable":true,"type":"string"},"last_fetched_at":{"nullable":true,"type":"string"},"token":{"nullable":true,"type":"string"},"token_hint":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["active","created_at","last_fetched_at","token","token_hint","url"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Make a new calendar link (the old one stops working)","tags":["small business"]}},"/small-business/exemptions/":{"get":{"description":"List tracked exemption applications, soonest deadline first.","operationId":"get_small_business_exemptions","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List tracked exemption applications","tags":["small business"]}},"/small-business/exemptions/{uid}/":{"delete":{"description":"Stop tracking an exemption.","operationId":"delete_small_business_exemptions_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Stop tracking an exemption","tags":["small business"]},"patch":{"description":"Update a tracked exemption. Marking it filed records today unless a filed date is given.","operationId":"patch_small_business_exemptions_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"deadline":{"format":"date","nullable":true,"type":"string"},"filed_on":{"format":"date","nullable":true,"type":"string"},"notes":{"type":"string"},"reference":{"type":"string"},"status":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Update a tracked exemption (status, deadline, filed date, reference, notes)","tags":["small business"]}},"/small-business/free-plan/":{"get":{"description":"What the free plan includes, the caller's current plan, and the one reason to upgrade.","operationId":"get_small_business_free_plan","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"current_plan":{"type":"string"},"included_records":{"type":"integer"},"includes":{"items":{"type":"string"},"type":"array"},"max_entities":{"nullable":true,"type":"integer"},"max_seats":{"nullable":true,"type":"integer"},"next_plan":{"type":"string"},"next_plan_records":{"type":"integer"},"plan":{"type":"string"},"upgrade_reason":{"type":"string"}},"required":["current_plan","included_records","includes","next_plan","plan","upgrade_reason"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Read what the free plan includes","tags":["small business"]}},"/small-business/owner-summary/":{"get":{"description":"What is owed, to whom, by when, and what to do next, from the saved check and records. ``entity_id`` picks one client (or ``all``); without it the page follows the chosen client, then the only one.","operationId":"get_small_business_owner_summary","parameters":[{"description":"A client's id, or all.","in":"query","name":"entity_id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"as_of":{"format":"date","type":"string"},"can_edit":{"type":"boolean"},"check":{"additionalProperties":true,"nullable":true,"type":"object"},"check_applies":{"type":"boolean"},"entities":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"},"entity":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"exemptions":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"next_steps":{"items":{"type":"string"},"type":"array"},"organization":{"type":"string"},"places":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"prepared_for":{"type":"string"},"reporting_periods":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["as_of","can_edit","check","check_applies","entities","entity","exemptions","next_steps","organization","places","prepared_for","reporting_periods"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Read the printable owner summary","tags":["small business"]}},"/small-business/packaging-templates/":{"get":{"description":"Typical packs (bag, pouch, jar, bottle, can, steel tin, carton, mailer, label), with common sizes. Weights are Instica starting estimates, not published figures, and stay marked estimated until replaced by a measurement.","operationId":"get_small_business_packaging_templates","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"method":{"type":"string"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List packaging templates","tags":["small business"]}},"/small-business/packaging-templates/apply/":{"post":{"description":"Add a packaging template's components to a product, each weight marked estimated. size_id picks one of the template's sizes; without it, an amount in the product's name (9 oz, 250 ml) picks the size it fits. weights (one per component, in order, in grams; blank keeps the estimate) replaces the starting estimates with weights the owner knows. A product that already has the template's parts answers 409 template_already_applied.","operationId":"post_small_business_packaging_templates_apply","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"size_id":{"type":"string"},"sku_id":{"type":"integer"},"template_id":{"type":"string"},"weights":{"items":{"type":"string"},"type":"array"}},"required":["sku_id","template_id"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"component_ids":{"items":{"type":"integer"},"type":"array"},"sku_id":{"type":"integer"},"template":{"additionalProperties":true,"type":"object"}},"required":["component_ids","sku_id","template"],"type":"object"}}},"description":"Created."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Add a packaging template's components to a product","tags":["small business"]}},"/small-business/threshold-check/":{"get":{"description":"Revenue bands, currencies and places the check answers for, the latest saved answers, and `start`: the places the workspace sells into and its worldwide revenue for the last full year, to begin from when nothing is saved yet.","operationId":"get_small_business_threshold_check","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"bands":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"currencies":{"items":{"type":"string"},"type":"array"},"latest":{"nullable":true,"properties":{"as_of":{"format":"date","type":"string"},"currency":{"type":"string"},"employee_count":{"nullable":true,"type":"integer"},"notes":{"items":{"type":"string"},"type":"array"},"places":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"revenue_band":{"type":"string"},"uid":{"nullable":true,"type":"string"}},"required":["as_of","currency","notes","places","revenue_band"],"type":"object"},"places":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"start":{"nullable":true,"properties":{"amount":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"places":{"items":{"type":"string"},"type":"array"}},"required":["amount","currency","places"],"type":"object"}},"required":["bands","currencies","latest","places","start"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Read the check's choices and the latest saved check","tags":["small business"]},"post":{"description":"Answer each chosen place for a revenue band: not obligated, must apply for an exemption, appears obligated, or need more data, each with the threshold, source and effective date. Exemptions to apply for are added to the tracked list. In a workspace with one legal entity, each chosen place that has no sells-into answer yet is saved as one, so the obligations check uses it.","operationId":"post_small_business_threshold_check","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"currency":{"type":"string"},"employee_count":{"nullable":true,"type":"integer"},"places":{"items":{"type":"string"},"type":"array"},"revenue_band":{"type":"string"}},"required":["currency","places","revenue_band"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"as_of":{"format":"date","type":"string"},"currency":{"type":"string"},"employee_count":{"nullable":true,"type":"integer"},"notes":{"items":{"type":"string"},"type":"array"},"places":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"revenue_band":{"type":"string"},"uid":{"nullable":true,"type":"string"}},"required":["as_of","currency","notes","places","revenue_band"],"type":"object"}}},"description":"Created."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Run and save the threshold check","tags":["small business"]}},"/spec-components/{id}":{"delete":{"description":"Retire a component (measurements stay).","operationId":"delete_spec_components_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Retire a component (measurements stay)","tags":["EPR"]},"patch":{"description":"Edit any attribute of a component.","operationId":"patch_spec_components_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedComponentInputRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedComponentInputRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedComponentInputRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"colour":{"type":"string"},"compostable":{"nullable":true,"type":"boolean"},"compostable_certificate_expires":{"format":"date","nullable":true,"type":"string"},"compostable_certificate_number":{"type":"string"},"compostable_certification":{"type":"string"},"contact_sensitive":{"nullable":true,"type":"boolean"},"estimate_method_missing":{"type":"boolean"},"format":{"type":"string"},"has_measurement":{"type":"boolean"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"layer_grams":{"nullable":true,"type":"string"},"layers":{"items":{"properties":{"grams":{"type":"string"},"grams_tier":{"type":"string"},"material_code":{"type":"string"},"material_name":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"position":{"type":"integer"}},"required":["grams","grams_tier","material_code","material_name","pcr_percent","position"],"type":"object"},"type":"array"},"markings":{"items":{"type":"string"},"type":"array"},"material_code":{"type":"string"},"material_name":{"type":"string"},"name":{"type":"string"},"opacity":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"pcr_percent_tier":{"type":"string"},"pfas_free_declared":{"nullable":true,"type":"boolean"},"quantity_per_spec":{"type":"integer"},"recyclable":{"nullable":true,"type":"boolean"},"reusable":{"nullable":true,"type":"boolean"},"reuse_cycles":{"nullable":true,"type":"integer"},"single_use_beverage_bottle":{"nullable":true,"type":"boolean"},"sort_order":{"type":"integer"},"spec":{"type":"integer"},"sub_material":{"type":"string"},"unit_grams":{"nullable":true,"type":"string"},"unit_grams_method":{"type":"string"},"unit_grams_tier":{"type":"string"}},"required":["colour","compostable","compostable_certificate_expires","compostable_certificate_number","compostable_certification","contact_sensitive","estimate_method_missing","format","has_measurement","id","is_active","layer_grams","layers","markings","material_code","material_name","name","opacity","pcr_percent","pcr_percent_tier","pfas_free_declared","quantity_per_spec","recyclable","reusable","reuse_cycles","single_use_beverage_bottle","sort_order","spec","sub_material","unit_grams","unit_grams_method","unit_grams_tier"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Edit any attribute of a component","tags":["EPR"]}},"/spec-components/{id}/layers":{"put":{"description":"Replace the layers; the component weight becomes their sum.","operationId":"put_spec_components_id_layers","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayersInputRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/LayersInputRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/LayersInputRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"colour":{"type":"string"},"compostable":{"nullable":true,"type":"boolean"},"compostable_certificate_expires":{"format":"date","nullable":true,"type":"string"},"compostable_certificate_number":{"type":"string"},"compostable_certification":{"type":"string"},"contact_sensitive":{"nullable":true,"type":"boolean"},"estimate_method_missing":{"type":"boolean"},"format":{"type":"string"},"has_measurement":{"type":"boolean"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"layer_grams":{"nullable":true,"type":"string"},"layers":{"items":{"properties":{"grams":{"type":"string"},"grams_tier":{"type":"string"},"material_code":{"type":"string"},"material_name":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"position":{"type":"integer"}},"required":["grams","grams_tier","material_code","material_name","pcr_percent","position"],"type":"object"},"type":"array"},"markings":{"items":{"type":"string"},"type":"array"},"material_code":{"type":"string"},"material_name":{"type":"string"},"name":{"type":"string"},"opacity":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"pcr_percent_tier":{"type":"string"},"pfas_free_declared":{"nullable":true,"type":"boolean"},"quantity_per_spec":{"type":"integer"},"recyclable":{"nullable":true,"type":"boolean"},"reusable":{"nullable":true,"type":"boolean"},"reuse_cycles":{"nullable":true,"type":"integer"},"single_use_beverage_bottle":{"nullable":true,"type":"boolean"},"sort_order":{"type":"integer"},"spec":{"type":"integer"},"sub_material":{"type":"string"},"unit_grams":{"nullable":true,"type":"string"},"unit_grams_method":{"type":"string"},"unit_grams_tier":{"type":"string"}},"required":["colour","compostable","compostable_certificate_expires","compostable_certificate_number","compostable_certification","contact_sensitive","estimate_method_missing","format","has_measurement","id","is_active","layer_grams","layers","markings","material_code","material_name","name","opacity","pcr_percent","pcr_percent_tier","pfas_free_declared","quantity_per_spec","recyclable","reusable","reuse_cycles","single_use_beverage_bottle","sort_order","spec","sub_material","unit_grams","unit_grams_method","unit_grams_tier"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Replace the layers; the component weight becomes their sum","tags":["EPR"]}},"/spec-families":{"get":{"description":"List families with their spec counts.","operationId":"get_spec_families","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"notes":{"type":"string"},"spec_count":{"type":"integer"}},"required":["id","name","notes","spec_count"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List families with their spec counts","tags":["EPR"]},"post":{"description":"Create a family.","operationId":"post_spec_families","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FamilyInputRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/FamilyInputRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/FamilyInputRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"notes":{"type":"string"},"spec_count":{"type":"integer"}},"required":["id","name","notes","spec_count"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a family","tags":["EPR"]}},"/spec-families/{id}":{"delete":{"description":"Delete a family; its specs stay and lose the grouping.","operationId":"delete_spec_families_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Delete a family; its specs stay and lose the grouping","tags":["EPR"]},"patch":{"description":"Rename a family or edit its notes.","operationId":"patch_spec_families_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedFamilyInputRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedFamilyInputRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedFamilyInputRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"notes":{"type":"string"},"spec_count":{"type":"integer"}},"required":["id","name","notes","spec_count"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Rename a family or edit its notes","tags":["EPR"]}},"/specs":{"get":{"description":"List specs (private per-SKU specs only with ``include_private=1``; ``sku=<id>`` keeps only specs linked to that SKU).","operationId":"get_specs","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"approval_note":{"type":"string"},"approved_at":{"nullable":true,"type":"string"},"approved_by_label":{"type":"string"},"code":{"type":"string"},"component_count":{"type":"integer"},"description":{"type":"string"},"family":{"nullable":true,"type":"integer"},"family_name":{"type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"is_sku_private":{"type":"boolean"},"level":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer"},"sku_count":{"type":"integer"},"sku_link":{"properties":{"effective_from":{"format":"date","nullable":true,"type":"string"},"effective_to":{"format":"date","nullable":true,"type":"string"},"name":{"type":"string"},"sku_code":{"type":"string"},"sku_id":{"type":"integer"},"units_per_sku":{"type":"integer"}},"required":["effective_from","effective_to","name","sku_code","sku_id","units_per_sku"],"type":"object"},"status":{"type":"string"},"variant_label":{"type":"string"},"variant_of":{"nullable":true,"type":"integer"}},"required":["approval_note","approved_at","approved_by_label","code","component_count","description","family","family_name","id","is_active","is_sku_private","level","name","revision","sku_count","status","variant_label","variant_of"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List specs; private per-SKU specs only with `include_private=1`","tags":["EPR"]},"post":{"description":"Create a spec.","operationId":"post_specs","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecInputRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/SpecInputRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/SpecInputRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"approval_note":{"type":"string"},"approved_at":{"nullable":true,"type":"string"},"approved_by_label":{"type":"string"},"code":{"type":"string"},"component_count":{"type":"integer"},"components":{"items":{"properties":{"colour":{"type":"string"},"compostable":{"nullable":true,"type":"boolean"},"compostable_certificate_expires":{"format":"date","nullable":true,"type":"string"},"compostable_certificate_number":{"type":"string"},"compostable_certification":{"type":"string"},"contact_sensitive":{"nullable":true,"type":"boolean"},"estimate_method_missing":{"type":"boolean"},"format":{"type":"string"},"has_measurement":{"type":"boolean"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"layer_grams":{"nullable":true,"type":"string"},"layers":{"items":{"properties":{"grams":{"type":"string"},"grams_tier":{"type":"string"},"material_code":{"type":"string"},"material_name":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"position":{"type":"integer"}},"required":["grams","grams_tier","material_code","material_name","pcr_percent","position"],"type":"object"},"type":"array"},"markings":{"items":{"type":"string"},"type":"array"},"material_code":{"type":"string"},"material_name":{"type":"string"},"name":{"type":"string"},"opacity":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"pcr_percent_tier":{"type":"string"},"pfas_free_declared":{"nullable":true,"type":"boolean"},"quantity_per_spec":{"type":"integer"},"recyclable":{"nullable":true,"type":"boolean"},"reusable":{"nullable":true,"type":"boolean"},"reuse_cycles":{"nullable":true,"type":"integer"},"single_use_beverage_bottle":{"nullable":true,"type":"boolean"},"sort_order":{"type":"integer"},"spec":{"type":"integer"},"sub_material":{"type":"string"},"unit_grams":{"nullable":true,"type":"string"},"unit_grams_method":{"type":"string"},"unit_grams_tier":{"type":"string"}},"required":["colour","compostable","compostable_certificate_expires","compostable_certificate_number","compostable_certification","contact_sensitive","estimate_method_missing","format","has_measurement","id","is_active","layer_grams","layers","markings","material_code","material_name","name","opacity","pcr_percent","pcr_percent_tier","pfas_free_declared","quantity_per_spec","recyclable","reusable","reuse_cycles","single_use_beverage_bottle","sort_order","spec","sub_material","unit_grams","unit_grams_method","unit_grams_tier"],"type":"object"},"type":"array"},"description":{"type":"string"},"family":{"nullable":true,"type":"integer"},"family_name":{"type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"is_sku_private":{"type":"boolean"},"level":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer"},"sku_count":{"type":"integer"},"skus":{"items":{"properties":{"effective_from":{"format":"date","nullable":true,"type":"string"},"effective_to":{"format":"date","nullable":true,"type":"string"},"name":{"type":"string"},"sku_code":{"type":"string"},"sku_id":{"type":"integer"},"units_per_sku":{"type":"integer"}},"required":["effective_from","effective_to","name","sku_code","sku_id","units_per_sku"],"type":"object"},"type":"array"},"status":{"type":"string"},"variant_label":{"type":"string"},"variant_of":{"nullable":true,"type":"integer"}},"required":["approval_note","approved_at","approved_by_label","code","component_count","components","description","family","family_name","id","is_active","is_sku_private","level","name","revision","sku_count","skus","status","variant_label","variant_of"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a spec","tags":["EPR"]}},"/specs/{id}":{"delete":{"description":"Retire a spec (its measurement history is kept).","operationId":"delete_specs_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflicts with the current state."},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Retire a spec (its measurement history is kept)","tags":["EPR"]},"get":{"description":"Return the spec with components, layers and linked SKUs.","operationId":"get_specs_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"approval_note":{"type":"string"},"approved_at":{"nullable":true,"type":"string"},"approved_by_label":{"type":"string"},"code":{"type":"string"},"component_count":{"type":"integer"},"components":{"items":{"properties":{"colour":{"type":"string"},"compostable":{"nullable":true,"type":"boolean"},"compostable_certificate_expires":{"format":"date","nullable":true,"type":"string"},"compostable_certificate_number":{"type":"string"},"compostable_certification":{"type":"string"},"contact_sensitive":{"nullable":true,"type":"boolean"},"estimate_method_missing":{"type":"boolean"},"format":{"type":"string"},"has_measurement":{"type":"boolean"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"layer_grams":{"nullable":true,"type":"string"},"layers":{"items":{"properties":{"grams":{"type":"string"},"grams_tier":{"type":"string"},"material_code":{"type":"string"},"material_name":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"position":{"type":"integer"}},"required":["grams","grams_tier","material_code","material_name","pcr_percent","position"],"type":"object"},"type":"array"},"markings":{"items":{"type":"string"},"type":"array"},"material_code":{"type":"string"},"material_name":{"type":"string"},"name":{"type":"string"},"opacity":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"pcr_percent_tier":{"type":"string"},"pfas_free_declared":{"nullable":true,"type":"boolean"},"quantity_per_spec":{"type":"integer"},"recyclable":{"nullable":true,"type":"boolean"},"reusable":{"nullable":true,"type":"boolean"},"reuse_cycles":{"nullable":true,"type":"integer"},"single_use_beverage_bottle":{"nullable":true,"type":"boolean"},"sort_order":{"type":"integer"},"spec":{"type":"integer"},"sub_material":{"type":"string"},"unit_grams":{"nullable":true,"type":"string"},"unit_grams_method":{"type":"string"},"unit_grams_tier":{"type":"string"}},"required":["colour","compostable","compostable_certificate_expires","compostable_certificate_number","compostable_certification","contact_sensitive","estimate_method_missing","format","has_measurement","id","is_active","layer_grams","layers","markings","material_code","material_name","name","opacity","pcr_percent","pcr_percent_tier","pfas_free_declared","quantity_per_spec","recyclable","reusable","reuse_cycles","single_use_beverage_bottle","sort_order","spec","sub_material","unit_grams","unit_grams_method","unit_grams_tier"],"type":"object"},"type":"array"},"description":{"type":"string"},"family":{"nullable":true,"type":"integer"},"family_name":{"type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"is_sku_private":{"type":"boolean"},"level":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer"},"sku_count":{"type":"integer"},"skus":{"items":{"properties":{"effective_from":{"format":"date","nullable":true,"type":"string"},"effective_to":{"format":"date","nullable":true,"type":"string"},"name":{"type":"string"},"sku_code":{"type":"string"},"sku_id":{"type":"integer"},"units_per_sku":{"type":"integer"}},"required":["effective_from","effective_to","name","sku_code","sku_id","units_per_sku"],"type":"object"},"type":"array"},"status":{"type":"string"},"variant_label":{"type":"string"},"variant_of":{"nullable":true,"type":"integer"}},"required":["approval_note","approved_at","approved_by_label","code","component_count","components","description","family","family_name","id","is_active","is_sku_private","level","name","revision","sku_count","skus","status","variant_label","variant_of"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the spec with components, layers and linked SKUs","tags":["EPR"]},"patch":{"description":"Update a spec; every linked SKU sees the change.","operationId":"patch_specs_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedSpecInputRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedSpecInputRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedSpecInputRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"approval_note":{"type":"string"},"approved_at":{"nullable":true,"type":"string"},"approved_by_label":{"type":"string"},"code":{"type":"string"},"component_count":{"type":"integer"},"components":{"items":{"properties":{"colour":{"type":"string"},"compostable":{"nullable":true,"type":"boolean"},"compostable_certificate_expires":{"format":"date","nullable":true,"type":"string"},"compostable_certificate_number":{"type":"string"},"compostable_certification":{"type":"string"},"contact_sensitive":{"nullable":true,"type":"boolean"},"estimate_method_missing":{"type":"boolean"},"format":{"type":"string"},"has_measurement":{"type":"boolean"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"layer_grams":{"nullable":true,"type":"string"},"layers":{"items":{"properties":{"grams":{"type":"string"},"grams_tier":{"type":"string"},"material_code":{"type":"string"},"material_name":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"position":{"type":"integer"}},"required":["grams","grams_tier","material_code","material_name","pcr_percent","position"],"type":"object"},"type":"array"},"markings":{"items":{"type":"string"},"type":"array"},"material_code":{"type":"string"},"material_name":{"type":"string"},"name":{"type":"string"},"opacity":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"pcr_percent_tier":{"type":"string"},"pfas_free_declared":{"nullable":true,"type":"boolean"},"quantity_per_spec":{"type":"integer"},"recyclable":{"nullable":true,"type":"boolean"},"reusable":{"nullable":true,"type":"boolean"},"reuse_cycles":{"nullable":true,"type":"integer"},"single_use_beverage_bottle":{"nullable":true,"type":"boolean"},"sort_order":{"type":"integer"},"spec":{"type":"integer"},"sub_material":{"type":"string"},"unit_grams":{"nullable":true,"type":"string"},"unit_grams_method":{"type":"string"},"unit_grams_tier":{"type":"string"}},"required":["colour","compostable","compostable_certificate_expires","compostable_certificate_number","compostable_certification","contact_sensitive","estimate_method_missing","format","has_measurement","id","is_active","layer_grams","layers","markings","material_code","material_name","name","opacity","pcr_percent","pcr_percent_tier","pfas_free_declared","quantity_per_spec","recyclable","reusable","reuse_cycles","single_use_beverage_bottle","sort_order","spec","sub_material","unit_grams","unit_grams_method","unit_grams_tier"],"type":"object"},"type":"array"},"description":{"type":"string"},"family":{"nullable":true,"type":"integer"},"family_name":{"type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"is_sku_private":{"type":"boolean"},"level":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer"},"sku_count":{"type":"integer"},"skus":{"items":{"properties":{"effective_from":{"format":"date","nullable":true,"type":"string"},"effective_to":{"format":"date","nullable":true,"type":"string"},"name":{"type":"string"},"sku_code":{"type":"string"},"sku_id":{"type":"integer"},"units_per_sku":{"type":"integer"}},"required":["effective_from","effective_to","name","sku_code","sku_id","units_per_sku"],"type":"object"},"type":"array"},"status":{"type":"string"},"variant_label":{"type":"string"},"variant_of":{"nullable":true,"type":"integer"}},"required":["approval_note","approved_at","approved_by_label","code","component_count","components","description","family","family_name","id","is_active","is_sku_private","level","name","revision","sku_count","skus","status","variant_label","variant_of"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Update a spec; every linked SKU sees the change","tags":["EPR"]}},"/specs/{id}/approve":{"post":{"description":"Freeze the spec, its active components and their weights as an immutable approved revision. Only a person holding the spec-approval right can approve; API keys cannot.","operationId":"post_specs_id_approve","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecApprovalInputRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/SpecApprovalInputRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/SpecApprovalInputRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"revision":{"properties":{"approved_at":{"type":"string"},"approved_by_label":{"type":"string"},"component_count":{"type":"integer"},"note":{"type":"string"},"revision":{"type":"integer"},"sku_count":{"type":"integer"},"snapshot":{"additionalProperties":true,"properties":{},"type":"object"}},"required":["approved_at","approved_by_label","component_count","note","revision","sku_count","snapshot"],"type":"object"},"spec":{"additionalProperties":true,"properties":{},"type":"object"}},"required":["revision","spec"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflicts with the current state."},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Approve the spec's current draft revision","tags":["EPR"]}},"/specs/{id}/revisions":{"get":{"description":"List every approved revision of the spec with its frozen snapshot, newest first.","operationId":"get_specs_id_revisions","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"approved_at":{"type":"string"},"approved_by_label":{"type":"string"},"component_count":{"type":"integer"},"note":{"type":"string"},"revision":{"type":"integer"},"sku_count":{"type":"integer"},"snapshot":{"additionalProperties":true,"properties":{},"type":"object"}},"required":["approved_at","approved_by_label","component_count","note","revision","sku_count","snapshot"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List the spec's approved revisions, newest first","tags":["EPR"]}},"/specs/{spec_id}/components":{"post":{"description":"Create a component on a spec shared by every SKU that links it.","operationId":"post_specs_spec_id_components","parameters":[{"in":"path","name":"spec_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentInputRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ComponentInputRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ComponentInputRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"colour":{"type":"string"},"compostable":{"nullable":true,"type":"boolean"},"compostable_certificate_expires":{"format":"date","nullable":true,"type":"string"},"compostable_certificate_number":{"type":"string"},"compostable_certification":{"type":"string"},"contact_sensitive":{"nullable":true,"type":"boolean"},"estimate_method_missing":{"type":"boolean"},"format":{"type":"string"},"has_measurement":{"type":"boolean"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"layer_grams":{"nullable":true,"type":"string"},"layers":{"items":{"properties":{"grams":{"type":"string"},"grams_tier":{"type":"string"},"material_code":{"type":"string"},"material_name":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"position":{"type":"integer"}},"required":["grams","grams_tier","material_code","material_name","pcr_percent","position"],"type":"object"},"type":"array"},"markings":{"items":{"type":"string"},"type":"array"},"material_code":{"type":"string"},"material_name":{"type":"string"},"name":{"type":"string"},"opacity":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"pcr_percent_tier":{"type":"string"},"pfas_free_declared":{"nullable":true,"type":"boolean"},"quantity_per_spec":{"type":"integer"},"recyclable":{"nullable":true,"type":"boolean"},"reusable":{"nullable":true,"type":"boolean"},"reuse_cycles":{"nullable":true,"type":"integer"},"single_use_beverage_bottle":{"nullable":true,"type":"boolean"},"sort_order":{"type":"integer"},"spec":{"type":"integer"},"sub_material":{"type":"string"},"unit_grams":{"nullable":true,"type":"string"},"unit_grams_method":{"type":"string"},"unit_grams_tier":{"type":"string"}},"required":["colour","compostable","compostable_certificate_expires","compostable_certificate_number","compostable_certification","contact_sensitive","estimate_method_missing","format","has_measurement","id","is_active","layer_grams","layers","markings","material_code","material_name","name","opacity","pcr_percent","pcr_percent_tier","pfas_free_declared","quantity_per_spec","recyclable","reusable","reuse_cycles","single_use_beverage_bottle","sort_order","spec","sub_material","unit_grams","unit_grams_method","unit_grams_tier"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a component on a spec shared by every SKU that links it","tags":["EPR"]}},"/specs/{spec_id}/photos":{"get":{"description":"List the spec's photos in display order.","operationId":"get_specs_spec_id_photos","parameters":[{"in":"path","name":"spec_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"caption":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"from_evidence":{"type":"boolean"},"id":{"type":"integer"},"position":{"type":"integer"},"spec":{"type":"integer"},"url":{"type":"string"}},"required":["caption","created_at","from_evidence","id","position","spec","url"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List the spec's photos in display order","tags":["EPR"]},"post":{"description":"Upload a photo of the spec (PNG, JPEG or WebP, up to 10 MB); it goes last.","operationId":"post_specs_spec_id_photos","parameters":[{"in":"path","name":"spec_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"caption":{"type":"string"},"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"caption":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"from_evidence":{"type":"boolean"},"id":{"type":"integer"},"position":{"type":"integer"},"spec":{"type":"integer"},"url":{"type":"string"}},"required":["caption","created_at","from_evidence","id","position","spec","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Upload a photo of the spec (PNG, JPEG or WebP, up to 10 MB); it goes last","tags":["EPR"]}},"/specs/{spec_id}/photos/order":{"post":{"description":"Set the display order: photo_ids names every photo of the spec exactly once, first to last.","operationId":"post_specs_spec_id_photos_order","parameters":[{"in":"path","name":"spec_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"photo_ids":{"items":{"type":"integer"},"type":"array"}},"required":["photo_ids"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"caption":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"from_evidence":{"type":"boolean"},"id":{"type":"integer"},"position":{"type":"integer"},"spec":{"type":"integer"},"url":{"type":"string"}},"required":["caption","created_at","from_evidence","id","position","spec","url"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Set the display order of the spec's photos","tags":["EPR"]}},"/specs/{spec_id}/photos/{id}":{"delete":{"description":"Delete a photo. A photo copied from measurement evidence leaves the evidence image in place.","operationId":"delete_specs_spec_id_photos_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"spec_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Delete a photo (evidence images it was copied from are kept)","tags":["EPR"]},"patch":{"description":"Change a photo's caption (an empty caption clears it).","operationId":"patch_specs_spec_id_photos_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"spec_id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"caption":{"type":"string"}},"required":["caption"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"caption":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"from_evidence":{"type":"boolean"},"id":{"type":"integer"},"position":{"type":"integer"},"spec":{"type":"integer"},"url":{"type":"string"}},"required":["caption","created_at","from_evidence","id","position","spec","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"Validation failed."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Change a photo's caption","tags":["EPR"]}},"/specs/{spec_id}/photos/{id}/file":{"get":{"description":"Stream one photo's image.","operationId":"get_specs_spec_id_photos_id_file","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"spec_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"image/jpeg":{"schema":{"format":"binary","type":"string"}},"image/png":{"schema":{"format":"binary","type":"string"}},"image/webp":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Stream one photo's image","tags":["EPR"]}},"/submissions":{"get":{"description":"List report versions (``?status=`` filters by tracker status).","operationId":"get_submissions","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"due_date":{"format":"date","nullable":true,"type":"string"},"entity_id":{"type":"integer"},"entity_name":{"type":"string"},"format_id":{"type":"string"},"id":{"type":"integer"},"jurisdiction_code":{"type":"string"},"locked_at":{"format":"date-time","type":"string"},"period_end":{"format":"date","type":"string"},"period_id":{"type":"integer"},"period_start":{"format":"date","type":"string"},"submission":{"properties":{"has_receipt":{"type":"boolean"},"history":{"items":{"properties":{"at":{"type":"string"},"by":{"type":"string"},"status":{"type":"string"}},"required":["at","by","status"],"type":"object"},"type":"array"},"is_sandbox":{"type":"boolean"},"notes":{"type":"string"},"portal_reference":{"type":"string"},"receipt_filename":{"type":"string"},"receipt_sha256":{"type":"string"},"rejection_reason":{"type":"string"},"status":{"type":"string"},"submitted_on":{"format":"date","nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["has_receipt","history","is_sandbox","notes","portal_reference","receipt_filename","receipt_sha256","rejection_reason","status","submitted_on","updated_at"],"type":"object"},"version_number":{"type":"integer"}},"required":["due_date","entity_id","entity_name","format_id","id","jurisdiction_code","locked_at","period_end","period_id","period_start","submission","version_number"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List report versions","tags":["EPR"]}},"/submissions/{id}":{"get":{"description":"Return the status, filled templates and the portal walkthrough.","operationId":"get_submissions_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"due_date":{"format":"date","nullable":true,"type":"string"},"entity_id":{"type":"integer"},"entity_name":{"type":"string"},"filled_templates":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"file_format":{"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"mapping_id":{"type":"integer"},"report_version_id":{"type":"integer"},"row_count":{"type":"integer"},"sha256":{"type":"string"},"unmapped_columns":{"items":{"type":"string"},"type":"array"}},"required":["created_at","file_format","filename","id","mapping_id","report_version_id","row_count","sha256","unmapped_columns"],"type":"object"},"type":"array"},"format_id":{"type":"string"},"id":{"type":"integer"},"jurisdiction_code":{"type":"string"},"locked_at":{"format":"date-time","type":"string"},"period_end":{"format":"date","type":"string"},"period_id":{"type":"integer"},"period_start":{"format":"date","type":"string"},"submission":{"properties":{"has_receipt":{"type":"boolean"},"history":{"items":{"properties":{"at":{"type":"string"},"by":{"type":"string"},"status":{"type":"string"}},"required":["at","by","status"],"type":"object"},"type":"array"},"is_sandbox":{"type":"boolean"},"notes":{"type":"string"},"portal_reference":{"type":"string"},"receipt_filename":{"type":"string"},"receipt_sha256":{"type":"string"},"rejection_reason":{"type":"string"},"status":{"type":"string"},"submitted_on":{"format":"date","nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["has_receipt","history","is_sandbox","notes","portal_reference","receipt_filename","receipt_sha256","rejection_reason","status","submitted_on","updated_at"],"type":"object"},"version_number":{"type":"integer"},"walkthrough":{"additionalProperties":true,"type":"object"}},"required":["due_date","entity_id","entity_name","filled_templates","format_id","id","jurisdiction_code","locked_at","period_end","period_id","period_start","submission","version_number","walkthrough"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the status, filled templates and the portal walkthrough","tags":["EPR"]}},"/submissions/{id}/fill":{"post":{"description":"Fill the uploaded template using a saved mapping; needs a paid plan (402 ``plan_required`` on Free).","operationId":"post_submissions_id_fill","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"},"mapping_id":{"type":"integer"}},"required":["file","mapping_id"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"file_format":{"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"mapping_id":{"type":"integer"},"report_version_id":{"type":"integer"},"row_count":{"type":"integer"},"sha256":{"type":"string"},"unmapped_columns":{"items":{"type":"string"},"type":"array"}},"required":["created_at","file_format","filename","id","mapping_id","report_version_id","row_count","sha256","unmapped_columns"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"description":"The current plan does not allow this."},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Fill the uploaded template using a saved mapping","tags":["EPR"]}},"/submissions/{id}/receipt":{"get":{"description":"Download the stored receipt.","operationId":"get_submissions_id_receipt","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Download the stored receipt","tags":["EPR"]},"post":{"description":"Store the receipt file the customer downloaded from the portal.","operationId":"post_submissions_id_receipt","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"has_receipt":{"type":"boolean"},"history":{"items":{"properties":{"at":{"type":"string"},"by":{"type":"string"},"status":{"type":"string"}},"required":["at","by","status"],"type":"object"},"type":"array"},"is_sandbox":{"type":"boolean"},"notes":{"type":"string"},"portal_reference":{"type":"string"},"receipt_filename":{"type":"string"},"receipt_sha256":{"type":"string"},"rejection_reason":{"type":"string"},"status":{"type":"string"},"submitted_on":{"format":"date","nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["has_receipt","history","is_sandbox","notes","portal_reference","receipt_filename","receipt_sha256","rejection_reason","status","submitted_on","updated_at"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Store the receipt file the customer downloaded from the portal","tags":["EPR"]}},"/submissions/{id}/status":{"post":{"description":"Record submitted, acknowledged or rejected, with the portal reference.","operationId":"post_submissions_id_status","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"notes":{"type":"string"},"portal_reference":{"type":"string"},"rejection_reason":{"type":"string"},"status":{"enum":["prepared","submitted_by_customer","acknowledged","rejected"],"type":"string"},"submitted_on":{"format":"date","nullable":true,"type":"string"}},"required":["status"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"has_receipt":{"type":"boolean"},"history":{"items":{"properties":{"at":{"type":"string"},"by":{"type":"string"},"status":{"type":"string"}},"required":["at","by","status"],"type":"object"},"type":"array"},"is_sandbox":{"type":"boolean"},"notes":{"type":"string"},"portal_reference":{"type":"string"},"receipt_filename":{"type":"string"},"receipt_sha256":{"type":"string"},"rejection_reason":{"type":"string"},"status":{"type":"string"},"submitted_on":{"format":"date","nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["has_receipt","history","is_sandbox","notes","portal_reference","receipt_filename","receipt_sha256","rejection_reason","status","submitted_on","updated_at"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Record submitted, acknowledged or rejected, with the portal reference","tags":["EPR"]}},"/supplier-declarations":{"get":{"description":"List declarations (``?supplier_id=``, ``?status=``, ``?expiring_within_days=``).","operationId":"get_supplier_declarations","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"component_id":{"nullable":true,"type":"integer"},"component_name":{"nullable":true,"type":"string"},"data_quality_tier":{"type":"string"},"days_until_expiry":{"nullable":true,"type":"integer"},"document_reference":{"type":"string"},"id":{"type":"integer"},"is_expired":{"type":"boolean"},"kind":{"type":"string"},"received_at":{"format":"date-time","nullable":true,"type":"string"},"statement":{"additionalProperties":true,"type":"object"},"status":{"type":"string"},"supplier_id":{"type":"integer"},"supplier_name":{"type":"string"},"valid_until":{"format":"date","nullable":true,"type":"string"}},"required":["component_id","component_name","data_quality_tier","days_until_expiry","document_reference","id","is_expired","kind","received_at","statement","status","supplier_id","supplier_name","valid_until"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List declarations","tags":["EPR"]}},"/supplier-declarations/{id}/re-request":{"post":{"description":"Create a renewal request for the declaration's component.","operationId":"post_supplier_declarations_id_re_request","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"components":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"sku_name":{"nullable":true,"type":"string"}},"required":["id","name","sku_name"],"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"documents":{"items":{"properties":{"component_id":{"nullable":true,"type":"integer"},"content_sha256":{"type":"string"},"content_type":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"extraction_status":{"type":"string"},"id":{"type":"integer"},"original_name":{"type":"string"},"request_id":{"nullable":true,"type":"integer"},"size_bytes":{"type":"integer"},"supplier_id":{"type":"integer"},"uploaded_via":{"type":"string"}},"required":["component_id","content_sha256","content_type","created_at","extraction_status","id","original_name","request_id","size_bytes","supplier_id","uploaded_via"],"type":"object"},"type":"array"},"duration_days":{"type":"integer"},"emailed":{"type":"boolean"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"last_reminded_at":{"format":"date-time","nullable":true,"type":"string"},"link":{"nullable":true,"type":"string"},"message":{"type":"string"},"pending_proposals":{"type":"integer"},"reminder_count":{"type":"integer"},"renewal_of_id":{"nullable":true,"type":"integer"},"seats":{"items":{"properties":{"email":{"type":"string"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"last_used_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"revoked":{"type":"boolean"}},"required":["email","expires_at","id","last_used_at","name","revoked"],"type":"object"},"type":"array"},"sent_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"supplier_id":{"type":"integer"},"supplier_name":{"type":"string"}},"required":["components","created_at","documents","duration_days","emailed","expires_at","id","last_reminded_at","link","message","pending_proposals","reminder_count","renewal_of_id","seats","sent_at","status","submitted_at","supplier_id","supplier_name"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a renewal request for the declaration's component","tags":["EPR"]}},"/supplier-documents":{"post":{"description":"Store the upload and create proposals; nothing is measured until a proposal is accepted.","operationId":"post_supplier_documents","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"component_id":{"type":"integer"},"file":{"format":"binary","type":"string"},"request_id":{"type":"integer"},"supplier_id":{"type":"integer"}},"required":["file","supplier_id"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"document":{"properties":{"component_id":{"nullable":true,"type":"integer"},"content_sha256":{"type":"string"},"content_type":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"extraction_status":{"type":"string"},"id":{"type":"integer"},"original_name":{"type":"string"},"request_id":{"nullable":true,"type":"integer"},"size_bytes":{"type":"integer"},"supplier_id":{"type":"integer"},"uploaded_via":{"type":"string"}},"required":["component_id","content_sha256","content_type","created_at","extraction_status","id","original_name","request_id","size_bytes","supplier_id","uploaded_via"],"type":"object"},"proposals":{"items":{"properties":{"certification":{"type":"string"},"component_id":{"nullable":true,"type":"integer"},"component_name":{"nullable":true,"type":"string"},"contact_name":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"data_quality_tier":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"decision_note":{"type":"string"},"declaration_id":{"nullable":true,"type":"integer"},"document_id":{"nullable":true,"type":"integer"},"document_name":{"nullable":true,"type":"string"},"extraction":{},"id":{"type":"integer"},"material_text":{"type":"string"},"notes":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"pfas_free":{"nullable":true,"type":"boolean"},"request_id":{"nullable":true,"type":"integer"},"source":{"type":"string"},"status":{"type":"string"},"supplier_id":{"type":"integer"},"supplier_name":{"type":"string"},"unit_grams":{"nullable":true,"type":"string"},"valid_until":{"format":"date","nullable":true,"type":"string"}},"required":["certification","component_id","component_name","contact_name","created_at","data_quality_tier","decided_at","decision_note","declaration_id","document_id","document_name","extraction","id","material_text","notes","pcr_percent","pfas_free","request_id","source","status","supplier_id","supplier_name","unit_grams","valid_until"],"type":"object"},"type":"array"}},"required":["document","proposals"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Store the upload and create proposals; nothing is measured until a proposal is accepted","tags":["EPR"]}},"/supplier-documents/{id}/file":{"get":{"description":"Download a supplier document exactly as uploaded. It is always sent as an attachment with nosniff and a sandbox policy, so nothing in it runs in the app.","operationId":"get_supplier_documents_id_file","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Download a supplier document as an attachment","tags":["EPR"]}},"/supplier-proposals":{"get":{"description":"List proposals (``?status=``, ``?supplier_id=``, ``?request_id=``).","operationId":"get_supplier_proposals","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"certification":{"type":"string"},"component_id":{"nullable":true,"type":"integer"},"component_name":{"nullable":true,"type":"string"},"contact_name":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"data_quality_tier":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"decision_note":{"type":"string"},"declaration_id":{"nullable":true,"type":"integer"},"document_id":{"nullable":true,"type":"integer"},"document_name":{"nullable":true,"type":"string"},"extraction":{},"id":{"type":"integer"},"material_text":{"type":"string"},"notes":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"pfas_free":{"nullable":true,"type":"boolean"},"request_id":{"nullable":true,"type":"integer"},"source":{"type":"string"},"status":{"type":"string"},"supplier_id":{"type":"integer"},"supplier_name":{"type":"string"},"unit_grams":{"nullable":true,"type":"string"},"valid_until":{"format":"date","nullable":true,"type":"string"}},"required":["certification","component_id","component_name","contact_name","created_at","data_quality_tier","decided_at","decision_note","declaration_id","document_id","document_name","extraction","id","material_text","notes","pcr_percent","pfas_free","request_id","source","status","supplier_id","supplier_name","unit_grams","valid_until"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List proposals","tags":["EPR"]},"post":{"description":"Record figures read from a supplier document as a pending proposal.","operationId":"post_supplier_proposals","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"certification":{"type":"string"},"component_id":{"type":"integer"},"material_text":{"type":"string"},"notes":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"pfas_free":{"nullable":true,"type":"boolean"},"supplier_id":{"type":"integer"},"unit_grams":{"nullable":true,"type":"string"},"valid_until":{"format":"date","nullable":true,"type":"string"}},"required":["component_id","supplier_id"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"certification":{"type":"string"},"component_id":{"nullable":true,"type":"integer"},"component_name":{"nullable":true,"type":"string"},"contact_name":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"data_quality_tier":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"decision_note":{"type":"string"},"declaration_id":{"nullable":true,"type":"integer"},"document_id":{"nullable":true,"type":"integer"},"document_name":{"nullable":true,"type":"string"},"extraction":{},"id":{"type":"integer"},"material_text":{"type":"string"},"notes":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"pfas_free":{"nullable":true,"type":"boolean"},"request_id":{"nullable":true,"type":"integer"},"source":{"type":"string"},"status":{"type":"string"},"supplier_id":{"type":"integer"},"supplier_name":{"type":"string"},"unit_grams":{"nullable":true,"type":"string"},"valid_until":{"format":"date","nullable":true,"type":"string"}},"required":["certification","component_id","component_name","contact_name","created_at","data_quality_tier","decided_at","decision_note","declaration_id","document_id","document_name","extraction","id","material_text","notes","pcr_percent","pfas_free","request_id","source","status","supplier_id","supplier_name","unit_grams","valid_until"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Record figures read from a supplier document as a pending proposal","tags":["EPR"]}},"/supplier-proposals/{id}":{"get":{"description":"Return one proposal.","operationId":"get_supplier_proposals_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"certification":{"type":"string"},"component_id":{"nullable":true,"type":"integer"},"component_name":{"nullable":true,"type":"string"},"contact_name":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"data_quality_tier":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"decision_note":{"type":"string"},"declaration_id":{"nullable":true,"type":"integer"},"document_id":{"nullable":true,"type":"integer"},"document_name":{"nullable":true,"type":"string"},"extraction":{},"id":{"type":"integer"},"material_text":{"type":"string"},"notes":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"pfas_free":{"nullable":true,"type":"boolean"},"request_id":{"nullable":true,"type":"integer"},"source":{"type":"string"},"status":{"type":"string"},"supplier_id":{"type":"integer"},"supplier_name":{"type":"string"},"unit_grams":{"nullable":true,"type":"string"},"valid_until":{"format":"date","nullable":true,"type":"string"}},"required":["certification","component_id","component_name","contact_name","created_at","data_quality_tier","decided_at","decision_note","declaration_id","document_id","document_name","extraction","id","material_text","notes","pcr_percent","pfas_free","request_id","source","status","supplier_id","supplier_name","unit_grams","valid_until"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one proposal","tags":["EPR"]}},"/supplier-proposals/{id}/accept":{"post":{"description":"Accept the proposal, applying any edits sent in ``changes``.","operationId":"post_supplier_proposals_id_accept","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"changes":{"properties":{"certification":{"type":"string"},"material_text":{"type":"string"},"notes":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"pfas_free":{"nullable":true,"type":"boolean"},"unit_grams":{"nullable":true,"type":"string"},"valid_until":{"format":"date","nullable":true,"type":"string"}},"type":"object"},"component_id":{"type":"integer"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"certification":{"type":"string"},"component_id":{"nullable":true,"type":"integer"},"component_name":{"nullable":true,"type":"string"},"contact_name":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"data_quality_tier":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"decision_note":{"type":"string"},"declaration_id":{"nullable":true,"type":"integer"},"document_id":{"nullable":true,"type":"integer"},"document_name":{"nullable":true,"type":"string"},"extraction":{},"id":{"type":"integer"},"material_text":{"type":"string"},"notes":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"pfas_free":{"nullable":true,"type":"boolean"},"request_id":{"nullable":true,"type":"integer"},"source":{"type":"string"},"status":{"type":"string"},"supplier_id":{"type":"integer"},"supplier_name":{"type":"string"},"unit_grams":{"nullable":true,"type":"string"},"valid_until":{"format":"date","nullable":true,"type":"string"}},"required":["certification","component_id","component_name","contact_name","created_at","data_quality_tier","decided_at","decision_note","declaration_id","document_id","document_name","extraction","id","material_text","notes","pcr_percent","pfas_free","request_id","source","status","supplier_id","supplier_name","unit_grams","valid_until"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Accept the proposal, applying any edits sent in `changes`","tags":["EPR"]}},"/supplier-proposals/{id}/reject":{"post":{"description":"Reject the proposal with an optional note.","operationId":"post_supplier_proposals_id_reject","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"note":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"certification":{"type":"string"},"component_id":{"nullable":true,"type":"integer"},"component_name":{"nullable":true,"type":"string"},"contact_name":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"data_quality_tier":{"type":"string"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"decision_note":{"type":"string"},"declaration_id":{"nullable":true,"type":"integer"},"document_id":{"nullable":true,"type":"integer"},"document_name":{"nullable":true,"type":"string"},"extraction":{},"id":{"type":"integer"},"material_text":{"type":"string"},"notes":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"pfas_free":{"nullable":true,"type":"boolean"},"request_id":{"nullable":true,"type":"integer"},"source":{"type":"string"},"status":{"type":"string"},"supplier_id":{"type":"integer"},"supplier_name":{"type":"string"},"unit_grams":{"nullable":true,"type":"string"},"valid_until":{"format":"date","nullable":true,"type":"string"}},"required":["certification","component_id","component_name","contact_name","created_at","data_quality_tier","decided_at","decision_note","declaration_id","document_id","document_name","extraction","id","material_text","notes","pcr_percent","pfas_free","request_id","source","status","supplier_id","supplier_name","unit_grams","valid_until"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Reject the proposal with an optional note","tags":["EPR"]}},"/supplier-request-components":{"get":{"description":"List in-scope active components with their SKU name.","operationId":"get_supplier_request_components","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"sku_name":{"nullable":true,"type":"string"}},"required":["id","name","sku_name"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List in-scope active components with their SKU name","tags":["EPR"]}},"/supplier-requests":{"get":{"description":"List requests (``?status=``, ``?supplier_id=``).","operationId":"get_supplier_requests","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"components":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"sku_name":{"nullable":true,"type":"string"}},"required":["id","name","sku_name"],"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"documents":{"items":{"properties":{"component_id":{"nullable":true,"type":"integer"},"content_sha256":{"type":"string"},"content_type":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"extraction_status":{"type":"string"},"id":{"type":"integer"},"original_name":{"type":"string"},"request_id":{"nullable":true,"type":"integer"},"size_bytes":{"type":"integer"},"supplier_id":{"type":"integer"},"uploaded_via":{"type":"string"}},"required":["component_id","content_sha256","content_type","created_at","extraction_status","id","original_name","request_id","size_bytes","supplier_id","uploaded_via"],"type":"object"},"type":"array"},"duration_days":{"type":"integer"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"last_reminded_at":{"format":"date-time","nullable":true,"type":"string"},"link":{"nullable":true,"type":"string"},"message":{"type":"string"},"pending_proposals":{"type":"integer"},"reminder_count":{"type":"integer"},"renewal_of_id":{"nullable":true,"type":"integer"},"seats":{"items":{"properties":{"email":{"type":"string"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"last_used_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"revoked":{"type":"boolean"}},"required":["email","expires_at","id","last_used_at","name","revoked"],"type":"object"},"type":"array"},"sent_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"supplier_id":{"type":"integer"},"supplier_name":{"type":"string"}},"required":["components","created_at","documents","duration_days","expires_at","id","last_reminded_at","link","message","pending_proposals","reminder_count","renewal_of_id","seats","sent_at","status","submitted_at","supplier_id","supplier_name"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List requests","tags":["EPR"]},"post":{"description":"Create a request for chosen components; the response carries the link once.","operationId":"post_supplier_requests","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"component_ids":{"items":{"type":"integer"},"type":"array"},"contact_email":{"type":"string"},"contact_name":{"type":"string"},"duration_days":{"type":"integer"},"message":{"type":"string"},"supplier_id":{"type":"integer"}},"required":["component_ids","supplier_id"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"components":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"sku_name":{"nullable":true,"type":"string"}},"required":["id","name","sku_name"],"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"documents":{"items":{"properties":{"component_id":{"nullable":true,"type":"integer"},"content_sha256":{"type":"string"},"content_type":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"extraction_status":{"type":"string"},"id":{"type":"integer"},"original_name":{"type":"string"},"request_id":{"nullable":true,"type":"integer"},"size_bytes":{"type":"integer"},"supplier_id":{"type":"integer"},"uploaded_via":{"type":"string"}},"required":["component_id","content_sha256","content_type","created_at","extraction_status","id","original_name","request_id","size_bytes","supplier_id","uploaded_via"],"type":"object"},"type":"array"},"duration_days":{"type":"integer"},"emailed":{"type":"boolean"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"last_reminded_at":{"format":"date-time","nullable":true,"type":"string"},"link":{"nullable":true,"type":"string"},"message":{"type":"string"},"pending_proposals":{"type":"integer"},"reminder_count":{"type":"integer"},"renewal_of_id":{"nullable":true,"type":"integer"},"seats":{"items":{"properties":{"email":{"type":"string"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"last_used_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"revoked":{"type":"boolean"}},"required":["email","expires_at","id","last_used_at","name","revoked"],"type":"object"},"type":"array"},"sent_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"supplier_id":{"type":"integer"},"supplier_name":{"type":"string"}},"required":["components","created_at","documents","duration_days","emailed","expires_at","id","last_reminded_at","link","message","pending_proposals","reminder_count","renewal_of_id","seats","sent_at","status","submitted_at","supplier_id","supplier_name"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a request for chosen components; the response carries the link once","tags":["EPR"]}},"/supplier-requests/{id}":{"get":{"description":"Return one request with its components and seats.","operationId":"get_supplier_requests_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"components":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"sku_name":{"nullable":true,"type":"string"}},"required":["id","name","sku_name"],"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"documents":{"items":{"properties":{"component_id":{"nullable":true,"type":"integer"},"content_sha256":{"type":"string"},"content_type":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"extraction_status":{"type":"string"},"id":{"type":"integer"},"original_name":{"type":"string"},"request_id":{"nullable":true,"type":"integer"},"size_bytes":{"type":"integer"},"supplier_id":{"type":"integer"},"uploaded_via":{"type":"string"}},"required":["component_id","content_sha256","content_type","created_at","extraction_status","id","original_name","request_id","size_bytes","supplier_id","uploaded_via"],"type":"object"},"type":"array"},"duration_days":{"type":"integer"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"last_reminded_at":{"format":"date-time","nullable":true,"type":"string"},"link":{"nullable":true,"type":"string"},"message":{"type":"string"},"pending_proposals":{"type":"integer"},"reminder_count":{"type":"integer"},"renewal_of_id":{"nullable":true,"type":"integer"},"seats":{"items":{"properties":{"email":{"type":"string"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"last_used_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"revoked":{"type":"boolean"}},"required":["email","expires_at","id","last_used_at","name","revoked"],"type":"object"},"type":"array"},"sent_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"supplier_id":{"type":"integer"},"supplier_name":{"type":"string"}},"required":["components","created_at","documents","duration_days","expires_at","id","last_reminded_at","link","message","pending_proposals","reminder_count","renewal_of_id","seats","sent_at","status","submitted_at","supplier_id","supplier_name"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one request with its components and seats","tags":["EPR"]}},"/supplier-requests/{id}/cancel":{"post":{"description":"Cancel the request and revoke its links.","operationId":"post_supplier_requests_id_cancel","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"components":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"sku_name":{"nullable":true,"type":"string"}},"required":["id","name","sku_name"],"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"documents":{"items":{"properties":{"component_id":{"nullable":true,"type":"integer"},"content_sha256":{"type":"string"},"content_type":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"extraction_status":{"type":"string"},"id":{"type":"integer"},"original_name":{"type":"string"},"request_id":{"nullable":true,"type":"integer"},"size_bytes":{"type":"integer"},"supplier_id":{"type":"integer"},"uploaded_via":{"type":"string"}},"required":["component_id","content_sha256","content_type","created_at","extraction_status","id","original_name","request_id","size_bytes","supplier_id","uploaded_via"],"type":"object"},"type":"array"},"duration_days":{"type":"integer"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"last_reminded_at":{"format":"date-time","nullable":true,"type":"string"},"link":{"nullable":true,"type":"string"},"message":{"type":"string"},"pending_proposals":{"type":"integer"},"reminder_count":{"type":"integer"},"renewal_of_id":{"nullable":true,"type":"integer"},"seats":{"items":{"properties":{"email":{"type":"string"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"last_used_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"revoked":{"type":"boolean"}},"required":["email","expires_at","id","last_used_at","name","revoked"],"type":"object"},"type":"array"},"sent_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"supplier_id":{"type":"integer"},"supplier_name":{"type":"string"}},"required":["components","created_at","documents","duration_days","expires_at","id","last_reminded_at","link","message","pending_proposals","reminder_count","renewal_of_id","seats","sent_at","status","submitted_at","supplier_id","supplier_name"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Cancel the request and revoke its links","tags":["EPR"]}},"/supplier-requests/{id}/remind":{"post":{"description":"Record a reminder, issuing a fresh link (the old one stops working).","operationId":"post_supplier_requests_id_remind","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"components":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"sku_name":{"nullable":true,"type":"string"}},"required":["id","name","sku_name"],"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"documents":{"items":{"properties":{"component_id":{"nullable":true,"type":"integer"},"content_sha256":{"type":"string"},"content_type":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"extraction_status":{"type":"string"},"id":{"type":"integer"},"original_name":{"type":"string"},"request_id":{"nullable":true,"type":"integer"},"size_bytes":{"type":"integer"},"supplier_id":{"type":"integer"},"uploaded_via":{"type":"string"}},"required":["component_id","content_sha256","content_type","created_at","extraction_status","id","original_name","request_id","size_bytes","supplier_id","uploaded_via"],"type":"object"},"type":"array"},"duration_days":{"type":"integer"},"emailed":{"type":"boolean"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"last_reminded_at":{"format":"date-time","nullable":true,"type":"string"},"link":{"nullable":true,"type":"string"},"message":{"type":"string"},"pending_proposals":{"type":"integer"},"reminder_count":{"type":"integer"},"renewal_of_id":{"nullable":true,"type":"integer"},"seats":{"items":{"properties":{"email":{"type":"string"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"last_used_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"revoked":{"type":"boolean"}},"required":["email","expires_at","id","last_used_at","name","revoked"],"type":"object"},"type":"array"},"sent_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"supplier_id":{"type":"integer"},"supplier_name":{"type":"string"}},"required":["components","created_at","documents","duration_days","emailed","expires_at","id","last_reminded_at","link","message","pending_proposals","reminder_count","renewal_of_id","seats","sent_at","status","submitted_at","supplier_id","supplier_name"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Record a reminder, issuing a fresh link (the old one stops working)","tags":["EPR"]}},"/suppliers":{"get":{"description":"List the organization's suppliers (``?active=true|false``, ``?q=``).","operationId":"get_suppliers","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"contact_email":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"notes":{"type":"string"}},"required":["contact_email","created_at","id","is_active","name","notes"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List the organization's suppliers","tags":["EPR"]},"post":{"description":"Create a supplier.","operationId":"post_suppliers","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"contact_email":{"type":"string"},"name":{"type":"string"},"notes":{"type":"string"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"contact_email":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"notes":{"type":"string"}},"required":["contact_email","created_at","id","is_active","name","notes"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a supplier","tags":["EPR"]}},"/suppliers/{id}":{"get":{"description":"Return one supplier.","operationId":"get_suppliers_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"contact_email":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"notes":{"type":"string"}},"required":["contact_email","created_at","id","is_active","name","notes"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return one supplier","tags":["EPR"]},"patch":{"description":"Update name, contact email, notes or active state.","operationId":"patch_suppliers_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"contact_email":{"type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"notes":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"contact_email":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"notes":{"type":"string"}},"required":["contact_email","created_at","id","is_active","name","notes"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Update name, contact email, notes or active state","tags":["EPR"]}},"/support/inbound/":{"post":{"description":"Verify the signature, store the event once, and thread the mail onto a ticket.","operationId":"post_support_inbound","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean"}},"required":["ok"],"type":"object"}}},"description":"Success."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"description":"Missing or invalid credentials."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Verify the signature, store the event once, and thread the mail onto a ticket","tags":["support"]}},"/support/staff/tickets/":{"get":{"description":"List tickets (``status``, ``assignee`` = me|unassigned|<id>, ``organization``, ``q``).","operationId":"get_support_staff_tickets","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"assignee":{"type":"string"},"assignee_id":{"nullable":true,"type":"integer"},"channel":{"type":"string"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"context_route":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"last_message_at":{"format":"date-time","type":"string"},"organization":{"type":"string"},"organization_id":{"nullable":true,"type":"integer"},"priority":{"type":"boolean"},"reference":{"type":"string"},"requester_email":{"type":"string"},"respond_by":{"format":"date-time","nullable":true,"type":"string"},"sender_verified":{"type":"boolean"},"status":{"type":"string"},"subject":{"type":"string"}},"required":["assignee","assignee_id","channel","closed_at","context_route","created_at","id","last_message_at","organization","organization_id","priority","reference","requester_email","respond_by","sender_verified","status","subject"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List tickets (`status`, `assignee` = me|unassigned|<id>, `organization`, `q`)","tags":["support"]}},"/support/staff/tickets/{uid}/":{"get":{"description":"Return a ticket with every message including internal notes.","operationId":"get_support_staff_tickets_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignee":{"type":"string"},"assignee_id":{"nullable":true,"type":"integer"},"channel":{"type":"string"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"context_route":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"last_message_at":{"format":"date-time","type":"string"},"messages":{"items":{"properties":{"author":{"type":"string"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"direction":{"type":"string"},"email_status":{"type":"string"},"id":{"type":"string"},"source":{"type":"string"}},"required":["author","body","created_at","direction","email_status","id","source"],"type":"object"},"type":"array"},"organization":{"type":"string"},"organization_id":{"nullable":true,"type":"integer"},"priority":{"type":"boolean"},"reference":{"type":"string"},"requester_email":{"type":"string"},"respond_by":{"format":"date-time","nullable":true,"type":"string"},"sender_verified":{"type":"boolean"},"status":{"type":"string"},"subject":{"type":"string"}},"required":["assignee","assignee_id","channel","closed_at","context_route","created_at","id","last_message_at","messages","organization","organization_id","priority","reference","requester_email","respond_by","sender_verified","status","subject"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return a ticket with every message including internal notes","tags":["support"]},"patch":{"description":"Change ``status`` and/or ``assignee`` (``\"me\"``, a staff user id, or null to unassign).","operationId":"patch_support_staff_tickets_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"assignee":{"nullable":true,"oneOf":[{"enum":["me"],"type":"string"},{"type":"integer"}]},"status":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignee":{"type":"string"},"assignee_id":{"nullable":true,"type":"integer"},"channel":{"type":"string"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"context_route":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"last_message_at":{"format":"date-time","type":"string"},"messages":{"items":{"properties":{"author":{"type":"string"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"direction":{"type":"string"},"email_status":{"type":"string"},"id":{"type":"string"},"source":{"type":"string"}},"required":["author","body","created_at","direction","email_status","id","source"],"type":"object"},"type":"array"},"organization":{"type":"string"},"organization_id":{"nullable":true,"type":"integer"},"priority":{"type":"boolean"},"reference":{"type":"string"},"requester_email":{"type":"string"},"respond_by":{"format":"date-time","nullable":true,"type":"string"},"sender_verified":{"type":"boolean"},"status":{"type":"string"},"subject":{"type":"string"}},"required":["assignee","assignee_id","channel","closed_at","context_route","created_at","id","last_message_at","messages","organization","organization_id","priority","reference","requester_email","respond_by","sender_verified","status","subject"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Change ``status`` and/or ``assignee`` (``\"me\"``, a staff user id, or null to unassign)","tags":["support"]}},"/support/staff/tickets/{uid}/reply/":{"post":{"description":"Email a reply to the requester, or save an internal note when ``note`` is true.","operationId":"post_support_staff_tickets_uid_reply","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"body":{"type":"string"},"note":{"type":"boolean"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"author":{"type":"string"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"direction":{"type":"string"},"email_status":{"type":"string"},"id":{"type":"string"},"source":{"type":"string"}},"required":["author","body","created_at","direction","email_status","id","source"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Email a reply to the requester, or save an internal note when `note` is true","tags":["support"]}},"/support/tickets/":{"get":{"description":"List the organization's tickets, newest activity first.","operationId":"get_support_tickets","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"channel":{"type":"string"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"context_route":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"last_message_at":{"format":"date-time","type":"string"},"reference":{"type":"string"},"requester_email":{"type":"string"},"respond_by":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"subject":{"type":"string"}},"required":["channel","closed_at","context_route","created_at","id","last_message_at","reference","requester_email","respond_by","status","subject"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List the organization's tickets, newest activity first","tags":["EPR"]},"post":{"description":"Open a ticket from the in-app help panel.","operationId":"post_support_tickets","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"body":{"type":"string"},"context_route":{"type":"string"},"subject":{"type":"string"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"channel":{"type":"string"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"context_route":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"last_message_at":{"format":"date-time","type":"string"},"messages":{"items":{"properties":{"author":{"type":"string"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"direction":{"type":"string"},"email_status":{"type":"string"},"id":{"type":"string"},"source":{"type":"string"}},"required":["author","body","created_at","direction","email_status","id","source"],"type":"object"},"type":"array"},"reference":{"type":"string"},"requester_email":{"type":"string"},"respond_by":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"subject":{"type":"string"}},"required":["channel","closed_at","context_route","created_at","id","last_message_at","messages","reference","requester_email","respond_by","status","subject"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Open a ticket from the in-app help panel","tags":["EPR"]}},"/support/tickets/{uid}/":{"get":{"description":"Return a ticket and its messages without internal notes.","operationId":"get_support_tickets_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"channel":{"type":"string"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"context_route":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"last_message_at":{"format":"date-time","type":"string"},"messages":{"items":{"properties":{"author":{"type":"string"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"direction":{"type":"string"},"email_status":{"type":"string"},"id":{"type":"string"},"source":{"type":"string"}},"required":["author","body","created_at","direction","email_status","id","source"],"type":"object"},"type":"array"},"reference":{"type":"string"},"requester_email":{"type":"string"},"respond_by":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"subject":{"type":"string"}},"required":["channel","closed_at","context_route","created_at","id","last_message_at","messages","reference","requester_email","respond_by","status","subject"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return a ticket and its messages without internal notes","tags":["EPR"]}},"/support/tickets/{uid}/messages/":{"post":{"description":"Add a customer reply; a closed ticket reopens.","operationId":"post_support_tickets_uid_messages","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"body":{"type":"string"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"author":{"type":"string"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"direction":{"type":"string"},"email_status":{"type":"string"},"id":{"type":"string"},"source":{"type":"string"}},"required":["author","body","created_at","direction","email_status","id","source"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Add a customer reply; a closed ticket reopens","tags":["EPR"]}},"/targets/evaluate/":{"post":{"description":"Evaluate and store the result; pending rules are named in ``pending_leaves``.","operationId":"post_targets_evaluate","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/EvaluateRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/EvaluateRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"as_of":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"data_quality":{"type":"string"},"id":{"type":"integer"},"inputs":{"additionalProperties":true,"type":"object"},"kind":{"type":"string"},"markets":{"items":{"type":"string"},"type":"array"},"pending_leaves":{"items":{"type":"string"},"type":"array"},"pending_rules":{"items":{"properties":{"rule":{"type":"string"},"title":{"type":"string"}},"required":["rule","title"],"type":"object"},"type":"array"},"result":{"additionalProperties":true,"type":"object"},"spec_id":{"nullable":true,"type":"integer"},"spec_name":{"type":"string"}},"required":["as_of","created_at","data_quality","id","inputs","kind","markets","pending_leaves","pending_rules","result","spec_id","spec_name"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Evaluate and store the result; pending rules are named in `pending_leaves`","tags":["targets"]}},"/targets/evaluations/":{"get":{"description":"Return up to 100 saved evaluations without their result bodies.","operationId":"get_targets_evaluations","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"evaluations":{"items":{"properties":{"as_of":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"data_quality":{"type":"string"},"id":{"type":"integer"},"kind":{"type":"string"},"markets":{"items":{"type":"string"},"type":"array"},"pending_leaves":{"items":{"type":"string"},"type":"array"},"pending_rules":{"items":{"properties":{"rule":{"type":"string"},"title":{"type":"string"}},"required":["rule","title"],"type":"object"},"type":"array"},"spec_id":{"nullable":true,"type":"integer"},"spec_name":{"type":"string"}},"required":["as_of","created_at","data_quality","id","kind","markets","pending_leaves","pending_rules","spec_id","spec_name"],"type":"object"},"type":"array"}},"required":["evaluations"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return up to 100 saved evaluations without their result bodies","tags":["targets"]}},"/targets/evaluations/{id}/":{"get":{"description":"Return the run; another organisation's (or another scoped user's) run is a 404.","operationId":"get_targets_evaluations_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"as_of":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"data_quality":{"type":"string"},"id":{"type":"integer"},"inputs":{"additionalProperties":true,"type":"object"},"kind":{"type":"string"},"markets":{"items":{"type":"string"},"type":"array"},"pending_leaves":{"items":{"type":"string"},"type":"array"},"pending_rules":{"items":{"properties":{"rule":{"type":"string"},"title":{"type":"string"}},"required":["rule","title"],"type":"object"},"type":"array"},"result":{"additionalProperties":true,"type":"object"},"spec_id":{"nullable":true,"type":"integer"},"spec_name":{"type":"string"}},"required":["as_of","created_at","data_quality","id","inputs","kind","markets","pending_leaves","pending_rules","result","spec_id","spec_name"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found in the caller's organization."},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the run; another organisation's (or another scoped user's) run is a 404","tags":["targets"]}},"/targets/labelling/":{"post":{"description":"Evaluate labelling for the selected specs in the requested markets and save the run. Flag messages, rule titles and pending-rule titles are written in the request language (Accept-Language). Each flag may carry a `note`: research text from the rule data (such as why a rule is pending, or the marking scheme a source names), written in the request language when a reviewed rendering exists. `note_lang` names the language `note` is written in and `note_original` keeps the English research text (null when the note is shown as it stands). The note is null when the rule data has none.","operationId":"post_targets_labelling","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabellingRunRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/LabellingRunRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/LabellingRunRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"as_of":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"data_quality":{"type":"string"},"id":{"type":"integer"},"inputs":{"additionalProperties":true,"type":"object"},"kind":{"type":"string"},"markets":{"items":{"type":"string"},"type":"array"},"pending_leaves":{"items":{"type":"string"},"type":"array"},"pending_rules":{"items":{"properties":{"rule":{"type":"string"},"title":{"type":"string"}},"required":["rule","title"],"type":"object"},"type":"array"},"result":{"additionalProperties":true,"type":"object"},"spec_id":{"nullable":true,"type":"integer"},"spec_name":{"type":"string"}},"required":["as_of","created_at","data_quality","id","inputs","kind","markets","pending_leaves","pending_rules","result","spec_id","spec_name"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Evaluate labelling for the selected specs in the requested markets and save the run","tags":["targets"]}},"/targets/options/":{"get":{"description":"Return the caller's visible specs (with components) and the material catalogue.","operationId":"get_targets_options","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"materials":{"items":{"properties":{"code":{"type":"string"},"is_plastic":{"type":"boolean"},"name":{"type":"string"}},"required":["code","is_plastic","name"],"type":"object"},"type":"array"},"specs":{"items":{"properties":{"components":{"items":{"properties":{"id":{},"material_code":{},"material_name":{},"name":{"type":"string"},"pcr_percent":{"nullable":true,"type":"string"},"unit_grams":{"nullable":true,"type":"string"}},"required":["id","material_code","material_name","name","pcr_percent","unit_grams"],"type":"object"},"type":"array"},"id":{"type":"integer"},"level":{},"name":{"type":"string"}},"required":["components","id","level","name"],"type":"object"},"type":"array"}},"required":["materials","specs"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the caller's visible specs (with components) and the material catalogue","tags":["targets"]}},"/targets/simulate/":{"post":{"description":"Return deltas in fees, targets, PPWR grade and UK PPT for the proposed changes.","operationId":"post_targets_simulate","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulateRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/SimulateRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/SimulateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"as_of":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"data_quality":{"type":"string"},"id":{"type":"integer"},"inputs":{"additionalProperties":true,"type":"object"},"kind":{"type":"string"},"markets":{"items":{"type":"string"},"type":"array"},"pending_leaves":{"items":{"type":"string"},"type":"array"},"pending_rules":{"items":{"properties":{"rule":{"type":"string"},"title":{"type":"string"}},"required":["rule","title"],"type":"object"},"type":"array"},"result":{"additionalProperties":true,"type":"object"},"spec_id":{"nullable":true,"type":"integer"},"spec_name":{"type":"string"}},"required":["as_of","created_at","data_quality","id","inputs","kind","markets","pending_leaves","pending_rules","result","spec_id","spec_name"],"type":"object"}}},"description":"Created."},"400":{"description":"The request or one of its parameters is invalid."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return deltas in fees, targets, PPWR grade and UK PPT for the proposed changes","tags":["targets"]}},"/targets/tracking/":{"get":{"description":"Return tracked targets; restricted members see only their scoped entities' targets.","operationId":"get_targets_tracking","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"targets":{"items":{"properties":{"baseline_value":{"nullable":true,"type":"string"},"baseline_year":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"current_tier":{"type":"string"},"current_value":{"nullable":true,"type":"string"},"entity_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"is_regulatory":{"type":"boolean"},"jurisdiction_code":{"type":"string"},"metric":{"type":"string"},"progress_percent":{"nullable":true,"type":"string"},"source_url":{"type":"string"},"target_value":{"type":"string"},"target_year":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["baseline_value","baseline_year","created_at","current_tier","current_value","entity_id","id","is_regulatory","jurisdiction_code","metric","progress_percent","source_url","target_value","target_year","updated_at"],"type":"object"},"type":"array"}},"required":["targets"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return tracked targets; restricted members see only their scoped entities' targets","tags":["targets"]},"post":{"description":"Create a tracked target in the caller's organisation.","operationId":"post_targets_tracking","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TrackingRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/TrackingRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"baseline_value":{"nullable":true,"type":"string"},"baseline_year":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"current_tier":{"type":"string"},"current_value":{"nullable":true,"type":"string"},"entity_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"is_regulatory":{"type":"boolean"},"jurisdiction_code":{"type":"string"},"metric":{"type":"string"},"progress_percent":{"nullable":true,"type":"string"},"source_url":{"type":"string"},"target_value":{"type":"string"},"target_year":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["baseline_value","baseline_year","created_at","current_tier","current_value","entity_id","id","is_regulatory","jurisdiction_code","metric","progress_percent","source_url","target_value","target_year","updated_at"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"The caller is not permitted to do this."},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a tracked target in the caller's organisation","tags":["targets"]}},"/targets/tracking/{id}/":{"delete":{"description":"Delete a tracked target.","operationId":"delete_targets_tracking_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Done; the response has no body."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Delete a tracked target","tags":["targets"]},"patch":{"description":"Update figures; another organisation's target is a 404.","operationId":"patch_targets_tracking_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedTrackingRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedTrackingRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedTrackingRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"baseline_value":{"nullable":true,"type":"string"},"baseline_year":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"current_tier":{"type":"string"},"current_value":{"nullable":true,"type":"string"},"entity_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"is_regulatory":{"type":"boolean"},"jurisdiction_code":{"type":"string"},"metric":{"type":"string"},"progress_percent":{"nullable":true,"type":"string"},"source_url":{"type":"string"},"target_value":{"type":"string"},"target_year":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["baseline_value","baseline_year","created_at","current_tier","current_value","entity_id","id","is_regulatory","jurisdiction_code","metric","progress_percent","source_url","target_value","target_year","updated_at"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Update figures; another organisation's target is a 404","tags":["targets"]}},"/taxonomy":{"get":{"description":"Return active versioned material categories, optionally filtered by state.","operationId":"get_taxonomy","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MaterialCategory"},"type":"array"}}},"description":""},"400":{"description":"Unsupported state"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List EPR material categories","tags":["EPR"]}},"/team":{"get":{"description":"Members with roles, signing right and entity scope, plus seat usage against the limit.","operationId":"get_team","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamOverview"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Team overview","tags":["EPR access"]}},"/team/external-auditors":{"post":{"description":"Invite someone outside the organization to the chosen legal entities (and, optionally, only some of their reporting periods). ``access`` is ``read_only`` (the default) or ``edit``: an editing adviser prepares and corrects figures but never signs, bills or manages members. Access ends at ``access_expires_at`` (at most 366 days ahead), is enforced by the server and can be revoked earlier. External advisers never use a seat. Needs a recent second factor.","operationId":"post_team_external_auditors","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalAuditorInviteRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalAuditorInvited"}}},"description":""},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Invite an external auditor","tags":["EPR access"]}},"/team/members/{member_uid}/approval-right":{"put":{"description":"Change whether the member may approve packaging specs. Auditors and guests can never hold it.","operationId":"put_team_members_member_uid_approval_right","parameters":[{"in":"path","name":"member_uid","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRightRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamOverview"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Grant or revoke the spec-approval right","tags":["EPR access"]}},"/team/members/{member_uid}/entity-scope":{"put":{"description":"Empty lists lift the restriction. Owners always see every entity.","operationId":"put_team_members_member_uid_entity_scope","parameters":[{"in":"path","name":"member_uid","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityScopeRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamOverview"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Set a member's entity scope","tags":["EPR access"]}},"/team/members/{member_uid}/revoke-external-access":{"post":{"description":"Ends the external auditor's membership before its end date and revokes their sessions, API keys and OAuth grants. Only external-auditor members can be revoked here.","operationId":"post_team_members_member_uid_revoke_external_access","parameters":[{"in":"path","name":"member_uid","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamOverview"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"End an external auditor's access now","tags":["EPR access"]}},"/team/members/{member_uid}/signing-right":{"put":{"description":"Change whether the member may sign reports.","operationId":"put_team_members_member_uid_signing_right","parameters":[{"in":"path","name":"member_uid","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SigningRightRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamOverview"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Grant or revoke the report-signing right","tags":["EPR access"]}},"/team/transfer-ownership":{"post":{"description":"Owner only. The recipient becomes owner and the caller takes the chosen role, so the organization always has an owner.","operationId":"post_team_transfer_ownership","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnershipTransferRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamOverview"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Transfer ownership","tags":["EPR access"]}},"/teardowns":{"post":{"description":"Create a resumable teardown session for an organization-owned packaging SKU.","operationId":"post_teardowns","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeardownSessionRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TeardownSessionRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/TeardownSessionRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeardownSession"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"SKU not found"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Start a packaging teardown","tags":["EPR"]}},"/teardowns/{id}":{"get":{"description":"Return one organization-owned resumable teardown session.","operationId":"get_teardowns_id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeardownSession"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Get a packaging teardown","tags":["EPR"]}},"/teardowns/{id}/analysis":{"get":{"description":"Return the latest stored proposal or failure state for a teardown.","operationId":"get_teardowns_id_analysis","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Stored analysis state"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Get teardown analysis","tags":["EPR"]}},"/teardowns/{id}/analyze":{"post":{"description":"Validate organization-owned evidence and enqueue material and scale analysis.","operationId":"post_teardowns_id_analyze","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"asset_ids":{"items":{"type":"integer"},"type":"array"},"component_id":{"nullable":true,"type":"integer"}},"required":["asset_ids"],"type":"object"}}}},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"analysis_id":{"type":"string"},"task_id":{"type":"string"}},"required":["analysis_id","task_id"],"type":"object"}}},"description":"Analysis queued"},"400":{"description":"Invalid assets"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Analyze teardown evidence","tags":["EPR"]}},"/teardowns/{id}/complete":{"post":{"description":"Finalize a teardown after its measurement records are confirmed.","operationId":"post_teardowns_id_complete","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeardownSession"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Complete a packaging teardown","tags":["EPR"]}},"/template-mappings":{"get":{"description":"List the organization's saved mappings.","operationId":"get_template_mappings","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"column_map":{},"constants":{},"header_row":{"type":"integer"},"id":{"type":"integer"},"jurisdiction_code":{"type":"string"},"sheet_name":{"type":"string"},"template_fingerprint":{"type":"string"},"template_name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["column_map","constants","header_row","id","jurisdiction_code","sheet_name","template_fingerprint","template_name","updated_at"],"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","has_more","next_cursor"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List the organization's saved mappings","tags":["EPR"]},"post":{"description":"Save the mapping for an uploaded template (the file identifies the template).","operationId":"post_template_mappings","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"column_map":{"description":"JSON object mapping template headings to report columns.","type":"string"},"constants":{"description":"JSON object of fixed values by template heading.","type":"string"},"file":{"format":"binary","type":"string"},"header_row":{"type":"integer"},"jurisdiction_code":{"type":"string"},"report_version_id":{"type":"integer"},"sheet_name":{"type":"string"},"template_name":{"type":"string"}},"required":["file"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"column_map":{},"constants":{},"header_row":{"type":"integer"},"id":{"type":"integer"},"jurisdiction_code":{"type":"string"},"sheet_name":{"type":"string"},"template_fingerprint":{"type":"string"},"template_name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["column_map","constants","header_row","id","jurisdiction_code","sheet_name","template_fingerprint","template_name","updated_at"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Save the mapping for an uploaded template (the file identifies the template)","tags":["EPR"]}},"/templates/preview":{"post":{"description":"Return the template's headings, a suggested mapping, and any saved mapping for it.","operationId":"post_templates_preview","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"},"header_row":{"type":"integer"},"jurisdiction_code":{"type":"string"},"report_version_id":{"type":"integer"},"sheet_name":{"type":"string"}},"required":["file"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"columns":{"items":{"properties":{"header":{"type":"string"},"id":{"type":"string"},"required":{"type":"boolean"}},"required":["header","id","required"],"type":"object"},"type":"array"},"file_format":{"type":"string"},"header_row":{"type":"integer"},"headers":{"items":{"type":"string"},"type":"array"},"saved_mapping":{"nullable":true,"properties":{"column_map":{},"constants":{},"header_row":{"type":"integer"},"id":{"type":"integer"},"jurisdiction_code":{"type":"string"},"sheet_name":{"type":"string"},"template_fingerprint":{"type":"string"},"template_name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["column_map","constants","header_row","id","jurisdiction_code","sheet_name","template_fingerprint","template_name","updated_at"],"type":"object"},"sheet_name":{"type":"string"},"suggested_map":{"additionalProperties":{"type":"string"},"type":"object"}},"required":["columns","file_format","header_row","headers","saved_mapping","sheet_name","suggested_map"],"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return the template's headings, a suggested mapping, and any saved mapping for it","tags":["EPR"]}},"/uploads":{"post":{"description":"Issue an upload URL (body: ``kind``, ``preset``, ``filename``, ``entity``); valid 15 minutes.","operationId":"post_uploads","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"entity":{"type":"string"},"filename":{"type":"string"},"kind":{"type":"string"},"preset":{"type":"string"}},"required":["filename","kind"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"expires_at":{"format":"date-time","type":"string"},"upload_url":{"type":"string"}},"required":["expires_at","upload_url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Issue an upload URL (body: `kind`, `preset`, `filename`, `entity`); valid for 15 minutes","tags":["EPR"]}},"/uploads/{token}":{"post":{"description":"Upload the file (raw body) and import it.","operationId":"post_uploads_token","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}},"text/csv":{"schema":{"format":"binary","type":"string"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"attempt":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"error_code":{"type":"string"},"error_file_name":{"type":"string"},"files":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"flow_id":{"nullable":true,"type":"string"},"flow_name":{"type":"string"},"has_error_file":{"type":"boolean"},"id":{"type":"string"},"import_job_id":{"nullable":true,"type":"string"},"rows_accepted":{"type":"integer"},"rows_rejected":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"trigger":{"type":"string"}},"required":["attempt","created_at","error_code","error_file_name","files","finished_at","flow_id","flow_name","has_error_file","id","import_job_id","rows_accepted","rows_rejected","started_at","status","trigger"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created."},"401":{"description":"Missing or invalid credentials."},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Upload the file (raw body) and import it","tags":["EPR"]},"put":{"description":"Upload the file (raw body) and import it.","operationId":"put_uploads_token","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}},"text/csv":{"schema":{"format":"binary","type":"string"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"attempt":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"error_code":{"type":"string"},"error_file_name":{"type":"string"},"files":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"flow_id":{"nullable":true,"type":"string"},"flow_name":{"type":"string"},"has_error_file":{"type":"boolean"},"id":{"type":"string"},"import_job_id":{"nullable":true,"type":"string"},"rows_accepted":{"type":"integer"},"rows_rejected":{"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"trigger":{"type":"string"}},"required":["attempt","created_at","error_code","error_file_name","files","finished_at","flow_id","flow_name","has_error_file","id","import_job_id","rows_accepted","rows_rejected","started_at","status","trigger"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created."},"401":{"description":"Missing or invalid credentials."},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Upload the file (raw body) and import it","tags":["EPR"]}},"/walkthroughs/{code}":{"get":{"description":"Return ordered steps, each citing its source leaf (``?entity_id=`` adds held numbers).","operationId":"get_walkthroughs_code","parameters":[{"in":"path","name":"code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Return ordered steps, each citing its source leaf","tags":["EPR"]}},"/webhook-deliveries":{"get":{"description":"Return the delivery log, newest first.","operationId":"get_webhook_deliveries","parameters":[{"in":"query","name":"cursor","schema":{"type":"string"}},{"description":"Only this endpoint.","in":"query","name":"endpoint_id","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"integer"}},{"description":"pending, succeeded, retrying or failed.","in":"query","name":"status","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryList"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List webhook deliveries","tags":["EPR access"]}},"/webhook-deliveries/{uid}/redeliver":{"post":{"description":"Send the same event to the same endpoint again.","operationId":"post_webhook_deliveries_uid_redeliver","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"$ref":"#/components/responses/Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Redeliver an event","tags":["EPR access"]}},"/webhook-endpoints":{"get":{"description":"List endpoints (secrets are never returned).","operationId":"get_webhook_endpoints","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List webhook endpoints","tags":["EPR access"]},"post":{"description":"Destinations must be public HTTPS URLs; private, loopback and link-local addresses are refused.","operationId":"post_webhook_endpoints","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointSecret"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create a webhook endpoint","tags":["EPR access"]}},"/webhook-endpoints/{uid}":{"delete":{"description":"Delete an endpoint and its delivery log.","operationId":"delete_webhook_endpoints_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Delete a webhook endpoint","tags":["EPR access"]},"get":{"description":"Return one endpoint.","operationId":"get_webhook_endpoints_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Get a webhook endpoint","tags":["EPR access"]},"patch":{"description":"Change the URL, events, description or enabled state.","operationId":"patch_webhook_endpoints_uid","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedWebhookEndpointUpdateRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"$ref":"#/components/responses/Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Change a webhook endpoint","tags":["EPR access"]}},"/webhook-endpoints/{uid}/rotate-secret":{"post":{"description":"The previous secret stays valid for 24 hours; deliveries carry a signature for each.","operationId":"post_webhook_endpoints_uid_rotate_secret","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointSecret"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Rotate a webhook signing secret","tags":["EPR access"]}},"/webhook-events":{"get":{"description":"Return the catalog of subscribable events.","operationId":"get_webhook_events","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventCatalog"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"List webhook event types","tags":["EPR access"]}},"/workspaces":{"post":{"description":"Provision an EPR workspace for the authenticated producer organization.","operationId":"post_workspaces","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSetupRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/WorkspaceSetupRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/WorkspaceSetupRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Workspace already exists"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Create an EPR workspace","tags":["EPR"]}},"/workspaces/current":{"get":{"description":"Return producer profile, launch state, and billing readiness.","operationId":"get_workspaces_current","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"Workspace unavailable"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Get the current EPR workspace","tags":["EPR"]},"patch":{"description":"Partially update editable producer profile fields; a company legal name renames the default entity.","operationId":"patch_workspaces_current","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedWorkspaceSetupRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedWorkspaceSetupRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedWorkspaceSetupRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}},"description":""},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"Workspace is read-only"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Update the current EPR workspace","tags":["EPR"]}},"/workspaces/current/accept-terms":{"post":{"description":"Record the authenticated user's acceptance with their drawn or typed signature and activate an eligible workspace. A typed signature must match the declaration signer's name. Optional `checker_answers` (the public checker's answers) are saved as the workspace's places and queue its first obligations check; places the rules do not cover are left out.","operationId":"post_workspaces_current_accept_terms","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptTermsRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/AcceptTermsRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AcceptTermsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}},"description":""},"400":{"description":"The signature is missing, blank or not a PNG"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"description":"Terms cannot be accepted"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]}],"summary":"Accept the current EPR terms","tags":["EPR"]}},"/workspaces/current/session":{"get":{"description":"Answers 200 and reports whether the caller is signed out, unverified, without a workspace, held back, setting up or ready, with the workspace when there is one. Too many calls get 429 with Retry-After.","operationId":"get_workspaces_current_session","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartSession"}}},"description":""},"429":{"description":"Too many requests; retry later.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"Bearer":[]},{}],"summary":"Who is signing in on the start page","tags":["EPR"]}}},"servers":[{"url":"https://app.instica.com/api/v1/epr"}]}