{"openapi":"3.1.0","info":{"title":"TaxLens API","description":"Global Accommodation Tax Intelligence Platform","version":"0.1.0"},"paths":{"/v1/auth/signup":{"post":{"tags":["Authentication"],"summary":"Signup","description":"Public sign-up. Creates a User and an Organization in one transaction.\nThe signing-up user becomes the org owner.\n\nBehavior depends on `settings.require_email_verification`:\n- False (dev): user is auto-logged-in; access_token is returned. Email\n  verification message is still sent so the user can verify later.\n- True (prod): no access_token is issued; client must redirect the user\n  to \"check your email\", and login is gated until verification.","operationId":"signup_v1_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/register":{"post":{"tags":["Authentication"],"summary":"Register","description":"Admin-gated user creation. Public sign-up should use /signup instead.","operationId":"register_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegister"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/login":{"post":{"tags":["Authentication"],"summary":"Login","description":"Authenticate and receive a JWT access token.\n\nWhen `settings.require_email_verification` is True, an unverified user\nreceives 403 `email_verification_required` instead of a token, and a fresh\nverification email is sent on their behalf.","operationId":"login_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/me":{"get":{"tags":["Authentication"],"summary":"Me","description":"Return the currently authenticated user and their organization.","operationId":"me_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}}}},"/v1/auth/forgot-password":{"post":{"tags":["Authentication"],"summary":"Forgot Password","description":"Initiate a password reset. Always returns 200 — never reveals whether\nthe email is registered (prevents enumeration).","operationId":"forgot_password_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/verify-email":{"post":{"tags":["Authentication"],"summary":"Verify Email","description":"Consume an email-verification token and mark the user as verified.\n\nReturns 410 if the token doesn't match an unverified user.","operationId":"verify_email_v1_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/resend-verification":{"post":{"tags":["Authentication"],"summary":"Resend Verification","description":"Issue a new verification email if the account exists and is unverified.\n\nAlways returns 200 to prevent enumeration.","operationId":"resend_verification_v1_auth_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/reset-password":{"post":{"tags":["Authentication"],"summary":"Reset Password","description":"Consume a reset token and set a new password.\n\nOn success: invalidates all other outstanding reset tokens for the user.","operationId":"reset_password_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs/me":{"get":{"tags":["Organizations"],"summary":"Get My Organization","description":"Return the caller's organization with members and pending invitations.","operationId":"get_my_organization_v1_orgs_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDetailResponse"}}}}}}},"/v1/orgs/me/legal-profile":{"patch":{"tags":["Organizations"],"summary":"Update Legal Profile","description":"Set or clear the current org's legal-identity fields.\n\nUsed to back the e-invoicing document projection's seller side when\na booking is persisted without an explicit issuer_id.","operationId":"update_legal_profile_v1_orgs_me_legal_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs/me/request-log":{"get":{"tags":["Organizations"],"summary":"List Request Log","description":"List the org's customer-billable API requests for debugging.","operationId":"list_request_log_v1_orgs_me_request_log_get","parameters":[{"name":"path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs/me/invitations":{"get":{"tags":["Organizations"],"summary":"List My Invitations","operationId":"list_my_invitations_v1_orgs_me_invitations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InvitationResponse"},"type":"array","title":"Response List My Invitations V1 Orgs Me Invitations Get"}}}}}}},"/v1/orgs/invitations/{token}/preview":{"post":{"tags":["Organizations"],"summary":"Preview Invitation","description":"Public: look up an invitation by token to render the accept page.","operationId":"preview_invitation_v1_orgs_invitations__token__preview_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs/invitations/{token}/accept":{"post":{"tags":["Organizations"],"summary":"Accept Invitation","description":"Public: accept an invitation by setting a password.\n\nCreates the User (if not already exists), links them to the inviting org,\nmarks the invitation accepted, and returns an access token.","operationId":"accept_invitation_v1_orgs_invitations__token__accept_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationAcceptRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys":{"post":{"tags":["API Keys"],"summary":"Create Key","description":"Create a new API key. The raw key is returned only in this response.\n\nGated by `organizations.api_access_enabled` while the platform is free —\nnew orgs cannot mint keys until admin opts them in (manual SQL flip when\na customer asks at hello@getdynamiq.ai).","operationId":"create_key_v1_api_keys_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["API Keys"],"summary":"List Keys","description":"List the current organization's API keys.\n\nRevoked keys are hidden by default — they stay in the DB for audit but\ndon't clutter the UI. Pass `?include_revoked=true` to include them.","operationId":"list_keys_v1_api_keys_get","parameters":[{"name":"include_revoked","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Revoked"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyResponse"},"title":"Response List Keys V1 Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys/{key_id}":{"delete":{"tags":["API Keys"],"summary":"Revoke Key","description":"Revoke an API key in the current organization.","operationId":"revoke_key_v1_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jurisdictions":{"get":{"tags":["Jurisdictions"],"summary":"List Jurisdictions","description":"List jurisdictions, optionally filtered by country, type, status, or\nparent. Set `q` for substring search on `name`. Pagination via `limit`\nand `offset`. The platform tracks 230+ countries + 600+ sub-jurisdictions\n(states, provinces, cities, districts, special zones).","operationId":"list_jurisdictions_v1_jurisdictions_get","parameters":[{"name":"country_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"}},{"name":"jurisdiction_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"parent_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Code"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name","title":"Q"},"description":"Search by name"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JurisdictionResponse"},"title":"Response List Jurisdictions V1 Jurisdictions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jurisdictions/resolve":{"get":{"tags":["Jurisdictions"],"summary":"Resolve Jurisdiction Endpoint","description":"Resolve a location name or code to matching jurisdictions.\n\nUse this endpoint to map OTA location names to TaxLens jurisdiction codes.\nReturns the best matches sorted by relevance.\n\nExamples:\n- `/resolve?query=Barcelona&country=ES` → ES-CT-BCN\n- `/resolve?query=new+york&country=US` → US-NY, US-NY-NYC\n- `/resolve?query=dubai` → AE-DU\n- `/resolve?query=US-NY` → exact code match","operationId":"resolve_jurisdiction_endpoint_v1_jurisdictions_resolve_get","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"City name, jurisdiction code, or ISO subdivision code","title":"Query"},"description":"City name, jurisdiction code, or ISO subdivision code"},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by ISO country code","title":"Country"},"description":"Filter by ISO country code"},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by jurisdiction type","title":"Type"},"description":"Filter by jurisdiction type"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JurisdictionResponse"},"title":"Response Resolve Jurisdiction Endpoint V1 Jurisdictions Resolve Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jurisdictions/{code}":{"get":{"tags":["Jurisdictions"],"summary":"Get Jurisdiction","description":"Look up a jurisdiction by its hierarchical code (e.g. `NL`,\n`US-NY-NYC`, `AE-DU`). Returns 404 if unknown.","operationId":"get_jurisdiction_v1_jurisdictions__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JurisdictionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jurisdictions/{code}/children":{"get":{"tags":["Jurisdictions"],"summary":"Get Children","description":"Direct children of this jurisdiction (e.g. states under a country,\ncities under a state). Doesn't recurse — use `/v1/jurisdictions?country_code=`\nfor everything under a country.","operationId":"get_children_v1_jurisdictions__code__children_get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JurisdictionResponse"},"title":"Response Get Children V1 Jurisdictions  Code  Children Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jurisdictions/{code}/ancestors":{"get":{"tags":["Jurisdictions"],"summary":"Get Ancestors","description":"The full ancestor chain from country down to this jurisdiction\n(inclusive). Useful for resolving inherited tax rates yourself; see\n`/effective-rates` for the engine's resolved view.","operationId":"get_ancestors_v1_jurisdictions__code__ancestors_get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JurisdictionResponse"},"title":"Response Get Ancestors V1 Jurisdictions  Code  Ancestors Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jurisdictions/{code}/effective-rates":{"get":{"tags":["Jurisdictions"],"summary":"Get Effective Rates","description":"Return every rate that ACTUALLY applies to bookings in this jurisdiction\non `stay_date` (default today), each row tagged with the ancestor (or self)\nit's attached to and whether it arrives via inheritance.\n\nThis is the user-facing manifestation of the override semantics — Amsterdam\nsees its own city tax (is_inherited=false) plus the Dutch VAT\n(is_inherited=true, attached_to=NL).","operationId":"get_effective_rates_v1_jurisdictions__code__effective_rates_get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}},{"name":"stay_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Date the booking spans, e.g. 2026-04-15. Determines which rates are effective (scheduled vs active). Defaults to today.","title":"Stay Date"},"description":"Date the booking spans, e.g. 2026-04-15. Determines which rates are effective (scheduled vs active). Defaults to today."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EffectiveRateRow"},"title":"Response Get Effective Rates V1 Jurisdictions  Code  Effective Rates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tax/calculate":{"post":{"tags":["Tax Calculation"],"summary":"Calculate Endpoint","description":"Calculate accommodation tax for a booking.\n\nProvide EITHER `jurisdiction_code` OR `lat`+`lng` (coordinates).\nIf coordinates are provided, the jurisdiction is auto-resolved via\nreverse geocoding with fallback chain: city → state → country.","operationId":"calculate_endpoint_v1_tax_calculate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxCalculationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxCalculationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tax/calculate/batch":{"post":{"tags":["Tax Calculation"],"summary":"Calculate Batch Endpoint","operationId":"calculate_batch_endpoint_v1_tax_calculate_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCalculationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCalculationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/addresses/validate":{"post":{"tags":["Addresses"],"summary":"Validate Address","description":"Forward-geocode an address string and resolve it to a TaxLens jurisdiction.\n\nAuthenticated; used by integrators (ETG/Gesti) who have a street address\nbut no lat/lng or jurisdiction_code yet. Honors `country_hint` to bias the\ngeocoder when the customer knows the country.","operationId":"validate_address_v1_addresses_validate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressValidateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressValidateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookings":{"post":{"tags":["Bookings"],"summary":"Post Booking","description":"Create a booking (persisted calculation).\n\nIf `idempotency_key` is provided and a booking with the same key exists\nin this org, returns that booking with HTTP 200 — otherwise creates a new\none and returns 201.","operationId":"post_booking_v1_bookings_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Bookings"],"summary":"Get Bookings","operationId":"get_bookings_v1_bookings_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"external_reference","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference"}},{"name":"is_test","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Test"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookings/{booking_id}":{"get":{"tags":["Bookings"],"summary":"Get Booking","operationId":"get_booking_v1_bookings__booking_id__get","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Bookings"],"summary":"Patch Booking","operationId":"patch_booking_v1_bookings__booking_id__patch","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Bookings"],"summary":"Delete Booking","operationId":"delete_booking_v1_bookings__booking_id__delete","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookings/{booking_id}/document":{"get":{"tags":["Bookings"],"summary":"Get Booking Document","description":"Project this booking as an EN 16931 / PEPPOL BIS 3.0-shaped\ninvoice document (JSON, read-only).\n\nThis is the e-invoicing foundation surface. No XML, no PDF, no\nclearance — the response is the country-agnostic data model that\nlater serializers (UBL, FatturaPA, CFDI, IRN-JSON, ZATCA) will\nconsume.\n\nReturns 422 when the booking has no seller party — the caller must\nfirst set up a legal issuer in Settings and either mark it as the\norg's default or attach it via the booking's `legal_issuer_id` at\ncreate time.\n\nOnce the booking is **issued**, this returns the FROZEN document of record\n(real fiscal number, final UNCL1001 type — 380/389 — and issue date) rather\nthan re-projecting a live, provisional document, so the JSON can't drift from\nthe immutable issued invoice (matching the 409 the UBL endpoint returns).","operationId":"get_booking_document_v1_bookings__booking_id__document_get","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookings/{booking_id}/document/ubl":{"get":{"tags":["Bookings"],"summary":"Get Booking Document Ubl","description":"Serialize this booking's invoice document to UBL 2.1 / PEPPOL BIS\nBilling 3.0 XML.\n\nRuns the EN 16931 / PEPPOL pre-check first. When the booking is not\nsend-ready, returns 422 with the exact list of violations (missing buyer\nname, seller VAT registration, etc.) so the caller can fix the data —\nrather than emitting an invoice that a tax authority would reject. Only a\nvalid document is serialized.\n\nThe export is **VAT-only**: occupancy/tourist taxes (which EN 16931 cannot\ncarry alongside VAT) are excluded and surfaced as a warning in the\ndocument's `validation` block. ``cbc:ID`` is a **provisional** identifier\n(``BKG-{booking_id}``) — once the booking is **issued**, this endpoint 409s\nand the caller must use the issued document of record\n(``GET /v1/invoices/{id}/ubl``) to avoid two conflicting invoices for one\nsale. No Schematron/XSD, signing, or clearance yet.","operationId":"get_booking_document_ubl_v1_bookings__booking_id__document_ubl_get","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}},"application/xml":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookings/{booking_id}/invoice-details":{"patch":{"tags":["Bookings"],"summary":"Patch Invoice Details","description":"Set invoice-only metadata (buyer name/address, buyer reference, issuing\nlegal entity) WITHOUT re-running the tax calculation.\n\nThis is how a booking becomes PEPPOL send-ready after creation: it updates\nthe frozen party snapshot + buyer reference only — no engine re-run, no\nchange to totals/status, no adjustment-history entry. Use `adjust` instead\nwhen tax-affecting fields change. Blocked on voided/refunded bookings.","operationId":"patch_invoice_details_v1_bookings__booking_id__invoice_details_patch","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingInvoiceDetailsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookings/{booking_id}/refund":{"post":{"tags":["Bookings"],"summary":"Post Refund","description":"Phase 6: partial or full refund. Calculates per-jurisdiction tax delta\nproportional to the refund amount. Idempotent via refund_idempotency_key.","operationId":"post_refund_v1_bookings__booking_id__refund_post","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingRefundRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingRefundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookings/{booking_id}/issue":{"post":{"tags":["Invoices"],"summary":"Post Issue Invoice","description":"Issue a fiscal invoice for a booking.\n\nValidates send-readiness (same EN 16931 / PEPPOL pre-check as the UBL\nendpoint), burns a gapless fiscal number, and freezes the document into an\nimmutable IssuedInvoice. Idempotent — re-issuing an already-issued booking\nreturns the existing invoice with HTTP 200 (vs 201 on first issue).\nReturns 422 if the booking isn't send-ready, 409 if it's voided/refunded.","operationId":"post_issue_invoice_v1_bookings__booking_id__issue_post","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IssueInvoiceRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedInvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices/{invoice_id}/credit-note":{"post":{"tags":["Invoices"],"summary":"Post Credit Note","description":"Issue a credit note (381) that reverses an issued invoice.\n\nBurns a fiscal number from the credit-note sequence, references the\noriginal (BT-25), and marks the original `credited`. Idempotent — one\ncredit note per booking; a replay returns the existing note with HTTP 200\n(vs 201 on first issue). Owner/admin only.","operationId":"post_credit_note_v1_invoices__invoice_id__credit_note_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CreditNoteRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedInvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices":{"get":{"tags":["Invoices"],"summary":"Get Invoices","description":"List issued invoices for the caller's org (newest first).","operationId":"get_invoices_v1_invoices_get","parameters":[{"name":"booking_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Booking Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"is_test","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Test"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedInvoiceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices/liability-summary":{"get":{"tags":["Invoices"],"summary":"Get Invoice Liability Summary","description":"Summarize tax liabilities derived from issued invoices.","operationId":"get_invoice_liability_summary_v1_invoices_liability_summary_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"}},{"name":"legal_issuer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Legal Issuer Id"}},{"name":"jurisdiction_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction Code"}},{"name":"authority","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority"}},{"name":"category_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Code"}},{"name":"include_test","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Test"}},{"name":"is_test","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Test"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiabilityLedgerSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices/liability-lines":{"get":{"tags":["Invoices"],"summary":"Get Invoice Liability Lines","description":"List invoice-level tax component liabilities.","operationId":"get_invoice_liability_lines_v1_invoices_liability_lines_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"}},{"name":"legal_issuer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Legal Issuer Id"}},{"name":"jurisdiction_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction Code"}},{"name":"authority","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority"}},{"name":"category_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Code"}},{"name":"include_test","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Test"}},{"name":"is_test","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Test"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiabilityLedgerLinesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices/liability-export.csv":{"get":{"tags":["Invoices"],"summary":"Get Invoice Liability Csv","description":"Export invoice-derived tax liability component lines as CSV.","operationId":"get_invoice_liability_csv_v1_invoices_liability_export_csv_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"}},{"name":"legal_issuer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Legal Issuer Id"}},{"name":"jurisdiction_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction Code"}},{"name":"authority","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority"}},{"name":"category_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Code"}},{"name":"include_test","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Test"}},{"name":"is_test","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Test"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices/{invoice_id}":{"get":{"tags":["Invoices"],"summary":"Get Invoice","description":"Fetch a single issued invoice, including its frozen EN 16931 document.","operationId":"get_invoice_v1_invoices__invoice_id__get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedInvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoices/{invoice_id}/ubl":{"get":{"tags":["Invoices"],"summary":"Get Invoice Ubl","description":"Serialize the FROZEN document to UBL 2.1 / PEPPOL BIS 3.0 XML.\n\nUnlike the booking-level UBL endpoint (a live projection with a provisional\n``BKG-{id}`` identifier), this renders the immutable issued document with\nits real fiscal ``invoice_number`` as ``cbc:ID`` — the send-ready artifact.","operationId":"get_invoice_ubl_v1_invoices__invoice_id__ubl_get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}},"application/xml":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/legal-issuers":{"post":{"tags":["Legal Issuers"],"summary":"Create Issuer","operationId":"create_issuer_v1_legal_issuers_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalIssuerCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalIssuerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Legal Issuers"],"summary":"List Issuers","operationId":"list_issuers_v1_legal_issuers_get","parameters":[{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalIssuerListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/legal-issuers/{issuer_id}":{"get":{"tags":["Legal Issuers"],"summary":"Get Issuer","operationId":"get_issuer_v1_legal_issuers__issuer_id__get","parameters":[{"name":"issuer_id","in":"path","required":true,"schema":{"type":"integer","title":"Issuer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalIssuerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Legal Issuers"],"summary":"Patch Issuer","operationId":"patch_issuer_v1_legal_issuers__issuer_id__patch","parameters":[{"name":"issuer_id","in":"path","required":true,"schema":{"type":"integer","title":"Issuer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalIssuerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalIssuerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Legal Issuers"],"summary":"Delete Issuer","operationId":"delete_issuer_v1_legal_issuers__issuer_id__delete","parameters":[{"name":"issuer_id","in":"path","required":true,"schema":{"type":"integer","title":"Issuer Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/legal-issuers/{issuer_id}/tax-registrations":{"post":{"tags":["Legal Issuers"],"summary":"Add Registration","operationId":"add_registration_v1_legal_issuers__issuer_id__tax_registrations_post","parameters":[{"name":"issuer_id","in":"path","required":true,"schema":{"type":"integer","title":"Issuer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRegistrationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Legal Issuers"],"summary":"List Registrations","operationId":"list_registrations_v1_legal_issuers__issuer_id__tax_registrations_get","parameters":[{"name":"issuer_id","in":"path","required":true,"schema":{"type":"integer","title":"Issuer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRegistrationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/legal-issuers/{issuer_id}/tax-registrations/{registration_id}":{"delete":{"tags":["Legal Issuers"],"summary":"Delete Registration","operationId":"delete_registration_v1_legal_issuers__issuer_id__tax_registrations__registration_id__delete","parameters":[{"name":"issuer_id","in":"path","required":true,"schema":{"type":"integer","title":"Issuer Id"}},{"name":"registration_id","in":"path","required":true,"schema":{"type":"integer","title":"Registration Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/exemption-certificates":{"post":{"tags":["Exemption Certificates"],"summary":"Create Endpoint","operationId":"create_endpoint_v1_exemption_certificates_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExemptionCertificateCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExemptionCertificateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Exemption Certificates"],"summary":"List Endpoint","operationId":"list_endpoint_v1_exemption_certificates_get","parameters":[{"name":"include_revoked","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Revoked"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExemptionCertificateListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/exemption-certificates/{certificate_id}":{"get":{"tags":["Exemption Certificates"],"summary":"Get Endpoint","operationId":"get_endpoint_v1_exemption_certificates__certificate_id__get","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"integer","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExemptionCertificateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Exemption Certificates"],"summary":"Update Endpoint","operationId":"update_endpoint_v1_exemption_certificates__certificate_id__patch","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"integer","title":"Certificate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExemptionCertificateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExemptionCertificateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Exemption Certificates"],"summary":"Revoke Endpoint","description":"Soft revoke — bookings may reference the row, so it is never deleted.","operationId":"revoke_endpoint_v1_exemption_certificates__certificate_id__delete","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"integer","title":"Certificate Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/exemption-certificates/{certificate_id}/attachment":{"put":{"tags":["Exemption Certificates"],"summary":"Upload Attachment Endpoint","description":"Upload/replace the certificate's proof document. Raw bytes body with a\nContent-Type header (PDF/PNG/JPEG, 5 MB cap) — deliberately not multipart,\nso no extra dependency.","operationId":"upload_attachment_endpoint_v1_exemption_certificates__certificate_id__attachment_put","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"integer","title":"Certificate Id"}},{"name":"filename","in":"query","required":false,"schema":{"type":"string","default":"certificate","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExemptionCertificateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Exemption Certificates"],"summary":"Download Attachment Endpoint","operationId":"download_attachment_endpoint_v1_exemption_certificates__certificate_id__attachment_get","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"integer","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/map/coverage":{"get":{"tags":["Coverage Map"],"summary":"Coverage Rollup","description":"Return customer-safe coverage rollups for the authenticated organization: country totals, admin-region rollups, and GeoJSON point markers for local jurisdictions. The response is designed for coverage-map rendering and does not expose internal review metadata.","operationId":"coverage_map_v1_map_coverage_get","responses":{"200":{"description":"Customer-safe coverage rollups and local marker GeoJSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageMapResponse"},"example":{"generated_at":"2026-06-01T12:00:00Z","totals":{"countries":245,"jurisdictions":1024,"cities":470,"active_rates":1130,"active_rules":660,"sources":830,"city_markers":430,"missing_city_markers":40,"marker_jurisdictions":500,"jurisdiction_markers":430,"missing_jurisdiction_markers":70},"countries":[{"code":"ES","name":"Spain","currency_code":"EUR","jurisdiction_count":18,"subjurisdiction_count":17,"city_count":6,"active_rate_count":22,"active_rule_count":14,"source_count":9,"coverage_score":84}],"regions":[{"code":"ES-CT","name":"Catalonia","country_code":"ES","jurisdiction_type":"region","child_count":1,"active_rate_count":1,"active_rule_count":2,"source_count":1}],"city_markers":{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[2.1734,41.3851]},"properties":{"code":"ES-CT-BCN","name":"Barcelona","country_code":"ES","jurisdiction_type":"city","currency_code":"EUR","active_rate_count":3,"active_rule_count":4,"coordinate_source":"metadata"}}]}}}}}}}},"/v1/map/jurisdictions/{code}":{"get":{"tags":["Coverage Map"],"summary":"Jurisdiction Dossier","description":"Return the map dossier for a clicked country, region, city, or local marker. The dossier includes hierarchy context, children, direct and inherited rates, active rules, monitored sources, country rollup, and optional marker geometry.","operationId":"map_jurisdiction_dossier_v1_map_jurisdictions__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","description":"Jurisdiction code to inspect in the coverage map.","examples":["ES-CT-BCN"],"title":"Code"},"description":"Jurisdiction code to inspect in the coverage map."}],"responses":{"200":{"description":"Customer-safe jurisdiction dossier for the coverage map.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapJurisdictionDossier"},"example":{"generated_at":"2026-06-01T12:00:00Z","jurisdiction":{"id":301,"code":"ES-CT-BCN","name":"Barcelona","local_name":"Barcelona","jurisdiction_type":"city","path":"ES.CT.BCN","parent_id":201,"country_code":"ES","subdivision_code":"ES-CT","timezone":"Europe/Madrid","currency_code":"EUR","status":"active","created_at":"2026-03-12T00:00:00Z","updated_at":"2026-05-28T20:40:00Z"},"ancestors":[{"id":100,"code":"ES","name":"Spain","local_name":"Espana","jurisdiction_type":"country","path":"ES","country_code":"ES","timezone":"Europe/Madrid","currency_code":"EUR","status":"active","created_at":"2026-03-12T00:00:00Z","updated_at":"2026-05-28T20:40:00Z"},{"id":201,"code":"ES-CT","name":"Catalonia","local_name":"Catalunya","jurisdiction_type":"region","path":"ES.CT","parent_id":100,"country_code":"ES","subdivision_code":"ES-CT","timezone":"Europe/Madrid","currency_code":"EUR","status":"active","created_at":"2026-03-12T00:00:00Z","updated_at":"2026-05-28T20:40:00Z"}],"children":[],"country":{"code":"ES","name":"Spain","currency_code":"EUR","jurisdiction_count":18,"subjurisdiction_count":17,"city_count":6,"active_rate_count":22,"active_rule_count":14,"source_count":9,"coverage_score":84},"direct_rates":[{"id":5117,"jurisdiction_id":301,"jurisdiction_code":"ES-CT-BCN","tax_category_id":44,"tax_category_code":"tourism_flat_person_night","rate_type":"tiered","currency_code":"EUR","tiers":[{"min":4,"value":6.6}],"tier_type":"single_amount","enacted_date":"2026-02-01","effective_start":"2026-04-01","announcement_date":"2026-02-01","calculation_order":100,"base_includes":[],"legal_reference":"Ley 2/2026 and ATC IEET tariff table","legal_uri":"https://atc.gencat.cat/","source_url":"https://atc.gencat.cat/","authority_name":"Ajuntament de Barcelona / Agencia Tributaria de Catalunya","version":1,"status":"scheduled"}],"effective_rates":[{"id":120,"tax_category_code":"vat_reduced","tax_category_name":"VAT / Sales Tax (reduced rate)","rate_type":"percentage","rate_value":"0.10","effective_start":"2024-01-01","legal_reference":"Ley 37/1992, Articulo 91.uno.2.2","authority_name":"Agencia Tributaria","source_url":"https://sede.agenciatributaria.gob.es/","attached_to_jurisdiction_id":100,"attached_to_jurisdiction_code":"ES","attached_to_jurisdiction_name":"Spain","attached_to_jurisdiction_type":"country","is_inherited":true}],"rules":[{"id":1361,"tax_rate_id":5117,"jurisdiction_id":301,"jurisdiction_code":"ES-CT-BCN","rule_type":"cap","priority":100,"name":"Barcelona IEET - 7-night cap per continuous stay","description":"Caps city tourism tax at 7 nights.","conditions":{"operator":"AND","rules":[]},"action":{"type":"cap","max_nights":7},"effective_start":"2026-04-01","enacted_date":"2026-02-01","legal_reference":"Ley 2/2026","legal_uri":"https://atc.gencat.cat/","authority_name":"Ajuntament de Barcelona","status":"active","version":1}],"sources":[{"id":88,"jurisdiction_code":"ES-CT-BCN","url":"https://atc.gencat.cat/","source_type":"tax_authority","language":"es","check_frequency_days":7,"last_checked_at":"2026-05-28T20:40:00Z","last_content_hash":"sha256:example","status":"active","created_at":"2026-03-12T00:00:00Z","updated_at":"2026-05-28T20:40:00Z"}],"marker":{"type":"Feature","geometry":{"type":"Point","coordinates":[2.1734,41.3851]},"properties":{"code":"ES-CT-BCN","name":"Barcelona","country_code":"ES","jurisdiction_type":"city","currency_code":"EUR","active_rate_count":3,"active_rule_count":4,"coordinate_source":"metadata"}},"metadata":{"map_centroid":{"lat":41.3851,"lng":2.1734}}}}}},"404":{"description":"Jurisdiction code was not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/properties":{"post":{"tags":["Properties"],"summary":"Post Property","operationId":"post_property_v1_properties_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Properties"],"summary":"Get Properties","operationId":"get_properties_v1_properties_get","parameters":[{"name":"mapping_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mapping Status"}},{"name":"country_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"}},{"name":"jurisdiction_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction Code"}},{"name":"external_reference","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/properties/bulk-map":{"post":{"tags":["Properties"],"summary":"Post Bulk Map","operationId":"post_bulk_map_v1_properties_bulk_map_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyBulkMapRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyBulkMapResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/properties/{property_id}":{"get":{"tags":["Properties"],"summary":"Get Property","operationId":"get_property_v1_properties__property_id__get","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Properties"],"summary":"Patch Property","operationId":"patch_property_v1_properties__property_id__patch","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/properties/{property_id}/remap":{"post":{"tags":["Properties"],"summary":"Post Remap Property","operationId":"post_remap_property_v1_properties__property_id__remap_post","parameters":[{"name":"property_id","in":"path","required":true,"schema":{"type":"integer","title":"Property Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/liability-ledger/summary":{"get":{"tags":["Liability Ledger"],"summary":"Get Liability Summary","operationId":"get_liability_summary_v1_liability_ledger_summary_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"}},{"name":"legal_issuer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Legal Issuer Id"}},{"name":"jurisdiction_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction Code"}},{"name":"authority","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority"}},{"name":"category_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Code"}},{"name":"include_test","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Test"}},{"name":"is_test","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Test"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiabilityLedgerSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/liability-ledger/lines":{"get":{"tags":["Liability Ledger"],"summary":"Get Liability Lines","operationId":"get_liability_lines_v1_liability_ledger_lines_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"}},{"name":"legal_issuer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Legal Issuer Id"}},{"name":"jurisdiction_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction Code"}},{"name":"authority","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority"}},{"name":"category_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Code"}},{"name":"include_test","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Test"}},{"name":"is_test","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Test"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiabilityLedgerLinesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/liability-ledger/export.csv":{"get":{"tags":["Liability Ledger"],"summary":"Get Liability Csv","operationId":"get_liability_csv_v1_liability_ledger_export_csv_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"}},{"name":"legal_issuer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Legal Issuer Id"}},{"name":"jurisdiction_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction Code"}},{"name":"authority","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority"}},{"name":"category_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Code"}},{"name":"include_test","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Test"}},{"name":"is_test","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Test"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/nexus/status":{"get":{"tags":["Nexus"],"summary":"Nexus Status Endpoint","operationId":"nexus_status_endpoint_v1_nexus_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NexusStatusResponse"}}}}}}},"/v1/vat/validate":{"post":{"tags":["VAT"],"summary":"Validate Vat","description":"Validate a business VAT id. Cache-first; definitive verdicts persist\n(positive 180d / negative 1h). Returns ``structural`` with no network when no\nlive provider is configured.","operationId":"validate_vat_v1_vat_validate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatValidateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatValidateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AddressValidateRequest":{"properties":{"address":{"type":"string","maxLength":500,"minLength":3,"title":"Address"},"country_hint":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country Hint","description":"ISO 3166-1 alpha-2; biases the geocoder toward this country."}},"type":"object","required":["address"],"title":"AddressValidateRequest"},"AddressValidateResponse":{"properties":{"normalized_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normalized Address"},"lat":{"type":"number","title":"Lat"},"lng":{"type":"number","title":"Lng"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"jurisdiction":{"anyOf":[{"$ref":"#/components/schemas/JurisdictionInfo"},{"type":"null"}]},"ancestors":{"items":{"$ref":"#/components/schemas/JurisdictionInfo"},"type":"array","title":"Ancestors","default":[]},"confidence":{"type":"string","title":"Confidence","default":"medium"}},"type":"object","required":["normalized_address","lat","lng","country","country_code","state","city","jurisdiction"],"title":"AddressValidateResponse"},"ApiKeyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"is_active":{"type":"boolean","title":"Is Active"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","key_prefix","is_active","last_used_at","expires_at","created_at"],"title":"ApiKeyResponse"},"BatchCalculationRequest":{"properties":{"calculations":{"items":{"$ref":"#/components/schemas/TaxCalculationRequest"},"type":"array","title":"Calculations"}},"type":"object","required":["calculations"],"title":"BatchCalculationRequest"},"BatchCalculationResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/BatchCalculationResult"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"BatchCalculationResponse"},"BatchCalculationResult":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"total_tax":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Tax"},"effective_rate":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Effective Rate"},"components":{"items":{"$ref":"#/components/schemas/TaxComponent"},"type":"array","title":"Components"},"total_withholding":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total Withholding"},"total_margin_vat":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total Margin Vat"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["total_tax","effective_rate","components"],"title":"BatchCalculationResult"},"BookingCreate":{"properties":{"calculation":{"$ref":"#/components/schemas/TaxCalculationRequest"},"property_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Property Id","description":"Optional org-scoped property/listing id. When supplied, omitted jurisdiction and tax-driver fields are filled from the property's stored mapping profile."},"external_reference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"External Reference","description":"The customer's own booking ID — surfaced in lists and used for reconciliation."},"idempotency_key":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Idempotency Key","description":"Optional. Re-POSTing with the same key + org returns the existing booking (200 instead of 201)."},"legal_issuer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Legal Issuer Id","description":"Optional. The legal entity that issues the (future) invoice. Must belong to the caller's org. When omitted, the org's default issuer is used if set."},"supplier_legal_issuer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Supplier Legal Issuer Id","description":"Optional. The HOST legal entity for a self-billed (389) invoice — the party the platform issues in the name of (OTA merchant-of-record). Must belong to the caller's org. When a 389 is issued and this is set, the host is the supplier and the host's fiscal sequence is used."},"buyer_reference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Buyer Reference","description":"EN 16931 BT-10 buyer reference (e.g. PO number, XRechnung Leitweg-ID, French B2G reference). Stored verbatim for later document emission."},"buyer_endpoint_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Buyer Endpoint Id","description":"BT-49 buyer electronic address (PEPPOL routing id). Required for a B2B PEPPOL invoice to be transmission-ready."},"buyer_endpoint_scheme":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Buyer Endpoint Scheme","description":"EAS/ICD scheme code for buyer_endpoint_id (e.g. 9930)."},"payment_terms":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Payment Terms","description":"BT-20 payment terms text. Defaults to 'Due on receipt' on the invoice when omitted (BR-CO-25)."},"is_test":{"type":"boolean","title":"Is Test","description":"Mark this as a TEST booking (e.g. created from the calculator to demo the flow). Test bookings — and any invoices issued for them — use an isolated 'TEST' fiscal series, so they can be wiped without leaving a gap in any real gapless sequence.","default":false}},"type":"object","required":["calculation"],"title":"BookingCreate","description":"A booking is a tax calculation persisted with an external reference.","example":{"buyer_endpoint_id":"9930:DE123456789","buyer_endpoint_scheme":"9930","buyer_reference":"PO-7781","calculation":{"checkout_date":"2026-06-18","currency":"USD","jurisdiction_code":"US-NY-NYC","nightly_rate":250.0,"nights":3,"number_of_guests":2,"property_type":"hotel","stay_date":"2026-06-15"},"external_reference":"PMS-2026-00482","idempotency_key":"pms-2026-00482-v1","legal_issuer_id":12,"payment_terms":"Due within 14 days","supplier_legal_issuer_id":18}},"BookingInvoiceDetailsUpdate":{"properties":{"buyer_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Buyer Name"},"buyer_address":{"anyOf":[{"$ref":"#/components/schemas/BuyerAddressInput"},{"type":"null"}]},"buyer_reference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Buyer Reference"},"buyer_endpoint_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Buyer Endpoint Id"},"buyer_endpoint_scheme":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Buyer Endpoint Scheme"},"payment_terms":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Payment Terms"},"legal_issuer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Legal Issuer Id","description":"Attach/replace the issuing legal entity (must belong to the caller's org). Re-freezes the invoice seller party."},"supplier_legal_issuer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Supplier Legal Issuer Id","description":"Attach/replace the HOST legal entity for self-billed (389) invoices (must belong to the caller's org). Re-freezes the supplier party."}},"type":"object","title":"BookingInvoiceDetailsUpdate","description":"Update invoice-only metadata on an existing booking WITHOUT re-running\nthe tax engine.\n\nBuyer identity (BT-44/BG-8), the buyer reference (BT-10), and the issuing\nlegal entity don't affect tax — they only shape the e-invoice. This lets a\nbooking that was created before these were known become PEPPOL send-ready\nwithout an `adjust` (which would re-run the engine and append to\nadjustment_history). Only fields explicitly present in the request are\napplied (partial update via model_fields_set).","example":{"buyer_address":{"city":"Berlin","country_code":"DE","line1":"Unter den Linden 1","line2":"Accounts Payable","postal_code":"10117","region":"BE"},"buyer_endpoint_id":"9930:DE123456789","buyer_endpoint_scheme":"9930","buyer_name":"Example GmbH","buyer_reference":"PO-7781","legal_issuer_id":12,"payment_terms":"Due within 14 days","supplier_legal_issuer_id":18}},"BookingListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BookingResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"total":{"type":"integer","title":"Total","default":0}},"type":"object","required":["items"],"title":"BookingListResponse"},"BookingRefundRequest":{"properties":{"refund_amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Refund Amount","description":"Amount to refund in booking currency"},"refund_currency":{"type":"string","maxLength":3,"minLength":3,"title":"Refund Currency","description":"Must match booking currency"},"refund_reason":{"type":"string","enum":["guest_cancel","courtesy","no_show","duplicate_charge","downgrade","other"],"title":"Refund Reason","description":"Why the refund is being issued"},"refund_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Refund Date","description":"Date the refund is effective. Defaults to today. Matters for jurisdictions that tax refunds based on the refund date's rate."},"refund_idempotency_key":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Refund Idempotency Key","description":"Optional. Re-POSTing with the same key returns the existing refund (idempotent)."}},"type":"object","required":["refund_amount","refund_currency","refund_reason"],"title":"BookingRefundRequest","description":"Partial or full refund. Engine re-computes tax against the refunded\nportion and returns a tax delta breakdown for the caller to claw back\nfrom authorities / refund to guest."},"BookingRefundResponse":{"properties":{"booking_id":{"type":"integer","title":"Booking Id"},"refund_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Refund Amount"},"refund_currency":{"type":"string","title":"Refund Currency"},"refund_reason":{"type":"string","enum":["guest_cancel","courtesy","no_show","duplicate_charge","downgrade","other"],"title":"Refund Reason"},"refund_date":{"type":"string","format":"date","title":"Refund Date"},"refund_idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refund Idempotency Key"},"refund_status":{"type":"string","enum":["full","partial"],"title":"Refund Status"},"tax_delta":{"items":{"$ref":"#/components/schemas/RefundTaxDeltaComponent"},"type":"array","title":"Tax Delta"},"total_tax_refunded":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Tax Refunded"},"new_booking_status":{"type":"string","title":"New Booking Status"},"refunded_at":{"type":"string","format":"date-time","title":"Refunded At"}},"type":"object","required":["booking_id","refund_amount","refund_currency","refund_reason","refund_date","refund_status","tax_delta","total_tax_refunded","new_booking_status","refunded_at"],"title":"BookingRefundResponse"},"BookingResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"user_id":{"type":"integer","title":"User Id"},"property_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Property Id"},"external_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"},"status":{"type":"string","title":"Status"},"is_test":{"type":"boolean","title":"Is Test","default":false},"total_tax":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Tax"},"total_with_tax":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total With Tax"},"currency":{"type":"string","title":"Currency"},"request":{"additionalProperties":true,"type":"object","title":"Request"},"response":{"additionalProperties":true,"type":"object","title":"Response"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"voided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Voided At"}},"type":"object","required":["id","org_id","user_id","external_reference","idempotency_key","status","total_tax","total_with_tax","currency","request","response","created_at","updated_at"],"title":"BookingResponse"},"BookingUpdate":{"properties":{"calculation":{"$ref":"#/components/schemas/TaxCalculationRequest"},"property_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Property Id","description":"Optional replacement property/listing id for the recalculated booking."},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","required":["calculation"],"title":"BookingUpdate","description":"Re-run the calculation with a different request; status transitions to `adjusted`.","example":{"calculation":{"checkout_date":"2026-06-18","currency":"USD","jurisdiction_code":"US-NY-NYC","nightly_rate":275.0,"nights":3,"number_of_guests":2,"property_type":"hotel","stay_date":"2026-06-15"},"reason":"nightly rate corrected after PMS sync"}},"BuyerAddressInput":{"properties":{"line1":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Line1"},"line2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Line2"},"city":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"City"},"region":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Region"},"postal_code":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Postal Code"},"country_code":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country Code","description":"ISO 3166-1 alpha-2. Mandatory for a PEPPOL-valid invoice (BT-55).","examples":["DE"]}},"type":"object","title":"BuyerAddressInput","description":"Buyer postal address for invoice issuance (EN 16931 BG-8 / BT-50..55).\n\nDoes not affect tax determination — it is captured purely so the booking's\ninvoice document can carry a compliant buyer party. ``country_code`` is the\nmandatory BT-55 element for a PEPPOL-valid invoice."},"BuyerParty":{"properties":{"customer_type":{"type":"string","title":"Customer Type","default":"consumer"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address":{"anyOf":[{"$ref":"#/components/schemas/PartyAddress"},{"type":"null"}]},"eas_endpoint":{"anyOf":[{"$ref":"#/components/schemas/EasEndpoint"},{"type":"null"}]}},"type":"object","title":"BuyerParty"},"CityMarkerFeature":{"properties":{"type":{"type":"string","const":"Feature","title":"Type","default":"Feature"},"geometry":{"$ref":"#/components/schemas/GeoJsonGeometry"},"properties":{"$ref":"#/components/schemas/CityMarkerProperties"}},"type":"object","required":["geometry","properties"],"title":"CityMarkerFeature"},"CityMarkerFeatureCollection":{"properties":{"type":{"type":"string","const":"FeatureCollection","title":"Type","default":"FeatureCollection"},"features":{"items":{"$ref":"#/components/schemas/CityMarkerFeature"},"type":"array","title":"Features"}},"type":"object","required":["features"],"title":"CityMarkerFeatureCollection"},"CityMarkerProperties":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"country_code":{"type":"string","title":"Country Code"},"jurisdiction_type":{"type":"string","title":"Jurisdiction Type"},"currency_code":{"type":"string","title":"Currency Code"},"active_rate_count":{"type":"integer","title":"Active Rate Count","default":0},"active_rule_count":{"type":"integer","title":"Active Rule Count","default":0},"coordinate_source":{"type":"string","enum":["metadata","natural_earth"],"title":"Coordinate Source"}},"type":"object","required":["code","name","country_code","jurisdiction_type","currency_code","coordinate_source"],"title":"CityMarkerProperties"},"CollectionInfo":{"properties":{"who_collects":{"type":"string","title":"Who Collects","default":"property"},"taxable_base":{"type":"string","title":"Taxable Base","default":"room_rate"},"platform_must_collect":{"type":"boolean","title":"Platform Must Collect","default":false},"notes":{"items":{"type":"string"},"type":"array","title":"Notes","default":[]},"merchant_of_record":{"anyOf":[{"type":"string","enum":["property","platform","none"]},{"type":"null"}],"title":"Merchant Of Record"},"platform_collected_components":{"items":{"type":"string"},"type":"array","title":"Platform Collected Components","default":[]},"property_collected_components":{"items":{"type":"string"},"type":"array","title":"Property Collected Components","default":[]}},"type":"object","title":"CollectionInfo"},"CollectionInfoOut":{"properties":{"merchant_of_record":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Of Record"},"platform_collected_components":{"items":{"type":"string"},"type":"array","title":"Platform Collected Components"},"property_collected_components":{"items":{"type":"string"},"type":"array","title":"Property Collected Components"}},"type":"object","title":"CollectionInfoOut","description":"Travel-industry MoR signaling that callers need at document time:\nis the platform or the property remitting which categories?"},"CountryCoverageRow":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"currency_code":{"type":"string","title":"Currency Code"},"jurisdiction_count":{"type":"integer","title":"Jurisdiction Count","default":0},"subjurisdiction_count":{"type":"integer","title":"Subjurisdiction Count","default":0},"city_count":{"type":"integer","title":"City Count","default":0},"active_rate_count":{"type":"integer","title":"Active Rate Count","default":0},"active_rule_count":{"type":"integer","title":"Active Rule Count","default":0},"source_count":{"type":"integer","title":"Source Count","default":0},"coverage_score":{"type":"integer","title":"Coverage Score","default":0}},"type":"object","required":["code","name","currency_code"],"title":"CountryCoverageRow"},"CoverageMapResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"totals":{"$ref":"#/components/schemas/CoverageTotals"},"countries":{"items":{"$ref":"#/components/schemas/CountryCoverageRow"},"type":"array","title":"Countries"},"regions":{"items":{"$ref":"#/components/schemas/RegionCoverageRow"},"type":"array","title":"Regions"},"city_markers":{"$ref":"#/components/schemas/CityMarkerFeatureCollection"}},"type":"object","required":["generated_at","totals","countries","city_markers"],"title":"CoverageMapResponse","example":{"city_markers":{"features":[{"geometry":{"coordinates":[2.1734,41.3851],"type":"Point"},"properties":{"code":"ES-CT-BCN","name":"Barcelona","country_code":"ES","jurisdiction_type":"city","currency_code":"EUR","active_rate_count":3,"active_rule_count":4,"coordinate_source":"metadata"},"type":"Feature"}],"type":"FeatureCollection"},"countries":[{"active_rate_count":22,"active_rule_count":14,"city_count":6,"code":"ES","coverage_score":84,"currency_code":"EUR","jurisdiction_count":18,"name":"Spain","source_count":9,"subjurisdiction_count":17}],"generated_at":"2026-06-01T12:00:00Z","regions":[{"active_rate_count":1,"active_rule_count":2,"child_count":1,"code":"ES-CT","country_code":"ES","jurisdiction_type":"region","name":"Catalonia","source_count":1}],"totals":{"active_rates":1130,"active_rules":660,"cities":470,"city_markers":430,"countries":245,"jurisdiction_markers":430,"jurisdictions":1024,"marker_jurisdictions":500,"missing_city_markers":40,"missing_jurisdiction_markers":70,"sources":830}}},"CoverageTotals":{"properties":{"countries":{"type":"integer","title":"Countries"},"jurisdictions":{"type":"integer","title":"Jurisdictions"},"cities":{"type":"integer","title":"Cities"},"active_rates":{"type":"integer","title":"Active Rates"},"active_rules":{"type":"integer","title":"Active Rules"},"sources":{"type":"integer","title":"Sources"},"city_markers":{"type":"integer","title":"City Markers"},"missing_city_markers":{"type":"integer","title":"Missing City Markers"},"marker_jurisdictions":{"type":"integer","title":"Marker Jurisdictions","default":0},"jurisdiction_markers":{"type":"integer","title":"Jurisdiction Markers","default":0},"missing_jurisdiction_markers":{"type":"integer","title":"Missing Jurisdiction Markers","default":0}},"type":"object","required":["countries","jurisdictions","cities","active_rates","active_rules","sources","city_markers","missing_city_markers"],"title":"CoverageTotals"},"CreateApiKeyRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["name"],"title":"CreateApiKeyRequest"},"CreateApiKeyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"is_active":{"type":"boolean","title":"Is Active"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"raw_key":{"type":"string","title":"Raw Key"}},"type":"object","required":["id","name","key_prefix","is_active","last_used_at","expires_at","created_at","raw_key"],"title":"CreateApiKeyResponse"},"CreditNoteRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"},"series":{"type":"string","maxLength":20,"title":"Series","default":""}},"type":"object","title":"CreditNoteRequest","description":"Issue a credit note (UNCL1001 381) that reverses an issued invoice.\n\nReason is free text for the audit trail. Series is the credit-note\nnumbering stream (independent of the invoice series)."},"DeliveryPeriod":{"properties":{"from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From"},"to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To"}},"type":"object","title":"DeliveryPeriod","description":"EN 16931 BTG-26 — Invoice delivery period.\n\nFor accommodation: stay start (check-in) → stay end (check-out)."},"DocumentHeader":{"properties":{"type_code":{"type":"string","title":"Type Code","description":"UNCL1001 document type code (e.g. 380 invoice)."},"type_name":{"type":"string","title":"Type Name"},"issue_date":{"type":"string","format":"date","title":"Issue Date"},"delivery_period":{"anyOf":[{"$ref":"#/components/schemas/DeliveryPeriod"},{"type":"null"}]},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency"},"buyer_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Reference"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Terms","description":"EN 16931 BT-20 payment terms text. Satisfies BR-CO-25 when the payable amount is positive (a PEPPOL invoice needs terms or a due date)."},"preceding_document_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preceding Document Ref","description":"When the booking represents a credit note or correction, points to the original document. Empty for plain commercial invoices."},"regulator_identifiers":{"$ref":"#/components/schemas/RegulatorIdentifiers","description":"National / clearance identifiers (Italy CodiceDestinatario, Mexico RFC + régimen fiscal, India GSTIN, ...). Serialized as a flat dict of the set values; empty until per-issuer / per-buyer national data is provided. Each national serializer reads its own fields."},"format_extensions":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"type":"null"}],"title":"Format Extensions","description":"Per-format escape hatch for fields with no EN 16931 equivalent, keyed by serializer format_id (e.g. {'cfdi': {'uso_cfdi': 'G03', 'forma_pago': '04'}}). Each national serializer reads its own slice."}},"type":"object","required":["type_code","type_name","issue_date","currency"],"title":"DocumentHeader","description":"EN 16931 BTG-1/BTG-2 — Invoice and Process basics."},"DocumentResponse":{"properties":{"document":{"$ref":"#/components/schemas/DocumentHeader"},"seller":{"anyOf":[{"$ref":"#/components/schemas/SellerParty"},{"type":"null"}]},"buyer":{"$ref":"#/components/schemas/BuyerParty"},"lines":{"items":{"$ref":"#/components/schemas/InvoiceLine"},"type":"array","title":"Lines"},"tax_breakdown":{"items":{"$ref":"#/components/schemas/TaxBreakdownRow"},"type":"array","title":"Tax Breakdown"},"totals":{"$ref":"#/components/schemas/DocumentTotals"},"collection_info":{"$ref":"#/components/schemas/CollectionInfoOut"},"validation":{"$ref":"#/components/schemas/DocumentValidation"},"trace":{"$ref":"#/components/schemas/DocumentTrace"}},"type":"object","required":["document","seller","buyer","lines","tax_breakdown","totals","collection_info","validation","trace"],"title":"DocumentResponse","description":"Top-level read-only document representation."},"DocumentTotals":{"properties":{"lines_net_total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Lines Net Total"},"tax_total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Total"},"grand_total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Grand Total"},"currency":{"type":"string","title":"Currency"},"amount_in_settlement_currency":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount In Settlement Currency"},"settlement_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Settlement Currency"},"excluded_tax_total":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Excluded Tax Total"},"total_paid_including_excluded":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total Paid Including Excluded"}},"type":"object","required":["lines_net_total","tax_total","grand_total","currency"],"title":"DocumentTotals","description":"EN 16931 BTG-22 — Document totals."},"DocumentTrace":{"properties":{"booking_id":{"type":"integer","title":"Booking Id"},"calculation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculation Id"},"data_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Version"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["booking_id","generated_at"],"title":"DocumentTrace"},"DocumentValidation":{"properties":{"is_valid":{"type":"boolean","title":"Is Valid"},"violations":{"items":{"$ref":"#/components/schemas/Violation"},"type":"array","title":"Violations"}},"type":"object","required":["is_valid"],"title":"DocumentValidation","description":"Compliance pre-check result for the document (PEPPOL BIS Billing 3.0).\n\n``is_valid`` is True when there are no error-severity violations — i.e. the\ndocument can be serialized to a PEPPOL-valid UBL invoice. Warnings (e.g. an\nexcluded occupancy/tourist tax) may still be present when valid."},"EasEndpoint":{"properties":{"id":{"type":"string","title":"Id"},"scheme_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheme Code"}},"type":"object","required":["id"],"title":"EasEndpoint"},"EffectiveRateRow":{"properties":{"id":{"type":"integer","title":"Id"},"tax_category_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Category Code"},"tax_category_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Category Name"},"rate_type":{"type":"string","title":"Rate Type"},"rate_value":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate Value"},"currency_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency Code"},"tiers":{"anyOf":[{},{"type":"null"}],"title":"Tiers"},"effective_start":{"type":"string","format":"date","title":"Effective Start"},"effective_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective End"},"legal_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Reference"},"authority_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority Name"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"attached_to_jurisdiction_id":{"type":"integer","title":"Attached To Jurisdiction Id"},"attached_to_jurisdiction_code":{"type":"string","title":"Attached To Jurisdiction Code"},"attached_to_jurisdiction_name":{"type":"string","title":"Attached To Jurisdiction Name"},"attached_to_jurisdiction_type":{"type":"string","title":"Attached To Jurisdiction Type"},"is_inherited":{"type":"boolean","title":"Is Inherited"}},"type":"object","required":["id","rate_type","effective_start","attached_to_jurisdiction_id","attached_to_jurisdiction_code","attached_to_jurisdiction_name","attached_to_jurisdiction_type","is_inherited"],"title":"EffectiveRateRow","description":"A rate that applies to the queried jurisdiction, tagged with where it's\nattached in the hierarchy. `is_inherited=True` means the rate is attached\nto an ancestor and applies via override semantics."},"ExemptionCertificateCreate":{"properties":{"certificate_type":{"type":"string","maxLength":80,"minLength":1,"title":"Certificate Type"},"holder_name":{"type":"string","maxLength":255,"minLength":1,"title":"Holder Name"},"holder_tax_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Holder Tax Id"},"certificate_number":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Certificate Number"},"issuing_authority":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Issuing Authority"},"jurisdiction_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Jurisdiction Codes","description":"Anchored jurisdiction-code prefixes the certificate covers (e.g. ['US-TX'] matches US-TX and US-TX-HOU). Empty/None = unrestricted."},"valid_from":{"type":"string","format":"date","title":"Valid From"},"valid_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid To","description":"None = open-ended"},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["certificate_type","holder_name","valid_from"],"title":"ExemptionCertificateCreate"},"ExemptionCertificateListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ExemptionCertificateResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"ExemptionCertificateListResponse"},"ExemptionCertificateResponse":{"properties":{"id":{"type":"integer","title":"Id"},"certificate_type":{"type":"string","title":"Certificate Type"},"holder_name":{"type":"string","title":"Holder Name"},"holder_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Holder Tax Id"},"certificate_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certificate Number"},"issuing_authority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issuing Authority"},"jurisdiction_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Jurisdiction Codes"},"valid_from":{"type":"string","format":"date","title":"Valid From"},"valid_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid To"},"status":{"type":"string","title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"computed_status":{"type":"string","title":"Computed Status"},"has_attachment":{"type":"boolean","title":"Has Attachment"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","certificate_type","holder_name","holder_tax_id","certificate_number","issuing_authority","jurisdiction_codes","valid_from","valid_to","status","notes","computed_status","has_attachment","created_at","updated_at"],"title":"ExemptionCertificateResponse"},"ExemptionCertificateUpdate":{"properties":{"certificate_type":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Certificate Type"},"holder_name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Holder Name"},"holder_tax_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Holder Tax Id"},"certificate_number":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Certificate Number"},"issuing_authority":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Issuing Authority"},"jurisdiction_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Jurisdiction Codes"},"valid_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid From"},"valid_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid To"},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ExemptionCertificateUpdate","description":"All-optional PATCH twin; only fields present in the payload change."},"ExemptionCertificateUsage":{"properties":{"certificate_id":{"type":"integer","title":"Certificate Id"},"certificate_type":{"type":"string","title":"Certificate Type"},"certificate_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certificate Number"},"holder_name":{"type":"string","title":"Holder Name"},"holder_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Holder Tax Id"},"jurisdiction_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Jurisdiction Codes"},"valid_from":{"type":"string","title":"Valid From"},"valid_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid To"},"status_at_validation":{"type":"string","title":"Status At Validation"},"validated_at":{"type":"string","title":"Validated At"}},"type":"object","required":["certificate_id","certificate_type","holder_name","valid_from","status_at_validation","validated_at"],"title":"ExemptionCertificateUsage","description":"The certificate validation result frozen into the calculation response\n(and therefore into booking.response_snapshot): a later edit or revocation\nof the certificate never retro-changes a persisted booking's audit story."},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token","description":"Cloudflare Turnstile token. Required in production."}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"GeoJsonGeometry":{"properties":{"type":{"type":"string","const":"Point","title":"Type"},"coordinates":{"items":{"type":"number"},"type":"array","maxItems":2,"minItems":2,"title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"GeoJsonGeometry"},"GuestSpec":{"properties":{"nationality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nationality","description":"ISO 3166-1 alpha-2","examples":["US"]},"age":{"anyOf":[{"type":"integer","maximum":130.0,"minimum":0.0},{"type":"null"}],"title":"Age"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"Per-guest guest_type from the canonical vocabulary (app/core/guest_types.py): drives per-guest exemptions/reductions — resident of the taxing jurisdiction, certified disability + its carer, diplomat, student, senior, seasonal worker, etc. Caller-attested (the property verifies eligibility at check-in). Aliased inputs are normalized; children are handled by `age`, not a type.","examples":["resident","disabled","diplomat","student","senior"]},"disability_percentage":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Disability Percentage","description":"Certified disability percentage, for threshold exemptions/reductions (e.g. Italy Naples exempt at >=80%, Germany GdB>=50 reduced). Caller-attested; property verifies the certificate at check-in."}},"type":"object","title":"GuestSpec","description":"A single guest on the booking. All fields optional; only what's known."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InvitationAcceptRequest":{"properties":{"password":{"type":"string","minLength":8,"title":"Password"}},"type":"object","required":["password"],"title":"InvitationAcceptRequest"},"InvitationPreviewResponse":{"properties":{"organization_name":{"type":"string","title":"Organization Name"},"invited_email":{"type":"string","title":"Invited Email"},"status":{"type":"string","title":"Status"}},"type":"object","required":["organization_name","invited_email","status"],"title":"InvitationPreviewResponse"},"InvitationResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"status":{"type":"string","title":"Status"},"invited_by_user_id":{"type":"integer","title":"Invited By User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","role","expires_at","status","invited_by_user_id","created_at"],"title":"InvitationResponse"},"InvoiceLine":{"properties":{"id":{"type":"string","title":"Id"},"description":{"type":"string","title":"Description"},"item_type":{"type":"string","title":"Item Type"},"quantity":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Quantity"},"unit_of_measure":{"type":"string","title":"Unit Of Measure","description":"UN/ECE Rec 20 code where possible: DAY for stay nights, EA for fees/commission. Hospitality-specific NIGHT exists in some Peppol extensions but DAY is broadly accepted."},"unit_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Unit Price"},"line_net":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Line Net"},"tax_category_code":{"type":"string","title":"Tax Category Code","description":"EN 16931 VAT category code: S (standard), Z (zero), E (exempt), AE (reverse charge), O (outside VAT scope — used for tourist tax)."},"tax_rate_percent":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tax Rate Percent"},"exemption_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exemption Code"}},"type":"object","required":["id","description","item_type","quantity","unit_of_measure","unit_price","line_net","tax_category_code"],"title":"InvoiceLine","description":"EN 16931 BTG-25 — Invoice line."},"IssueInvoiceRequest":{"properties":{"series":{"type":"string","maxLength":20,"title":"Series","default":""},"self_billed":{"type":"boolean","title":"Self Billed","description":"Issue as a self-billed invoice (UNCL1001 389) — a platform / OTA issuing in the supplier's name (merchant-of-record scenario).","default":false}},"type":"object","title":"IssueInvoiceRequest","description":"Issue a fiscal document for a booking. Optional series lets an issuer\nkeep parallel numbering streams (Italy/Spain/Mexico). Idempotent: issuing\nan already-issued booking returns the existing invoice."},"IssuedInvoiceListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/IssuedInvoiceResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"total":{"type":"integer","title":"Total","default":0}},"type":"object","required":["items"],"title":"IssuedInvoiceListResponse"},"IssuedInvoiceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"booking_id":{"type":"integer","title":"Booking Id"},"legal_issuer_id":{"type":"integer","title":"Legal Issuer Id"},"document_type":{"type":"string","title":"Document Type"},"series":{"type":"string","title":"Series"},"fiscal_year":{"type":"integer","title":"Fiscal Year"},"sequence_number":{"type":"integer","title":"Sequence Number"},"invoice_number":{"type":"string","title":"Invoice Number"},"currency":{"type":"string","title":"Currency"},"grand_total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Grand Total"},"status":{"type":"string","title":"Status"},"is_test":{"type":"boolean","title":"Is Test","default":false},"preceding_invoice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Preceding Invoice Id"},"issued_at":{"type":"string","format":"date-time","title":"Issued At"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"transmission_status":{"type":"string","title":"Transmission Status","default":"none"},"transmission_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transmission Provider"},"transmitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Transmitted At"},"document":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Document"}},"type":"object","required":["id","org_id","booking_id","legal_issuer_id","document_type","series","fiscal_year","sequence_number","invoice_number","currency","grand_total","status","issued_at","created_at","updated_at"],"title":"IssuedInvoiceResponse"},"JurisdictionInfo":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"jurisdiction_type":{"type":"string","title":"Jurisdiction Type"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"}},"type":"object","required":["code","name","jurisdiction_type"],"title":"JurisdictionInfo"},"JurisdictionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"local_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Local Name"},"jurisdiction_type":{"type":"string","title":"Jurisdiction Type"},"path":{"type":"string","title":"Path"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id"},"country_code":{"type":"string","title":"Country Code"},"subdivision_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subdivision Code"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"currency_code":{"type":"string","title":"Currency Code"},"status":{"type":"string","title":"Status"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","code","name","jurisdiction_type","path","country_code","currency_code","status","created_by","created_at","updated_at"],"title":"JurisdictionResponse"},"LegalIssuerCreate":{"properties":{"legal_name":{"type":"string","maxLength":500,"minLength":1,"title":"Legal Name"},"trading_name":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Trading Name"},"country_code":{"type":"string","maxLength":2,"minLength":2,"title":"Country Code"},"registered_address":{"$ref":"#/components/schemas/RegisteredAddress"},"default_currency":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Default Currency"},"tax_regime":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Tax Regime","description":"The issuer's own tax regime (e.g. 'franchise_base', 'kleinunternehmer', 'regime_forfettario', 'eu_sme_scheme', 'uk_below_threshold', 'mype'). Drives supplier-regime tax treatment and VAT-exempt (category E) invoicing for bookings where this issuer is the supplier."},"eas_endpoint_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Eas Endpoint Id"},"eas_scheme_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Eas Scheme Code"},"einvoice_format":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Einvoice Format","description":"National e-invoice wire format for this issuer's documents (ubl_peppol default; fatturapa, zatca, mydata, ksef_fa3, cfdi). Null → the country default / PEPPOL UBL."}},"type":"object","required":["legal_name","country_code"],"title":"LegalIssuerCreate","example":{"country_code":"IT","default_currency":"EUR","eas_endpoint_id":"0211:IT12345678901","eas_scheme_code":"0211","legal_name":"Acme Hotel Italia SRL","registered_address":{"city":"Milan","country_code":"IT","line1":"Via Roma 10","line2":"Reception desk","postal_code":"20121","region":"MI"},"trading_name":"Acme Milan Centro"}},"LegalIssuerListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LegalIssuerResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"LegalIssuerListResponse"},"LegalIssuerResponse":{"properties":{"legal_name":{"type":"string","maxLength":500,"minLength":1,"title":"Legal Name"},"trading_name":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Trading Name"},"country_code":{"type":"string","maxLength":2,"minLength":2,"title":"Country Code"},"registered_address":{"$ref":"#/components/schemas/RegisteredAddress"},"default_currency":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Default Currency"},"tax_regime":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Tax Regime","description":"The issuer's own tax regime (e.g. 'franchise_base', 'kleinunternehmer', 'regime_forfettario', 'eu_sme_scheme', 'uk_below_threshold', 'mype'). Drives supplier-regime tax treatment and VAT-exempt (category E) invoicing for bookings where this issuer is the supplier."},"eas_endpoint_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Eas Endpoint Id"},"eas_scheme_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Eas Scheme Code"},"einvoice_format":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Einvoice Format","description":"National e-invoice wire format for this issuer's documents (ubl_peppol default; fatturapa, zatca, mydata, ksef_fa3, cfdi). Null → the country default / PEPPOL UBL."},"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["legal_name","country_code","id","org_id","is_active","created_at","updated_at"],"title":"LegalIssuerResponse"},"LegalIssuerUpdate":{"properties":{"legal_name":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Legal Name"},"trading_name":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Trading Name"},"country_code":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country Code"},"registered_address":{"anyOf":[{"$ref":"#/components/schemas/RegisteredAddress"},{"type":"null"}]},"default_currency":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Default Currency"},"tax_regime":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Tax Regime"},"eas_endpoint_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Eas Endpoint Id"},"eas_scheme_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Eas Scheme Code"},"einvoice_format":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Einvoice Format"}},"type":"object","title":"LegalIssuerUpdate","example":{"eas_endpoint_id":"0211:IT12345678901","eas_scheme_code":"0211","registered_address":{"city":"Milan","country_code":"IT","line1":"Via Roma 10","line2":"Reception desk","postal_code":"20121","region":"MI"},"trading_name":"Acme Milan Centro"}},"LegalProfileUpdate":{"properties":{"legal_name":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Legal Name"},"tax_country_code":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Tax Country Code"},"default_legal_issuer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Legal Issuer Id"}},"type":"object","title":"LegalProfileUpdate","description":"Editable subset of the org's legal-identity foundation. All\nfields optional; only provided keys are updated.\n\n`default_legal_issuer_id` must point to an issuer the caller's org\nowns, or be explicitly null to clear the pointer. Sending a\ndifferent org's issuer ID returns 400 — we don't leak existence by\nsilently rejecting.","example":{"default_legal_issuer_id":12,"legal_name":"Acme Hospitality Group","tax_country_code":"IT"}},"LiabilityLedgerLine":{"properties":{"invoice_id":{"type":"integer","title":"Invoice Id"},"invoice_number":{"type":"string","title":"Invoice Number"},"document_type":{"type":"string","title":"Document Type"},"booking_id":{"type":"integer","title":"Booking Id"},"property_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Property Id"},"external_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference"},"issued_at":{"type":"string","format":"date-time","title":"Issued At"},"legal_issuer_id":{"type":"integer","title":"Legal Issuer Id"},"currency":{"type":"string","title":"Currency"},"jurisdiction_code":{"type":"string","title":"Jurisdiction Code"},"authority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority"},"category_code":{"type":"string","title":"Category Code"},"taxable_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Taxable Amount"},"tax_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Amount"},"sign":{"type":"integer","title":"Sign"}},"type":"object","required":["invoice_id","invoice_number","document_type","booking_id","issued_at","legal_issuer_id","currency","jurisdiction_code","authority","category_code","taxable_amount","tax_amount","sign"],"title":"LiabilityLedgerLine"},"LiabilityLedgerLinesResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LiabilityLedgerLine"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","total"],"title":"LiabilityLedgerLinesResponse"},"LiabilityLedgerSummaryItem":{"properties":{"jurisdiction_code":{"type":"string","title":"Jurisdiction Code"},"authority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority"},"category_code":{"type":"string","title":"Category Code"},"currency":{"type":"string","title":"Currency"},"taxable_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Taxable Amount"},"tax_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Amount"},"invoice_count":{"type":"integer","minimum":0.0,"title":"Invoice Count"}},"type":"object","required":["jurisdiction_code","authority","category_code","currency","taxable_amount","tax_amount","invoice_count"],"title":"LiabilityLedgerSummaryItem"},"LiabilityLedgerSummaryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LiabilityLedgerSummaryItem"},"type":"array","title":"Items"},"total_tax_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total Tax Amount"},"total_tax_amount_by_currency":{"additionalProperties":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},"type":"object","title":"Total Tax Amount By Currency"}},"type":"object","required":["items","total_tax_amount"],"title":"LiabilityLedgerSummaryResponse"},"LineItem":{"properties":{"description":{"type":"string","title":"Description","examples":["Room rate","Resort fee","Cleaning fee"]},"item_type":{"type":"string","enum":["room","resort_fee","cleaning_fee","service_fee","destination_fee","sustainability_fee","amenity_fee","commission","other"],"title":"Item Type"},"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount","description":"Per-night amount in booking currency"},"nights":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Nights","description":"Override stay nights for this line. Default = booking.nights."},"taxable":{"type":"boolean","title":"Taxable","description":"If false, this line is excluded from tax base (e.g. refundable damage deposit).","default":true}},"type":"object","required":["description","item_type","amount"],"title":"LineItem","description":"One charge component on a booking — taxed independently when its\nmatching tax_categories.base_type rate exists for the jurisdiction.\n\nExample: Las Vegas Strip hotel charges room USD 250 + resort fee USD 45.\nNevada taxes the resort fee at the same 13.38% TLT rate as the room, but\nCalifornia's TOT excludes mandatory resort fees. Pass them as two line\nitems so the engine applies the correct base-type filter per jurisdiction."},"MapJurisdictionDossier":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"jurisdiction":{"$ref":"#/components/schemas/MapJurisdictionResponse"},"ancestors":{"items":{"$ref":"#/components/schemas/MapJurisdictionResponse"},"type":"array","title":"Ancestors"},"children":{"items":{"$ref":"#/components/schemas/MapJurisdictionResponse"},"type":"array","title":"Children"},"country":{"anyOf":[{"$ref":"#/components/schemas/CountryCoverageRow"},{"type":"null"}]},"direct_rates":{"items":{"$ref":"#/components/schemas/MapTaxRateResponse"},"type":"array","title":"Direct Rates"},"effective_rates":{"items":{"$ref":"#/components/schemas/EffectiveRateRow"},"type":"array","title":"Effective Rates"},"rules":{"items":{"$ref":"#/components/schemas/MapTaxRuleResponse"},"type":"array","title":"Rules"},"sources":{"items":{"$ref":"#/components/schemas/MonitoredSourceResponse"},"type":"array","title":"Sources"},"marker":{"anyOf":[{"$ref":"#/components/schemas/CityMarkerFeature"},{"type":"null"}]},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["generated_at","jurisdiction","ancestors","children","direct_rates","effective_rates","rules","sources"],"title":"MapJurisdictionDossier","example":{"ancestors":[{"code":"ES","country_code":"ES","created_at":"2026-03-12T00:00:00Z","currency_code":"EUR","id":100,"jurisdiction_type":"country","local_name":"Espana","name":"Spain","path":"ES","status":"active","timezone":"Europe/Madrid","updated_at":"2026-05-28T20:40:00Z"},{"code":"ES-CT","country_code":"ES","created_at":"2026-03-12T00:00:00Z","currency_code":"EUR","id":201,"jurisdiction_type":"region","local_name":"Catalunya","name":"Catalonia","parent_id":100,"path":"ES.CT","status":"active","subdivision_code":"ES-CT","timezone":"Europe/Madrid","updated_at":"2026-05-28T20:40:00Z"}],"children":[],"country":{"active_rate_count":22,"active_rule_count":14,"city_count":6,"code":"ES","coverage_score":84,"currency_code":"EUR","jurisdiction_count":18,"name":"Spain","source_count":9,"subjurisdiction_count":17},"direct_rates":[{"announcement_date":"2026-02-01","authority_name":"Ajuntament de Barcelona / Agencia Tributaria de Catalunya","base_includes":[],"calculation_order":100,"currency_code":"EUR","effective_start":"2026-04-01","enacted_date":"2026-02-01","id":5117,"jurisdiction_code":"ES-CT-BCN","jurisdiction_id":301,"legal_reference":"Ley 2/2026 and ATC IEET tariff table","legal_uri":"https://atc.gencat.cat/","rate_type":"tiered","source_url":"https://atc.gencat.cat/","status":"scheduled","tax_category_code":"tourism_flat_person_night","tax_category_id":44,"tier_type":"single_amount","tiers":[{"min":4,"value":6.6}],"version":1}],"effective_rates":[{"attached_to_jurisdiction_code":"ES","attached_to_jurisdiction_id":100,"attached_to_jurisdiction_name":"Spain","attached_to_jurisdiction_type":"country","authority_name":"Agencia Tributaria","effective_start":"2024-01-01","id":120,"is_inherited":true,"legal_reference":"Ley 37/1992, Articulo 91.uno.2.2","rate_type":"percentage","rate_value":"0.10","source_url":"https://sede.agenciatributaria.gob.es/","tax_category_code":"vat_reduced","tax_category_name":"VAT / Sales Tax (reduced rate)"}],"generated_at":"2026-06-01T12:00:00Z","jurisdiction":{"code":"ES-CT-BCN","country_code":"ES","created_at":"2026-03-12T00:00:00Z","currency_code":"EUR","id":301,"jurisdiction_type":"city","local_name":"Barcelona","name":"Barcelona","parent_id":201,"path":"ES.CT.BCN","status":"active","subdivision_code":"ES-CT","timezone":"Europe/Madrid","updated_at":"2026-05-28T20:40:00Z"},"marker":{"geometry":{"coordinates":[2.1734,41.3851],"type":"Point"},"properties":{"code":"ES-CT-BCN","name":"Barcelona","country_code":"ES","jurisdiction_type":"city","currency_code":"EUR","active_rate_count":3,"active_rule_count":4,"coordinate_source":"metadata"},"type":"Feature"},"metadata":{"map_centroid":{"lat":41.3851,"lng":2.1734}},"rules":[{"action":{"max_nights":7,"type":"cap"},"authority_name":"Ajuntament de Barcelona","conditions":{"operator":"AND","rules":[]},"description":"Caps city tourism tax at 7 nights.","effective_start":"2026-04-01","enacted_date":"2026-02-01","id":1361,"jurisdiction_code":"ES-CT-BCN","jurisdiction_id":301,"legal_reference":"Ley 2/2026","legal_uri":"https://atc.gencat.cat/","name":"Barcelona IEET - 7-night cap per continuous stay","priority":100,"rule_type":"cap","status":"active","tax_rate_id":5117,"version":1}],"sources":[{"check_frequency_days":7,"created_at":"2026-03-12T00:00:00Z","id":88,"jurisdiction_code":"ES-CT-BCN","language":"es","last_checked_at":"2026-05-28T20:40:00Z","last_content_hash":"sha256:example","source_type":"tax_authority","status":"active","updated_at":"2026-05-28T20:40:00Z","url":"https://atc.gencat.cat/"}]}},"MapJurisdictionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"local_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Local Name"},"jurisdiction_type":{"type":"string","title":"Jurisdiction Type"},"path":{"type":"string","title":"Path"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id"},"country_code":{"type":"string","title":"Country Code"},"subdivision_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subdivision Code"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"currency_code":{"type":"string","title":"Currency Code"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","code","name","jurisdiction_type","path","country_code","currency_code","status","created_at","updated_at"],"title":"MapJurisdictionResponse","description":"Customer-safe jurisdiction shape for coverage-map dossiers.\n\nUnlike the admin jurisdiction API, this intentionally omits internal review\nmetadata such as `created_by`."},"MapTaxRateResponse":{"properties":{"id":{"type":"integer","title":"Id"},"jurisdiction_id":{"type":"integer","title":"Jurisdiction Id"},"jurisdiction_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction Code"},"tax_category_id":{"type":"integer","title":"Tax Category Id"},"tax_category_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Category Code"},"rate_type":{"type":"string","title":"Rate Type"},"rate_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate Value"},"currency_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency Code"},"tiers":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tiers"},"tier_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier Type"},"percentage_basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Percentage Basis"},"basis_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Basis Value"},"basis_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Basis Currency"},"enacted_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Enacted Date"},"effective_start":{"type":"string","format":"date","title":"Effective Start"},"effective_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective End"},"applicability_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Applicability Start"},"announcement_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Announcement Date"},"calculation_order":{"type":"integer","title":"Calculation Order"},"base_includes":{"items":{"type":"string"},"type":"array","title":"Base Includes"},"legal_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Reference"},"legal_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Uri"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"authority_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority Name"},"version":{"type":"integer","title":"Version"},"supersedes_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Supersedes Id"},"status":{"type":"string","title":"Status"},"collection_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection Model"},"taxable_amount_rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxable Amount Rule"}},"type":"object","required":["id","jurisdiction_id","tax_category_id","rate_type","effective_start","calculation_order","base_includes","version","status"],"title":"MapTaxRateResponse"},"MapTaxRuleResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tax_rate_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Rate Id"},"jurisdiction_id":{"type":"integer","title":"Jurisdiction Id"},"jurisdiction_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction Code"},"rule_type":{"type":"string","title":"Rule Type"},"priority":{"type":"integer","title":"Priority"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"conditions":{"additionalProperties":true,"type":"object","title":"Conditions"},"action":{"additionalProperties":true,"type":"object","title":"Action"},"effective_start":{"type":"string","format":"date","title":"Effective Start"},"effective_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective End"},"enacted_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Enacted Date"},"legal_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Reference"},"legal_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Uri"},"authority_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority Name"},"status":{"type":"string","title":"Status"},"version":{"type":"integer","title":"Version"},"supersedes_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Supersedes Id"}},"type":"object","required":["id","jurisdiction_id","rule_type","priority","name","conditions","action","effective_start","status","version"],"title":"MapTaxRuleResponse"},"MeResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserResponse"},"organization":{"anyOf":[{"$ref":"#/components/schemas/OrganizationResponse"},{"type":"null"}]}},"type":"object","required":["user"],"title":"MeResponse"},"MonitoredSourceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"jurisdiction_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction Code"},"url":{"type":"string","title":"Url"},"source_type":{"type":"string","title":"Source Type"},"language":{"type":"string","title":"Language"},"check_frequency_days":{"type":"integer","title":"Check Frequency Days"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked At"},"last_content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Content Hash"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","url","source_type","language","check_frequency_days","last_checked_at","last_content_hash","status","created_at","updated_at"],"title":"MonitoredSourceResponse"},"NexusStatusResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/NexusStatusRow"},"type":"array","title":"Items"},"disclaimer":{"type":"string","title":"Disclaimer","default":"Guidance, not legal advice. Figures are measured over your ISSUED fiscal documents (380/389 positive, 381 credit notes negative; test documents excluded) converted into each threshold's currency at monthly rates. Amounts approximate each statute's turnover definition as net supplies — jurisdiction-specific inclusions (operator-levied city taxes folded into the VAT base, gross-receipts definitions in some US states, exempt receipts) can make actual statutory turnover higher. Registration obligations can arise regardless of thresholds — e.g. an accommodation property's own jurisdiction usually requires registration from the first taxable supply — and some jurisdictions apply conjunctive or special tests noted per row. Confirm with a tax professional before acting."},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["items","generated_at"],"title":"NexusStatusResponse"},"NexusStatusRow":{"properties":{"jurisdiction_code":{"type":"string","title":"Jurisdiction Code"},"scheme":{"type":"string","title":"Scheme"},"applies_to":{"type":"string","title":"Applies To"},"status":{"type":"string","title":"Status"},"threshold_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Threshold Amount"},"currency":{"type":"string","title":"Currency"},"basis":{"type":"string","title":"Basis"},"transaction_count_threshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transaction Count Threshold"},"accumulated_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Accumulated Amount"},"transaction_count":{"type":"integer","title":"Transaction Count"},"pct_of_threshold":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Pct Of Threshold"},"window_start":{"type":"string","format":"date","title":"Window Start"},"window_end":{"type":"string","format":"date","title":"Window End"},"fx_incomplete":{"type":"boolean","title":"Fx Incomplete","default":false},"legal_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Reference"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["jurisdiction_code","scheme","applies_to","status","threshold_amount","currency","basis","transaction_count_threshold","accumulated_amount","transaction_count","pct_of_threshold","window_start","window_end","legal_reference","source_url","notes"],"title":"NexusStatusRow"},"NightlyRateEntry":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"rate":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Rate"}},"type":"object","required":["date","rate"],"title":"NightlyRateEntry","description":"Rate that applies on a specific stay night."},"OrgDetailResponse":{"properties":{"organization":{"$ref":"#/components/schemas/OrganizationResponse"},"is_owner":{"type":"boolean","title":"Is Owner"},"can_manage":{"type":"boolean","title":"Can Manage"},"members":{"items":{"$ref":"#/components/schemas/OrganizationMemberResponse"},"type":"array","title":"Members"},"pending_invitations":{"items":{"$ref":"#/components/schemas/InvitationResponse"},"type":"array","title":"Pending Invitations"}},"type":"object","required":["organization","is_owner","can_manage","members","pending_invitations"],"title":"OrgDetailResponse"},"OrganizationMemberResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"org_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Org Id"},"org_role":{"type":"string","title":"Org Role"}},"type":"object","required":["id","email","role","is_active","created_at","org_role"],"title":"OrganizationMemberResponse"},"OrganizationResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"owner_id":{"type":"integer","title":"Owner Id"},"api_access_enabled":{"type":"boolean","title":"Api Access Enabled","default":false},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"tax_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Country Code"},"default_legal_issuer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Legal Issuer Id"}},"type":"object","required":["id","name","slug","owner_id"],"title":"OrganizationResponse"},"PartyAddress":{"properties":{"line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line1"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"country_code":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country Code"}},"type":"object","title":"PartyAddress"},"PropertyBulkMapRequest":{"properties":{"properties":{"items":{"$ref":"#/components/schemas/PropertyCreate"},"type":"array","maxItems":500,"minItems":1,"title":"Properties"}},"type":"object","required":["properties"],"title":"PropertyBulkMapRequest"},"PropertyBulkMapResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PropertyResponse"},"type":"array","title":"Items"},"mapped":{"type":"integer","title":"Mapped"},"unresolved":{"type":"integer","title":"Unresolved"}},"type":"object","required":["items","mapped","unresolved"],"title":"PropertyBulkMapResponse"},"PropertyCreate":{"properties":{"external_reference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"External Reference"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"address_line1":{"type":"string","maxLength":500,"minLength":3,"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"City"},"region":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Region"},"postal_code":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Postal Code"},"country_code":{"type":"string","maxLength":2,"minLength":2,"title":"Country Code"},"jurisdiction_code":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Jurisdiction Code","description":"Optional TaxLens jurisdiction code to pin deterministically. When omitted, the address geocoder resolves jurisdiction."},"property_type":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Property Type"},"property_classification":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Property Classification"},"star_rating":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Star Rating"},"property_postal_code":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Property Postal Code"},"property_zone_code":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Property Zone Code","description":"Optional sub-city tax-overlay zone (e.g. 'sf_tid_zone_1'), frozen onto bookings as a tax driver when the booking does not supply one."},"supplier_tax_regime":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Supplier Tax Regime","description":"Optional host tax-regime default for bookings from this property (e.g. 'franchise_base', 'mype'). The supplier legal issuer's regime takes precedence when set."},"default_legal_issuer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Legal Issuer Id","description":"Optional org-scoped legal issuer used as the invoice seller for bookings created from this property when the booking does not explicitly supply legal_issuer_id."},"default_supplier_legal_issuer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Supplier Legal Issuer Id","description":"Optional org-scoped host/supplier legal issuer used for self-billed 389 invoices when the booking does not explicitly supply supplier_legal_issuer_id."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["name","address_line1","country_code"],"title":"PropertyCreate"},"PropertyDetailResponse":{"properties":{"external_reference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"External Reference"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"address_line1":{"type":"string","maxLength":500,"minLength":3,"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"City"},"region":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Region"},"postal_code":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Postal Code"},"country_code":{"type":"string","maxLength":2,"minLength":2,"title":"Country Code"},"jurisdiction_code":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Jurisdiction Code","description":"Optional TaxLens jurisdiction code to pin deterministically. When omitted, the address geocoder resolves jurisdiction."},"property_type":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Property Type"},"property_classification":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Property Classification"},"star_rating":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Star Rating"},"property_postal_code":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Property Postal Code"},"property_zone_code":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Property Zone Code","description":"Optional sub-city tax-overlay zone (e.g. 'sf_tid_zone_1'), frozen onto bookings as a tax driver when the booking does not supply one."},"supplier_tax_regime":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Supplier Tax Regime","description":"Optional host tax-regime default for bookings from this property (e.g. 'franchise_base', 'mype'). The supplier legal issuer's regime takes precedence when set."},"default_legal_issuer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Legal Issuer Id","description":"Optional org-scoped legal issuer used as the invoice seller for bookings created from this property when the booking does not explicitly supply legal_issuer_id."},"default_supplier_legal_issuer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Supplier Legal Issuer Id","description":"Optional org-scoped host/supplier legal issuer used for self-billed 389 invoices when the booking does not explicitly supply supplier_legal_issuer_id."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"},"normalized_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normalized Address"},"jurisdiction_confidence":{"type":"string","enum":["high","medium","low"],"title":"Jurisdiction Confidence"},"jurisdiction_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction Path"},"tax_driver_status":{"type":"string","enum":["complete","incomplete"],"title":"Tax Driver Status"},"mapping_status":{"type":"string","enum":["mapped","unresolved","stale"],"title":"Mapping Status"},"last_mapped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Mapped At"},"last_mapping_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Mapping Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"jurisdiction":{"anyOf":[{"$ref":"#/components/schemas/JurisdictionInfo"},{"type":"null"}]},"ancestors":{"items":{"$ref":"#/components/schemas/JurisdictionInfo"},"type":"array","title":"Ancestors"},"tax_driver_hints":{"items":{"type":"string"},"type":"array","title":"Tax Driver Hints"}},"type":"object","required":["name","address_line1","country_code","id","org_id","lat","lng","normalized_address","jurisdiction_confidence","jurisdiction_path","tax_driver_status","mapping_status","last_mapped_at","last_mapping_error","created_at","updated_at"],"title":"PropertyDetailResponse"},"PropertyListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PropertyResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"PropertyListResponse"},"PropertyResponse":{"properties":{"external_reference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"External Reference"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"address_line1":{"type":"string","maxLength":500,"minLength":3,"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"City"},"region":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Region"},"postal_code":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Postal Code"},"country_code":{"type":"string","maxLength":2,"minLength":2,"title":"Country Code"},"jurisdiction_code":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Jurisdiction Code","description":"Optional TaxLens jurisdiction code to pin deterministically. When omitted, the address geocoder resolves jurisdiction."},"property_type":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Property Type"},"property_classification":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Property Classification"},"star_rating":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Star Rating"},"property_postal_code":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Property Postal Code"},"property_zone_code":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Property Zone Code","description":"Optional sub-city tax-overlay zone (e.g. 'sf_tid_zone_1'), frozen onto bookings as a tax driver when the booking does not supply one."},"supplier_tax_regime":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Supplier Tax Regime","description":"Optional host tax-regime default for bookings from this property (e.g. 'franchise_base', 'mype'). The supplier legal issuer's regime takes precedence when set."},"default_legal_issuer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Legal Issuer Id","description":"Optional org-scoped legal issuer used as the invoice seller for bookings created from this property when the booking does not explicitly supply legal_issuer_id."},"default_supplier_legal_issuer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Supplier Legal Issuer Id","description":"Optional org-scoped host/supplier legal issuer used for self-billed 389 invoices when the booking does not explicitly supply supplier_legal_issuer_id."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"},"normalized_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normalized Address"},"jurisdiction_confidence":{"type":"string","enum":["high","medium","low"],"title":"Jurisdiction Confidence"},"jurisdiction_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction Path"},"tax_driver_status":{"type":"string","enum":["complete","incomplete"],"title":"Tax Driver Status"},"mapping_status":{"type":"string","enum":["mapped","unresolved","stale"],"title":"Mapping Status"},"last_mapped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Mapped At"},"last_mapping_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Mapping Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","address_line1","country_code","id","org_id","lat","lng","normalized_address","jurisdiction_confidence","jurisdiction_path","tax_driver_status","mapping_status","last_mapped_at","last_mapping_error","created_at","updated_at"],"title":"PropertyResponse"},"PropertyUpdate":{"properties":{"external_reference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"External Reference"},"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"address_line1":{"anyOf":[{"type":"string","maxLength":500,"minLength":3},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"City"},"region":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Region"},"postal_code":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Postal Code"},"country_code":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country Code"},"jurisdiction_code":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Jurisdiction Code"},"property_type":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Property Type"},"property_classification":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Property Classification"},"star_rating":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Star Rating"},"property_postal_code":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Property Postal Code"},"property_zone_code":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Property Zone Code"},"supplier_tax_regime":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Supplier Tax Regime"},"default_legal_issuer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Legal Issuer Id"},"default_supplier_legal_issuer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Supplier Legal Issuer Id"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"PropertyUpdate"},"RefundTaxDeltaComponent":{"properties":{"category_code":{"type":"string","title":"Category Code"},"jurisdiction_code":{"type":"string","title":"Jurisdiction Code"},"original_tax":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Original Tax"},"refunded_tax":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Refunded Tax"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["category_code","jurisdiction_code","original_tax","refunded_tax"],"title":"RefundTaxDeltaComponent","description":"Tax delta per category that's being refunded."},"RegionCoverageRow":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"country_code":{"type":"string","title":"Country Code"},"jurisdiction_type":{"type":"string","title":"Jurisdiction Type"},"child_count":{"type":"integer","title":"Child Count","default":0},"active_rate_count":{"type":"integer","title":"Active Rate Count","default":0},"active_rule_count":{"type":"integer","title":"Active Rule Count","default":0},"source_count":{"type":"integer","title":"Source Count","default":0}},"type":"object","required":["code","name","country_code","jurisdiction_type"],"title":"RegionCoverageRow"},"RegisteredAddress":{"properties":{"line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line1"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"country_code":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country Code"}},"type":"object","title":"RegisteredAddress","description":"Postal address per EN 16931 BTG-31. Minimum street + city +\npostal_code + country_code for PEPPOL routing; line2 is optional.","example":{"city":"Milan","country_code":"IT","line1":"Via Roma 10","line2":"Reception desk","postal_code":"20121","region":"MI"}},"RegulatorIdentifiers":{"additionalProperties":{"type":"string"},"type":"object"},"RequestLogEntry":{"properties":{"id":{"type":"integer","title":"Id"},"request_id":{"type":"string","title":"Request Id"},"method":{"type":"string","title":"Method"},"path":{"type":"string","title":"Path"},"status_code":{"type":"integer","title":"Status Code"},"duration_ms":{"type":"integer","title":"Duration Ms"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"payload_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Summary"},"error_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Detail"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","request_id","method","path","status_code","duration_ms","ip_address","user_agent","payload_summary","error_detail","created_at"],"title":"RequestLogEntry"},"RequestLogResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RequestLogEntry"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"RequestLogResponse"},"ResendVerificationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ResendVerificationRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","minLength":16,"title":"Token"},"new_password":{"type":"string","minLength":8,"title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest"},"RuleTraceEntry":{"properties":{"rule_id":{"type":"integer","title":"Rule Id"},"name":{"type":"string","title":"Name"},"rule_type":{"type":"string","title":"Rule Type"},"result":{"type":"string","title":"Result"}},"type":"object","required":["rule_id","name","rule_type","result"],"title":"RuleTraceEntry"},"SellerParty":{"properties":{"legal_name":{"type":"string","title":"Legal Name"},"trading_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Name"},"address":{"$ref":"#/components/schemas/PartyAddress"},"tax_registrations":{"items":{"$ref":"#/components/schemas/TaxRegistrationRef"},"type":"array","title":"Tax Registrations"},"eas_endpoint":{"anyOf":[{"$ref":"#/components/schemas/EasEndpoint"},{"type":"null"}]}},"type":"object","required":["legal_name","address"],"title":"SellerParty"},"SignupRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":8,"title":"Password"},"organization_name":{"type":"string","maxLength":200,"minLength":1,"title":"Organization Name"},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token","description":"Cloudflare Turnstile token. Required in production."}},"type":"object","required":["email","password","organization_name"],"title":"SignupRequest"},"SignupResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserResponse"},"organization":{"$ref":"#/components/schemas/OrganizationResponse"},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"token_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Type"},"verification_required":{"type":"boolean","title":"Verification Required","default":false}},"type":"object","required":["user","organization"],"title":"SignupResponse","description":"Signup result. When verification is required (prod), `access_token` is null\nand `verification_required` is True — the client must verify before logging in."},"TaxBreakdown":{"properties":{"components":{"items":{"$ref":"#/components/schemas/TaxComponent"},"type":"array","title":"Components"},"total_tax":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Tax"},"effective_rate":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Effective Rate"},"currency":{"type":"string","title":"Currency"},"subtotal_excluding_tax":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Subtotal Excluding Tax"},"subtotal_including_tax":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Subtotal Including Tax"},"total_withholding":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total Withholding"},"total_margin_vat":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total Margin Vat"},"amount_in_settlement_currency":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount In Settlement Currency"},"settlement_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Settlement Currency"},"settlement_fx_rate":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Settlement Fx Rate"},"settlement_fx_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Settlement Fx Error"}},"type":"object","required":["components","total_tax","effective_rate","currency"],"title":"TaxBreakdown"},"TaxBreakdownRow":{"properties":{"category_code":{"type":"string","title":"Category Code"},"rate_percent":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate Percent"},"taxable_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Taxable Amount"},"tax_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Amount"},"exemption_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exemption Code"},"exemption_reason_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exemption Reason Text"}},"type":"object","required":["category_code","rate_percent","taxable_amount","tax_amount"],"title":"TaxBreakdownRow","description":"EN 16931 BTG-23 — VAT breakdown, one row per (category, rate)."},"TaxCalculationRequest":{"properties":{"jurisdiction_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction Code","examples":["US-NY-NYC"]},"lat":{"anyOf":[{"type":"number","maximum":90.0,"minimum":-90.0},{"type":"null"}],"title":"Lat","description":"Latitude — used to auto-resolve jurisdiction if jurisdiction_code not provided"},"lng":{"anyOf":[{"type":"number","maximum":180.0,"minimum":-180.0},{"type":"null"}],"title":"Lng","description":"Longitude — used to auto-resolve jurisdiction if jurisdiction_code not provided"},"stay_date":{"type":"string","format":"date","title":"Stay Date"},"checkout_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Checkout Date"},"nightly_rate":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Nightly Rate"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","examples":["USD"]},"property_type":{"type":"string","title":"Property Type","default":"hotel"},"property_classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Classification","description":"Optional authority-assigned lodging class when property_type/star_rating are not precise enough, e.g. Dubai holiday_home_deluxe."},"star_rating":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Star Rating"},"guest_type":{"type":"string","title":"Guest Type","default":"standard"},"guest_age":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Guest Age"},"guest_nationality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guest Nationality"},"disability_percentage":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Disability Percentage","description":"Booking-level certified disability % (counts-only path; for per-guest precision use guests[].disability_percentage). Caller-attested."},"nights":{"type":"integer","minimum":1.0,"title":"Nights"},"number_of_guests":{"type":"integer","minimum":1.0,"title":"Number Of Guests","default":1},"adults":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Adults","description":"Number of guests chargeable for per-person tourist taxes that exempt minors (e.g. FR taxe de séjour exempts under-18s). When provided, per-person taxes are charged for `adults` instead of `number_of_guests` — a 2-adult + 2-child booking passes adults=2 to be charged for 2, not 4. When omitted, every occupant is charged (legacy). Must not exceed number_of_guests."},"is_marketplace":{"type":"boolean","title":"Is Marketplace","default":false},"platform_type":{"type":"string","title":"Platform Type","default":"direct"},"is_bundled":{"type":"boolean","title":"Is Bundled","default":false},"property_room_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Property Room Count","description":"Number of rooms in the property. Used by operator-size tier rules (Pakistan, India, Hong Kong, Seychelles, Uzbekistan)."},"bedroom_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Bedroom Count","description":"Number of bedrooms in the booked unit. Used by per-bedroom cap rules (Barbados villa, Trinidad & Tobago 6+ bedroom HAT scope, Montserrat)."},"property_postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Postal Code","description":"Postal/ZIP code of the property. Used by geofenced rules (e.g. Chicago Tourism Improvement District applies only within the downtown ZIP boundary). When omitted, geofenced rules preserve their pre-geofence behaviour."},"para_hotelier":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Para Hotelier","description":"For furnished short-term rentals: True when the supply includes the ancillary services (>=3 of 4: breakfast, regular cleaning, linen, reception) that make it a VAT-taxable para-hôtelier supply in France (CGI 261 D 4°). False signals a bare rental (VAT-exempt). When omitted, legacy VAT treatment is preserved."},"property_zone_code":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Property Zone Code","description":"Sub-city tax-overlay zone of the property, for cities whose lodging tax varies by zone where the zone is NOT an admin boundary or a clean ZIP set (e.g. San Francisco TID 'sf_tid_zone_1'/'sf_tid_zone_2'; San Diego TOT 'sd_tot_zone_1'..'sd_tot_zone_3'). String match only; zonal rules gate on it via in[list]/==. When omitted, zonal rules fall back to the city baseline (backward-compatible). Admin-boundary zones (e.g. Venice islands) are resolved from the address instead."},"supplier_tax_regime":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Supplier Tax Regime","description":"The host's/supplier's own tax regime, for statutes conditioned on supplier standing rather than the booking/guest. Conventional values: franchise_base (FR CGI 293 B), kleinunternehmer (DE §19 UStG), regime_forfettario (IT L.190/2014), eu_sme_scheme (Dir 2020/285), uk_below_threshold, mype (Peru Ley 31556), simples_nacional, standard. Sourced from the supplier legal issuer / property default at booking time; settable per request to override. When omitted, standard treatment applies (backward-compatible)."},"payment_method":{"type":"string","title":"Payment Method","description":"Payment method used for the booking. Conventional values: card, cash, bank_transfer, foreign_card, mobile_money, unknown. Used by Argentina IVA refund, Azerbaijan cashless-POS exemption, Pakistan digital-payment discount, Uruguay IVA-cero, Venezuela IGTF.","default":"unknown"},"exemption_certificate_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exemption Certificate Id","description":"An exemption certificate held by the calling organization that documents this booking's exemption claim (government/diplomatic/entity stays). The server validates it — org ownership, validity window covering the whole stay, jurisdiction scope — and only then sets has_valid_exemption_certificate for certificate-gated rules. Invalid/expired/out-of-scope certificates reject the calculation (409); an unknown id is a 404. Requires an organization-scoped call (JWT or API key). When omitted, no certificate-gated exemption can fire (backward-compatible)."},"guests":{"anyOf":[{"items":{"$ref":"#/components/schemas/GuestSpec"},"type":"array"},{"type":"null"}],"title":"Guests","description":"Per-guest details. If provided, overrides scalar guest_* fields and number_of_guests."},"booking_purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booking Purpose","description":"Drives purpose-based exemption rules.","examples":["business","leisure","government","military","diplomatic"]},"nightly_rates":{"anyOf":[{"items":{"$ref":"#/components/schemas/NightlyRateEntry"},"type":"array"},{"type":"null"}],"title":"Nightly Rates","description":"Per-night rate schedule. If provided, overrides scalar nightly_rate × nights."},"line_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/LineItem"},"type":"array"},{"type":"null"}],"title":"Line Items","description":"Itemized charges (room, resort_fee, cleaning_fee, etc.). When provided, the engine applies each rate to the items whose item_type matches the rate's tax_category base_type. When omitted, all rates apply to nightly_rate × nights (legacy)."},"price_includes_tax":{"type":"boolean","title":"Price Includes Tax","description":"If True, the engine treats nightly_rate and line_item.amount as tax-inclusive (gross). Response will reverse-derive the base and tax. Used by Booking.com TaxPolicy Type=Inclusive and EU consumer-protection display compliance.","default":false},"merchant_of_record":{"anyOf":[{"type":"string","enum":["property","platform","none"]},{"type":"null"}],"title":"Merchant Of Record","description":"Who legally remits the tax to authorities. 'property' = hotel/host (Booking agency, Vrbo non-MPF). 'platform' = OTA/marketplace (Booking MoR, Airbnb MPF, ETG MoR). 'none' or omitted = engine falls back to is_marketplace heuristic."},"customer_type":{"anyOf":[{"type":"string","enum":["consumer","business","government","diplomat","ngo","exempt_entity"]},{"type":"null"}],"title":"Customer Type","description":"Customer profile. Drives B2B reverse-charge, government/diplomat exemptions. Defaults to 'consumer' when omitted."},"business_tax_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Business Tax Id","description":"Business VAT ID / EIN / GSTIN. Used for B2B reverse-charge eligibility (when customer_type='business' and cross-border within EU)."},"commission_supplier_country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Commission Supplier Country","description":"ISO 3166-1 alpha-2 country where the OTA/intermediary that charges the commission is established (e.g. 'US' for a US marketplace acting as MoR). Gates reverse charge on the COMMISSION line independently of the guest: an intermediary service supplied to an EU hotel by an OTA in a different country is reverse-charged (Art. 44/196), even when the guest is a non-EU consumer. When omitted, commission reverse charge falls back to the guest-derived is_cross_border_b2b signal (legacy). The ROOM is never affected (Art. 47 — always local VAT)."},"commission_withholding_country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Commission Withholding Country","description":"ISO 3166-1 alpha-2 country whose income-tax WITHHOLDING regime applies to the OTA→property payout (e.g. 'IN' for India's Section 194-O TDS on e-commerce). When set, the platform withholds income tax on GROSS room sales — a payment-side deduction from the property's payout, NOT a VAT line: it is disclosed in the breakdown (category O) and surfaced as total_withholding, but EXCLUDED from total_tax / total_with_tax (the guest bill is unchanged). Omitted = no withholding (legacy)."},"commission_withholding_treaty_rate":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Commission Withholding Treaty Rate","description":"Optional double-tax-treaty-reduced withholding rate as a decimal (e.g. 0.0005 for 0.05%). Overrides the seeded statutory rate for commission_withholding_country. Ignored when commission_withholding_country is not set."},"buyer_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Buyer Name","description":"Buyer's legal/registered name (EN 16931 BT-44). Does not affect tax calculation; captured so the booking's invoice document carries a compliant buyer. Required for a PEPPOL-valid e-invoice."},"buyer_address":{"anyOf":[{"$ref":"#/components/schemas/BuyerAddressInput"},{"type":"null"}],"description":"Buyer's postal address (EN 16931 BG-8). Does not affect tax calculation. country_code is required for a PEPPOL-valid e-invoice (BT-55)."},"settlement_currency":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Settlement Currency","description":"ISO 4217 currency the platform will settle in (may differ from booking currency). Response includes amount_in_settlement_currency. When omitted, no FX projection is performed."},"margin_scheme":{"type":"boolean","title":"Margin Scheme","description":"Opt into the EU Tour Operators' Margin Scheme (Art. 306-310). When True, the operator resells bought-in travel in its own name and VAT is due on the MARGIN (selling price − bought_in_cost), taxed at the operator's establishment country standard rate — NOT the destination room VAT. The invoice shows category E / VATEX-EU-306 ('Margin scheme — travel agents') with NO separate VAT line; the computed margin VAT is the operator's own liability, surfaced as total_margin_vat (not added to the guest bill).","default":false},"bought_in_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Bought In Cost","description":"TOMS only: the operator's actual cost of the bought-in travel services for the direct benefit of the traveller (e.g. the net room rate paid to the hotel), in `currency`. Required when margin_scheme=True. Margin = selling price − this cost (clamped to ≥0)."},"operator_country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Operator Country","description":"TOMS only: ISO 3166-1 alpha-2 country where the tour operator is established (place of supply, Art. 307). The margin is taxed at this country's standard VAT rate. Required when margin_scheme=True."},"out_of_eu_cost_fraction":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Out Of Eu Cost Fraction","description":"TOMS only: the fraction (0..1) of the bought-in travel enjoyed OUTSIDE the EU, whose margin is zero-rated (Art. 309). Default 0 (fully in-EU). The bundle is a single supply (one category-E line); this fraction only scales the operator's margin VAT."}},"type":"object","required":["stay_date","nightly_rate","currency","nights"],"title":"TaxCalculationRequest"},"TaxCalculationResponse":{"properties":{"calculation_id":{"type":"string","title":"Calculation Id"},"jurisdiction":{"additionalProperties":true,"type":"object","title":"Jurisdiction"},"input":{"additionalProperties":true,"type":"object","title":"Input"},"tax_breakdown":{"$ref":"#/components/schemas/TaxBreakdown"},"total_with_tax":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total With Tax"},"rules_applied":{"items":{"$ref":"#/components/schemas/RuleTraceEntry"},"type":"array","title":"Rules Applied"},"collection_info":{"anyOf":[{"$ref":"#/components/schemas/CollectionInfo"},{"type":"null"}]},"exemption_certificate":{"anyOf":[{"$ref":"#/components/schemas/ExemptionCertificateUsage"},{"type":"null"}]},"calculated_at":{"type":"string","format":"date-time","title":"Calculated At"},"data_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Version"}},"type":"object","required":["calculation_id","jurisdiction","input","tax_breakdown","total_with_tax","rules_applied","calculated_at"],"title":"TaxCalculationResponse"},"TaxComponent":{"properties":{"name":{"type":"string","title":"Name"},"category_code":{"type":"string","title":"Category Code"},"jurisdiction_code":{"type":"string","title":"Jurisdiction Code"},"jurisdiction_level":{"type":"string","title":"Jurisdiction Level"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"},"rate_type":{"type":"string","title":"Rate Type"},"taxable_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Taxable Amount"},"tax_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Amount"},"legal_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Reference"},"authority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority"},"line_item_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line Item Index"},"collected_by":{"anyOf":[{"type":"string","enum":["property","platform"]},{"type":"null"}],"title":"Collected By"},"exemption_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exemption Reason"},"is_exempt":{"type":"boolean","title":"Is Exempt","default":false},"logic_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logic Label"}},"type":"object","required":["name","category_code","jurisdiction_code","jurisdiction_level","rate","rate_type","taxable_amount","tax_amount","legal_reference","authority"],"title":"TaxComponent"},"TaxRegistrationCreate":{"properties":{"country_code":{"type":"string","maxLength":2,"minLength":2,"title":"Country Code"},"scheme":{"type":"string","maxLength":50,"minLength":1,"title":"Scheme"},"scheme_icd":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Scheme Icd"},"value":{"type":"string","maxLength":200,"minLength":1,"title":"Value"},"valid_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid From"},"valid_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid To"}},"type":"object","required":["country_code","scheme","value"],"title":"TaxRegistrationCreate","example":{"country_code":"IT","scheme":"VAT","scheme_icd":"0211","valid_from":"2026-01-01","valid_to":"2026-12-31","value":"IT12345678901"}},"TaxRegistrationListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TaxRegistrationResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"TaxRegistrationListResponse"},"TaxRegistrationRef":{"properties":{"scheme":{"type":"string","title":"Scheme"},"scheme_icd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheme Icd"},"value":{"type":"string","title":"Value"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"}},"type":"object","required":["scheme","value"],"title":"TaxRegistrationRef"},"TaxRegistrationResponse":{"properties":{"country_code":{"type":"string","maxLength":2,"minLength":2,"title":"Country Code"},"scheme":{"type":"string","maxLength":50,"minLength":1,"title":"Scheme"},"scheme_icd":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Scheme Icd"},"value":{"type":"string","maxLength":200,"minLength":1,"title":"Value"},"valid_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid From"},"valid_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid To"},"id":{"type":"integer","title":"Id"},"legal_issuer_id":{"type":"integer","title":"Legal Issuer Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["country_code","scheme","value","id","legal_issuer_id","created_at","updated_at"],"title":"TaxRegistrationResponse"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type"},"user":{"$ref":"#/components/schemas/UserResponse"},"organization":{"anyOf":[{"$ref":"#/components/schemas/OrganizationResponse"},{"type":"null"}]}},"type":"object","required":["access_token","token_type","user"],"title":"TokenResponse"},"UserLogin":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token","description":"Cloudflare Turnstile token. Required in production."}},"type":"object","required":["email","password"],"title":"UserLogin"},"UserRegister":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":8,"title":"Password"}},"type":"object","required":["email","password"],"title":"UserRegister"},"UserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"org_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Org Id"}},"type":"object","required":["id","email","role","is_active","created_at"],"title":"UserResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VatValidateRequest":{"properties":{"vat_id":{"type":"string","title":"Vat Id","description":"VAT id to validate, e.g. 'DE123456789'."},"requester_vat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requester Vat Id","description":"The requester's own VAT id — recorded for consultation-number provenance when a provider supplies one (taxid.pro does not)."}},"type":"object","required":["vat_id"],"title":"VatValidateRequest"},"VatValidateResponse":{"properties":{"vat_id":{"type":"string","title":"Vat Id"},"status":{"type":"string","title":"Status","description":"'valid' | 'invalid' | 'unknown' (lookup unavailable) | 'structural' (no live provider configured — trusted structurally)."},"provider":{"type":"string","title":"Provider"},"cached":{"type":"boolean","title":"Cached","description":"True when served from the cache (no live call)."},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code","description":"ISO-3166 alpha-2 derived from the VAT prefix (EL→GR), or null if unrecognized."},"format_valid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Format Valid","description":"The id matches the country's structural pattern. Null if the prefix is unknown."},"checksum_valid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Checksum Valid","description":"The check digit verifies. Null when format is already invalid, the country publishes no checksum, or the offline validator is unavailable."},"registry_checked":{"type":"boolean","title":"Registry Checked","description":"True when a registry (VIES) existence check was performed — then 'status' reflects real registration, not just format/checksum.","default":false},"exists":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exists","description":"The id is registered in the registry (VIES). Null when no existence check ran."},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name","description":"Registered trader name (VIES; some member states withhold it for privacy)."},"company_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Address","description":"Registered trader address (VIES, where shared)."},"validated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Validated At"},"consultation_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consultation Number","description":"VIES consultation number (requestIdentifier) when a requester VAT id is supplied."}},"type":"object","required":["vat_id","status","provider","cached"],"title":"VatValidateResponse"},"VerifyEmailRequest":{"properties":{"token":{"type":"string","minLength":16,"title":"Token"}},"type":"object","required":["token"],"title":"VerifyEmailRequest"},"Violation":{"properties":{"code":{"type":"string","title":"Code"},"severity":{"type":"string","title":"Severity"},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","severity","message"],"title":"Violation","description":"A single EN 16931 / PEPPOL BIS compliance finding.\n\n``severity=\"error\"`` means the document is not send-ready (the UBL export\nis blocked); ``severity=\"warning\"`` is informational and does not block.\n``field`` carries the EN 16931 Business Term / rule reference where it\napplies (e.g. ``BT-44``, ``BR-CO-15``)."}}}}