{"openapi":"3.1.0","info":{"title":"IPAY Orchestrator","description":"IPAY Last-Mile orchestrator API — payment-on-arrival flow between merchant, carrier, consumer and PSP. JWT bearer auth (7-day TTL). 18 supported UI languages. Browse the curated quickstart groups at /reference, or the complete auto-generated catalog at /reference#api-complete-reference. Interactive Swagger UI below.","version":"0.91.3"},"paths":{"/api/":{"get":{"summary":"Root","operationId":"root_api__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/register":{"post":{"summary":"Register","operationId":"register_api_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/login":{"post":{"summary":"Login","operationId":"login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/me":{"get":{"summary":"Me","operationId":"me_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/merchant/me":{"get":{"summary":"Get My Merchant","operationId":"get_my_merchant_api_merchant_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"summary":"Update My Merchant","operationId":"update_my_merchant_api_merchant_me_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantSettingsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/carriers":{"get":{"summary":"List Carriers","operationId":"list_carriers_api_carriers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/carriers/{code}":{"patch":{"summary":"Admin Update Carrier","description":"Operator-only: update a carrier's flags (cash COD acceptance, OTP default, name).\n\n`accepts_cash_cod` controls whether the cash-vs-digital choice screen is shown\nto consumers paying for COD orders shipped via this carrier.","operationId":"admin_update_carrier_api_admin_carriers__code__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierPatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants":{"get":{"summary":"Admin List Merchants","description":"Admin-only: list every merchant (id + name + created_at) for cross-merchant operations.","operationId":"admin_list_merchants_api_admin_merchants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/shipping-rates":{"get":{"summary":"List Rates","operationId":"list_rates_api_shipping_rates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Rate","operationId":"create_rate_api_shipping_rates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingRateIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/shipping-rates/{rate_id}":{"delete":{"summary":"Delete Rate","operationId":"delete_rate_api_shipping_rates__rate_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rate_id","in":"path","required":true,"schema":{"type":"string","title":"Rate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shipping-rates/calc":{"post":{"summary":"Calc Rate","operationId":"calc_rate_api_shipping_rates_calc_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"country_code","in":"query","required":true,"schema":{"type":"string","title":"Country Code"}},{"name":"weight_kg","in":"query","required":true,"schema":{"type":"number","title":"Weight Kg"}},{"name":"volume_l","in":"query","required":true,"schema":{"type":"number","title":"Volume L"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/orders":{"get":{"summary":"List Orders","operationId":"list_orders_api_orders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Order","operationId":"create_order_api_orders_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/orders/sample.csv":{"get":{"summary":"Download Sample Csv","operationId":"download_sample_csv_api_orders_sample_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/orders/upload":{"post":{"summary":"Upload Orders","operationId":"upload_orders_api_orders_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_orders_api_orders_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/dg-permissions":{"get":{"summary":"List Dg Permissions","operationId":"list_dg_permissions_api_dg_permissions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Upsert Dg Permission","operationId":"upsert_dg_permission_api_dg_permissions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DgPermissionIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/orders/{order_id}/dg-approve":{"post":{"summary":"Approve Dg Order","operationId":"approve_dg_order_api_orders__order_id__dg_approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/import":{"post":{"summary":"Import Carrier Tariffs","description":"Admin: parse the multi-tab UPS-style Excel and upsert into:\ncarrier_tariffs, carrier_zones, carrier_fuel_surcharges, carrier_weight_bands,\ncarrier_fr_zone_details (FR per-département lookup).\n\nTwo formats supported:\n  - Legacy 'YES …' prefixed sheets (single-origin).\n  - Normalised v6+ format: UPS_RATES_NORMALIZED / UPS_ZONE_NORMALIZED /\n    FR_ZONE_FLAT (multi-origin, all NL+BE+FR in one file).\nCarrier is auto-detected (defaults UPS).","operationId":"import_carrier_tariffs_api_admin_carrier_tariffs_import_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_carrier_tariffs_api_admin_carrier_tariffs_import_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/carrier-tariffs/summary":{"get":{"summary":"Carrier Tariffs Summary","description":"Admin: per-carrier counts + last import + fuel surcharge status.","operationId":"carrier_tariffs_summary_api_admin_carrier_tariffs_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/carrier-tariffs/{carrier_code}":{"get":{"summary":"List Carrier Tariffs","operationId":"list_carrier_tariffs_api_admin_carrier_tariffs__carrier_code__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}},{"name":"section","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"}},{"name":"zone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone"}},{"name":"weight_band_kg","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight Band Kg"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/zones":{"get":{"summary":"List Carrier Zones","operationId":"list_carrier_zones_api_admin_carrier_tariffs__carrier_code__zones_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/weight-bands":{"get":{"summary":"List Carrier Weight Bands","operationId":"list_carrier_weight_bands_api_admin_carrier_tariffs__carrier_code__weight_bands_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/fuel":{"put":{"summary":"Update Fuel Surcharge","operationId":"update_fuel_surcharge_api_admin_carrier_tariffs__carrier_code__fuel_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FuelSurchargeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/cost-preview":{"post":{"summary":"Cost Preview","operationId":"cost_preview_api_admin_carrier_tariffs_cost_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostPreviewIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/orders/recompute-costs":{"post":{"summary":"Recompute Order Costs","description":"Admin backfill: recompute carrier cost + margin for orders that don't yet have\na `cost_components` block (or all, if only_missing=false). Existing matched costs\nare NOT touched when only_missing=true.","operationId":"recompute_order_costs_api_admin_orders_recompute_costs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"only_missing","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Only Missing"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/invoice-upload":{"post":{"summary":"Upload Carrier Invoice","description":"Admin: upload a carrier invoice CSV (e.g. UPS weekly invoice).\nMatches every row to our internal orders by tracking_number, compares the\ninvoiced amount with our pre-computed cost. Flags MATCHED / MISMATCH / UNMATCHED_IN_DB.\nAll rows persisted to `carrier_invoice_reconciliations` with the import_id for audit.","operationId":"upload_carrier_invoice_api_admin_carrier_tariffs__carrier_code__invoice_upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}},{"name":"invoice_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Carrier invoice number (e.g. 2025-100) — REQUIRED for credit-statement","title":"Invoice Number"},"description":"Carrier invoice number (e.g. 2025-100) — REQUIRED for credit-statement"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_carrier_invoice_api_admin_carrier_tariffs__carrier_code__invoice_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/invoices":{"get":{"summary":"List Invoice Imports","description":"Admin: per-invoice overview for a carrier. Single aggregation pipeline groups\nreconciliations by import_id and computes counts + totals in one DB round-trip.","operationId":"list_invoice_imports_api_admin_carrier_tariffs__carrier_code__invoices_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/billing-coverage":{"get":{"summary":"Billing Coverage","description":"For every order that has a label generated for this carrier, return whether\nwe've found a matching row in any carrier invoice. Lets you spot shipments the\ncarrier hasn't billed for (yet).","operationId":"billing_coverage_api_admin_carrier_tariffs__carrier_code__billing_coverage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":1000,"title":"Limit"}},{"name":"only_uninvoiced","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Only Uninvoiced"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/reconciliations":{"get":{"summary":"List Invoice Reconciliations","operationId":"list_invoice_reconciliations_api_admin_carrier_tariffs__carrier_code__reconciliations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"import_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Import Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":1000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/invoices/{import_id}":{"patch":{"summary":"Update Invoice Meta","description":"v0.89 — Update carrier invoice metadata (e.g. invoice_number) after upload.\nAllows correcting/filling the invoice number that's printed on the credit-statement\nso the carrier can match it to their own systems.","operationId":"update_invoice_meta_api_admin_carrier_tariffs__carrier_code__invoices__import_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}},{"name":"import_id","in":"path","required":true,"schema":{"type":"string","title":"Import Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoiceMetaIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/reconciliations/summary":{"get":{"summary":"Reconciliation Summary","operationId":"reconciliation_summary_api_admin_carrier_tariffs__carrier_code__reconciliations_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/reconciliations/{row_id}/approve":{"post":{"summary":"Approve Reconciliation Row","description":"v0.88 — Mark one reconciliation row as APPROVED. Used by the line-by-line\nUI to close out a verified invoice line. Approvals are logged in the row\ndocument and an audit_log entry is written.","operationId":"approve_reconciliation_row_api_admin_carrier_tariffs__carrier_code__reconciliations__row_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}},{"name":"row_id","in":"path","required":true,"schema":{"type":"string","title":"Row Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/reconciliations/{row_id}/exclude":{"post":{"summary":"Exclude Reconciliation Row","description":"v0.89 — Mark a row as EXCLUDED from the credit-statement.\n\nUsed when a mismatch is actually correct (e.g. fuel surcharge update, service\nupgrade billed by carrier). Requires a written reason. The row stays in\nhistory but won't appear on the carrier email-statement.","operationId":"exclude_reconciliation_row_api_admin_carrier_tariffs__carrier_code__reconciliations__row_id__exclude_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}},{"name":"row_id","in":"path","required":true,"schema":{"type":"string","title":"Row Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExcludeRowIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/reconciliations/{row_id}/unexclude":{"post":{"summary":"Unexclude Reconciliation Row","description":"Re-include a previously excluded row.","operationId":"unexclude_reconciliation_row_api_admin_carrier_tariffs__carrier_code__reconciliations__row_id__unexclude_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}},{"name":"row_id","in":"path","required":true,"schema":{"type":"string","title":"Row Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/reconciliations/{row_id}/request-credit":{"post":{"summary":"Request Credit For Row","description":"v0.89 — Mark a MISMATCH row as requiring a credit from the carrier.\nCredit reason REQUIRED so the email-statement explains why.","operationId":"request_credit_for_row_api_admin_carrier_tariffs__carrier_code__reconciliations__row_id__request_credit_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}},{"name":"row_id","in":"path","required":true,"schema":{"type":"string","title":"Row Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveRowIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/reconciliations/bulk-approve":{"post":{"summary":"Bulk Approve Reconciliations","description":"v0.88 — Approve N reconciliation rows in one call. Used by the\n\"Keur alle MATCH-regels goed\" 1-klik button on the UI.","operationId":"bulk_approve_reconciliations_api_admin_carrier_tariffs__carrier_code__reconciliations_bulk_approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkApproveIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/statements/{import_id}/preview":{"get":{"summary":"Preview Statement","description":"Preview the credit-statement PDF before sending. Returns the PDF bytes.","operationId":"preview_statement_api_admin_carrier_tariffs__carrier_code__statements__import_id__preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}},{"name":"import_id","in":"path","required":true,"schema":{"type":"string","title":"Import Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/statements/{import_id}/send":{"post":{"summary":"Send Statement","description":"Email the credit-statement PDF to the carrier contact via Resend.","operationId":"send_statement_api_admin_carrier_tariffs__carrier_code__statements__import_id__send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}},{"name":"import_id","in":"path","required":true,"schema":{"type":"string","title":"Import Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendStatementIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-tariffs/{carrier_code}/statements/log":{"get":{"summary":"Statement Log","description":"List sent statements for audit.","operationId":"statement_log_api_admin_carrier_tariffs__carrier_code__statements_log_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier_code","in":"path","required":true,"schema":{"type":"string","title":"Carrier Code"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/carrier-statements/aging-report":{"get":{"summary":"Aging Report","description":"v0.90 — Aging report for unanswered credit-statement requests.\n\nReturns per carrier: how many statements were emailed, how long ago, total\noutstanding credit amount. Threshold-buckets help spot carriers who don't\nrespond to credit requests:\n  - 0-7d (recent, normal)\n  - 7-30d (chase reminder needed)\n  - 30+d (escalate to account manager)\n  - 60+d (write off / dispute resolution)","operationId":"aging_report_api_admin_carrier_statements_aging_report_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/carrier-statements/{statement_id}/mark-resolved":{"post":{"summary":"Mark Statement Resolved","description":"v0.90 — Mark a credit-statement as resolved (carrier credited it / disputed accepted).","operationId":"mark_statement_resolved_api_admin_carrier_statements__statement_id__mark_resolved_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"statement_id","in":"path","required":true,"schema":{"type":"string","title":"Statement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkStatementResolvedIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/sendcloud":{"post":{"summary":"Sendcloud Webhook","description":"v0.89 — Receive Sendcloud parcel status updates and propagate to\nreturn_cases when the tracking number matches a return shipment.","operationId":"sendcloud_webhook_api_webhooks_sendcloud_post","parameters":[{"name":"x-sendcloud-signature","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Sendcloud-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/orders/{order_id}/create-session":{"post":{"summary":"Create Session For Order","operationId":"create_session_for_order_api_orders__order_id__create_session_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/driver/cash-records/{ipay_reference_18}/confirm-collected":{"post":{"summary":"Driver Confirm Cash Collected","description":"Driver confirms physical cash has been collected from the consumer.\n\nThis is the final step in the cash flow: marks the session PAID with\npsp='cash_at_door' + payment_method='cash', then the normal OTP release flow proceeds.","operationId":"driver_confirm_cash_collected_api_driver_cash_records__ipay_reference_18__confirm_collected_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ipay_reference_18","in":"path","required":true,"schema":{"type":"string","title":"Ipay Reference 18"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/cash-records":{"get":{"summary":"List Cash Records","description":"Operator view of cash-on-delivery records, used for EOD reconciliation and analytics.","operationId":"list_cash_records_api_admin_cash_records_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"pending | confirmed | reconciled","title":"Status"},"description":"pending | confirmed | reconciled"},{"name":"carrier_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Code"}},{"name":"driver_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Driver User Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/driver/verify-otp":{"post":{"summary":"Verify Otp","operationId":"verify_otp_api_driver_verify_otp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyOtpIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/payment-sessions":{"get":{"summary":"List Sessions","operationId":"list_sessions_api_payment_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"carrier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"}},{"name":"psp","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Psp"}},{"name":"payment_method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"parcel_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parcel Status"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment-sessions/{sid}/parcel-status":{"post":{"summary":"Update Parcel Status","operationId":"update_parcel_status_api_payment_sessions__sid__parcel_status_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParcelStatusIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment-sessions/parcel-transitions":{"get":{"summary":"Get Parcel Transitions","operationId":"get_parcel_transitions_api_payment_sessions_parcel_transitions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/payment-sessions/{sid}":{"get":{"summary":"Get Session Detail","operationId":"get_session_detail_api_payment_sessions__sid__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dashboard/metrics":{"get":{"summary":"Metrics","operationId":"metrics_api_dashboard_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/session/{token}":{"get":{"summary":"Get Session Public","operationId":"get_session_public_api_session__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/session/{token}/demo-pay":{"post":{"summary":"Demo Pay Instant","description":"Instant-success payment for demo sessions only. Marks session PAID immediately.\n\nFrontend uses this when sess.demo_seed=True — shows a payment-method picker\n(Visa / Mastercard / Apple Pay / Google Pay / Samsung Pay / PayPal) where every\noption succeeds instantly so investor demos always show the success screen.","operationId":"demo_pay_instant_api_session__token__demo_pay_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/session/{token}/pay-cash":{"post":{"summary":"Pay Cash At Door","description":"Consumer-chosen 'pay cash to driver' flow.\n\nRecords a cash_records row + advances session status to CASH_RECORDED (pending driver confirmation).\nDriver later confirms via /api/driver/cash-records/{ipay_ref}/confirm-collected which marks PAID.","operationId":"pay_cash_at_door_api_session__token__pay_cash_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/session/{token}/start-payment":{"post":{"summary":"Start Payment","operationId":"start_payment_api_session__token__start_payment_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartPaymentIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/session/{token}/receipt.pdf":{"get":{"summary":"Receipt Pdf","operationId":"receipt_pdf_api_session__token__receipt_pdf_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payments/stripe/live-status":{"get":{"summary":"Stripe Live Status","description":"Smoke test the configured Stripe key. Returns balance + key prefix.\n\nAdmin-only. Use this after activating live mode to confirm:\n  - which key is currently active (test/live)\n  - whether it can authenticate against Stripe API\n  - what funds (if any) are pending payout","operationId":"stripe_live_status_api_payments_stripe_live_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/payments/stripe/webhook-endpoints":{"get":{"summary":"Stripe Webhook Endpoints","description":"List all configured Stripe webhook endpoints. Detect duplicates\n(same URL multiple times) — common after Stripe auto-creates Snapshot+Thin\nvariants. Returns list + duplicates summary.","operationId":"stripe_webhook_endpoints_api_payments_stripe_webhook_endpoints_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/payments/stripe/webhook-endpoints/{endpoint_id}":{"delete":{"summary":"Delete Stripe Webhook Endpoint","description":"Delete a Stripe webhook endpoint by id (OPERATOR only — Sales Manager blocked).","operationId":"delete_stripe_webhook_endpoint_api_payments_stripe_webhook_endpoints__endpoint_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payments/stripe/smoke-test":{"post":{"summary":"Stripe Smoke Test","description":"Create a €0,50 PaymentIntent in LIVE mode (Stripe's minimum is €0,50 for EUR).\nOPERATOR only — Sales Manager blocked (write-action on PSP).\nReturns a hosted checkout URL — open it in browser, pay with real card, and\nwatch the webhook fire. Idempotent via metadata.smoke_test_id (timestamp-based).","operationId":"stripe_smoke_test_api_payments_stripe_smoke_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/payments/stripe/smoke-test-status":{"get":{"summary":"Stripe Smoke Test Status","description":"Return last 10 smoke tests + their webhook delivery status from the log.","operationId":"stripe_smoke_test_status_api_payments_stripe_smoke_test_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/webhook/stripe":{"post":{"summary":"Stripe Webhook","description":"Stripe webhook handler. When STRIPE_WEBHOOK_SECRET is set, verifies signature\nvia the official Stripe SDK; otherwise falls back to emergentintegrations parser.","operationId":"stripe_webhook_api_webhook_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/payments/status/{stripe_session_id}":{"get":{"summary":"Check Payment Status","description":"Polled by the consumer success page (Stripe wrapper through emergent proxy).","operationId":"check_payment_status_api_payments_status__stripe_session_id__get","parameters":[{"name":"stripe_session_id","in":"path","required":true,"schema":{"type":"string","title":"Stripe Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payments/confirm-success/{stripe_session_id}":{"post":{"summary":"Confirm Success Fallback","description":"FALLBACK for when the Stripe proxy intermittently 404s its own sessions.\nStripe ONLY redirects the user to success_url after the payment succeeded, so if the user\nis on the success page AND we have a payment_transaction we created for this session_id,\nwe trust the redirect and mark the IPAY session paid. Method is recorded as 'card' (stripe-fallback).","operationId":"confirm_success_fallback_api_payments_confirm_success__stripe_session_id__post","parameters":[{"name":"stripe_session_id","in":"path","required":true,"schema":{"type":"string","title":"Stripe Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/tools/quick-qr":{"post":{"summary":"Admin Quick Qr","description":"Admin-only Quick QR generator with full audit trail.\n\nEnforces:\n- operator role required (memo §15.1 — admin-only)\n- reason_code MUST be provided\n- 1 active QR per shipment_id (memo §15.4 — auto-expires the previous one if exists)\n- audit log entry with IP, user-agent, admin_user_id, previous_qr_id","operationId":"admin_quick_qr_api_admin_tools_quick_qr_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickQRAdminIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/tools/quick-qr/audit-log":{"get":{"summary":"Quick Qr Audit Log","description":"Admin-only audit log of all Quick QR generations + expirations.","operationId":"quick_qr_audit_log_api_admin_tools_quick_qr_audit_log_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"shipment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipment Id"}},{"name":"admin_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tools/quick-qr":{"post":{"summary":"Quick Qr Legacy","description":"LEGACY (v0.41 deprecated for merchant role).\n\nOperators see HTTP 200 with a deprecation header.\nMerchants now receive HTTP 403 — Quick QR was moved to IPAY Admin → Tools → Quick QR (memo §15).","operationId":"quick_qr_legacy_api_tools_quick_qr_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickQRIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/orders/{order_id}/ups-label":{"post":{"summary":"Create Ups Label","operationId":"create_ups_label_api_orders__order_id__ups_label_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/orders/{order_id}/ups-label.pdf":{"get":{"summary":"Get Ups Label Pdf","operationId":"get_ups_label_pdf_api_orders__order_id__ups_label_pdf_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/carrier-rates":{"get":{"summary":"List Carrier Rates","operationId":"list_carrier_rates_api_carrier_rates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Upsert Carrier Rate","operationId":"upsert_carrier_rate_api_carrier_rates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierRateIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/reports/summary":{"get":{"summary":"Reports Summary","operationId":"reports_summary_api_reports_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/events/stream":{"get":{"summary":"Event Stream","description":"SSE endpoint for real-time event log updates.\n\nAuth via `?token=` query parameter (EventSource cannot set Authorization headers).\nOperators receive every event; merchants receive only events for their own sessions.\nHeartbeat comment frame every 15s keeps the connection alive through proxies.","operationId":"event_stream_api_events_stream_get","parameters":[{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/companies":{"post":{"summary":"Create Company","operationId":"create_company_api_sales_companies_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Companies","operationId":"list_companies_api_sales_companies_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"sales_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sales Status"}},{"name":"segment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"min_score","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Score"}},{"name":"owner_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner User Id"}},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/companies/{company_id}":{"get":{"summary":"Get Company","operationId":"get_company_api_sales_companies__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Company","operationId":"update_company_api_sales_companies__company_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Company","operationId":"delete_company_api_sales_companies__company_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/companies/{company_id}/graduate":{"post":{"summary":"Graduate Company","description":"v0.87 — Mark a HubSpot-managed company as graduated to IPAY-native.\n\nTriggered automatically when a HubSpot deal flips to Closed-Won (via the\nHubSpot webhook handler), or manually from the Sales UI. Side-effects:\n  - sets graduated_at + flips origin to 'graduated_post_won'\n  - optionally creates an Onboarding case (default true)\n  - blocks future HubSpot push for this record (read-only sync)","operationId":"graduate_company_api_sales_companies__company_id__graduate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","title":"Company Id"}},{"name":"create_onboarding","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Create Onboarding"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/contacts":{"post":{"summary":"Create Contact","operationId":"create_contact_api_sales_contacts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__sales__ContactIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/sales/contacts/{contact_id}":{"delete":{"summary":"Delete Contact","operationId":"delete_contact_api_sales_contacts__contact_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/deals":{"post":{"summary":"Create Deal","operationId":"create_deal_api_sales_deals_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/sales/deals/{deal_id}/stage":{"patch":{"summary":"Move Deal Stage","operationId":"move_deal_stage_api_sales_deals__deal_id__stage_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","title":"Deal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealStageIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/activities":{"post":{"summary":"Create Activity","operationId":"create_activity_api_sales_activities_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/sales/pipelines/{pipeline}":{"get":{"summary":"Pipeline View","operationId":"pipeline_view_api_sales_pipelines__pipeline__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"pipeline","in":"path","required":true,"schema":{"type":"string","title":"Pipeline"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/summary":{"get":{"summary":"Sales Summary","operationId":"sales_summary_api_sales_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/sales/companies/bulk-import":{"post":{"summary":"Bulk Import Companies","operationId":"bulk_import_companies_api_sales_companies_bulk_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkImportIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/sales/hubspot/connect":{"post":{"summary":"Hubspot Connect","description":"Verify the private app token by calling /account-info/v3/details, then store it.","operationId":"hubspot_connect_api_sales_hubspot_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HubspotConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/sales/hubspot/disconnect":{"post":{"summary":"Hubspot Disconnect","operationId":"hubspot_disconnect_api_sales_hubspot_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/sales/hubspot/status":{"get":{"summary":"Hubspot Status","operationId":"hubspot_status_api_sales_hubspot_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/sales/hubspot/sync/pull":{"post":{"summary":"Hubspot Sync Pull","description":"Pull HubSpot Companies into our DB. Idempotent by hubspot_company_id.","operationId":"hubspot_sync_pull_api_sales_hubspot_sync_pull_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/hubspot/sync/push/{company_id}":{"post":{"summary":"Hubspot Sync Push","description":"Push (create or update) a local company to HubSpot.","operationId":"hubspot_sync_push_api_sales_hubspot_sync_push__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/hubspot/sync/push-qualified":{"post":{"summary":"Hubspot Push Qualified","description":"Bulk-push qualified+ companies to HubSpot. Skip already-pushed.","operationId":"hubspot_push_qualified_api_sales_hubspot_sync_push_qualified_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Dry Run"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/master-export.xlsx":{"get":{"summary":"Master Export","description":"Stream the full merchants master as an Excel file (live from Atlas).","operationId":"master_export_api_sales_master_export_xlsx_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment"}},{"name":"min_score","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Score"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/hubspot/webhook":{"post":{"summary":"Hubspot Webhook","description":"Receive HubSpot webhook events (deal stage changes, company updates, etc.).","operationId":"hubspot_webhook_api_sales_hubspot_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/sales/constants":{"get":{"summary":"Sales Constants","operationId":"sales_constants_api_sales_constants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/sales/template.xlsx":{"get":{"summary":"Sales Template","description":"Generate a styled Excel template with all columns + per-type instructions.\n\nThe template includes:\n  - Sheet 'Instructions' (read first)\n  - Sheet 'Master_Template' (the canonical master schema)\n  - Sheets per type with type-specific columns highlighted: Merchants, Carriers, PSPs, Software_Partners\n  - Sheet 'Example_Rows' (5 example rows per type)\n  - Sheet 'Vocabulary' (controlled values for dropdown fields)","operationId":"sales_template_api_sales_template_xlsx_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/sales/companies/import-excel":{"post":{"summary":"Sales Import Excel","description":"Import companies from an Excel file. Tries all sheets, normalizes columns,\ndetects duplicates by domain or name+type, returns a per-row report.","operationId":"sales_import_excel_api_sales_companies_import_excel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"default_type","in":"query","required":false,"schema":{"type":"string","default":"merchant","title":"Default Type"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_sales_import_excel_api_sales_companies_import_excel_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/target-segments":{"get":{"summary":"List Target Segments","description":"List all imported cross-border target segments + aggregate stats.","operationId":"list_target_segments_api_sales_target_segments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/sales/target-segments/push-to-hubspot":{"post":{"summary":"Push Targets To Hubspot","description":"Push every cross-border target segment to HubSpot as a Company record\nwith custom properties (segment, volume, confidence, GTM note). One company\nper sub-segment, named '{Segment} — {Sub-segment}'.","operationId":"push_targets_to_hubspot_api_sales_target_segments_push_to_hubspot_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/onboarding/cases/{case_id}/health":{"get":{"summary":"Get Case Health","operationId":"get_case_health_api_onboarding_cases__case_id__health_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/health-summary":{"get":{"summary":"Get Health Summary","description":"Cross-merchant health summary for dashboard — list cases grouped by color.\n\nOptimized: 1 query for cases + 1 query for ALL blocking tasks (instead of N+1).\nWas ~14s for 125 cases · now ~1-2s with in-memory grouping.","operationId":"get_health_summary_api_onboarding_health_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/onboarding/steps/{step_key}/template":{"get":{"summary":"Get Step Template Endpoint","operationId":"get_step_template_endpoint_api_onboarding_steps__step_key__template_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"step_key","in":"path","required":true,"schema":{"type":"string","title":"Step Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/cases/{case_id}/step-detail":{"get":{"summary":"Get Step Detail","description":"Combine case + template for selected step + tasks for that step + gate evaluation + next-step info.\n\nThis powers the Step Detail Panel (memo §3). If step_key is None, uses the case's current_step_key.","operationId":"get_step_detail_api_onboarding_cases__case_id__step_detail_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}},{"name":"step_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/cases/{case_id}/regenerate-tasks":{"post":{"summary":"Regenerate Tasks","description":"Admin override — re-seed tasks for a step from templates. Useful when templates were updated.","operationId":"regenerate_tasks_api_onboarding_cases__case_id__regenerate_tasks_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}},{"name":"step_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/steps":{"get":{"summary":"Get Steps","operationId":"get_steps_api_onboarding_steps_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/onboarding/phases":{"get":{"summary":"Get Phases","description":"Return the 5 phases that group the 15 steps (onboarding_review_v2.md §A).","operationId":"get_phases_api_onboarding_phases_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/onboarding/dashboard":{"get":{"summary":"Onboarding Dashboard","operationId":"onboarding_dashboard_api_onboarding_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/onboarding/cases":{"post":{"summary":"Create Case","description":"Create an onboarding case from a sales company. Idempotent — returns existing if already onboarded.","operationId":"create_case_api_onboarding_cases_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCaseIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Cases","operationId":"list_cases_api_onboarding_cases_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"step_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Key"}},{"name":"is_completed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Completed"}},{"name":"owner_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner User Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/cases/{case_id}":{"get":{"summary":"Get Case","operationId":"get_case_api_onboarding_cases__case_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/cases/{case_id}/intake-data":{"patch":{"summary":"Patch Intake Data","description":"Persist sparse intake_data updates (memo §J fix list).","operationId":"patch_intake_data_api_onboarding_cases__case_id__intake_data_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeDataPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/cases/{case_id}/verify-website":{"post":{"summary":"Verify Website","description":"Persist the verified merchant website URL into intake_data (memo §J fix).\n\nPreviously the verify button only ticked a checkbox; the URL was discarded.","operationId":"verify_website_api_onboarding_cases__case_id__verify_website_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyWebsiteIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/cases/{case_id}/advance":{"patch":{"summary":"Advance Case","operationId":"advance_case_api_onboarding_cases__case_id__advance_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvanceStepIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/tasks":{"post":{"summary":"Create Task","operationId":"create_task_api_onboarding_tasks_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Tasks","operationId":"list_tasks_api_onboarding_tasks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Id"}},{"name":"assignee_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee User Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"overdue_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Overdue Only"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/tasks/{task_id}":{"patch":{"summary":"Update Task","operationId":"update_task_api_onboarding_tasks__task_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/comments":{"post":{"summary":"Create Comment","operationId":"create_comment_api_onboarding_comments_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/onboarding/sync-from-sales":{"post":{"summary":"Sync From Sales","description":"Create onboarding cases for all companies with status=ready_for_onboarding that don't have a case yet.","operationId":"sync_from_sales_api_onboarding_sync_from_sales_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/onboarding/cases/{case_id}/substatus":{"patch":{"summary":"Update Substatus","operationId":"update_substatus_api_onboarding_cases__case_id__substatus_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubstatusIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/substatus-options":{"get":{"summary":"List Substatus Options","operationId":"list_substatus_options_api_onboarding_substatus_options_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/onboarding/cases/{case_id}/documents":{"get":{"summary":"List Documents","description":"List uploaded documents for a case + show required documents from step templates.","operationId":"list_documents_api_onboarding_cases__case_id__documents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Upload Document","operationId":"upload_document_api_onboarding_cases__case_id__documents_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_api_onboarding_cases__case_id__documents_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/cases/{case_id}/documents/{document_id}/download":{"get":{"summary":"Download Document","operationId":"download_document_api_onboarding_cases__case_id__documents__document_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/cases/{case_id}/documents/{document_id}":{"delete":{"summary":"Delete Document","operationId":"delete_document_api_onboarding_cases__case_id__documents__document_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/cases/{case_id}/audit-log":{"get":{"summary":"Case Audit Log","description":"Clean structured audit log: Date | User | Action | Old → New | Reason.","operationId":"case_audit_log_api_onboarding_cases__case_id__audit_log_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/cases/{case_id}/drop-off":{"post":{"summary":"Drop Off Case","description":"Move a case to step 15 (Issue/Drop-off) with full reason context (memo §9).","operationId":"drop_off_case_api_onboarding_cases__case_id__drop_off_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropOffIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/drop-reasons":{"get":{"summary":"Drop Reasons","operationId":"drop_reasons_api_onboarding_drop_reasons_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/onboarding/my-case":{"get":{"summary":"My Case","description":"Merchant-only — returns ONLY their case with merchant_actions trimmed view (no internal notes).","operationId":"my_case_api_onboarding_my_case_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/onboarding/cases/{case_id}/compliance":{"get":{"summary":"Get Compliance Profile","operationId":"get_compliance_profile_api_onboarding_cases__case_id__compliance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Patch Compliance Profile","operationId":"patch_compliance_profile_api_onboarding_cases__case_id__compliance_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/cases/{case_id}/gates":{"get":{"summary":"Get Gates","operationId":"get_gates_api_onboarding_cases__case_id__gates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/onboarding/gates/definitions":{"get":{"summary":"Gate Definitions","operationId":"gate_definitions_api_onboarding_gates_definitions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/onboarding/cases/{case_id}/magic-link":{"post":{"summary":"Generate Magic Link","description":"Generate (or rotate) the merchant-facing magic token for this case.","operationId":"generate_magic_link_api_admin_onboarding_cases__case_id__magic_link_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Revoke Magic Link","operationId":"revoke_magic_link_api_admin_onboarding_cases__case_id__magic_link_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/onboarding/{token}":{"get":{"summary":"Public Get Case","description":"Merchant view of their onboarding case.\n\nIncludes: company, current step (+ step description + goal), open tasks\nassigned to merchant, required documents (with upload status), target go-live.","operationId":"public_get_case_api_public_onboarding__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/onboarding/{token}/upload":{"post":{"summary":"Public Upload Document","description":"Merchant uploads a required document via the magic link.","operationId":"public_upload_document_api_public_onboarding__token__upload_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_public_upload_document_api_public_onboarding__token__upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/onboarding/{token}/task/{task_id}/complete":{"post":{"summary":"Public Complete Task","description":"Merchant marks one of their tasks as done.","operationId":"public_complete_task_api_public_onboarding__token__task__task_id__complete_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTaskCompleteIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/onboarding/cases/{case_id}/send-reminder":{"post":{"summary":"Send Reminder Email","description":"Send the merchant a reminder email with the magic-link to their progress page.","operationId":"send_reminder_email_api_admin_onboarding_cases__case_id__send_reminder_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendReminderIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/onboarding/run-reminders-now":{"post":{"summary":"Admin Run Reminders","description":"Manual trigger of the auto-reminder scheduler (admin debug).","operationId":"admin_run_reminders_api_admin_onboarding_run_reminders_now_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/sales/hubspot/pipelines/sync":{"post":{"summary":"Sync Deal Pipelines","description":"Pull all deal pipelines + stages from HubSpot and cache in db_sales.hubspot_pipelines.","operationId":"sync_deal_pipelines_api_sales_hubspot_pipelines_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/sales/hubspot/deals/sync":{"post":{"summary":"Sync Deals","description":"Pull deals from HubSpot into db_sales.hubspot_deals.\n\nStored fields: id, dealname, amount, dealstage, pipeline, closedate, hubspot_owner_id,\nassociated_companies (links to company id via /associations).","operationId":"sync_deals_api_sales_hubspot_deals_sync_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/hubspot/pipeline-view":{"get":{"summary":"Pipeline View","description":"Return one HubSpot deal pipeline with its deals grouped per stage,\nenriched with the IPAY 5-phase mapping so Sales sees both worlds.","operationId":"pipeline_view_api_sales_hubspot_pipeline_view_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"pipeline_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/hubspot/stage-map":{"put":{"summary":"Put Stage Map","description":"Persist a custom HubSpot stage → IPAY phase mapping for a pipeline.","operationId":"put_stage_map_api_sales_hubspot_stage_map_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageMapPutIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/webhooks/hubspot":{"post":{"summary":"Hubspot Webhook","operationId":"hubspot_webhook_api_webhooks_hubspot_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/sales/hubspot/webhook-events":{"get":{"summary":"List Webhook Events","description":"Recent HubSpot webhook events for debugging.","operationId":"list_webhook_events_api_sales_hubspot_webhook_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/compliance-health/cases/{case_id}":{"get":{"summary":"Case Health","operationId":"case_health_api_admin_compliance_health_cases__case_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/compliance-health/merchants/{merchant_id}":{"get":{"summary":"Merchant Health","operationId":"merchant_health_api_admin_compliance_health_merchants__merchant_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/compliance-health/summary":{"get":{"summary":"Compliance Summary","operationId":"compliance_summary_api_admin_compliance_health_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":500,"title":"Limit"}},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"merchant (default) | carrier | software_partner | psp | all","default":"merchant","title":"Entity Type"},"description":"merchant (default) | carrier | software_partner | psp | all"},{"name":"include_unknown","in":"query","required":false,"schema":{"type":"boolean","description":"v0.83: standaard FALSE — onbekende entity types worden uitgesloten uit de merchant-view (Bryan flag #3 in docx)","default":false,"title":"Include Unknown"},"description":"v0.83: standaard FALSE — onbekende entity types worden uitgesloten uit de merchant-view (Bryan flag #3 in docx)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/compliance/overview":{"get":{"summary":"Overview","operationId":"overview_api_admin_compliance_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/compliance/audit-logs":{"get":{"summary":"Audit Logs","operationId":"audit_logs_api_admin_compliance_audit_logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/compliance/access-logs":{"get":{"summary":"Access Logs","operationId":"access_logs_api_admin_compliance_access_logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/compliance/api-keys-summary":{"get":{"summary":"Api Keys Summary","operationId":"api_keys_summary_api_admin_compliance_api_keys_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/compliance/webhook-logs":{"get":{"summary":"Webhook Logs","operationId":"webhook_logs_api_admin_compliance_webhook_logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/compliance/sub-processors":{"get":{"summary":"Sub Processors","operationId":"sub_processors_api_admin_compliance_sub_processors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/compliance/data-processing":{"get":{"summary":"List Data Processing","operationId":"list_data_processing_api_admin_compliance_data_processing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Data Processing","operationId":"create_data_processing_api_admin_compliance_data_processing_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataProcessingEntry"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/compliance/data-processing/{entry_id}":{"delete":{"summary":"Delete Data Processing","operationId":"delete_data_processing_api_admin_compliance_data_processing__entry_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/compliance/risks":{"get":{"summary":"List Risks","operationId":"list_risks_api_admin_compliance_risks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Risk","operationId":"create_risk_api_admin_compliance_risks_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskRegisterEntry"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/compliance/risks/{risk_id}":{"patch":{"summary":"Update Risk","operationId":"update_risk_api_admin_compliance_risks__risk_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"risk_id","in":"path","required":true,"schema":{"type":"string","title":"Risk Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Updates"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Risk","operationId":"delete_risk_api_admin_compliance_risks__risk_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"risk_id","in":"path","required":true,"schema":{"type":"string","title":"Risk Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/compliance/incidents":{"get":{"summary":"List Incidents","operationId":"list_incidents_api_admin_compliance_incidents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Incident","operationId":"create_incident_api_admin_compliance_incidents_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentEntry"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/compliance/incidents/{incident_id}":{"patch":{"summary":"Update Incident","operationId":"update_incident_api_admin_compliance_incidents__incident_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string","title":"Incident Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Updates"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/compliance/settings":{"get":{"summary":"Get Settings","operationId":"get_settings_api_admin_compliance_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"summary":"Patch Settings","operationId":"patch_settings_api_admin_compliance_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceSettingsPatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/compliance/security-documents":{"get":{"summary":"Security Documents","operationId":"security_documents_api_admin_compliance_security_documents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/compliance/seed-starter-pack":{"post":{"summary":"Seed Starter Pack","description":"Insert 10 voorgedefinieerde ISMS-risks + 1 incident-drill template.\n\nIdempotent — uses `starter_pack_key` field to detect duplicates. Re-running\nre-seeds only missing entries (does not overwrite ops-edited rows).","operationId":"seed_starter_pack_api_admin_compliance_seed_starter_pack_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/gdpr-requests":{"get":{"summary":"List Gdpr Requests","operationId":"list_gdpr_requests_api_admin_gdpr_requests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/gdpr-requests/{source}/{request_id}":{"patch":{"summary":"Update Gdpr Request","operationId":"update_gdpr_request_api_admin_gdpr_requests__source___request_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"source","in":"path","required":true,"schema":{"enum":["consumer","merchant"],"type":"string","title":"Source"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GdprRequestPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/gdpr-requests/merchant":{"post":{"summary":"Create Merchant Gdpr Request","description":"Manually log a GDPR request received on behalf of a merchant (e.g. via email).","operationId":"create_merchant_gdpr_request_api_admin_gdpr_requests_merchant_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantGdprRequestIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/shipping-rules/constants":{"get":{"summary":"Get Constants","operationId":"get_constants_api_shipping_rules_constants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/shipping-rules":{"post":{"summary":"Create Rule","operationId":"create_rule_api_shipping_rules_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Rules","operationId":"list_rules_api_shipping_rules_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"rule_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Type"}},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Active Only"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shipping-rules/{rule_id}":{"patch":{"summary":"Update Rule","operationId":"update_rule_api_shipping_rules__rule_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Rule","operationId":"delete_rule_api_shipping_rules__rule_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shipping-rules/evaluate":{"post":{"summary":"Simulate","description":"Simulate: pass a shipment context, get the evaluation result back.\nUseful for merchants/admins to test rule sets BEFORE production.","operationId":"simulate_api_shipping_rules_evaluate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/shipping-rules/seed-defaults":{"post":{"summary":"Seed Defaults","description":"Seed the canonical rule set from Bryan's MEMO 2026-05.","operationId":"seed_defaults_api_shipping_rules_seed_defaults_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/quotes/constants":{"get":{"summary":"Constants","operationId":"constants_api_quotes_constants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/quotes/settings":{"put":{"summary":"Update Quote Settings","operationId":"update_quote_settings_api_quotes_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteSettingsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/quotes/calculate":{"post":{"summary":"Calculate Quote","description":"Calculate without saving — quick what-if simulation.","operationId":"calculate_quote_api_quotes_calculate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/quotes":{"post":{"summary":"Create Quote","description":"Calculate + persist a quote in the Offer Register.","operationId":"create_quote_api_quotes_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Quotes","operationId":"list_quotes_api_quotes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"merchant_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Name"}},{"name":"sales_owner","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sales Owner"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/quotes/{quote_id}":{"get":{"summary":"Get Quote","operationId":"get_quote_api_quotes__quote_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Quote","operationId":"delete_quote_api_quotes__quote_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/quotes/{quote_id}/status":{"patch":{"summary":"Update Quote Status","operationId":"update_quote_status_api_quotes__quote_id__status_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteStatusIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/quotes/dashboard/summary":{"get":{"summary":"Quotes Summary","operationId":"quotes_summary_api_quotes_dashboard_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/quotes/dashboard/export.xlsx":{"get":{"summary":"Export Register","description":"Export the full Offer Register: all quotes in one sheet with totals.","operationId":"export_register_api_quotes_dashboard_export_xlsx_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/quotes/{quote_id}/external.xlsx":{"get":{"summary":"Export External Quote","description":"Customer-facing quote — only shows selling prices, NOT costs/margins.","operationId":"export_external_quote_api_quotes__quote_id__external_xlsx_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/quotes/{quote_id}/internal.xlsx":{"get":{"summary":"Export Internal Quote","description":"Internal margin sheet — full cost/margin breakdown for IPAY ops/finance.","operationId":"export_internal_quote_api_quotes__quote_id__internal_xlsx_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/quotes/{quote_id}/send-email":{"post":{"summary":"Send Quote Email","operationId":"send_quote_email_api_quotes__quote_id__send_email_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteSendIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/quotes/{quote_id}/send-history":{"get":{"summary":"Quote Send History","operationId":"quote_send_history_api_quotes__quote_id__send_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/email-outbox":{"get":{"summary":"Email Outbox","description":"View what would have been emailed (MOCKED delivery).","operationId":"email_outbox_api_admin_email_outbox_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/quotes/preview-pdf":{"post":{"summary":"Preview Quote Pdf","description":"Render the customer-facing PDF without saving — for the live preview\nin the New-quote modal. Same min-margin gate applies as the saved-quote endpoint.","operationId":"preview_quote_pdf_api_quotes_preview_pdf_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/quotes/{quote_id}/external.pdf":{"get":{"summary":"Export External Pdf","description":"Branded customer-facing PDF quote download (with IPAY logo).","operationId":"export_external_pdf_api_quotes__quote_id__external_pdf_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants-360":{"get":{"summary":"List Merchants Admin","description":"Operator list of all merchants with light-weight filters for the Merchant 360° list page.","operationId":"list_merchants_admin_api_admin_merchants_360_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-text search across name / legal_name / customer_number","title":"Q"},"description":"Free-text search across name / legal_name / customer_number"},{"name":"segment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment"}},{"name":"kyc_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kyc Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants/{merchant_id}/360":{"get":{"summary":"Merchant 360","description":"Single aggregated view per merchant for the CS-medewerker.\n\nCombines: profile + NAW + KYC + segments + agreements + PSP-config + recent activity\n(last 5 orders, last 3 quotes, last 3 returns, last 3 sessions).","operationId":"merchant_360_api_admin_merchants__merchant_id__360_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants/{merchant_id}":{"patch":{"summary":"Update Merchant Profile","operationId":"update_merchant_profile_api_admin_merchants__merchant_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantProfilePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants/{merchant_id}/agreements":{"post":{"summary":"Upload Agreement","description":"Upload a single agreement PDF/document for a merchant.\n\nStored locally under /app/backend/storage/merchant_agreements/{merchant_id}/{uuid}_filename.\nMax 10 MB. Allowed types: master_ipay / psp_link / kyc / pricing_addendum / nda / dpa / other.","operationId":"upload_agreement_api_admin_merchants__merchant_id__agreements_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_agreement_api_admin_merchants__merchant_id__agreements_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants/{merchant_id}/agreements/{agreement_id}":{"patch":{"summary":"Update Agreement","description":"Toggle signed flag, update notes, or change type on an existing agreement.","operationId":"update_agreement_api_admin_merchants__merchant_id__agreements__agreement_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}},{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","title":"Agreement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Agreement","operationId":"delete_agreement_api_admin_merchants__merchant_id__agreements__agreement_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}},{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","title":"Agreement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants/{merchant_id}/agreements/{agreement_id}/download":{"get":{"summary":"Download Agreement","operationId":"download_agreement_api_admin_merchants__merchant_id__agreements__agreement_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}},{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","title":"Agreement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants/{merchant_id}/contacts":{"post":{"summary":"Add Contact","operationId":"add_contact_api_admin_merchants__merchant_id__contacts_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__merchants_360__ContactIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants/{merchant_id}/contacts/{contact_id}":{"delete":{"summary":"Delete Contact","operationId":"delete_contact_api_admin_merchants__merchant_id__contacts__contact_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}},{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants-meta/constants":{"get":{"summary":"Merchants Meta Constants","operationId":"merchants_meta_constants_api_admin_merchants_meta_constants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/merchants/{merchant_id}/360/quotes":{"get":{"summary":"Merchant 360 Quotes","description":"Full list of quotes for this merchant (read-only).","operationId":"merchant_360_quotes_api_admin_merchants__merchant_id__360_quotes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants/{merchant_id}/360/pricing":{"get":{"summary":"Merchant 360 Pricing","description":"Pricing view: which carriers/services this merchant has used + a sample of\nthe live carrier tariffs (≤8 per carrier) so the CS-team can quickly answer\n'what does this merchant pay for X service'.","operationId":"merchant_360_pricing_api_admin_merchants__merchant_id__360_pricing_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants/{merchant_id}/360/invoices":{"get":{"summary":"Merchant 360 Invoices","description":"Monthly-aggregated invoice view: what IPAY would bill the merchant per\nmonth. Aggregates `orders.revenue_eur` (IPAY margin per order) + VAT estimate\n+ actual `payment_transactions` (Stripe IPAY tooling invoices, if any).","operationId":"merchant_360_invoices_api_admin_merchants__merchant_id__360_invoices_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}},{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":36,"default":12,"title":"Months"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants/{merchant_id}/360/choices":{"get":{"summary":"Get Merchant Choices","description":"Aggregate all choices the merchant made during onboarding.\n\nSources:\n- onboarding_case.intake_data (current PSP, carriers, platform, volumes, etc.)\n- merchant_carrier_contracts (active carriers + mode)\n- merchant.psp_config / payment_methods (existing)","operationId":"get_merchant_choices_api_admin_merchants__merchant_id__360_choices_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants/{merchant_id}/360/financial":{"get":{"summary":"Get Merchant Financial","description":"Top-line financial overview: revenue, orders, outstanding, wallet.","operationId":"get_merchant_financial_api_admin_merchants__merchant_id__360_financial_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants/{merchant_id}/360/documents":{"get":{"summary":"Get Merchant Documents","description":"Unified document list: agreements + onboarding case documents.","operationId":"get_merchant_documents_api_admin_merchants__merchant_id__360_documents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants/{merchant_id}/360/ai-context":{"get":{"summary":"Get Merchant Ai Context","description":"Compact context blob for AI chat queries about this merchant.\n\nThe chatbot can use this as system-prompt grounding to answer queries like\n'wat is hun wallet saldo?', 'welke carrier gebruiken ze?', 'hoeveel orders\ndeden ze laatste 30 dagen?', 'wat is hun PSP-keuze?'.","operationId":"get_merchant_ai_context_api_admin_merchants__merchant_id__360_ai_context_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants/{merchant_id}/360/ai-chat":{"post":{"summary":"Merchant Ai Chat","description":"Ask the AI a question about this merchant. Uses merchant ai_context as grounding.","operationId":"merchant_ai_chat_api_admin_merchants__merchant_id__360_ai_chat_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__merchants_360_ext__MerchantChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants/{merchant_id}/360/ai-chat-history":{"get":{"summary":"Get Merchant Chat History","operationId":"get_merchant_chat_history_api_admin_merchants__merchant_id__360_ai_chat_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merchants/{merchant_id}/psp-rail":{"get":{"summary":"Get Psp Rail","operationId":"get_psp_rail_api_admin_merchants__merchant_id__psp_rail_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Patch Psp Rail","operationId":"patch_psp_rail_api_admin_merchants__merchant_id__psp_rail_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PSPRailUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/global-routing-matrix":{"get":{"summary":"Global Routing Matrix","operationId":"global_routing_matrix_api_admin_global_routing_matrix_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/coverage-gaps/{country_code}/activate":{"post":{"summary":"Activate Coverage Gap","description":"One-click demo activation: seed merchant + order + 2C2P token for the\ngiven Asian country so the country moves out of the gaps list.","operationId":"activate_coverage_gap_api_admin_coverage_gaps__country_code__activate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"country_code","in":"path","required":true,"schema":{"type":"string","title":"Country Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/scheduler/status":{"get":{"summary":"Scheduler Status","operationId":"scheduler_status_api_admin_scheduler_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/scheduler/run-now":{"post":{"summary":"Scheduler Run Now","description":"Manually trigger a single pass without waiting for the timer.","operationId":"scheduler_run_now_api_admin_scheduler_run_now_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/scheduler/sync-log":{"get":{"summary":"Scheduler Sync Log","operationId":"scheduler_sync_log_api_admin_scheduler_sync_log_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"only_errors","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Only Errors"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/scheduler/summary":{"get":{"summary":"Scheduler Summary","description":"Aggregate per-provider counts (last 24h) for the dashboard chart.","operationId":"scheduler_summary_api_admin_scheduler_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/smoke-test/run-now":{"post":{"tags":["Smoke-Test"],"summary":"Run Now","operationId":"run_now_api_admin_smoke_test_run_now_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/smoke-test/log":{"get":{"tags":["Smoke-Test"],"summary":"Get Log","operationId":"get_log_api_admin_smoke_test_log_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/avatar/status":{"get":{"tags":["Avatar (D-ID)"],"summary":"Avatar Status","description":"Public — frontend can quickly check if D-ID is configured.","operationId":"avatar_status_api_avatar_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/avatar/talks":{"post":{"tags":["Avatar (D-ID)"],"summary":"Create Avatar Talk","description":"Create a D-ID Talk for the given text. Returns talk_id immediately;\nvideo URL becomes available later via /avatar/talks/{talk_id}.\nPublic endpoint — anyone using the AI widget can trigger video synthesis.","operationId":"create_avatar_talk_api_avatar_talks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAvatarTalkIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/avatar/talks/{talk_id}":{"get":{"tags":["Avatar (D-ID)"],"summary":"Get Avatar Talk","description":"Fetch current status of a Talk. If not 'done' yet, calls D-ID for latest\nstatus and updates MongoDB. Returns result_url when complete.","operationId":"get_avatar_talk_api_avatar_talks__talk_id__get","parameters":[{"name":"talk_id","in":"path","required":true,"schema":{"type":"string","title":"Talk Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/avatar/voices":{"get":{"tags":["Avatar (D-ID)"],"summary":"List Voices","description":"Pass-through to D-ID's /tts/voices for voice discovery (admin / settings UI).","operationId":"list_voices_api_avatar_voices_get","parameters":[{"name":"provider","in":"query","required":false,"schema":{"type":"string","default":"microsoft","title":"Provider"}},{"name":"language","in":"query","required":false,"schema":{"type":"string","default":"nl","title":"Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/avatar/admin/recent":{"get":{"tags":["Avatar (D-ID)"],"summary":"Admin Recent Talks","description":"Operator visibility — last 25 D-ID talks + their lifecycle status.","operationId":"admin_recent_talks_api_avatar_admin_recent_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/avatar-settings":{"get":{"tags":["Avatar Settings"],"summary":"Get Settings","operationId":"get_settings_api_admin_avatar_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Avatar Settings"],"summary":"Set Settings","operationId":"set_settings_api_admin_avatar_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarSettingsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/avatar-settings/presenter-library":{"get":{"tags":["Avatar Settings"],"summary":"Presenter Library","description":"Returns 8 curated D-ID presenters + a 'custom upload' slot.\nPublic — frontend uses it for the picker UI.","operationId":"presenter_library_api_admin_avatar_settings_presenter_library_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/docs-api/index":{"get":{"summary":"Docs Api Index","operationId":"docs_api_index_api_docs_api_index_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/docs-api/all-endpoints":{"get":{"summary":"Docs Api All Endpoints","description":"Auto-generated complete API reference from FastAPI's live OpenAPI schema.\n\nNo drift possible — every router mounted in `server.py` shows up here within\nseconds of a code-reload. Frontend renders this as the \"Complete Reference\"\nsection beneath the curated quick-start groups.","operationId":"docs_api_all_endpoints_api_docs_api_all_endpoints_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/docs-api/postman-collection.json":{"get":{"summary":"Docs Api Postman Collection","description":"Postman v2.1 collection generated live from the OpenAPI schema.\n\nClick \"Download Postman collection\" on /reference → integrators import the\nfile into Postman / Insomnia / Bruno and have all 700+ endpoints + JWT auth\npre-configured in under 60 seconds.","operationId":"docs_api_postman_collection_api_docs_api_postman_collection_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/docs-api/webhooks":{"get":{"summary":"Docs Webhooks","operationId":"docs_webhooks_api_docs_api_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/help/articles":{"get":{"summary":"List Help","operationId":"list_help_api_help_articles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/help/articles/{article_id}":{"get":{"summary":"Get Help","operationId":"get_help_api_help_articles__article_id__get","parameters":[{"name":"article_id","in":"path","required":true,"schema":{"type":"string","title":"Article Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/help/articles":{"get":{"summary":"Admin List Help","description":"Admin-only — shows ALL articles including `internal_only` ones (OTP rule, etc.).","operationId":"admin_list_help_api_admin_help_articles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/help/articles/{article_id}":{"get":{"summary":"Admin Get Help","description":"Admin-only — returns body even for internal_only articles.","operationId":"admin_get_help_api_admin_help_articles__article_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"article_id","in":"path","required":true,"schema":{"type":"string","title":"Article Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/portal/initiate":{"post":{"summary":"Returns Portal Initiate","description":"Consumer opens the portal, identifies their order. Returns a token + the existing order info.","operationId":"returns_portal_initiate_api_returns_portal_initiate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnInitiate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/portal/{token}":{"get":{"summary":"Returns Portal Lookup","operationId":"returns_portal_lookup_api_returns_portal__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/portal/{token}/choose":{"post":{"summary":"Returns Portal Choose","description":"Consumer locks in: money refund OR app credit (with bonus).","operationId":"returns_portal_choose_api_returns_portal__token__choose_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnChoice"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/cases":{"get":{"summary":"List Return Cases","operationId":"list_return_cases_api_returns_cases_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"customer_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/cases/{case_id}/advance":{"post":{"summary":"Advance Return Case","operationId":"advance_return_case_api_returns_cases__case_id__advance_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}},{"name":"status","in":"query","required":true,"schema":{"type":"string","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/summary":{"get":{"summary":"Returns Summary","operationId":"returns_summary_api_returns_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/returns/settings":{"get":{"summary":"Get Settings","operationId":"get_settings_api_returns_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"summary":"Update Settings","operationId":"update_settings_api_returns_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/returns/rules":{"get":{"summary":"List Rules","operationId":"list_rules_api_returns_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Rule","operationId":"create_rule_api_returns_rules_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnRuleIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/returns/rules/{rule_id}":{"delete":{"summary":"Delete Rule","operationId":"delete_rule_api_returns_rules__rule_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/credit/{email}":{"get":{"summary":"Credit For Email","description":"Operator/merchant lookup — what credit does this customer have?","operationId":"credit_for_email_api_returns_credit__email__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/cases/{case_id}/generate-return-label":{"post":{"summary":"Generate Return Label","description":"Manual trigger from admin/merchant. Idempotent unless force=true.","operationId":"generate_return_label_api_returns_cases__case_id__generate_return_label_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/v041/prevention-offers":{"get":{"summary":"List Offers","operationId":"list_offers_api_returns_v041_prevention_offers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Offer","operationId":"create_offer_api_returns_v041_prevention_offers_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreventionOfferIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/v041/prevention-offers/{offer_id}":{"patch":{"summary":"Update Offer","operationId":"update_offer_api_returns_v041_prevention_offers__offer_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offer_id","in":"path","required":true,"schema":{"type":"string","title":"Offer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Offer","operationId":"delete_offer_api_returns_v041_prevention_offers__offer_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offer_id","in":"path","required":true,"schema":{"type":"string","title":"Offer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/v041/prevention-offers/seed":{"post":{"summary":"Seed Default Offers","description":"Seed 4 standard prevention offers — globally or per merchant.","operationId":"seed_default_offers_api_returns_v041_prevention_offers_seed_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/v041/portal/{token}/offers":{"get":{"summary":"Get Offers For Case","description":"Get applicable prevention offers for this return case.","operationId":"get_offers_for_case_api_returns_v041_portal__token__offers_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/v041/portal/{token}/accept-offer":{"post":{"summary":"Accept Prevention Offer","description":"Consumer accepts a prevention offer — case closes without return label.","operationId":"accept_prevention_offer_api_returns_v041_portal__token__accept_offer_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferAccept"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/v041/portal/{token}/choose":{"post":{"summary":"Choose Refund V041","description":"Consumer locks in: money · app_credit · exchange · keep_item_discount.","operationId":"choose_refund_v041_api_returns_v041_portal__token__choose_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundChoiceV041"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/v041/analytics":{"get":{"summary":"Returns Analytics","description":"19 commercial KPIs for Smart Returns dashboard.","operationId":"returns_analytics_api_returns_v041_analytics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/v041/roi/demo":{"get":{"summary":"Returns Roi Public Demo","description":"PUBLIC (no auth) — anonymised platform-wide ROI snapshot for the /demo/roi sales page.\n\nAggregated across ALL merchants, no merchant_id / customer_email exposed.\nDesigned to be linked from LinkedIn / sales emails to show prospects what\nIPAY Smart Returns achieves before they even sign up.","operationId":"returns_roi_public_demo_api_returns_v041_roi_demo_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/v041/roi":{"get":{"summary":"Returns Roi","description":"Per-merchant ROI summary — value retained, cash avoided, repeat-purchase uplift.\n\nDesigned as a sales-pitch / investor-deck snapshot:\n- 'IPAY Smart Returns has retained €X.XX in your ecosystem'\n- 'Y returns avoided through prevention offers'\n- 'Z repeat purchases triggered by wallet credit'","operationId":"returns_roi_api_returns_v041_roi_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/v041/wallet/{email}":{"get":{"summary":"Wallet For Email","description":"Operator/merchant lookup — full wallet incl expiry & repurchase tracking.","operationId":"wallet_for_email_api_returns_v041_wallet__email__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/merchant-portal/orders/import-log":{"get":{"summary":"Import Log","description":"List incoming order webhook events with success/error status + raw payload.","operationId":"import_log_api_merchant_portal_orders_import_log_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["success","error","pending"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/merchant-portal/orders/import-log/{log_id}/retry":{"post":{"summary":"Retry Import","description":"Operator-only retry of a failed import. Marks for re-processing.","operationId":"retry_import_api_merchant_portal_orders_import_log__log_id__retry_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string","title":"Log Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/merchant-portal/orders/exceptions":{"get":{"summary":"Order Exceptions","description":"List failed orders that didn't become IPAY orders (missing fields / validation errors / duplicates).","operationId":"order_exceptions_api_merchant_portal_orders_exceptions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/merchant-portal/ipay/qr-links":{"get":{"summary":"Qr Links","description":"List all QR codes (payment sessions) per shipment with status.","operationId":"qr_links_api_merchant_portal_ipay_qr_links_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/merchant-portal/ipay/payment-timeline/{session_id}":{"get":{"summary":"Payment Timeline","description":"Chronological event stream for a single payment session.","operationId":"payment_timeline_api_merchant_portal_ipay_payment_timeline__session_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/merchant-portal/ipay/payment-timeline-recent":{"get":{"summary":"Payment Timeline Recent","description":"Cross-session recent event stream — for the merchant Payment Timeline landing page.","operationId":"payment_timeline_recent_api_merchant_portal_ipay_payment_timeline_recent_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/merchant-portal/ipay/settlement":{"get":{"summary":"Settlement","description":"v0.90 — Settlement reconciliation: GROSS − (IPAY fee per order × order_count) = NET to merchant.\n\nDe IPAY-fee is een vast bedrag per order, contract-onderhandeld per merchant.\nNiet langer een percentage.","operationId":"settlement_api_merchant_portal_ipay_settlement_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/merchant-portal/ipay/settlement/pdf":{"get":{"summary":"Settlement Pdf","description":"PDF settlement statement for finance team / accountant / audit trail.","operationId":"settlement_pdf_api_merchant_portal_ipay_settlement_pdf_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/merchant-portal/ipay/refunds-disputes":{"get":{"summary":"Refunds Disputes","description":"Combined refunds (from returns) + disputes (chargebacks) view.","operationId":"refunds_disputes_api_merchant_portal_ipay_refunds_disputes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":90,"title":"Days"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/merchant-portal/technical/api-keys":{"get":{"summary":"List My Api Keys","description":"List the merchant's own API keys (or all for operator).","operationId":"list_my_api_keys_api_merchant_portal_technical_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create My Api Key","description":"Merchant or operator creates an API key. Returns the full secret ONCE — never again.\n\nv0.46 hardening: secret is sha256-hashed before storage. The raw value is returned\nonly in this response. Verification happens by hashing the incoming key and matching\nagainst `key_secret_hash` (legacy `key_secret` plaintext field is still readable for\nkeys created before v0.46; we leave it alone but new keys have None there).","operationId":"create_my_api_key_api_merchant_portal_technical_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/merchant-portal/technical/api-keys/{key_id}/revoke":{"post":{"summary":"Revoke My Api Key","operationId":"revoke_my_api_key_api_merchant_portal_technical_api_keys__key_id__revoke_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/merchant-portal/technical/webhooks":{"get":{"summary":"List Webhooks","operationId":"list_webhooks_api_merchant_portal_technical_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Webhook","operationId":"create_webhook_api_merchant_portal_technical_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/merchant-portal/technical/webhooks/{webhook_id}":{"delete":{"summary":"Delete Webhook","operationId":"delete_webhook_api_merchant_portal_technical_webhooks__webhook_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/merchant-portal/technical/webhooks/{webhook_id}/delivery-log":{"get":{"summary":"Webhook Delivery Log","operationId":"webhook_delivery_log_api_merchant_portal_technical_webhooks__webhook_id__delivery_log_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/merchant-portal/reporting/co2":{"get":{"summary":"Co2 Report","description":"Sustainability report — CO2 emissions per parcel · per carrier · IPAY vs non-IPAY.","operationId":"co2_report_api_merchant_portal_reporting_co2_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":90,"title":"Days"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/merchant-portal/reporting/performance":{"get":{"summary":"Performance Report","description":"Performance breakdowns — delivery speed · payment conversion · OTP success · return rate · time-to-first-attempt.","operationId":"performance_report_api_merchant_portal_reporting_performance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/auth/request":{"post":{"summary":"Request Magic Link","operationId":"request_magic_link_api_consumer_auth_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/auth/verify/{token}":{"get":{"summary":"Verify Magic Link","operationId":"verify_magic_link_api_consumer_auth_verify__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/otp-view/{token}":{"get":{"summary":"View Otp","operationId":"view_otp_api_consumer_otp_view__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/me":{"get":{"summary":"Consumer Me","operationId":"consumer_me_api_consumer_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/orders":{"get":{"summary":"Consumer Orders","operationId":"consumer_orders_api_consumer_orders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/cash-records":{"get":{"summary":"Consumer Cash Records","description":"List cash-on-delivery records associated with this consumer's email.\n\nBuilds trust: consumer can see \"yes, I chose cash for this order — driver confirmed at HH:MM\".\nPart of the v0.34 cash transparency improvements.","operationId":"consumer_cash_records_api_consumer_cash_records_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/returns":{"get":{"summary":"Consumer Returns","operationId":"consumer_returns_api_consumer_returns_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/orders/{order_id}":{"get":{"summary":"Consumer Order Detail","description":"Full detail of a single order — only if it belongs to the calling consumer.","operationId":"consumer_order_detail_api_consumer_orders__order_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/profile":{"get":{"summary":"Consumer Profile","operationId":"consumer_profile_api_consumer_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"summary":"Consumer Profile Update","operationId":"consumer_profile_update_api_consumer_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdateIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/profile/gdpr":{"post":{"summary":"Consumer Gdpr Request","description":"Log a GDPR request (data export / deletion). Operator dashboard picks it up.\n\nNote: in production this would trigger an automated export job + email or a\ndeletion workflow with a grace period. For now we just record the request.","operationId":"consumer_gdpr_request_api_consumer_profile_gdpr_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GdprActionIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/orders/{order_id}/contact-merchant":{"post":{"summary":"Consumer Contact Merchant","operationId":"consumer_contact_merchant_api_consumer_orders__order_id__contact_merchant_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactMerchantIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/faqs":{"get":{"summary":"Consumer Faqs","description":"Public — returns FAQ entries with i18n keys. Frontend resolves the actual translation.","operationId":"consumer_faqs_api_consumer_faqs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/consumer/home":{"get":{"summary":"Consumer Home","description":"Action-first home aggregator: max 3 'Action Required' cards + recent activity.\n\nCard priorities:\n  1. Pay required — open payment session (CREATED/LABEL_READY/IN_DELIVERY/PAYMENT_IN_PROGRESS)\n  2. Locker code ready — locker case status='code_available'\n  3. Return pending — return_cases in 'awaiting_drop_off'\n  4. Delivery today — orders with carrier ETA today","operationId":"consumer_home_api_consumer_home_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/payment-request/share":{"post":{"summary":"Share Payment Request","description":"Generate a single-use share link so someone else can pay this order.","operationId":"share_payment_request_api_consumer_payment_request_share_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareRequestIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/payment-request/{share_token}":{"get":{"summary":"View Shared Payment Request","description":"Public endpoint — anyone with the token sees a privacy-stripped view.\n\nReturns: amount, currency, merchant (name only), expires_at, already_paid.\nNEVER returns: customer email/address, ipay_reference_18 internal, session details.","operationId":"view_shared_payment_request_api_consumer_payment_request__share_token__get","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/payment-request/{share_token}/redirect":{"post":{"summary":"Redirect Shared Payment Request","description":"Mark the share link 'about to be paid' and return the underlying PSP pay URL.\n\nPhase 2 improvement: also creates a notification (and best-effort email) for\nthe original requester so they get instant feedback when someone clicks the link.","operationId":"redirect_shared_payment_request_api_consumer_payment_request__share_token__redirect_post","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/notifications":{"get":{"summary":"List Notifications","operationId":"list_notifications_api_consumer_notifications_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/notifications/{nid}/read":{"post":{"summary":"Mark Notification Read","operationId":"mark_notification_read_api_consumer_notifications__nid__read_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"nid","in":"path","required":true,"schema":{"type":"string","title":"Nid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/notifications/mark-all-read":{"post":{"summary":"Mark All Notifications Read","operationId":"mark_all_notifications_read_api_consumer_notifications_mark_all_read_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/points":{"get":{"summary":"Get Points","operationId":"get_points_api_consumer_points_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/deals":{"get":{"summary":"List Deals","operationId":"list_deals_api_consumer_deals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/refund-options":{"get":{"summary":"Get Refund Options","operationId":"get_refund_options_api_consumer_refund_options_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/returns/set-refund-option":{"post":{"summary":"Set Refund Option","operationId":"set_refund_option_api_consumer_returns_set_refund_option_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetRefundOptionIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/carriers/demo-profiles":{"get":{"summary":"Get Carrier Demo Profiles","description":"Public lookup so the front-end can render carrier-branded UI elements.","operationId":"get_carrier_demo_profiles_api_consumer_carriers_demo_profiles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/consumer/loyalty-cards":{"get":{"summary":"List Loyalty Cards","operationId":"list_loyalty_cards_api_consumer_loyalty_cards_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Loyalty Card","operationId":"create_loyalty_card_api_consumer_loyalty_cards_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoyaltyCardIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/loyalty-cards/{card_id}":{"patch":{"summary":"Update Loyalty Card","operationId":"update_loyalty_card_api_consumer_loyalty_cards__card_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string","title":"Card Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoyaltyCardUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Loyalty Card","operationId":"delete_loyalty_card_api_consumer_loyalty_cards__card_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string","title":"Card Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/loyalty-cards/applicable-for-session/{session_token}":{"get":{"summary":"Applicable Cards For Session","description":"Return cards owned by the caller that could be applied to this session.\n\nMatch logic (intentionally lenient for MVP):\n- card.balance_eur > 0\n- card.card_type in {gift_card, voucher} (loyalty/membership/points excluded — no monetary balance)\n- merchant_id direct hit OR normalized merchant_name overlap (lowercased substring both ways)","operationId":"applicable_cards_for_session_api_consumer_loyalty_cards_applicable_for_session__session_token__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_token","in":"path","required":true,"schema":{"type":"string","title":"Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/loyalty-cards/{card_id}/apply-to-session":{"post":{"summary":"Apply Voucher To Session","description":"Debit the loyalty card balance and credit the consumer's IPAY wallet.\n\nSafer MVP than touching session.amount_due directly: voucher value becomes\nimmediately spendable wallet credit, which the consumer can use on any\nfuture IPAY order (including this one if they pick \"wallet payment\" later).","operationId":"apply_voucher_to_session_api_consumer_loyalty_cards__card_id__apply_to_session_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string","title":"Card Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyVoucherIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/wallet/balance":{"get":{"summary":"Wallet Balance","description":"Returns current wallet balance + recent ledger entries for the authenticated consumer.","operationId":"wallet_balance_api_consumer_wallet_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/wallet/transfer":{"post":{"summary":"Wallet Transfer","operationId":"wallet_transfer_api_consumer_wallet_transfer_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletTransferIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/wallet/transfers":{"get":{"summary":"List Wallet Transfers","operationId":"list_wallet_transfers_api_consumer_wallet_transfers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/orders/{order_id}/timeline":{"get":{"summary":"Consumer Order Timeline","description":"Return a curated consumer-friendly timeline for an order.\n\nPulls raw event_log entries, drops ops-only fields, maps to consumer\nstages, and adds payment_share_link + refund_completed bookkeeping\nevents when applicable.","operationId":"consumer_order_timeline_api_consumer_orders__order_id__timeline_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ai-assistant/chat":{"post":{"summary":"Chat","operationId":"chat_api_ai_assistant_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ai-assistant/session/{session_id}":{"get":{"summary":"Get Session","description":"Optional: fetch a previous conversation by id (for 'continue chat' UX).","operationId":"get_session_api_ai_assistant_session__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ai-assistant/merchant-chat":{"post":{"summary":"Merchant Chat","description":"Merchant-scoped Claude chat for operators inside the Merchant 360° page.\n\nGrounds the model with a compact context block (profile · KYC · PSP · financials ·\nonboarding stage · recent orders) so the assistant can answer questions like\n'wat is het saldo van deze merchant?', 'welke PSP gebruikt deze klant?',\n'hoeveel orders deze maand?'.\n\nSprint M360.2 — action mode: when an operator asks Claude to PERFORM an action\n(\"top up €500\", \"mark KYC approved\"), Claude proposes a structured action via\nJSON wrapper. The proposal is returned, the operator confirms, then the\n`/execute-action` endpoint actually mutates state.","operationId":"merchant_chat_api_ai_assistant_merchant_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__ai_assistant__MerchantChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/ai-assistant/actions":{"get":{"summary":"List Available Actions","description":"Return the catalogue of actions Claude is allowed to propose.","operationId":"list_available_actions_api_ai_assistant_actions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/ai-assistant/execute-action":{"post":{"summary":"Execute Ai Action","description":"Execute an AI-proposed action after operator confirmation.","operationId":"execute_ai_action_api_ai_assistant_execute_action_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteActionIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/ai-assistant/partner-chat":{"post":{"summary":"Partner Chat","description":"Partner-scoped Claude chat — answers questions about a specific partner\n+ can propose actions (set priority, update onboarding, issue magic link).","operationId":"partner_chat_api_ai_assistant_partner_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/ai-assistant/execute-partner-action":{"post":{"summary":"Execute Partner Action","operationId":"execute_partner_action_api_ai_assistant_execute_partner_action_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutePartnerActionIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/api-key-requests":{"post":{"summary":"Submit Api Key Request","description":"Public endpoint — anyone can submit a request from /reference.","operationId":"submit_api_key_request_api_api_key_requests_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRequestIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/api-key-requests":{"get":{"summary":"List Api Key Requests","operationId":"list_api_key_requests_api_admin_api_key_requests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["pending","approved","rejected"],"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/api-key-requests/{request_id}/approve":{"post":{"summary":"Approve Api Key Request","operationId":"approve_api_key_request_api_admin_api_key_requests__request_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/api-key-requests/{request_id}/reject":{"post":{"summary":"Reject Api Key Request","operationId":"reject_api_key_request_api_admin_api_key_requests__request_id__reject_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"reason","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/api-keys":{"get":{"summary":"List Api Keys","description":"List active API keys. The actual key string is REDACTED — operators see\nonly owner + scopes + last_used_at. To rotate, revoke and re-issue.","operationId":"list_api_keys_api_admin_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/api-keys/{key_id}/revoke":{"post":{"summary":"Revoke Api Key","operationId":"revoke_api_key_api_admin_api_keys__key_id__revoke_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications":{"get":{"summary":"List Notifications","operationId":"list_notifications_api_notifications_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread Only"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/{notif_id}/mark-read":{"post":{"summary":"Mark Read","operationId":"mark_read_api_notifications__notif_id__mark_read_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"notif_id","in":"path","required":true,"schema":{"type":"string","title":"Notif Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/mark-all-read":{"post":{"summary":"Mark All Read","operationId":"mark_all_read_api_notifications_mark_all_read_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/dashboard/merchants-list":{"get":{"summary":"Dashboard Merchants List","description":"List of merchants (id+name) for the per-merchant filter dropdown.","operationId":"dashboard_merchants_list_api_dashboard_merchants_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/dashboard/master":{"get":{"summary":"Master Dashboard","description":"Single endpoint returning every KPI the master dashboard needs.\n\nSections: hero KPIs, alerts, recent activity, per-merchant breakdown,\ncarrier health, integration sync status, returns trends, payments breakdown.\n\nWhen ?merchant_id=... is passed, all KPIs are filtered to that merchant.","operationId":"master_dashboard_api_dashboard_master_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional: filter all KPIs to a single merchant","title":"Merchant Id"},"description":"Optional: filter all KPIs to a single merchant"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/hubspot-tasks-log":{"get":{"summary":"Hubspot Tasks Log","description":"Read the HubSpot task creation audit log.\n\nUseful for verifying the auto-task wiring: when a return case opens, a\nmerchant becomes qualified, etc., a row lands here with status=created,\nskipped, or failed.","operationId":"hubspot_tasks_log_api_admin_hubspot_tasks_log_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lockers/issue-code":{"post":{"summary":"Issue Locker Code","description":"Generic carrier → IPAY unlock-code push.\n\nAuthentication (production): HMAC-SHA256 of the raw body using the\nper-carrier secret. Set LOCKER_VERIFY_HMAC=true in env to enforce.","operationId":"issue_locker_code_api_lockers_issue_code_post","parameters":[{"name":"x-ipay-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Signature"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCodeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lockers/dpd/issue-code":{"post":{"summary":"Dpd Issue","operationId":"dpd_issue_api_lockers_dpd_issue_code_post","parameters":[{"name":"x-ipay-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Signature"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCodeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lockers/ups/issue-code":{"post":{"summary":"Ups Issue","operationId":"ups_issue_api_lockers_ups_issue_code_post","parameters":[{"name":"x-ipay-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Signature"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCodeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lockers/postnl/issue-code":{"post":{"summary":"Postnl Issue","operationId":"postnl_issue_api_lockers_postnl_issue_code_post","parameters":[{"name":"x-ipay-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Signature"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCodeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lockers/inpost/issue-code":{"post":{"summary":"Inpost Issue","operationId":"inpost_issue_api_lockers_inpost_issue_code_post","parameters":[{"name":"x-ipay-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Signature"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCodeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lockers/allegro-one/issue-code":{"post":{"summary":"Allegro Issue","operationId":"allegro_issue_api_lockers_allegro_one_issue_code_post","parameters":[{"name":"x-ipay-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Signature"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCodeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/lockers":{"get":{"summary":"Consumer Lockers","description":"List the consumer's active locker cases (code MASKED until they tap reveal).","operationId":"consumer_lockers_api_consumer_lockers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/lockers/{case_id}/reveal":{"post":{"summary":"Reveal Locker Code","operationId":"reveal_locker_code_api_consumer_lockers__case_id__reveal_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/lockers/{case_id}/mark-picked-up":{"post":{"summary":"Mark Picked Up","operationId":"mark_picked_up_api_consumer_lockers__case_id__mark_picked_up_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/lockers/cases":{"get":{"summary":"Operator Locker Cases","operationId":"operator_locker_cases_api_admin_lockers_cases_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/lockers/audit/{case_id}":{"get":{"summary":"Locker Audit Trail","operationId":"locker_audit_trail_api_admin_lockers_audit__case_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/lockers/summary":{"get":{"summary":"Lockers Summary","operationId":"lockers_summary_api_admin_lockers_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/lockers/{case_id}":{"get":{"summary":"Consumer Locker Detail","description":"Rich detail for the locker pickup page. Code stays masked until /reveal.","operationId":"consumer_locker_detail_api_consumer_lockers__case_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/demo/seed-locker-cases":{"post":{"summary":"Seed Demo Locker Cases","description":"Seed 3 demo locker cases for alice@example.com and test@bryan.com.\n\nIdempotent — clears + reseeds the demo cases each call.","operationId":"seed_demo_locker_cases_api_demo_seed_locker_cases_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/demo/seed-consumer":{"post":{"summary":"Seed Consumer Demo Data","description":"Wipe + reseed demo data for alice@example.com and test@bryan.com.\n\nCreates per consumer:\n  - 2 payment_sessions in AWAITING_PAYMENT (1 is the locker-pickup-payment)\n  - 1 in_transit order with delivery_today (pay-on-arrival)\n  - 30 delivered orders (varied merchants/dates/amounts over last 90 days)\n  - 5 returns in different lifecycle stages","operationId":"seed_consumer_demo_data_api_demo_seed_consumer_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/returns/reasons":{"get":{"summary":"List Reasons","description":"Public reason picker for the new-return wizard.","operationId":"list_reasons_api_consumer_returns_reasons_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/returns/start":{"post":{"summary":"Start Return","description":"Step 1 of return wizard — customer picks order + reason.","operationId":"start_return_api_consumer_returns_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartReturnIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/returns/keep-with-discount":{"post":{"summary":"Keep With Discount","description":"Customer accepts the alternative — keep item + get partial wallet refund.","operationId":"keep_with_discount_api_consumer_returns_keep_with_discount_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeepDiscountIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/returns/refund-method":{"post":{"summary":"Set Refund Method","description":"Customer picks between 110% wallet credit or 100% original payment method.","operationId":"set_refund_method_api_consumer_returns_refund_method_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundMethodIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/consumer/returns/{return_id}":{"get":{"summary":"Get Return Detail","description":"Detail view of a single return, including offer + status timeline.","operationId":"get_return_detail_api_consumer_returns__return_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"return_id","in":"path","required":true,"schema":{"type":"string","title":"Return Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/consumer/returns/{return_id}/qr-payload":{"get":{"summary":"Get Return Qr Payload","description":"Return QR payload string — frontend renders the QR locally.","operationId":"get_return_qr_payload_api_consumer_returns__return_id__qr_payload_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"return_id","in":"path","required":true,"schema":{"type":"string","title":"Return Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dashboard/merchant/catalog":{"get":{"summary":"Tile Catalog","description":"List all available tiles. Used by the customize-dashboard modal.","operationId":"tile_catalog_api_dashboard_merchant_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/dashboard/merchant/preferences":{"get":{"summary":"Get Prefs","operationId":"get_prefs_api_dashboard_merchant_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"summary":"Save Prefs","operationId":"save_prefs_api_dashboard_merchant_preferences_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TilePrefsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/dashboard/merchant":{"get":{"summary":"Merchant Dashboard","description":"Return all enabled tiles for the current user. Merchants see ONLY their own data;\noperators see aggregated across all merchants (no merchant_id filter).","operationId":"merchant_dashboard_api_dashboard_merchant_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/powerbi/orders":{"get":{"summary":"Pbi Orders","operationId":"pbi_orders_api_powerbi_orders_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50000,"default":10000,"title":"Limit"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"json","title":"Format"}},{"name":"x-ipay-power-bi-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Power-Bi-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/powerbi/payment-sessions":{"get":{"summary":"Pbi Sessions","operationId":"pbi_sessions_api_powerbi_payment_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50000,"default":10000,"title":"Limit"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"json","title":"Format"}},{"name":"x-ipay-power-bi-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Power-Bi-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/powerbi/returns":{"get":{"summary":"Pbi Returns","operationId":"pbi_returns_api_powerbi_returns_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50000,"default":10000,"title":"Limit"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"json","title":"Format"}},{"name":"x-ipay-power-bi-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Power-Bi-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/powerbi/cash-records":{"get":{"summary":"Pbi Cash Records","operationId":"pbi_cash_records_api_powerbi_cash_records_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50000,"default":10000,"title":"Limit"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"carrier_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Code"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"json","title":"Format"}},{"name":"x-ipay-power-bi-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Power-Bi-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/powerbi/cash-daily-by-carrier":{"get":{"summary":"Pbi Cash Daily By Carrier","description":"Pre-aggregated daily cash flow per carrier — feeds the cash-fade forecast chart.\n\nReturns one row per (date, carrier_code) with count + amount_eur + confirmed_count.","operationId":"pbi_cash_daily_by_carrier_api_powerbi_cash_daily_by_carrier_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"default":90,"title":"Days"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"json","title":"Format"}},{"name":"x-ipay-power-bi-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Power-Bi-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/powerbi/merchants":{"get":{"summary":"Pbi Merchants","description":"All merchants with NAW + segments + KYC + customer_number. Use as DimMerchants in Power BI star schema.","operationId":"pbi_merchants_api_powerbi_merchants_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"json","title":"Format"}},{"name":"x-ipay-power-bi-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Power-Bi-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/powerbi/carriers":{"get":{"summary":"Pbi Carriers","description":"Carrier dimension table for star schema joins.","operationId":"pbi_carriers_api_powerbi_carriers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"json","title":"Format"}},{"name":"x-ipay-power-bi-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Power-Bi-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/powerbi/carrier-invoices":{"get":{"summary":"Pbi Invoices","operationId":"pbi_invoices_api_powerbi_carrier_invoices_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50000,"default":10000,"title":"Limit"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"json","title":"Format"}},{"name":"x-ipay-power-bi-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Power-Bi-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/powerbi/quotes":{"get":{"summary":"Pbi Quotes","operationId":"pbi_quotes_api_powerbi_quotes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50000,"default":10000,"title":"Limit"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"json","title":"Format"}},{"name":"x-ipay-power-bi-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Power-Bi-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/powerbi/csv-template-non-ipay":{"get":{"summary":"Csv Template Non Ipay","description":"Download the CSV template merchants use to upload their non-IPAY order history.\nUsed to compare IPAY vs non-IPAY performance in Power BI.","operationId":"csv_template_non_ipay_api_powerbi_csv_template_non_ipay_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"x-ipay-power-bi-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Power-Bi-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/powerbi/catalog":{"get":{"summary":"Pbi Catalog","description":"List all PowerBI feeds with row counts — used in the admin UI for at-a-glance health.","operationId":"pbi_catalog_api_powerbi_catalog_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"x-ipay-power-bi-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ipay-Power-Bi-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/powerbi/key":{"get":{"summary":"Get Pbi Key Status","operationId":"get_pbi_key_status_api_admin_powerbi_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/powerbi/rotate-key":{"post":{"summary":"Rotate Pbi Key","description":"Generates a fresh key. The new value is shown ONCE — operator must\nupdate their .env (POWER_BI_KEY) and Power BI report header to match.\nNote: this does NOT auto-update .env; that's a manual step.","operationId":"rotate_pbi_key_api_admin_powerbi_rotate_key_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/shipping-tool/sender-addresses":{"get":{"summary":"List Sender Addresses","operationId":"list_sender_addresses_api_shipping_tool_sender_addresses_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Sender Address","operationId":"create_sender_address_api_shipping_tool_sender_addresses_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderAddressIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shipping-tool/sender-addresses/{addr_id}":{"patch":{"summary":"Update Sender Address","operationId":"update_sender_address_api_shipping_tool_sender_addresses__addr_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"addr_id","in":"path","required":true,"schema":{"type":"string","title":"Addr Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderAddressPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Sender Address","operationId":"delete_sender_address_api_shipping_tool_sender_addresses__addr_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"addr_id","in":"path","required":true,"schema":{"type":"string","title":"Addr Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shipping-tool/all-orders":{"get":{"summary":"List All Orders","description":"Consolidated 'All Orders' table — all orders, IPAY filter on column.\n\nPer blueprint: Shipping Tool shows ALL orders. Merchants can filter by payment_method.\nThe IPAY Dashboard (/app/sessions) only shows IPAY orders. This endpoint is the\noperational total view.","operationId":"list_all_orders_api_shipping_tool_all_orders_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Filter"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"shipment_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipment Status"}},{"name":"payment_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Status"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shipping-tool/shipments":{"get":{"summary":"List Shipments","operationId":"list_shipments_api_shipping_tool_shipments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"carrier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"release_state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Release State"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Shipment","operationId":"create_shipment_api_shipping_tool_shipments_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shipping-tool/shipments/{shipment_id}":{"get":{"summary":"Get Shipment","operationId":"get_shipment_api_shipping_tool_shipments__shipment_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"shipment_id","in":"path","required":true,"schema":{"type":"string","title":"Shipment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shipping-tool/shipments/{shipment_id}/evaluate-release":{"post":{"summary":"Evaluate Release","description":"Re-compute the hold/release state for a shipment. Returns the resulting state\n+ reasons. Useful after a payment succeeds, customs are filled, or duties paid.","operationId":"evaluate_release_api_shipping_tool_shipments__shipment_id__evaluate_release_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"shipment_id","in":"path","required":true,"schema":{"type":"string","title":"Shipment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shipping-tool/release-events":{"post":{"summary":"Add Release Event","operationId":"add_release_event_api_shipping_tool_release_events_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseEventIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Release Events","operationId":"list_release_events_api_shipping_tool_release_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"shipment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipment Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shipping-tool/carrier-events":{"post":{"summary":"Add Carrier Event","operationId":"add_carrier_event_api_shipping_tool_carrier_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierEventIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/shipping-tool/surcharges":{"post":{"summary":"Add Surcharge","operationId":"add_surcharge_api_shipping_tool_surcharges_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SurchargeEventIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Surcharges","operationId":"list_surcharges_api_shipping_tool_surcharges_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"shipment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipment Id"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shipping-tool/customs":{"post":{"summary":"Create Customs Record","operationId":"create_customs_record_api_shipping_tool_customs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomsRecordIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/shipping-tool/constants":{"get":{"summary":"Get Constants","operationId":"get_constants_api_shipping_tool_constants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/shipping-tool/backfill-shipments":{"post":{"summary":"Backfill Shipments","description":"Idempotent: for each order without a corresponding shipment row, create one.","operationId":"backfill_shipments_api_shipping_tool_backfill_shipments_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/shipping-tool/summary":{"get":{"summary":"Shipping Tool Summary","operationId":"shipping_tool_summary_api_shipping_tool_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/carrier-contracts/schemas":{"get":{"summary":"Get Credential Schemas","description":"Return the per-carrier required/optional fields schema. Used by frontend\nto render the right form per carrier.","operationId":"get_credential_schemas_api_carrier_contracts_schemas_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/carrier-contracts":{"get":{"summary":"List Contracts","operationId":"list_contracts_api_carrier_contracts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Or Update Contract","operationId":"create_or_update_contract_api_carrier_contracts_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierContractIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/carrier-contracts/compare":{"get":{"summary":"Compare Rates","description":"Side-by-side compare: IPAY tariff vs merchant's own contract cost.\n\nUses existing `carrier_tariffs` collection (IPAY-negotiated rates) with\nschema: carrier_code, service, origin, weight_band_kg, rate_eur, market, zone.\nCross-references merchant_carrier_contracts.cost_per_shipment_eur.","operationId":"compare_rates_api_carrier_contracts_compare_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"weight_kg","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight Kg"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/carrier-contracts/{contract_id}":{"get":{"summary":"Get Contract","operationId":"get_contract_api_carrier_contracts__contract_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Patch Contract","operationId":"patch_contract_api_carrier_contracts__contract_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierContractPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Contract","operationId":"delete_contract_api_carrier_contracts__contract_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/carrier-contracts/{contract_id}/test-label":{"post":{"summary":"Test Label","description":"Mock test-label endpoint. In a real integration this would call the carrier's\ntest/sandbox API. For now: validates credentials are non-empty and flips\nverification_status → verified.","operationId":"test_label_api_carrier_contracts__contract_id__test_label_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/carrier-contracts/{contract_id}/cost-table-csv":{"post":{"summary":"Import Cost Table Csv","description":"Optional CSV upload to bulk-import rate rows.\n\nExpected CSV columns (case-insensitive header):\n  country_code,weight_min_kg,weight_max_kg,service_code,cost_eur,zone","operationId":"import_cost_table_csv_api_carrier_contracts__contract_id__cost_table_csv_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_cost_table_csv_api_carrier_contracts__contract_id__cost_table_csv_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/carrier-contracts/seed-demo":{"post":{"summary":"Seed Demo Contracts","description":"Seed demo data — for each connected merchant create example contracts:\nDHL on IPAY rates · UPS on own contract (verified) · PostNL on IPAY rates.\nIdempotent.","operationId":"seed_demo_contracts_api_carrier_contracts_seed_demo_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/carrier-performance/summary":{"get":{"summary":"Carrier Performance Summary","description":"Aggregate KPIs grouped by carrier. Returns a list of rows (one per carrier)\nplus a top-line summary across all matching shipments.","operationId":"carrier_performance_summary_api_carrier_performance_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"carrier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"}},{"name":"delivery_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Type"}},{"name":"payment_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Filter"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/carrier-performance/filter-options":{"get":{"summary":"Get Filter Options","description":"Return distinct values for each filter dimension. Lets the frontend\nauto-populate dropdowns.","operationId":"get_filter_options_api_carrier_performance_filter_options_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customs/hs-codes":{"get":{"summary":"List Hs Codes","operationId":"list_hs_codes_api_customs_hs_codes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customs/cases":{"get":{"summary":"List Customs Cases","description":"Returns shipments going to customs_required countries (UK/NO/CH/CN/...)\nenriched with their customs_records status.","operationId":"list_customs_cases_api_customs_cases_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customs_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customs Status"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customs/cases/{shipment_id}/upsert":{"post":{"summary":"Upsert Customs Case","operationId":"upsert_customs_case_api_customs_cases__shipment_id__upsert_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"shipment_id","in":"path","required":true,"schema":{"type":"string","title":"Shipment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomsCaseUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customs/cases/{shipment_id}/approve-value":{"post":{"summary":"Approve Value","operationId":"approve_value_api_customs_cases__shipment_id__approve_value_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"shipment_id","in":"path","required":true,"schema":{"type":"string","title":"Shipment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomsApproveValue"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customs/cases/{shipment_id}/duty-payment":{"post":{"summary":"Create Duty Payment","description":"Create a duty_advance PaymentIntent linked to this shipment.\n\nIPAY's positioning: customs + payment + release in ONE workflow. The intent\nis stored in `duty_payment_intents` collection. When marked paid, the\nshipment's release_state flips from hold_duties_unpaid → no_hold/released.","operationId":"create_duty_payment_api_customs_cases__shipment_id__duty_payment_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"shipment_id","in":"path","required":true,"schema":{"type":"string","title":"Shipment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DutyPaymentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customs/cases/{shipment_id}/mark-duties-paid":{"post":{"summary":"Mark Duties Paid","description":"Operator-only: mock the gateway callback confirming duty payment.","operationId":"mark_duties_paid_api_customs_cases__shipment_id__mark_duties_paid_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"shipment_id","in":"path","required":true,"schema":{"type":"string","title":"Shipment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customs/cases/{shipment_id}/clear":{"post":{"summary":"Clear Customs","description":"Final step: mark as cleared. Carrier can hand off the package.","operationId":"clear_customs_api_customs_cases__shipment_id__clear_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"shipment_id","in":"path","required":true,"schema":{"type":"string","title":"Shipment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customs/cases/{shipment_id}/commercial-invoice.pdf":{"get":{"summary":"Commercial Invoice Pdf","operationId":"commercial_invoice_pdf_api_customs_cases__shipment_id__commercial_invoice_pdf_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"shipment_id","in":"path","required":true,"schema":{"type":"string","title":"Shipment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customs/summary":{"get":{"summary":"Customs Summary","operationId":"customs_summary_api_customs_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customs/consumer/customs-cases":{"get":{"summary":"Consumer Customs List","description":"List customs cases that are awaiting payment by the authenticated consumer.\nAuth via consumer JWT (email in token).","operationId":"consumer_customs_list_api_customs_consumer_customs_cases_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/customs/consumer/customs-cases/{shipment_id}":{"get":{"summary":"Consumer Customs Detail","operationId":"consumer_customs_detail_api_customs_consumer_customs_cases__shipment_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"shipment_id","in":"path","required":true,"schema":{"type":"string","title":"Shipment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customs/consumer/customs-cases/{shipment_id}/pay":{"post":{"summary":"Consumer Pay Customs","description":"Consumer triggers Stripe Checkout for their customs charge.","operationId":"consumer_pay_customs_api_customs_consumer_customs_cases__shipment_id__pay_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"shipment_id","in":"path","required":true,"schema":{"type":"string","title":"Shipment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/decision-analytics/insights":{"get":{"summary":"Get Insights","description":"Return a list of actionable insights / recommendations.\n\nEach insight has:\n  - id\n  - title\n  - description\n  - impact_label (e.g. \"save €0.45/order on FR\")\n  - priority (high/medium/low)\n  - data (numbers backing the recommendation)","operationId":"get_insights_api_decision_analytics_insights_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Days"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/decision-analytics/profitability-matrix":{"get":{"summary":"Profitability Matrix","description":"Country × delivery_type margin matrix for heatmap visualisation.","operationId":"profitability_matrix_api_decision_analytics_profitability_matrix_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Days"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/wallet":{"get":{"summary":"Get Wallet","operationId":"get_wallet_api_billing_wallet_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/wallet/topup":{"post":{"summary":"Topup Wallet","description":"Top up the shipping credit wallet.\n\nNOTE: stripe_card and sepa are MOCKED (we don't actually charge Stripe here).\nReal implementation would create a Stripe PaymentIntent and credit the wallet\nvia webhook. For now this is a direct credit (operator-only for safety).","operationId":"topup_wallet_api_billing_wallet_topup_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/wallet/config":{"patch":{"summary":"Patch Wallet Config","operationId":"patch_wallet_config_api_billing_wallet_config_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletConfigPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/wallet/ledger":{"get":{"summary":"List Ledger","operationId":"list_ledger_api_billing_wallet_ledger_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/surcharges/recover":{"post":{"summary":"Recover Surcharge","description":"Recover a surcharge from the merchant — via wallet deduct, next settlement,\nor absorb (write off).","operationId":"recover_surcharge_api_billing_surcharges_recover_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SurchargeRecoverBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/settlements/export.csv":{"get":{"summary":"Export Settlements Csv","operationId":"export_settlements_csv_api_billing_settlements_export_csv_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Start"}},{"name":"period_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period End"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/reconciliation/runs":{"post":{"summary":"Trigger Reconciliation","operationId":"trigger_reconciliation_api_billing_reconciliation_runs_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Reconciliation Runs","operationId":"list_reconciliation_runs_api_billing_reconciliation_runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/reconciliation/runs/{run_id}":{"get":{"summary":"Get Reconciliation Run","operationId":"get_reconciliation_run_api_billing_reconciliation_runs__run_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/carrier-invoices":{"post":{"summary":"Upload Carrier Invoice","operationId":"upload_carrier_invoice_api_billing_carrier_invoices_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierInvoiceIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/disputes":{"post":{"summary":"Create Dispute","operationId":"create_dispute_api_billing_disputes_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Disputes","operationId":"list_disputes_api_billing_disputes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/disputes/{dispute_id}/resolve":{"post":{"summary":"Resolve Dispute","operationId":"resolve_dispute_api_billing_disputes__dispute_id__resolve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"dispute_id","in":"path","required":true,"schema":{"type":"string","title":"Dispute Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeResolveBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/savings-calculator":{"post":{"summary":"Savings Calculator","description":"Estimate monthly potential savings for a (prospective) merchant.\n\nInputs: monthly_volume, avg_weight_kg, countries (ISO-2), delivery_mix (home/pickup/locker shares).\nLogic:\n  1. For each country, find IPAY tariff for closest weight band  per carrier\n  2. Assume merchant currently pays \"market rate\" = avg own-contract cost across IPAY contracts (default fallback: IPAY tariff × 1.20)\n  3. Compute (market_rate - ipay_cost) × monthly_volume × country_weight","operationId":"savings_calculator_api_billing_savings_calculator_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsCalculatorRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/performance-emails/generate":{"post":{"summary":"Generate Monthly Performance Report","description":"Generate a monthly performance report for a merchant. Stores the result\nin `monthly_performance_reports` collection and returns it.\n\nThe report distils Decision Analytics insights into a top-3 list ready\nto email.","operationId":"generate_monthly_performance_report_api_billing_performance_emails_generate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/performance-emails/{report_id}/send":{"post":{"summary":"Send Performance Email","description":"Send the generated report by email. Uses email_service.send_email which\nfalls back to MOCK if RESEND_API_KEY is not set. Either way, the email is\nlogged for audit.","operationId":"send_performance_email_api_billing_performance_emails__report_id__send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/performance-emails":{"get":{"summary":"List Performance Emails","operationId":"list_performance_emails_api_billing_performance_emails_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/summary":{"get":{"summary":"Billing Summary","operationId":"billing_summary_api_billing_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/psp/2c2p/credentials":{"get":{"tags":["psp-2c2p"],"summary":"List Credentials","operationId":"list_credentials_api_psp_2c2p_credentials_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/psp/2c2p/channels/{country_code}":{"get":{"tags":["psp-2c2p"],"summary":"List Payment Channels","description":"List 2C2P payment channels available per Asian country.\nReturns a curated list — actual channel availability depends on the\nmerchant's 2C2P account configuration.","operationId":"list_payment_channels_api_psp_2c2p_channels__country_code__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"country_code","in":"path","required":true,"schema":{"type":"string","title":"Country Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/psp/2c2p/create-payment":{"post":{"tags":["psp-2c2p"],"summary":"Create Payment","operationId":"create_payment_api_psp_2c2p_create_payment_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/psp/2c2p/inquiry":{"post":{"tags":["psp-2c2p"],"summary":"Payment Inquiry","operationId":"payment_inquiry_api_psp_2c2p_inquiry_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InquiryIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/psp/2c2p/payments":{"get":{"tags":["psp-2c2p"],"summary":"List Payments","operationId":"list_payments_api_psp_2c2p_payments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"country_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/2c2p":{"post":{"tags":["psp-2c2p-webhook"],"summary":"Webhook Receiver","description":"2C2P calls this URL after a hosted-payment-page interaction.\n\nExpected body: {\"payload\": \"<JWS_HS256_token>\"}.\nWe decode the header to discover merchantID, look up the SHA key,\nthen verify-decode the JWS. On success we mark the corresponding\npayments_2c2p row as PAID / FAILED / CANCELLED based on respCode.","operationId":"webhook_receiver_api_webhooks_2c2p_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/labels/sendcloud-status":{"get":{"summary":"Sendcloud Status","description":"v0.88 — Diagnoses why live labels fall back to mock.\n\nReturns the Sendcloud account's actual capabilities + the specific missing\nsetup steps. Used by IPAYLabels.jsx to show a clear actionable banner\nrather than just 'mock_fallback' for unclear reasons.","operationId":"sendcloud_status_api_labels_sendcloud_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/labels/create":{"post":{"summary":"Create Label","description":"Create a composite IPAY label. MOCK mode is auto-selected when\nSENDCLOUD_PUBLIC_KEY / SENDCLOUD_SECRET_KEY env vars are not set.","operationId":"create_label_api_labels_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLabelIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/labels/{label_id}/pdf":{"get":{"summary":"Get Label Pdf","operationId":"get_label_pdf_api_labels__label_id__pdf_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"label_id","in":"path","required":true,"schema":{"type":"string","title":"Label Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/labels":{"get":{"summary":"List Labels","operationId":"list_labels_api_labels_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"carrier_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/labels/carriers":{"get":{"summary":"List Carriers","description":"Return the carrier registry for UI dropdowns.","operationId":"list_carriers_api_labels_carriers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/labels/seed-demo":{"post":{"summary":"Seed Demo Labels","description":"Operator-only: generate one IPAY example label per carrier in the\nregistry. Idempotent — wipes prior demo labels first.","operationId":"seed_demo_labels_api_labels_seed_demo_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/partners/dashboard":{"get":{"tags":["partner-dashboard"],"summary":"Partner Dashboard","description":"One-shot dashboard aggregate. Returns 5 sub-views.","operationId":"partner_dashboard_api_partners_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/partners/{partner_id}/readiness":{"get":{"tags":["partner-readiness"],"summary":"Partner Readiness","description":"Returns 8-dimension pilot readiness checklist + overall score.","operationId":"partner_readiness_api_partners__partner_id__readiness_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/readiness/summary":{"get":{"tags":["partner-readiness"],"summary":"All Partners Readiness","description":"Bulk view: list all partners with their overall readiness.\n\nParallelised via asyncio.gather to avoid N+1 latency.","operationId":"all_partners_readiness_api_partners_readiness_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/partners/contracts/templates":{"get":{"tags":["partner-contracts"],"summary":"List Templates","operationId":"list_templates_api_partners_contracts_templates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/contracts":{"get":{"tags":["partner-contracts"],"summary":"List Partner Contracts","operationId":"list_partner_contracts_api_partners__partner_id__contracts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/contracts/generate":{"post":{"tags":["partner-contracts"],"summary":"Generate Contract","operationId":"generate_contract_api_partners__partner_id__contracts_generate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateContractIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/contracts/{contract_id}/pdf":{"get":{"tags":["partner-contracts"],"summary":"Download Contract Pdf","operationId":"download_contract_pdf_api_partners__partner_id__contracts__contract_id__pdf_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}},{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/contracts/{contract_id}/send":{"post":{"tags":["partner-contracts"],"summary":"Send To Partner","description":"Mark contract as sent + activate magic link expiry (14 days) + email main contact.","operationId":"send_to_partner_api_partners__partner_id__contracts__contract_id__send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}},{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/contracts/{contract_id}/ipay-sign":{"post":{"tags":["partner-contracts"],"summary":"Ipay Sign","operationId":"ipay_sign_api_partners__partner_id__contracts__contract_id__ipay_sign_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}},{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpaySignIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/contracts/{contract_id}/cancel":{"post":{"tags":["partner-contracts"],"summary":"Cancel Contract","operationId":"cancel_contract_api_partners__partner_id__contracts__contract_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}},{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/p-sign/{token}":{"get":{"tags":["partner-contracts-public"],"summary":"Public View Contract","operationId":"public_view_contract_api_p_sign__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/p-sign/{token}/pdf":{"get":{"tags":["partner-contracts-public"],"summary":"Public Download Pdf","operationId":"public_download_pdf_api_p_sign__token__pdf_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/p-sign/{token}/sign":{"post":{"tags":["partner-contracts-public"],"summary":"Public Sign","operationId":"public_sign_api_p_sign__token__sign_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerSignIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/scoring":{"get":{"tags":["partner-scoring"],"summary":"Get Partner Scoring","description":"Compute scoring on demand for one partner (no persistence).","operationId":"get_partner_scoring_api_partners__partner_id__scoring_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/scoring/accept":{"post":{"tags":["partner-scoring"],"summary":"Accept Partner Score","description":"Compute fresh score + apply suggested_priority to partner.","operationId":"accept_partner_score_api_partners__partner_id__scoring_accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptScoreIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/scoring/preview":{"get":{"tags":["partner-scoring"],"summary":"Preview All Scoring","description":"Preview computed scores for ALL partners. Useful before bulk accept.","operationId":"preview_all_scoring_api_partners_scoring_preview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/partners/scoring/run-now":{"post":{"tags":["partner-scoring"],"summary":"Run Scoring Now","description":"Manual trigger of nightly scoring. Persists breakdown + sets suggested_priority.","operationId":"run_scoring_now_api_partners_scoring_run_now_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/partners/hubspot/status":{"get":{"tags":["partner-hubspot"],"summary":"Hubspot Partner Status","description":"Overall HubSpot connection status for Partners domain.","operationId":"hubspot_partner_status_api_partners_hubspot_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/partners/hubspot/pull-companies":{"post":{"tags":["partner-hubspot"],"summary":"Pull And Match Companies","description":"Fetch HubSpot Companies + auto-match local partners by website domain.\n\nReturns counts of matched + unmatched + already_linked.","operationId":"pull_and_match_companies_api_partners_hubspot_pull_companies_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/hubspot":{"get":{"tags":["partner-hubspot"],"summary":"Get Partner Hubspot Status","description":"Return link status + field-level diff for a single partner.","operationId":"get_partner_hubspot_status_api_partners__partner_id__hubspot_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/hubspot/link":{"post":{"tags":["partner-hubspot"],"summary":"Link Partner To Hubspot","description":"Manually link a partner to a HubSpot company id.","operationId":"link_partner_to_hubspot_api_partners__partner_id__hubspot_link_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["partner-hubspot"],"summary":"Unlink Partner From Hubspot","operationId":"unlink_partner_from_hubspot_api_partners__partner_id__hubspot_link_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/hubspot/push":{"post":{"tags":["partner-hubspot"],"summary":"Push Partner To Hubspot","description":"Push IPAY partner fields → HubSpot company properties.","operationId":"push_partner_to_hubspot_api_partners__partner_id__hubspot_push_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/hubspot/pull":{"post":{"tags":["partner-hubspot"],"summary":"Pull Partner From Hubspot","description":"Pull HubSpot company fields → IPAY partner.","operationId":"pull_partner_from_hubspot_api_partners__partner_id__hubspot_pull_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/hubspot/sync-all":{"post":{"tags":["partner-hubspot"],"summary":"Sync All Partners","description":"Bulk push IPAY → HubSpot for all linked partners. Returns per-partner status.","operationId":"sync_all_partners_api_partners_hubspot_sync_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/partners":{"get":{"tags":["partners"],"summary":"List Partners","description":"List partners with optional filters. Operator-only.","operationId":"list_partners_api_partners_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"priority","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["partners"],"summary":"Create Partner","operationId":"create_partner_api_partners_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/taxonomy":{"get":{"tags":["partners"],"summary":"Get Partner Taxonomy","description":"Return the taxonomy (types + tags + use cases + statuses) for UI dropdowns.","operationId":"get_partner_taxonomy_api_partners_taxonomy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/partners/{partner_id}":{"get":{"tags":["partners"],"summary":"Get Partner","operationId":"get_partner_api_partners__partner_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["partners"],"summary":"Patch Partner","operationId":"patch_partner_api_partners__partner_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["partners"],"summary":"Delete Partner","operationId":"delete_partner_api_partners__partner_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/use-cases":{"post":{"tags":["partners"],"summary":"Upsert Use Case","operationId":"upsert_use_case_api_partners__partner_id__use_cases_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UseCaseUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/commercial":{"get":{"tags":["partners-extended"],"summary":"Get Commercial","operationId":"get_commercial_api_partners__partner_id__commercial_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["partners-extended"],"summary":"Patch Commercial","operationId":"patch_commercial_api_partners__partner_id__commercial_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommercialUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/compliance":{"get":{"tags":["partners-extended"],"summary":"Get Compliance","operationId":"get_compliance_api_partners__partner_id__compliance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["partners-extended"],"summary":"Upsert Compliance","operationId":"upsert_compliance_api_partners__partner_id__compliance_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceItemUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/merchants":{"get":{"tags":["partners-extended"],"summary":"Get Linked Merchants","operationId":"get_linked_merchants_api_partners__partner_id__merchants_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/financial":{"get":{"tags":["partners-extended"],"summary":"Get Financial","description":"Summarise financial flow per partner over the last 90 days.","operationId":"get_financial_api_partners__partner_id__financial_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/{partner_id}/activity":{"get":{"tags":["partners-extended"],"summary":"Get Activity","description":"Combined timeline of partner activity: profile updates · onboarding steps · AI actions · commercial changes.","operationId":"get_activity_api_partners__partner_id__activity_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/finance/batches":{"get":{"summary":"List Batches","operationId":"list_batches_api_finance_batches_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":60,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/finance/batches/generate":{"post":{"summary":"Generate Batch Endpoint","operationId":"generate_batch_endpoint_api_finance_batches_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateBatchIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/finance/batches/{batch_id}/regenerate":{"post":{"summary":"Regenerate Batch","description":"Force re-generate a non-locked batch (e.g. after fixing missing data).","operationId":"regenerate_batch_api_finance_batches__batch_id__regenerate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/finance/batches/{batch_id}":{"get":{"summary":"Get Batch","operationId":"get_batch_api_finance_batches__batch_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/finance/batches/{batch_id}/lines":{"get":{"summary":"List Batch Lines","operationId":"list_batch_lines_api_finance_batches__batch_id__lines_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"line_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/finance/batches/{batch_id}/journal-preview":{"get":{"summary":"Journal Preview","description":"Boekhoudkundige journaalpost-preview per Bryan's spec (v0.74.1).\n\nEach accounting source line generates TWO journal entry lines:\n  - one debit entry on `debit_account`\n  - one credit entry on `credit_account`\nOptionally a third VAT line when `vat_amount > 0` (not used in daily accrual —\nonly on actual merchant/supplier invoice).\n\nOutput schema matches `Journal Entry Preview` table requested by finance:\n[no, account_code, account_name, debit, credit, vat_code, source, description]","operationId":"journal_preview_api_finance_batches__batch_id__journal_preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/finance/batches/{batch_id}/exceptions":{"get":{"summary":"List Batch Exceptions","operationId":"list_batch_exceptions_api_finance_batches__batch_id__exceptions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/finance/batches/{batch_id}/approve":{"post":{"summary":"Approve Batch","operationId":"approve_batch_api_finance_batches__batch_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveBatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/finance/batches/{batch_id}/reject":{"post":{"summary":"Reject Batch","operationId":"reject_batch_api_finance_batches__batch_id__reject_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectBatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/finance/batches/{batch_id}/post-to-exact":{"post":{"summary":"Post To Exact","operationId":"post_to_exact_api_finance_batches__batch_id__post_to_exact_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostExactIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/finance/accrual-reconciliation":{"get":{"summary":"Accrual Reconciliation","operationId":"accrual_reconciliation_api_finance_accrual_reconciliation_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/finance/account-mapping":{"get":{"summary":"Account Mapping","operationId":"account_mapping_api_finance_account_mapping_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/finance/jobs/status":{"get":{"summary":"Jobs Status","operationId":"jobs_status_api_finance_jobs_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/seed-psp-strategy":{"post":{"summary":"Seed Psp Strategy","description":"Idempotent — seeds all 4 layers of partners per Bryan's PSP Strategy memo.","operationId":"seed_psp_strategy_api_admin_seed_psp_strategy_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/payment/strategy-overview":{"get":{"summary":"Strategy Overview","description":"Layer-by-layer aggregation per partner_type + koppelstrategie + country coverage.","operationId":"strategy_overview_api_payment_strategy_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/payment/routing-rules":{"get":{"summary":"List Routing Rules","operationId":"list_routing_rules_api_payment_routing_rules_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"payment_method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"}},{"name":"primary_partner_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Partner Id"}},{"name":"enabled","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Routing Rule","operationId":"create_routing_rule_api_payment_routing_rules_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingRuleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment/routing-rules/{rule_id}":{"patch":{"summary":"Update Routing Rule","operationId":"update_routing_rule_api_payment_routing_rules__rule_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingRuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Routing Rule","operationId":"delete_routing_rule_api_payment_routing_rules__rule_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment/incidents":{"get":{"summary":"List Incidents","operationId":"list_incidents_api_payment_incidents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"partner_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Incident","operationId":"create_incident_api_payment_incidents_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment/incidents/{incident_id}":{"patch":{"summary":"Update Incident","operationId":"update_incident_api_payment_incidents__incident_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string","title":"Incident Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment/connector-status":{"get":{"summary":"List Connector Status","operationId":"list_connector_status_api_payment_connector_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment/connector-status/{partner_id}/override":{"post":{"summary":"Manual Override Status","operationId":"manual_override_status_api_payment_connector_status__partner_id__override_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment/country-health":{"get":{"summary":"Country Health Scores","description":"Strategy Health Score per country — 0-100 dashboard widget.","operationId":"country_health_scores_api_payment_country_health_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":5,"default":40,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment/dashboard-kpis":{"get":{"summary":"Control Room Kpis","operationId":"control_room_kpis_api_payment_dashboard_kpis_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/seed-routing-rules":{"post":{"summary":"Seed Routing Rules","description":"Seed example routing rules per Bryan's memo examples (NL · VN · TH · ID · MY · SG · PH).","operationId":"seed_routing_rules_api_admin_seed_routing_rules_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/payment/layer-doc":{"get":{"summary":"Get Layer Doc","description":"v0.84: Educatieve banner voor Control Room — uitleg 4-lagen model conform Bryan's docx.","operationId":"get_layer_doc_api_payment_layer_doc_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/payment/merchant-view":{"get":{"summary":"Merchant View","description":"Per merchant: payment methods used + routing + volume + failure-stats + refunds + cash%.\n\nNOTE v0.84: gebruikt simulated/aggregated data voor failure-rates en settlement\nomdat productie-volume in dev laag is. Productie zal uit payment_sessions + return_cases.\nBryan akkoord met mock-data tot productie genoeg volume heeft.","operationId":"merchant_view_api_payment_merchant_view_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":5,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment/partner-view":{"get":{"summary":"Partner View","description":"Per PSP/wallet partner: countries live · merchants attached · volume · uptime · incidents · SLA · settlement+reconciliation quality.","operationId":"partner_view_api_payment_partner_view_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/payment/method-view":{"get":{"summary":"Method View","description":"Cross-country matrix per payment method: in welke landen actief, via welke layer/partner.\n\nLayout: rows = payment methods, columns = countries (sparse — alleen waar method actief is).\nGeeft Bryan antwoord op vraag #1 (verdeling payment methode per land).","operationId":"method_view_api_payment_method_view_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/payment/merchant-overrides":{"get":{"summary":"List Merchant Overrides","operationId":"list_merchant_overrides_api_payment_merchant_overrides_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Merchant Override","operationId":"create_merchant_override_api_payment_merchant_overrides_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantOverrideIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment/merchant-overrides/{override_id}":{"patch":{"summary":"Update Merchant Override","operationId":"update_merchant_override_api_payment_merchant_overrides__override_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"override_id","in":"path","required":true,"schema":{"type":"string","title":"Override Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantOverrideUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Merchant Override","operationId":"delete_merchant_override_api_payment_merchant_overrides__override_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"override_id","in":"path","required":true,"schema":{"type":"string","title":"Override Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment/effective-routing":{"get":{"summary":"Effective Routing","description":"Returns the routing that will actually be used for a (merchant, country, method).","operationId":"effective_routing_api_payment_effective_routing_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Merchant Id"}},{"name":"country","in":"query","required":false,"schema":{"type":"string","default":"","title":"Country"}},{"name":"payment_method","in":"query","required":false,"schema":{"type":"string","default":"","title":"Payment Method"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment/routing-rules/{rule_id}/split-config":{"post":{"summary":"Set Split Config","description":"Configures split-payment behaviour for a routing rule.\n\nWhen a payment runs via this rule:\n- IPAY-portion (incl VAT if set) auto-splits to ipay_destination_account_id\n- Remainder goes to merchant's PSP account\n- Optional 3rd-leg: carrier_amount_eur to carrier_destination_account_id","operationId":"set_split_config_api_payment_routing_rules__rule_id__split_config_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitConfigIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment/otp-strategies":{"get":{"summary":"List Otp Strategies","operationId":"list_otp_strategies_api_payment_otp_strategies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Set Otp Strategy","operationId":"set_otp_strategy_api_payment_otp_strategies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpStrategyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/payment/otp-strategies/seed":{"post":{"summary":"Seed Otp Strategies","description":"Seed sensible defaults per Bryan's spec.","operationId":"seed_otp_strategies_api_payment_otp_strategies_seed_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/strategy-gap-report/preview":{"post":{"summary":"Preview Strategy Gap Report","operationId":"preview_strategy_gap_report_api_admin_strategy_gap_report_preview_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/strategy-gap-report/send-now":{"post":{"summary":"Send Strategy Gap Now","operationId":"send_strategy_gap_now_api_admin_strategy_gap_report_send_now_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/payment/audit-trail":{"get":{"summary":"Audit Trail","description":"Chronological audit log — who did what, when, to which record, with diff.\n\nFilterable by collection / actor / action / time window. Default last 14 days,\n200 rows. Used by the Control Room \"Audit Trail\" tab for compliance review and\nrollback investigations.","operationId":"audit_trail_api_payment_audit_trail_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection"}},{"name":"actor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":14,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/data-integrity/snapshot-now":{"post":{"summary":"Snapshot Now","description":"On-demand reconciliation. Per Bryan's enhancement-suggestion v0.75.6 'Reconcile Now'.","operationId":"snapshot_now_api_audit_data_integrity_snapshot_now_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/audit/data-integrity/snapshots":{"get":{"summary":"List Snapshots","operationId":"list_snapshots_api_audit_data_integrity_snapshots_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/data-integrity/reconciliation":{"get":{"summary":"Reconciliation For Day","operationId":"reconciliation_for_day_api_audit_data_integrity_reconciliation_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date","in":"query","required":true,"schema":{"type":"string","title":"Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/data-integrity/master-collections":{"get":{"summary":"List Master Collections","operationId":"list_master_collections_api_audit_data_integrity_master_collections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/audit/accountant-overview":{"get":{"summary":"Accountant Overview","description":"Consolidated overzicht van ALLE controlemaatregelen in IPAY.\n\nPer controle: wat / waarom / hoe / waar / status / mapping SOC2 + ISO27001 + GDPR\nPLUS live: last_check_at · last_outcome (green/amber/red) · last_ran_at · details (deep-drill payload).","operationId":"accountant_overview_api_audit_accountant_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/audit/run-check/{control_id}":{"post":{"summary":"Run Single Check","operationId":"run_single_check_api_audit_run_check__control_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"control_id","in":"path","required":true,"schema":{"type":"string","title":"Control Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/run-all-checks":{"post":{"summary":"Run All Checks","operationId":"run_all_checks_api_audit_run_all_checks_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/audit/check-history/{control_id}":{"get":{"summary":"Check History","operationId":"check_history_api_audit_check_history__control_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"control_id","in":"path","required":true,"schema":{"type":"string","title":"Control Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":30,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/approval-status":{"get":{"summary":"Get Approval Status","description":"Get approval status for a given date (default: today).","operationId":"get_approval_status_api_audit_approval_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/approve-daily-controls":{"post":{"summary":"Approve Daily","description":"CFO/controller signs off on the daily controls run.\n\nRequired: initials (e.g. \"HV\" for Henry). Optional: notes.\nStores append-only — never overwrite, but new approve creates a new record\nif previous one was for a different date.","operationId":"approve_daily_api_audit_approve_daily_controls_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/audit/approval-history":{"get":{"summary":"Approval History","description":"List recent approvals (audit trail — append-only, never pruned).","operationId":"approval_history_api_audit_approval_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":60,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/prune-now":{"post":{"summary":"Prune Now","description":"Manually trigger the retention prune (admin only).","operationId":"prune_now_api_audit_prune_now_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/audit/send-digest-now":{"post":{"summary":"Send Digest Now","description":"Manually trigger the daily digest (admin only) — for testing.","operationId":"send_digest_now_api_audit_send_digest_now_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/audit/digest-history":{"get":{"summary":"Digest History","description":"List recent daily digests sent.","operationId":"digest_history_api_audit_digest_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":30,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/wallet-reconciliation":{"get":{"summary":"Wallet Reconciliation","description":"Beginsaldo (D-1) + mutaties (D-1 → D) = eindsaldo (D) per consumer-wallet en globaal.\n\nVergelijkbaar met data-integrity reconciliation maar specifiek voor de wallet-ledger.\nDetecteert: mismatched balance (balance != sum of ledger), missing mutations,\nonverklaarde balance changes.","operationId":"wallet_reconciliation_api_audit_wallet_reconciliation_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO date YYYY-MM-DD (default today)","title":"Date"},"description":"ISO date YYYY-MM-DD (default today)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/critical-fields-diff/{collection_name}":{"get":{"summary":"Critical Fields Diff","description":"For a master collection, list records that changed in critical fields between snapshots.\n\nHelpt bij de scenarios: 'iemand wijzigde de bankrekening van merchant X' →\nwelke merchant_id had voor/na een andere bank_account_iban?","operationId":"critical_fields_diff_api_audit_critical_fields_diff__collection_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/carrier-control/booking-matrix":{"get":{"summary":"Booking Matrix","operationId":"booking_matrix_api_carrier_control_booking_matrix_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/carrier-control/sla-buckets":{"get":{"summary":"Sla Buckets","operationId":"sla_buckets_api_carrier_control_sla_buckets_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"carrier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/carrier-control/phase-thresholds":{"get":{"summary":"Get Phase Thresholds","operationId":"get_phase_thresholds_api_carrier_control_phase_thresholds_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Set Phase Thresholds","operationId":"set_phase_thresholds_api_carrier_control_phase_thresholds_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/carrier-control/confidence-score":{"get":{"summary":"Confidence Score","operationId":"confidence_score_api_carrier_control_confidence_score_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":7,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/carrier-control/lost-cod-revenue":{"get":{"summary":"Lost Cod Revenue","operationId":"lost_cod_revenue_api_carrier_control_lost_cod_revenue_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/carrier-control/api-health-split":{"get":{"summary":"Api Health Split","operationId":"api_health_split_api_carrier_control_api_health_split_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/carrier-control/locker-roi":{"get":{"summary":"Locker Roi","operationId":"locker_roi_api_carrier_control_locker_roi_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/carrier-control/settings":{"get":{"summary":"Get Control Settings","operationId":"get_control_settings_api_carrier_control_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Set Control Settings","operationId":"set_control_settings_api_carrier_control_settings_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/carrier-control/why-no-cod":{"get":{"summary":"Get Why No Cod","operationId":"get_why_no_cod_api_carrier_control_why_no_cod_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Upsert Why No Cod","operationId":"upsert_why_no_cod_api_carrier_control_why_no_cod_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/carrier-control/why-no-cod/{row_id}":{"delete":{"summary":"Delete Why No Cod","operationId":"delete_why_no_cod_api_carrier_control_why_no_cod__row_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"row_id","in":"path","required":true,"schema":{"type":"string","title":"Row Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/carrier-control/benefit-per-order":{"get":{"summary":"Benefit Per Order","operationId":"benefit_per_order_api_carrier_control_benefit_per_order_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/carrier-control/reports-sla":{"get":{"summary":"Reports Sla","operationId":"reports_sla_api_carrier_control_reports_sla_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Upsert Reports Sla","operationId":"upsert_reports_sla_api_carrier_control_reports_sla_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/carrier-control/overview":{"get":{"summary":"Control Overview","operationId":"control_overview_api_carrier_control_overview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner-onboarding/case/{partner_id}":{"get":{"tags":["partner-onboarding"],"summary":"Get Or Create Case","description":"Fetch the partner's onboarding case; create it lazily from the\nappropriate template if it doesn't exist yet.","operationId":"get_or_create_case_api_partner_onboarding_case__partner_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner-onboarding/case/{partner_id}/step/{step_key}":{"patch":{"tags":["partner-onboarding"],"summary":"Update Step","operationId":"update_step_api_partner_onboarding_case__partner_id__step__step_key__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}},{"name":"step_key","in":"path","required":true,"schema":{"type":"string","title":"Step Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner-onboarding/cases":{"get":{"tags":["partner-onboarding"],"summary":"List Active Cases","description":"Operator-wide list of active onboarding cases for the Pipeline dashboard.","operationId":"list_active_cases_api_partner_onboarding_cases_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/partner-onboarding/case/{partner_id}/magic-link":{"post":{"tags":["partner-onboarding"],"summary":"Issue Magic Link","description":"Generate a partner-side magic URL — the partner can update their own\nonboarding steps via the public action center.","operationId":"issue_magic_link_api_partner_onboarding_case__partner_id__magic_link_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/p-onboard/{token}":{"get":{"tags":["partner-onboarding-public"],"summary":"Public View Case","operationId":"public_view_case_api_p_onboard__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/p-onboard/{token}/note":{"post":{"tags":["partner-onboarding-public"],"summary":"Public Add Note","description":"Partner can add a note to a step from their portal — does not change status,\nwhich still requires operator confirmation to avoid abuse.","operationId":"public_add_note_api_p_onboard__token__note_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicStepNote"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/status":{"get":{"summary":"Prestashop Setup Info","operationId":"prestashop_setup_info_api_integrations_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopify":{"get":{"summary":"Get Shopify Integration","operationId":"get_shopify_integration_api_integrations_shopify_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopify/setup-info":{"get":{"summary":"Shopify Setup Info","operationId":"shopify_setup_info_api_integrations_shopify_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopify/connect":{"post":{"summary":"Connect Shopify","operationId":"connect_shopify_api_integrations_shopify_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopifyConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopify/disconnect":{"post":{"summary":"Disconnect Shopify","operationId":"disconnect_shopify_api_integrations_shopify_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopify/sync":{"post":{"summary":"Sync Shopify","operationId":"sync_shopify_api_integrations_shopify_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopify/simulate":{"post":{"summary":"Simulate Shopify Order","description":"DEMO ONLY: process a fake Shopify order payload as if it came from a webhook.","operationId":"simulate_shopify_order_api_integrations_shopify_simulate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopify/webhook":{"post":{"summary":"Shopify Webhook","operationId":"shopify_webhook_api_integrations_shopify_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/integrations/prestashop":{"get":{"summary":"Get Prestashop Integration","operationId":"get_prestashop_integration_api_integrations_prestashop_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/prestashop/setup-info":{"get":{"summary":"Prestashop Setup Info","operationId":"prestashop_setup_info_api_integrations_prestashop_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/prestashop/connect":{"post":{"summary":"Connect Prestashop","operationId":"connect_prestashop_api_integrations_prestashop_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrestaShopConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/prestashop/disconnect":{"post":{"summary":"Disconnect Prestashop","operationId":"disconnect_prestashop_api_integrations_prestashop_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/prestashop/sync":{"post":{"summary":"Sync Prestashop","operationId":"sync_prestashop_api_integrations_prestashop_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/prestashop/simulate":{"post":{"summary":"Simulate Prestashop Order","description":"DEMO ONLY: process a fake PrestaShop order payload as if it came from a webhook.","operationId":"simulate_prestashop_order_api_integrations_prestashop_simulate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/prestashop/webhook":{"post":{"summary":"Prestashop Webhook","description":"Receive a 'new order' webhook from a PrestaShop module.\nRequired header: X-PrestaShop-Shop-Domain (the shop's host, must match shop_url).\nBody: JSON `{ \"order_id\": 12345 }` or the full order payload.","operationId":"prestashop_webhook_api_integrations_prestashop_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/integrations/woocommerce":{"get":{"summary":"Get Woocommerce Integration","operationId":"get_woocommerce_integration_api_integrations_woocommerce_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/woocommerce/setup-info":{"get":{"summary":"Woocommerce Setup Info","operationId":"woocommerce_setup_info_api_integrations_woocommerce_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/woocommerce/connect":{"post":{"summary":"Connect Woocommerce","operationId":"connect_woocommerce_api_integrations_woocommerce_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WooConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/woocommerce/disconnect":{"post":{"summary":"Disconnect Woocommerce","operationId":"disconnect_woocommerce_api_integrations_woocommerce_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/woocommerce/sync":{"post":{"summary":"Sync Woocommerce","operationId":"sync_woocommerce_api_integrations_woocommerce_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/woocommerce/simulate":{"post":{"summary":"Simulate Woocommerce","operationId":"simulate_woocommerce_api_integrations_woocommerce_simulate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/woocommerce/webhook":{"post":{"summary":"Woocommerce Webhook","operationId":"woocommerce_webhook_api_integrations_woocommerce_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/integrations/odoo":{"get":{"summary":"Get Odoo Integration","operationId":"get_odoo_integration_api_integrations_odoo_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/odoo/setup-info":{"get":{"summary":"Odoo Setup Info","operationId":"odoo_setup_info_api_integrations_odoo_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/odoo/connect":{"post":{"summary":"Connect Odoo","operationId":"connect_odoo_api_integrations_odoo_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OdooConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/odoo/disconnect":{"post":{"summary":"Disconnect Odoo","operationId":"disconnect_odoo_api_integrations_odoo_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/odoo/sync":{"post":{"summary":"Sync Odoo","operationId":"sync_odoo_api_integrations_odoo_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/odoo/simulate":{"post":{"summary":"Simulate Odoo","operationId":"simulate_odoo_api_integrations_odoo_simulate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/odoo/webhook":{"post":{"summary":"Odoo Webhook","operationId":"odoo_webhook_api_integrations_odoo_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/integrations/shopware":{"get":{"summary":"Get Shopware Integration","operationId":"get_shopware_integration_api_integrations_shopware_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopware/setup-info":{"get":{"summary":"Shopware Setup Info","operationId":"shopware_setup_info_api_integrations_shopware_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopware/connect":{"post":{"summary":"Connect Shopware","operationId":"connect_shopware_api_integrations_shopware_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopwareConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopware/disconnect":{"post":{"summary":"Disconnect Shopware","operationId":"disconnect_shopware_api_integrations_shopware_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopware/sync":{"post":{"summary":"Sync Shopware","operationId":"sync_shopware_api_integrations_shopware_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopware/simulate":{"post":{"summary":"Simulate Shopware","operationId":"simulate_shopware_api_integrations_shopware_simulate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopware/webhook":{"post":{"summary":"Shopware Webhook","operationId":"shopware_webhook_api_integrations_shopware_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/integrations/magento":{"get":{"summary":"Get Magento Integration","operationId":"get_magento_integration_api_integrations_magento_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/magento/setup-info":{"get":{"summary":"Magento Setup Info","operationId":"magento_setup_info_api_integrations_magento_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/magento/connect":{"post":{"summary":"Connect Magento","operationId":"connect_magento_api_integrations_magento_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagentoConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/magento/disconnect":{"post":{"summary":"Disconnect Magento","operationId":"disconnect_magento_api_integrations_magento_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/magento/sync":{"post":{"summary":"Sync Magento","operationId":"sync_magento_api_integrations_magento_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/magento/simulate":{"post":{"summary":"Simulate Magento","operationId":"simulate_magento_api_integrations_magento_simulate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/magento/webhook":{"post":{"summary":"Magento Webhook","operationId":"magento_webhook_api_integrations_magento_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/integrations/bigcommerce":{"get":{"summary":"Get Bigcommerce Integration","operationId":"get_bigcommerce_integration_api_integrations_bigcommerce_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/bigcommerce/setup-info":{"get":{"summary":"Bc Setup Info","operationId":"bc_setup_info_api_integrations_bigcommerce_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/bigcommerce/connect":{"post":{"summary":"Connect Bc","operationId":"connect_bc_api_integrations_bigcommerce_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BigCommerceConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/bigcommerce/disconnect":{"post":{"summary":"Disconnect Bc","operationId":"disconnect_bc_api_integrations_bigcommerce_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/bigcommerce/sync":{"post":{"summary":"Sync Bc","operationId":"sync_bc_api_integrations_bigcommerce_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/bigcommerce/simulate":{"post":{"summary":"Simulate Bc","operationId":"simulate_bc_api_integrations_bigcommerce_simulate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/bigcommerce/webhook":{"post":{"summary":"Bc Webhook","operationId":"bc_webhook_api_integrations_bigcommerce_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/integrations/lightspeed":{"get":{"summary":"Get Lightspeed Integration","operationId":"get_lightspeed_integration_api_integrations_lightspeed_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/lightspeed/setup-info":{"get":{"summary":"Ls Setup Info","operationId":"ls_setup_info_api_integrations_lightspeed_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/lightspeed/connect":{"post":{"summary":"Connect Ls","operationId":"connect_ls_api_integrations_lightspeed_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LightspeedConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/lightspeed/disconnect":{"post":{"summary":"Disconnect Ls","operationId":"disconnect_ls_api_integrations_lightspeed_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/lightspeed/sync":{"post":{"summary":"Sync Ls","operationId":"sync_ls_api_integrations_lightspeed_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/lightspeed/simulate":{"post":{"summary":"Simulate Ls","operationId":"simulate_ls_api_integrations_lightspeed_simulate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/lightspeed/webhook":{"post":{"summary":"Ls Webhook","operationId":"ls_webhook_api_integrations_lightspeed_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/integrations/bol":{"get":{"summary":"Get Bol Integration","operationId":"get_bol_integration_api_integrations_bol_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/bol/setup-info":{"get":{"summary":"Bol Setup Info","operationId":"bol_setup_info_api_integrations_bol_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/bol/connect":{"post":{"summary":"Connect Bol","operationId":"connect_bol_api_integrations_bol_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BolConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/bol/disconnect":{"post":{"summary":"Disconnect Bol","operationId":"disconnect_bol_api_integrations_bol_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/bol/sync":{"post":{"summary":"Sync Bol","operationId":"sync_bol_api_integrations_bol_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/bol/simulate":{"post":{"summary":"Simulate Bol","operationId":"simulate_bol_api_integrations_bol_simulate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/picqer":{"get":{"summary":"Get Picqer Integration","operationId":"get_picqer_integration_api_integrations_picqer_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/picqer/setup-info":{"get":{"summary":"Picqer Setup Info","operationId":"picqer_setup_info_api_integrations_picqer_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/picqer/connect":{"post":{"summary":"Connect Picqer","operationId":"connect_picqer_api_integrations_picqer_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PicqerConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/picqer/disconnect":{"post":{"summary":"Disconnect Picqer","operationId":"disconnect_picqer_api_integrations_picqer_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/picqer/sync":{"post":{"summary":"Sync Picqer","operationId":"sync_picqer_api_integrations_picqer_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/picqer/simulate":{"post":{"summary":"Simulate Picqer","operationId":"simulate_picqer_api_integrations_picqer_simulate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/picqer/webhook":{"post":{"summary":"Picqer Webhook","operationId":"picqer_webhook_api_integrations_picqer_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/integrations/sendcloud":{"get":{"summary":"Get Sendcloud","operationId":"get_sendcloud_api_integrations_sendcloud_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/sendcloud/setup-info":{"get":{"summary":"Setup Info","operationId":"setup_info_api_integrations_sendcloud_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/sendcloud/connect":{"post":{"summary":"Connect Sendcloud","description":"Polymorphic — body shape determines the auth_method.","operationId":"connect_sendcloud_api_integrations_sendcloud_connect_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/sendcloud/disconnect":{"post":{"summary":"Disconnect Sendcloud","operationId":"disconnect_sendcloud_api_integrations_sendcloud_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/sendcloud/create-label":{"post":{"summary":"Sendcloud Create Label","description":"Generate a real Sendcloud label for an existing IPAY order.","operationId":"sendcloud_create_label_api_integrations_sendcloud_create_label_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"query","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/sendcloud/webhook":{"post":{"summary":"Sendcloud Webhook","description":"Sendcloud → IPAY status push. Updates order + emits SSE.","operationId":"sendcloud_webhook_api_integrations_sendcloud_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/integrations/sendcloud/simulate":{"post":{"summary":"Sendcloud Simulate","description":"Simulate a Sendcloud webhook without a live key — useful for testing.","operationId":"sendcloud_simulate_api_integrations_sendcloud_simulate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/sendcloud/origins":{"get":{"summary":"List Origins","description":"List all warehouse/sender origins for the merchant (or all for operator).","operationId":"list_origins_api_integrations_sendcloud_origins_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Origin","operationId":"create_origin_api_integrations_sendcloud_origins_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendcloudOriginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/sendcloud/origins/{origin_id}":{"patch":{"summary":"Update Origin","operationId":"update_origin_api_integrations_sendcloud_origins__origin_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"origin_id","in":"path","required":true,"schema":{"type":"string","title":"Origin Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Origin","operationId":"delete_origin_api_integrations_sendcloud_origins__origin_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"origin_id","in":"path","required":true,"schema":{"type":"string","title":"Origin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/sendcloud/settings":{"get":{"summary":"Get Settings","operationId":"get_settings_api_integrations_sendcloud_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"summary":"Update Settings","operationId":"update_settings_api_integrations_sendcloud_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendcloudSettingsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/sendcloud/origins/pick":{"get":{"summary":"Pick Origin","description":"Returns the default origin for the merchant (or first if no default flagged).","operationId":"pick_origin_api_integrations_sendcloud_origins_pick_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/sendcloud/origins/sync-from-sendcloud":{"post":{"summary":"Sync From Sendcloud","description":"Pull existing sender_addresses from Sendcloud API → create matching origin records.\n\nPre-condition: a Sendcloud integration record exists for this merchant\n(sendcloud_integrations collection). Each merchant must have basic/oauth setup.","operationId":"sync_from_sendcloud_api_integrations_sendcloud_origins_sync_from_sendcloud_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/opencart":{"get":{"summary":"Get Oc","operationId":"get_oc_api_integrations_opencart_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/opencart/setup-info":{"get":{"summary":"Oc Setup","operationId":"oc_setup_api_integrations_opencart_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/opencart/connect":{"post":{"summary":"Connect Oc","operationId":"connect_oc_api_integrations_opencart_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenCartConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/opencart/disconnect":{"post":{"summary":"Disconnect Oc","operationId":"disconnect_oc_api_integrations_opencart_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/opencart/sync":{"post":{"summary":"Sync Oc","operationId":"sync_oc_api_integrations_opencart_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/opencart/simulate":{"post":{"summary":"Simulate Oc","operationId":"simulate_oc_api_integrations_opencart_simulate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/opencart/webhook":{"post":{"summary":"Oc Webhook","operationId":"oc_webhook_api_integrations_opencart_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/integrations/nopcommerce":{"get":{"summary":"Get Nop","operationId":"get_nop_api_integrations_nopcommerce_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/nopcommerce/setup-info":{"get":{"summary":"Nop Setup","operationId":"nop_setup_api_integrations_nopcommerce_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/nopcommerce/connect":{"post":{"summary":"Connect Nop","operationId":"connect_nop_api_integrations_nopcommerce_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NopCommerceConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/nopcommerce/disconnect":{"post":{"summary":"Disconnect Nop","operationId":"disconnect_nop_api_integrations_nopcommerce_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/nopcommerce/sync":{"post":{"summary":"Sync Nop","operationId":"sync_nop_api_integrations_nopcommerce_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/nopcommerce/simulate":{"post":{"summary":"Simulate Nop","operationId":"simulate_nop_api_integrations_nopcommerce_simulate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/nopcommerce/webhook":{"post":{"summary":"Nop Webhook","operationId":"nop_webhook_api_integrations_nopcommerce_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/integrations/vinted":{"get":{"summary":"Get Vinted Integration","operationId":"get_vinted_integration_api_integrations_vinted_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/vinted/setup-info":{"get":{"summary":"Vinted Setup Info","operationId":"vinted_setup_info_api_integrations_vinted_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/vinted/connect":{"post":{"summary":"Connect Vinted","operationId":"connect_vinted_api_integrations_vinted_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VintedConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/vinted/disconnect":{"post":{"summary":"Disconnect Vinted","operationId":"disconnect_vinted_api_integrations_vinted_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/vinted/register-webhooks":{"post":{"summary":"Register Vinted Webhooks","description":"Register the default IPAY webhook URL on Vinted Pro side for the key events.","operationId":"register_vinted_webhooks_api_integrations_vinted_register_webhooks_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/vinted/sync":{"post":{"summary":"Sync Vinted","operationId":"sync_vinted_api_integrations_vinted_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/vinted/simulate":{"post":{"summary":"Simulate Vinted Order","description":"DEMO ONLY: process a fake Vinted order payload as if it came from a webhook.","operationId":"simulate_vinted_order_api_integrations_vinted_simulate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/vinted/webhook":{"post":{"summary":"Vinted Webhook","description":"Receive callbacks from Vinted Pro. Body is HMAC-signed via X-Vpi-Webhook-Hmac-Sha256.","operationId":"vinted_webhook_api_integrations_vinted_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/integrations/kaufland":{"get":{"summary":"Get Integration","operationId":"get_integration_api_integrations_kaufland_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/kaufland/setup-info":{"get":{"summary":"Setup Info","operationId":"setup_info_api_integrations_kaufland_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/kaufland/connect":{"post":{"summary":"Connect","operationId":"connect_api_integrations_kaufland_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatedConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/kaufland/disconnect":{"post":{"summary":"Disconnect","operationId":"disconnect_api_integrations_kaufland_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/kaufland/sync":{"post":{"summary":"Sync","operationId":"sync_api_integrations_kaufland_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/kaufland/simulate":{"post":{"summary":"Simulate","operationId":"simulate_api_integrations_kaufland_simulate_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/cdiscount":{"get":{"summary":"Get Integration","operationId":"get_integration_api_integrations_cdiscount_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/cdiscount/setup-info":{"get":{"summary":"Setup Info","operationId":"setup_info_api_integrations_cdiscount_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/cdiscount/connect":{"post":{"summary":"Connect","operationId":"connect_api_integrations_cdiscount_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatedConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/cdiscount/disconnect":{"post":{"summary":"Disconnect","operationId":"disconnect_api_integrations_cdiscount_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/cdiscount/sync":{"post":{"summary":"Sync","operationId":"sync_api_integrations_cdiscount_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/cdiscount/simulate":{"post":{"summary":"Simulate","operationId":"simulate_api_integrations_cdiscount_simulate_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/empik":{"get":{"summary":"Get Integration","operationId":"get_integration_api_integrations_empik_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/empik/setup-info":{"get":{"summary":"Setup Info","operationId":"setup_info_api_integrations_empik_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/empik/connect":{"post":{"summary":"Connect","operationId":"connect_api_integrations_empik_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatedConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/empik/disconnect":{"post":{"summary":"Disconnect","operationId":"disconnect_api_integrations_empik_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/empik/sync":{"post":{"summary":"Sync","operationId":"sync_api_integrations_empik_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/empik/simulate":{"post":{"summary":"Simulate","operationId":"simulate_api_integrations_empik_simulate_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/temu":{"get":{"summary":"Get Integration","operationId":"get_integration_api_integrations_temu_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/temu/setup-info":{"get":{"summary":"Setup Info","operationId":"setup_info_api_integrations_temu_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/temu/connect":{"post":{"summary":"Connect","operationId":"connect_api_integrations_temu_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatedConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/temu/disconnect":{"post":{"summary":"Disconnect","operationId":"disconnect_api_integrations_temu_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/temu/sync":{"post":{"summary":"Sync","operationId":"sync_api_integrations_temu_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/temu/simulate":{"post":{"summary":"Simulate","operationId":"simulate_api_integrations_temu_simulate_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shein":{"get":{"summary":"Get Integration","operationId":"get_integration_api_integrations_shein_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shein/setup-info":{"get":{"summary":"Setup Info","operationId":"setup_info_api_integrations_shein_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shein/connect":{"post":{"summary":"Connect","operationId":"connect_api_integrations_shein_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatedConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shein/disconnect":{"post":{"summary":"Disconnect","operationId":"disconnect_api_integrations_shein_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shein/sync":{"post":{"summary":"Sync","operationId":"sync_api_integrations_shein_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shein/simulate":{"post":{"summary":"Simulate","operationId":"simulate_api_integrations_shein_simulate_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/aliexpress":{"get":{"summary":"Get Integration","operationId":"get_integration_api_integrations_aliexpress_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/aliexpress/setup-info":{"get":{"summary":"Setup Info","operationId":"setup_info_api_integrations_aliexpress_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/aliexpress/connect":{"post":{"summary":"Connect","operationId":"connect_api_integrations_aliexpress_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatedConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/aliexpress/disconnect":{"post":{"summary":"Disconnect","operationId":"disconnect_api_integrations_aliexpress_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/aliexpress/sync":{"post":{"summary":"Sync","operationId":"sync_api_integrations_aliexpress_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/aliexpress/simulate":{"post":{"summary":"Simulate","operationId":"simulate_api_integrations_aliexpress_simulate_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopee":{"get":{"summary":"Get Integration","operationId":"get_integration_api_integrations_shopee_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopee/setup-info":{"get":{"summary":"Setup Info","operationId":"setup_info_api_integrations_shopee_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopee/connect":{"post":{"summary":"Connect","operationId":"connect_api_integrations_shopee_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatedConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopee/disconnect":{"post":{"summary":"Disconnect","operationId":"disconnect_api_integrations_shopee_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopee/sync":{"post":{"summary":"Sync","operationId":"sync_api_integrations_shopee_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/shopee/simulate":{"post":{"summary":"Simulate","operationId":"simulate_api_integrations_shopee_simulate_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/lazada":{"get":{"summary":"Get Integration","operationId":"get_integration_api_integrations_lazada_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/lazada/setup-info":{"get":{"summary":"Setup Info","operationId":"setup_info_api_integrations_lazada_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/lazada/connect":{"post":{"summary":"Connect","operationId":"connect_api_integrations_lazada_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatedConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/lazada/disconnect":{"post":{"summary":"Disconnect","operationId":"disconnect_api_integrations_lazada_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/lazada/sync":{"post":{"summary":"Sync","operationId":"sync_api_integrations_lazada_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/lazada/simulate":{"post":{"summary":"Simulate","operationId":"simulate_api_integrations_lazada_simulate_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/tiktok_shop":{"get":{"summary":"Get Integration","operationId":"get_integration_api_integrations_tiktok_shop_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/tiktok_shop/setup-info":{"get":{"summary":"Setup Info","operationId":"setup_info_api_integrations_tiktok_shop_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/tiktok_shop/connect":{"post":{"summary":"Connect","operationId":"connect_api_integrations_tiktok_shop_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatedConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/tiktok_shop/disconnect":{"post":{"summary":"Disconnect","operationId":"disconnect_api_integrations_tiktok_shop_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/tiktok_shop/sync":{"post":{"summary":"Sync","operationId":"sync_api_integrations_tiktok_shop_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/tiktok_shop/simulate":{"post":{"summary":"Simulate","operationId":"simulate_api_integrations_tiktok_shop_simulate_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_nl":{"get":{"summary":"Get Integration","operationId":"get_integration_api_integrations_amazon_nl_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_nl/setup-info":{"get":{"summary":"Setup Info","operationId":"setup_info_api_integrations_amazon_nl_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_nl/connect":{"post":{"summary":"Connect","operationId":"connect_api_integrations_amazon_nl_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatedConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_nl/disconnect":{"post":{"summary":"Disconnect","operationId":"disconnect_api_integrations_amazon_nl_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_nl/sync":{"post":{"summary":"Sync","operationId":"sync_api_integrations_amazon_nl_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_nl/simulate":{"post":{"summary":"Simulate","operationId":"simulate_api_integrations_amazon_nl_simulate_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_de":{"get":{"summary":"Get Integration","operationId":"get_integration_api_integrations_amazon_de_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_de/setup-info":{"get":{"summary":"Setup Info","operationId":"setup_info_api_integrations_amazon_de_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_de/connect":{"post":{"summary":"Connect","operationId":"connect_api_integrations_amazon_de_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatedConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_de/disconnect":{"post":{"summary":"Disconnect","operationId":"disconnect_api_integrations_amazon_de_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_de/sync":{"post":{"summary":"Sync","operationId":"sync_api_integrations_amazon_de_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_de/simulate":{"post":{"summary":"Simulate","operationId":"simulate_api_integrations_amazon_de_simulate_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_fr":{"get":{"summary":"Get Integration","operationId":"get_integration_api_integrations_amazon_fr_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_fr/setup-info":{"get":{"summary":"Setup Info","operationId":"setup_info_api_integrations_amazon_fr_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_fr/connect":{"post":{"summary":"Connect","operationId":"connect_api_integrations_amazon_fr_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatedConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_fr/disconnect":{"post":{"summary":"Disconnect","operationId":"disconnect_api_integrations_amazon_fr_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_fr/sync":{"post":{"summary":"Sync","operationId":"sync_api_integrations_amazon_fr_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_fr/simulate":{"post":{"summary":"Simulate","operationId":"simulate_api_integrations_amazon_fr_simulate_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_it":{"get":{"summary":"Get Integration","operationId":"get_integration_api_integrations_amazon_it_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_it/setup-info":{"get":{"summary":"Setup Info","operationId":"setup_info_api_integrations_amazon_it_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_it/connect":{"post":{"summary":"Connect","operationId":"connect_api_integrations_amazon_it_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatedConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_it/disconnect":{"post":{"summary":"Disconnect","operationId":"disconnect_api_integrations_amazon_it_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_it/sync":{"post":{"summary":"Sync","operationId":"sync_api_integrations_amazon_it_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_it/simulate":{"post":{"summary":"Simulate","operationId":"simulate_api_integrations_amazon_it_simulate_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_es":{"get":{"summary":"Get Integration","operationId":"get_integration_api_integrations_amazon_es_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_es/setup-info":{"get":{"summary":"Setup Info","operationId":"setup_info_api_integrations_amazon_es_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_es/connect":{"post":{"summary":"Connect","operationId":"connect_api_integrations_amazon_es_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatedConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_es/disconnect":{"post":{"summary":"Disconnect","operationId":"disconnect_api_integrations_amazon_es_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_es/sync":{"post":{"summary":"Sync","operationId":"sync_api_integrations_amazon_es_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/amazon_es/simulate":{"post":{"summary":"Simulate","operationId":"simulate_api_integrations_amazon_es_simulate_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/psp/{psp}/status":{"get":{"summary":"Psp Status","operationId":"psp_status_api_psp__psp__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"psp","in":"path","required":true,"schema":{"type":"string","title":"Psp"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/psp/{psp}/connect":{"post":{"summary":"Psp Connect","description":"Start the connect flow.\n\nOAuth PSPs (Mollie): returns a redirect URL with state token.\nAPI-key PSPs (Xendit, Adyen): persists the key, marks connected.\nAll in mock-mode when live env vars missing — no external HTTP calls.","operationId":"psp_connect_api_psp__psp__connect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"psp","in":"path","required":true,"schema":{"type":"string","title":"Psp"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/psp/{psp}/oauth-callback":{"post":{"summary":"Psp Oauth Callback","operationId":"psp_oauth_callback_api_psp__psp__oauth_callback_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"psp","in":"path","required":true,"schema":{"type":"string","title":"Psp"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthCallbackIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/psp/{psp}/disconnect":{"post":{"summary":"Psp Disconnect","operationId":"psp_disconnect_api_psp__psp__disconnect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"psp","in":"path","required":true,"schema":{"type":"string","title":"Psp"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/psp/{psp}/test-checkout":{"post":{"summary":"Psp Test Checkout","description":"Create a TEST checkout — returns mock checkout URL when live env missing.","operationId":"psp_test_checkout_api_psp__psp__test_checkout_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"psp","in":"path","required":true,"schema":{"type":"string","title":"Psp"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCheckoutIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/psp/connections/overview":{"get":{"summary":"Connections Overview","operationId":"connections_overview_api_psp_connections_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/payment/split-preview":{"get":{"summary":"Split Preview","description":"Toon intended split per session OR per (country, method, amount) hypothetical.","operationId":"split_preview_api_payment_split_preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"payment_method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"}},{"name":"amount_eur","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount Eur"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rbac/catalog":{"get":{"summary":"Get Catalog","description":"Return the static permission catalog (resources, actions, scopes).","operationId":"get_catalog_api_rbac_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/rbac/me/permissions":{"get":{"summary":"My Permissions","description":"Return permissions for the current user — used by frontend for conditional rendering.","operationId":"my_permissions_api_rbac_me_permissions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/rbac/roles":{"get":{"summary":"List Roles","operationId":"list_roles_api_rbac_roles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Role","operationId":"create_role_api_rbac_roles_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/rbac/roles/{role_id}":{"put":{"summary":"Update Role","operationId":"update_role_api_rbac_roles__role_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","title":"Role Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Role","operationId":"delete_role_api_rbac_roles__role_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","title":"Role Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rbac/roles/{role_id}/clone":{"post":{"summary":"Clone Role","operationId":"clone_role_api_rbac_roles__role_id__clone_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","title":"Role Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rbac/users":{"get":{"summary":"List User Assignments","operationId":"list_user_assignments_api_rbac_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/rbac/users/{user_email}/roles":{"post":{"summary":"Assign Role","operationId":"assign_role_api_rbac_users__user_email__roles_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_email","in":"path","required":true,"schema":{"type":"string","title":"User Email"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rbac/users/{user_email}/roles/{role_id}":{"delete":{"summary":"Revoke Role","operationId":"revoke_role_api_rbac_users__user_email__roles__role_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_email","in":"path","required":true,"schema":{"type":"string","title":"User Email"}},{"name":"role_id","in":"path","required":true,"schema":{"type":"string","title":"Role Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rbac/roles/{role_id}/apply-trim":{"post":{"summary":"Apply Trim","description":"Apply a 'remove permission' patch to a non-system role.\n\nPayload: { \"patches\": [{\"resource\": \"tech_stack\", \"remove_action\": \"view\"}, ...] }\nReduces the role's permissions in 1 call — used by the Sidebar Preview tab.","operationId":"apply_trim_api_rbac_roles__role_id__apply_trim_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","title":"Role Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rbac/roles/{role_id}/suggest-trim":{"post":{"summary":"Suggest Trim For Resource","description":"Given a (role, resource), suggest 3 trim options for the Sidebar Preview tab.\n\nReturns: { \"suggestions\": [{\"label\", \"patch\":{...}, \"rationale\"}, ...] }","operationId":"suggest_trim_for_resource_api_rbac_roles__role_id__suggest_trim_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","title":"Role Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner-control/overview":{"get":{"summary":"Overview","operationId":"overview_api_partner_control_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/partner-control/partners":{"get":{"summary":"List Partners","operationId":"list_partners_api_partner_control_partners_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"generic","title":"Scope"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner-control/partners/{partner_id}":{"get":{"summary":"Partner Detail","operationId":"partner_detail_api_partner_control_partners__partner_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner-control/agreements":{"get":{"summary":"List Agreements","operationId":"list_agreements_api_partner_control_agreements_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Agreement","operationId":"create_agreement_api_partner_control_agreements_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgreementIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner-control/attribution-rules":{"get":{"summary":"List Attribution Rules","operationId":"list_attribution_rules_api_partner_control_attribution_rules_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Id"}},{"name":"merchant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},{"name":"only_conflicts","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Only Conflicts"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Attribution Rule","operationId":"create_attribution_rule_api_partner_control_attribution_rules_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributionRuleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner-control/attribution-rules/{rule_id}/resolve-conflict":{"post":{"summary":"Resolve Conflict","description":"Resolve attribution conflict — admin chooses winner (this rule or revoke).","operationId":"resolve_conflict_api_partner_control_attribution_rules__rule_id__resolve_conflict_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner-control/calculate-commission":{"post":{"summary":"Calculate Commission","operationId":"calculate_commission_api_partner_control_calculate_commission_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommissionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/partner-control/commission-ledger":{"get":{"summary":"List Commission Ledger","operationId":"list_commission_ledger_api_partner_control_commission_ledger_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner-control/commission-ledger/{ledger_id}/mark-paid":{"post":{"summary":"Mark Commission Paid","operationId":"mark_commission_paid_api_partner_control_commission_ledger__ledger_id__mark_paid_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ledger_id","in":"path","required":true,"schema":{"type":"string","title":"Ledger Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner-control/performance/{partner_id}":{"get":{"summary":"Get Performance","operationId":"get_performance_api_partner_control_performance__partner_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/taxonomy":{"get":{"summary":"List Taxonomy","description":"List reasons for a merchant. Auto-seed if empty.","operationId":"list_taxonomy_api_returns_taxonomy_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":true,"schema":{"type":"string","title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Reason","operationId":"create_reason_api_returns_taxonomy_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/taxonomy/{reason_id}":{"put":{"summary":"Update Reason","operationId":"update_reason_api_returns_taxonomy__reason_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"reason_id","in":"path","required":true,"schema":{"type":"string","title":"Reason Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Reason","operationId":"delete_reason_api_returns_taxonomy__reason_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"reason_id","in":"path","required":true,"schema":{"type":"string","title":"Reason Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/returns/taxonomy/categorize":{"post":{"summary":"Categorize Free Text","description":"Match free-text return reason against merchant taxonomy via Claude LLM.\n\nReturns matched {category, sub_reason_slug, confidence} or {category:'other'}\nwhen no good match.","operationId":"categorize_free_text_api_returns_taxonomy_categorize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategorizeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/returns/taxonomy/usage-stats":{"get":{"summary":"Usage Stats","description":"How often is each reason used in actual return_cases?","operationId":"usage_stats_api_returns_taxonomy_usage_stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"query","required":true,"schema":{"type":"string","title":"Merchant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/credentials-status":{"get":{"summary":"Credentials Status","description":"v0.91 — Inventory of every 3rd-party integration with live status, env-keys read,\nnext action, and owner (who has to deliver the key).","operationId":"credentials_status_api_admin_credentials_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/credentials-status/sendcloud-live-test":{"get":{"summary":"Credentials Status Sendcloud Test","description":"Run a live ping against Sendcloud to see whether the 'announce parcel'\npermission is now granted, or whether the mock-PDF fallback is still needed.","operationId":"credentials_status_sendcloud_test_api_admin_credentials_status_sendcloud_live_test_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/psp-multisafepay/status":{"get":{"summary":"Multisafepay Status","operationId":"multisafepay_status_api_psp_multisafepay_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/psp-multisafepay/orders":{"post":{"summary":"Multisafepay Create Order","operationId":"multisafepay_create_order_api_psp_multisafepay_orders_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/psp-multisafepay/orders/{order_id}":{"get":{"summary":"Multisafepay Get Order","operationId":"multisafepay_get_order_api_psp_multisafepay_orders__order_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/psp-multisafepay/orders/{order_id}/refunds":{"post":{"summary":"Multisafepay Refund","operationId":"multisafepay_refund_api_psp_multisafepay_orders__order_id__refunds_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/psp-multisafepay/gateways":{"get":{"summary":"Multisafepay Gateways","operationId":"multisafepay_gateways_api_psp_multisafepay_gateways_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/webhooks/multisafepay":{"post":{"summary":"Multisafepay Webhook","operationId":"multisafepay_webhook_api_webhooks_multisafepay_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/multisafepay/transactions":{"get":{"summary":"List Multisafepay Transactions","operationId":"list_multisafepay_transactions_api_admin_multisafepay_transactions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/multisafepay/webhook-events":{"get":{"summary":"List Multisafepay Webhook Events","operationId":"list_multisafepay_webhook_events_api_admin_multisafepay_webhook_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/integrations-roadmap":{"get":{"summary":"Integrations Roadmap","operationId":"integrations_roadmap_api_admin_integrations_roadmap_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/integrations-roadmap/{provider}":{"patch":{"summary":"Patch Integration Deal","operationId":"patch_integration_deal_api_admin_integrations_roadmap__provider__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/integrations-roadmap/{provider}/history":{"get":{"summary":"Integration Deal History","operationId":"integration_deal_history_api_admin_integrations_roadmap__provider__history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dashboard/hot-sources":{"get":{"summary":"Hot Sources","description":"Aggregates volume/revenue by source/country/PSP/carrier.\n\nResponse shape:\n    {\n      period: {days, since, until},\n      totals: {orders, gross_eur, paid_orders},\n      by_source: [{key, label, orders, gross_eur, share_pct}],\n      by_country: [...],\n      by_psp: [...],\n      by_carrier: [...],\n      top_merchants: [...],\n    }","operationId":"hot_sources_api_dashboard_hot_sources_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/consumer-app-readiness":{"get":{"summary":"Consumer App Readiness","operationId":"consumer_app_readiness_api_admin_consumer_app_readiness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/explore/content":{"get":{"summary":"Explore Content","description":"Returns the commercial content for the Discover IPAY landing page.","operationId":"explore_content_api_explore_content_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/lockers-pilot":{"get":{"summary":"Lockers Pilot","operationId":"lockers_pilot_api_admin_lockers_pilot_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/tech-stack":{"get":{"summary":"Get Tech Stack","description":"Returns the curated stack overview + live runtime stats.","operationId":"get_tech_stack_api_admin_tech_stack_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/tech-stack/categories":{"get":{"summary":"List Categories","description":"Lightweight category list — used for nav.","operationId":"list_categories_api_admin_tech_stack_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/translation-health":{"get":{"summary":"Translation Health","description":"Returns coverage per language + breakdown per namespace.","operationId":"translation_health_api_admin_translation_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/translation-health/{lang}/missing":{"get":{"summary":"Translation Missing","description":"Returns FULL list of missing keys + their NL values for a specific language.\nOptionally filtered by namespace (e.g. 'consumer', 'merchant').","operationId":"translation_missing_api_admin_translation_health__lang__missing_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lang","in":"path","required":true,"schema":{"type":"string","title":"Lang"}},{"name":"namespace","in":"query","required":false,"schema":{"type":"string","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/translation-health/{lang}/ai-fill":{"post":{"summary":"Translation Ai Fill","description":"v0.85 Fase 2B — AI-fill missing keys via Claude Sonnet 4.5 (Emergent LLM Key).\nOne-click workflow: admin clicks → backend detects missing keys → Claude translates → JSON file gepersist.\nOptional ?namespace= filter to only fill 1 namespace.","operationId":"translation_ai_fill_api_admin_translation_health__lang__ai_fill_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lang","in":"path","required":true,"schema":{"type":"string","title":"Lang"}},{"name":"namespace","in":"query","required":false,"schema":{"type":"string","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/translation-health/ai-fill-all":{"post":{"summary":"Translation Ai Fill All","description":"v0.85 Fase 3 — AI-fill ALL 16 target languages sequentially.\n1-click mega-button workflow. Returns aggregate result + per-language status.","operationId":"translation_ai_fill_all_api_admin_translation_health_ai_fill_all_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"namespace","in":"query","required":false,"schema":{"type":"string","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/translation-health/{lang}/side-by-side":{"get":{"summary":"Translation Side By Side","description":"v0.85 Fase 3 — Side-by-side NL vs target language for review/edit.\nonly_identical=true → toon alleen rows waar target == NL (potentieel niet-vertaald).","operationId":"translation_side_by_side_api_admin_translation_health__lang__side_by_side_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lang","in":"path","required":true,"schema":{"type":"string","title":"Lang"}},{"name":"namespace","in":"query","required":false,"schema":{"type":"string","title":"Namespace"}},{"name":"only_identical","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Only Identical"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/translation-health/{lang}/edit":{"put":{"summary":"Translation Edit","description":"v0.85 Fase 3 — Bulk-edit keys for a language.\nBody: {\"updates\": {\"consumer.home.welcome_back\": \"Selamat datang kembali 👋\", ...}}\nPersists immediately to JSON file.","operationId":"translation_edit_api_admin_translation_health__lang__edit_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lang","in":"path","required":true,"schema":{"type":"string","title":"Lang"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AcceptScoreIn":{"properties":{"apply_to_partner":{"type":"boolean","title":"Apply To Partner","default":true}},"type":"object","title":"AcceptScoreIn"},"Action":{"properties":{"type":{"type":"string","title":"Type"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["type"],"title":"Action"},"ActivityIn":{"properties":{"company_id":{"type":"string","title":"Company Id"},"deal_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Id"},"type":{"type":"string","enum":["call","email","meeting","note","task"],"title":"Type"},"subject":{"type":"string","title":"Subject"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","required":["company_id","type","subject"],"title":"ActivityIn"},"AdvanceStepIn":{"properties":{"target_step_key":{"type":"string","title":"Target Step Key"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"bypass_gate":{"type":"boolean","title":"Bypass Gate","default":false},"completion_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completion Note"},"evidence_doc_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Evidence Doc Ids"}},"type":"object","required":["target_step_key"],"title":"AdvanceStepIn"},"AgreementIn":{"properties":{"partner_id":{"type":"string","title":"Partner Id"},"name":{"type":"string","title":"Name"},"revenue_model":{"type":"string","title":"Revenue Model"},"rate_value":{"type":"number","title":"Rate Value"},"tiers":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tiers"},"monthly_cap_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Cap Eur"},"minimum_payout_eur":{"type":"number","title":"Minimum Payout Eur","default":50.0},"valid_from":{"type":"string","title":"Valid From"},"valid_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid Until"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["partner_id","name","revenue_model","rate_value","valid_from"],"title":"AgreementIn"},"ApiKeyRequestIn":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"company":{"type":"string","maxLength":200,"minLength":2,"title":"Company"},"use_case":{"type":"string","maxLength":2000,"minLength":10,"title":"Use Case"},"expected_monthly_orders":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Monthly Orders"}},"type":"object","required":["name","email","company","use_case"],"title":"ApiKeyRequestIn"},"ApplyVoucherIn":{"properties":{"session_token":{"type":"string","title":"Session Token"},"amount_eur":{"type":"number","title":"Amount Eur"}},"type":"object","required":["session_token","amount_eur"],"title":"ApplyVoucherIn"},"ApproveBatchIn":{"properties":{"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"ApproveBatchIn"},"ApproveRowIn":{"properties":{"credit_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credit Reason"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ApproveRowIn"},"AttributionRuleIn":{"properties":{"partner_id":{"type":"string","title":"Partner Id"},"merchant_id":{"type":"string","title":"Merchant Id"},"attribution_type":{"type":"string","title":"Attribution Type"},"valid_from":{"type":"string","title":"Valid From"},"valid_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid Until"},"revenue_components":{"items":{"type":"string"},"type":"array","title":"Revenue Components","default":["transaction_fee","subscription"]},"priority":{"type":"integer","title":"Priority","default":100}},"type":"object","required":["partner_id","merchant_id","attribution_type","valid_from"],"title":"AttributionRuleIn"},"AvatarSettingsIn":{"properties":{"source_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Source Url"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","required":["source_url"],"title":"AvatarSettingsIn"},"BigCommerceConnectIn":{"properties":{"store_hash":{"type":"string","title":"Store Hash"},"access_token":{"type":"string","title":"Access Token"},"auto_create_session":{"type":"boolean","title":"Auto Create Session","default":true},"trigger":{"type":"string","enum":["payment_module","tag_ipay","always"],"title":"Trigger","default":"payment_module"}},"type":"object","required":["store_hash","access_token"],"title":"BigCommerceConnectIn"},"Body_import_carrier_tariffs_api_admin_carrier_tariffs_import_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_import_carrier_tariffs_api_admin_carrier_tariffs_import_post"},"Body_import_cost_table_csv_api_carrier_contracts__contract_id__cost_table_csv_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_import_cost_table_csv_api_carrier_contracts__contract_id__cost_table_csv_post"},"Body_public_upload_document_api_public_onboarding__token__upload_post":{"properties":{"doc_key":{"type":"string","title":"Doc Key"},"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["doc_key","file"],"title":"Body_public_upload_document_api_public_onboarding__token__upload_post"},"Body_sales_import_excel_api_sales_companies_import_excel_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_sales_import_excel_api_sales_companies_import_excel_post"},"Body_upload_agreement_api_admin_merchants__merchant_id__agreements_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"type":{"type":"string","title":"Type","default":"other"},"signed":{"type":"boolean","title":"Signed","default":false},"signed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed By"},"signed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed At"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["file"],"title":"Body_upload_agreement_api_admin_merchants__merchant_id__agreements_post"},"Body_upload_carrier_invoice_api_admin_carrier_tariffs__carrier_code__invoice_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_carrier_invoice_api_admin_carrier_tariffs__carrier_code__invoice_upload_post"},"Body_upload_document_api_onboarding_cases__case_id__documents_post":{"properties":{"doc_key":{"type":"string","title":"Doc Key"},"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["doc_key","file"],"title":"Body_upload_document_api_onboarding_cases__case_id__documents_post"},"Body_upload_orders_api_orders_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_orders_api_orders_upload_post"},"BolConnectIn":{"properties":{"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"auto_create_session":{"type":"boolean","title":"Auto Create Session","default":true},"trigger":{"type":"string","enum":["always","fbb_only","fbr_only"],"title":"Trigger","default":"always"}},"type":"object","required":["client_id","client_secret"],"title":"BolConnectIn"},"BulkApproveIn":{"properties":{"ids":{"items":{"type":"string"},"type":"array","title":"Ids"}},"type":"object","required":["ids"],"title":"BulkApproveIn"},"BulkImportIn":{"properties":{"type":{"type":"string","enum":["merchant","carrier","psp","software_partner"],"title":"Type","default":"merchant"},"companies":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Companies"}},"type":"object","required":["companies"],"title":"BulkImportIn"},"CarrierContractIn":{"properties":{"carrier_code":{"type":"string","title":"Carrier Code"},"contract_mode":{"type":"string","enum":["ipay_rates","own_contract"],"title":"Contract Mode","default":"ipay_rates"},"credentials":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Credentials"},"cost_per_shipment_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Shipment Eur"},"cost_table":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Cost Table"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","default":""},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["carrier_code"],"title":"CarrierContractIn"},"CarrierContractPatch":{"properties":{"contract_mode":{"anyOf":[{"type":"string","enum":["ipay_rates","own_contract"]},{"type":"null"}],"title":"Contract Mode"},"credentials":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Credentials"},"cost_per_shipment_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Shipment Eur"},"cost_table":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Cost Table"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"CarrierContractPatch"},"CarrierEventIn":{"properties":{"shipment_id":{"type":"string","title":"Shipment Id"},"event_code":{"type":"string","title":"Event Code"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location","default":""},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At"},"raw_payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Raw Payload"}},"type":"object","required":["shipment_id","event_code"],"title":"CarrierEventIn"},"CarrierInvoiceIn":{"properties":{"carrier_code":{"type":"string","title":"Carrier Code"},"invoice_number":{"type":"string","title":"Invoice Number"},"invoice_date":{"type":"string","title":"Invoice Date"},"period_start":{"type":"string","title":"Period Start"},"period_end":{"type":"string","title":"Period End"},"total_amount_eur":{"type":"number","title":"Total Amount Eur"},"line_items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Line Items","default":[]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","default":""}},"type":"object","required":["carrier_code","invoice_number","invoice_date","period_start","period_end","total_amount_eur"],"title":"CarrierInvoiceIn"},"CarrierPatchIn":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"otp_required_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Otp Required Default"},"accepts_cash_cod":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Accepts Cash Cod"}},"type":"object","title":"CarrierPatchIn"},"CarrierRateIn":{"properties":{"carrier_code":{"type":"string","title":"Carrier Code"},"rate":{"type":"number","title":"Rate"},"ipay_commission":{"type":"number","title":"Ipay Commission","default":0},"vat_rate":{"type":"number","title":"Vat Rate","default":0.21},"currency":{"type":"string","title":"Currency","default":"EUR"}},"type":"object","required":["carrier_code","rate"],"title":"CarrierRateIn"},"CategorizeIn":{"properties":{"merchant_id":{"type":"string","title":"Merchant Id"},"free_text":{"type":"string","title":"Free Text"}},"type":"object","required":["merchant_id","free_text"],"title":"CategorizeIn"},"ChatRequest":{"properties":{"message":{"type":"string","maxLength":2000,"minLength":1,"title":"Message"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface","default":"help"}},"type":"object","required":["message"],"title":"ChatRequest"},"ChatResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"answer":{"type":"string","title":"Answer"},"model":{"type":"string","title":"Model"}},"type":"object","required":["session_id","answer","model"],"title":"ChatResponse"},"CommentIn":{"properties":{"case_id":{"type":"string","title":"Case Id"},"body":{"type":"string","title":"Body"}},"type":"object","required":["case_id","body"],"title":"CommentIn"},"CommercialUpdate":{"properties":{"pricing_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricing Model"},"setup_fee_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Setup Fee Eur"},"monthly_fee_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Fee Eur"},"per_unit_fee_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Per Unit Fee Eur"},"revenue_share_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenue Share Pct"},"minimum_commitment_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minimum Commitment Eur"},"payment_terms_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Terms Days"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","default":"EUR"},"contract_start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Start Date"},"contract_end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract End Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"CommercialUpdate"},"CommissionRequest":{"properties":{"partner_id":{"type":"string","title":"Partner Id"},"period_start":{"type":"string","title":"Period Start"},"period_end":{"type":"string","title":"Period End"},"revenue_component":{"type":"string","title":"Revenue Component","default":"transaction_fee"},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","required":["partner_id","period_start","period_end"],"title":"CommissionRequest"},"CompanyIn":{"properties":{"type":{"type":"string","enum":["merchant","carrier","psp","software_partner"],"title":"Type"},"name":{"type":"string","title":"Name"},"trading_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Name"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"estimated_monthly_orders":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Monthly Orders"},"estimated_aov":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Aov"},"product_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Category"},"cod_relevant":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cod Relevant"},"dropship_relevant":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dropship Relevant"},"cross_border_relevant":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cross Border Relevant"},"locker_pickup_relevant":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Locker Pickup Relevant"},"services":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Services"},"coverage_countries":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Coverage Countries"},"has_label_api":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Label Api"},"carrier_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Code"},"supported_methods":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Supported Methods"},"fee_structure":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fee Structure"},"partnership_type":{"anyOf":[{"type":"string","enum":["referrer","reseller","integrator"]},{"type":"null"}],"title":"Partnership Type"},"customer_volume":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Customer Volume"},"ipay_fit_score":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Ipay Fit Score"},"segment":{"anyOf":[{"type":"string","enum":["A","B","C","D","E"]},{"type":"null"}],"title":"Segment"},"priority":{"anyOf":[{"type":"string","enum":["high","medium","low"]},{"type":"null"}],"title":"Priority"},"sales_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sales Status"},"lost_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lost Reason"},"owner_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner User Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["type","name"],"title":"CompanyIn"},"CompanyPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"sales_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sales Status"},"lost_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lost Reason"},"owner_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner User Id"},"ipay_fit_score":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Ipay Fit Score"},"segment":{"anyOf":[{"type":"string","enum":["A","B","C","D","E"]},{"type":"null"}],"title":"Segment"},"priority":{"anyOf":[{"type":"string","enum":["high","medium","low"]},{"type":"null"}],"title":"Priority"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"extra":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra"}},"type":"object","title":"CompanyPatch"},"ComplianceItemUpdate":{"properties":{"item_key":{"type":"string","title":"Item Key"},"status":{"type":"string","title":"Status"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"document_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Url"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["item_key","status"],"title":"ComplianceItemUpdate"},"ComplianceSettingsPatch":{"properties":{"section":{"type":"string","enum":["backup","pentest","audit","iso27001","security_owner"],"title":"Section"},"updates":{"additionalProperties":true,"type":"object","title":"Updates"}},"type":"object","required":["section","updates"],"title":"ComplianceSettingsPatch"},"Condition":{"properties":{"field":{"type":"string","title":"Field"},"op":{"type":"string","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with"],"title":"Op"},"value":{"title":"Value"}},"type":"object","required":["field","op","value"],"title":"Condition"},"ConnectIn":{"properties":{"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"},"merchant_account":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Account"}},"type":"object","title":"ConnectIn"},"ConnectorStatusUpdate":{"properties":{"status":{"type":"string","title":"Status"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"error_rate_15min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Error Rate 15Min"},"latency_ms_p95":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms P95"}},"type":"object","required":["status"],"title":"ConnectorStatusUpdate"},"ContactMerchantIn":{"properties":{"subject":{"type":"string","title":"Subject"},"message":{"type":"string","title":"Message"}},"type":"object","required":["subject","message"],"title":"ContactMerchantIn"},"CostPreviewIn":{"properties":{"carrier_code":{"type":"string","title":"Carrier Code","default":"UPS"},"section":{"type":"string","title":"Section","default":"S2"},"country_code":{"type":"string","title":"Country Code"},"postcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postcode"},"actual_weight_kg":{"type":"number","title":"Actual Weight Kg"},"length_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Length Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"is_business":{"type":"boolean","title":"Is Business","default":true},"extra_surcharge_eur":{"type":"number","title":"Extra Surcharge Eur","default":0.0},"origin":{"type":"string","title":"Origin","default":"NL"}},"type":"object","required":["country_code","actual_weight_kg"],"title":"CostPreviewIn"},"CountryMix":{"properties":{"country_code":{"type":"string","title":"Country Code"},"percentage":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Percentage"}},"type":"object","required":["country_code","percentage"],"title":"CountryMix"},"CreateAvatarTalkIn":{"properties":{"text":{"type":"string","maxLength":4000,"minLength":1,"title":"Text"},"source_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Source Url"},"voice_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Provider"},"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"}},"type":"object","required":["text"],"title":"CreateAvatarTalkIn"},"CreateCaseIn":{"properties":{"company_id":{"type":"string","title":"Company Id"},"primary_owner_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Owner User Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["company_id"],"title":"CreateCaseIn"},"CreateLabelIn":{"properties":{"order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Id"},"carrier_code":{"type":"string","title":"Carrier Code"},"merchant_name":{"type":"string","title":"Merchant Name"},"recipient_name":{"type":"string","title":"Recipient Name"},"recipient_address":{"type":"string","title":"Recipient Address"},"recipient_city":{"type":"string","title":"Recipient City"},"recipient_postal_code":{"type":"string","title":"Recipient Postal Code"},"recipient_country":{"type":"string","title":"Recipient Country","default":"NL"},"amount":{"type":"number","title":"Amount"},"currency":{"type":"string","title":"Currency","default":"EUR"},"ipay_reference_18":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ipay Reference 18"},"service":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service"},"tracking_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Number"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name"}},"type":"object","required":["carrier_code","merchant_name","recipient_name","recipient_address","recipient_city","recipient_postal_code","amount"],"title":"CreateLabelIn"},"CreateOrderRequest":{"properties":{"internal_reference":{"type":"string","title":"Internal Reference","description":"18-digit IPAY reference / order id"},"amount_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount Cents","description":"Amount in cents"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"EUR"},"description":{"type":"string","title":"Description","default":"IPAY pay-on-arrival order"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Url"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"},"notification_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notification Url"},"gateway":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gateway"}},"type":"object","required":["internal_reference","amount_cents"],"title":"CreateOrderRequest"},"CreatePaymentIn":{"properties":{"country_code":{"type":"string","title":"Country Code"},"invoice_no":{"type":"string","title":"Invoice No"},"amount":{"type":"number","title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"description":{"type":"string","title":"Description","default":"IPAY Order"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"backend_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backend Url"},"frontend_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Frontend Url"},"payment_channels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Payment Channels"}},"type":"object","required":["country_code","invoice_no","amount"],"title":"CreatePaymentIn"},"CustomsApproveValue":{"properties":{"approved_by_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved By Note","default":""}},"type":"object","title":"CustomsApproveValue"},"CustomsCaseUpsert":{"properties":{"commercial_invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commercial Invoice Number","default":""},"hs_codes":{"items":{"type":"string"},"type":"array","title":"Hs Codes","default":[]},"declared_value_eur":{"type":"number","title":"Declared Value Eur"},"currency":{"type":"string","title":"Currency","default":"EUR"},"incoterms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Incoterms","default":"DAP"},"items":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Items"},"sender_address_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Address Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","default":""}},"type":"object","required":["declared_value_eur"],"title":"CustomsCaseUpsert"},"CustomsRecordIn":{"properties":{"shipment_id":{"type":"string","title":"Shipment Id"},"commercial_invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commercial Invoice Number","default":""},"hs_codes":{"items":{"type":"string"},"type":"array","title":"Hs Codes","default":[]},"declared_value_eur":{"type":"number","title":"Declared Value Eur"},"currency":{"type":"string","title":"Currency","default":"EUR"},"duties_amount_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duties Amount Eur"},"vat_amount_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vat Amount Eur"},"customs_status":{"type":"string","enum":["draft","value_approved","duties_pending","duties_paid","cleared","held"],"title":"Customs Status","default":"draft"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","default":""}},"type":"object","required":["shipment_id","declared_value_eur"],"title":"CustomsRecordIn"},"DataProcessingEntry":{"properties":{"name":{"type":"string","title":"Name"},"legal_basis":{"type":"string","enum":["contract","consent","legitimate_interest","legal_obligation","vital_interest","public_task"],"title":"Legal Basis","default":"contract"},"purpose":{"type":"string","title":"Purpose"},"data_categories":{"items":{"type":"string"},"type":"array","title":"Data Categories"},"data_subjects":{"items":{"type":"string"},"type":"array","title":"Data Subjects"},"retention_period":{"type":"string","title":"Retention Period","default":""},"recipients":{"items":{"type":"string"},"type":"array","title":"Recipients"},"transfers_outside_eu":{"type":"boolean","title":"Transfers Outside Eu","default":false},"transfer_safeguard":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Safeguard"},"security_measures":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Security Measures"}},"type":"object","required":["name","purpose"],"title":"DataProcessingEntry"},"DealIn":{"properties":{"company_id":{"type":"string","title":"Company Id"},"pipeline":{"type":"string","enum":["merchant_sales","partner_sales"],"title":"Pipeline"},"stage":{"type":"string","title":"Stage","default":"lead"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"amount_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount Eur"},"expected_close_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Close Date"},"owner_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner User Id"}},"type":"object","required":["company_id","pipeline"],"title":"DealIn"},"DealPatch":{"properties":{"deal_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Stage"},"partner_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Contact Name"},"partner_contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Contact Email"},"commercial_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commercial Terms"},"next_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Action"},"next_action_due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Action Due Date","description":"ISO date YYYY-MM-DD"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority","description":"P0 / P1 / P2"},"history_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"History Note","description":"Free-text appended to history if provided"}},"type":"object","title":"DealPatch"},"DealStageIn":{"properties":{"stage":{"type":"string","title":"Stage"}},"type":"object","required":["stage"],"title":"DealStageIn"},"DeliveryMix":{"properties":{"home_delivery_pct":{"type":"number","title":"Home Delivery Pct","default":70.0},"pickup_pct":{"type":"number","title":"Pickup Pct","default":15.0},"locker_pct":{"type":"number","title":"Locker Pct","default":15.0},"returns_pct":{"type":"number","title":"Returns Pct","default":5.0}},"type":"object","title":"DeliveryMix"},"DgPermissionIn":{"properties":{"merchant_id":{"type":"string","title":"Merchant Id"},"carrier_code":{"type":"string","title":"Carrier Code"},"granted":{"type":"boolean","title":"Granted","default":true},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["merchant_id","carrier_code"],"title":"DgPermissionIn"},"DisputeIn":{"properties":{"item_type":{"type":"string","enum":["surcharge","shipment_cost","duty","other"],"title":"Item Type"},"item_id":{"type":"string","title":"Item Id"},"reason":{"type":"string","title":"Reason"},"amount_eur":{"type":"number","title":"Amount Eur"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""}},"type":"object","required":["item_type","item_id","reason","amount_eur"],"title":"DisputeIn"},"DisputeResolveBody":{"properties":{"outcome":{"type":"string","enum":["approved_refund","rejected","partial_refund"],"title":"Outcome"},"refund_amount_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Refund Amount Eur"},"resolution_note":{"type":"string","title":"Resolution Note","default":""}},"type":"object","required":["outcome"],"title":"DisputeResolveBody"},"DropOffIn":{"properties":{"drop_reason":{"type":"string","enum":["merchant_not_responding","contract_not_agreed","pricing_not_agreed","psp_not_supported","carrier_not_supported","technical_complexity_too_high","margin_insufficient","compliance_issue","fraud_risk","volume_too_low","wrong_timing","competitor_chosen","pilot_failed","follow_up_later"],"title":"Drop Reason"},"blocker_type":{"type":"string","enum":["commercial","technical","legal","compliance","other"],"title":"Blocker Type"},"resolution_action":{"type":"string","maxLength":500,"minLength":3,"title":"Resolution Action"},"follow_up_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Follow Up Date"},"move_back_to_hubspot_nurture":{"type":"boolean","title":"Move Back To Hubspot Nurture","default":false},"pause_or_close":{"type":"string","enum":["pause","close"],"title":"Pause Or Close","default":"pause"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["drop_reason","blocker_type","resolution_action"],"title":"DropOffIn"},"DutyPaymentRequest":{"properties":{"amount_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount Eur"},"payment_method":{"type":"string","enum":["ipay_consumer","merchant_credit","manual"],"title":"Payment Method","default":"ipay_consumer"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","default":""}},"type":"object","title":"DutyPaymentRequest"},"EvaluateIn":{"properties":{"destination_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination Country"},"destination_postcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination Postcode"},"origin_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Country","default":"NL"},"actual_weight_kg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actual Weight Kg"},"length_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Length Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"label_print_hour":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Label Print Hour"},"day_of_week":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Day Of Week"},"carrier_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Code"},"delivery_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Type"},"is_cross_border":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Cross Border"},"customs_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Customs Required"},"goods_value_approved":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Goods Value Approved"},"vat_eori_set":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Vat Eori Set"},"locker_eligible":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Locker Eligible"},"saturday_delivery_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Saturday Delivery Required"},"merchant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"}},"type":"object","title":"EvaluateIn","description":"Test/simulate evaluation: pass a shipment context, get triggered actions back."},"ExcludeRowIn":{"properties":{"exclusion_reason":{"type":"string","title":"Exclusion Reason"}},"type":"object","required":["exclusion_reason"],"title":"ExcludeRowIn"},"ExecuteActionIn":{"properties":{"merchant_id":{"type":"string","maxLength":64,"minLength":1,"title":"Merchant Id"},"action_id":{"type":"string","maxLength":64,"minLength":1,"title":"Action Id"},"args":{"additionalProperties":true,"type":"object","title":"Args"},"proposal_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposal Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","required":["merchant_id","action_id"],"title":"ExecuteActionIn"},"ExecutePartnerActionIn":{"properties":{"partner_id":{"type":"string","maxLength":64,"minLength":1,"title":"Partner Id"},"action_id":{"type":"string","title":"Action Id"},"args":{"additionalProperties":true,"type":"object","title":"Args"},"proposal_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposal Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","required":["partner_id","action_id"],"title":"ExecutePartnerActionIn"},"ExtraServices":{"properties":{"ipay_enabled":{"type":"boolean","title":"Ipay Enabled","default":true},"insurance":{"type":"boolean","title":"Insurance","default":false},"average_insured_value_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Insured Value Eur"},"signature":{"type":"boolean","title":"Signature","default":false},"saturday_delivery":{"type":"boolean","title":"Saturday Delivery","default":false},"evening_delivery":{"type":"boolean","title":"Evening Delivery","default":false},"returns":{"type":"boolean","title":"Returns","default":false}},"type":"object","title":"ExtraServices"},"FuelSurchargeUpdate":{"properties":{"published_pct":{"type":"number","title":"Published Pct"},"ipay_discount_pct":{"type":"number","title":"Ipay Discount Pct","default":0.5},"source_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Link"}},"additionalProperties":false,"type":"object","required":["published_pct"],"title":"FuelSurchargeUpdate"},"GdprActionIn":{"properties":{"action":{"type":"string","title":"Action"}},"type":"object","required":["action"],"title":"GdprActionIn"},"GdprRequestPatch":{"properties":{"status":{"type":"string","enum":["queued","in_progress","completed","rejected"],"title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"handled_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handled By"}},"type":"object","required":["status"],"title":"GdprRequestPatch"},"GenerateBatchIn":{"properties":{"accounting_date":{"type":"string","title":"Accounting Date","description":"YYYY-MM-DD"},"entity_id":{"type":"string","title":"Entity Id","default":"IPAY_EUROPE"},"currency":{"type":"string","title":"Currency","default":"EUR"}},"type":"object","required":["accounting_date"],"title":"GenerateBatchIn"},"GenerateContractIn":{"properties":{"template_key":{"type":"string","title":"Template Key"}},"type":"object","required":["template_key"],"title":"GenerateContractIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HubspotConnectIn":{"properties":{"access_token":{"type":"string","title":"Access Token"},"portal_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portal Id"}},"type":"object","required":["access_token"],"title":"HubspotConnectIn"},"IncidentEntry":{"properties":{"title":{"type":"string","title":"Title"},"type":{"type":"string","enum":["security","privacy_breach","operational","psp","carrier"],"title":"Type","default":"security"},"severity":{"type":"string","enum":["low","medium","high","critical"],"title":"Severity","default":"medium"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"detected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected At"},"reported_to_authority":{"type":"boolean","title":"Reported To Authority","default":false},"authority_reported_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority Reported At"},"affected_merchants_count":{"type":"integer","title":"Affected Merchants Count","default":0},"affected_consumers_count":{"type":"integer","title":"Affected Consumers Count","default":0},"status":{"type":"string","enum":["open","investigating","contained","remediated","closed"],"title":"Status","default":"open"},"remediation_steps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation Steps"}},"type":"object","required":["title"],"title":"IncidentEntry"},"IncidentIn":{"properties":{"partner_id":{"type":"string","title":"Partner Id"},"severity":{"type":"string","title":"Severity"},"type":{"type":"string","title":"Type"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"countries_affected":{"items":{"type":"string"},"type":"array","title":"Countries Affected"},"payment_methods_affected":{"items":{"type":"string"},"type":"array","title":"Payment Methods Affected"},"estimated_orders_affected":{"type":"integer","title":"Estimated Orders Affected","default":0},"root_cause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Cause"},"workaround":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workaround"}},"type":"object","required":["partner_id","severity","type","title"],"title":"IncidentIn"},"IncidentUpdate":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"root_cause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Cause"},"workaround":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workaround"},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved At"},"estimated_orders_affected":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Orders Affected"}},"type":"object","title":"IncidentUpdate"},"InquiryIn":{"properties":{"country_code":{"type":"string","title":"Country Code"},"invoice_no":{"type":"string","title":"Invoice No"}},"type":"object","required":["country_code","invoice_no"],"title":"InquiryIn"},"IntakeDataPatch":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data","description":"Sparse update on intake_data fields"}},"type":"object","required":["data"],"title":"IntakeDataPatch"},"IpaySignIn":{"properties":{"signer_name":{"type":"string","title":"Signer Name"},"signer_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signer Role","default":"Director"}},"type":"object","required":["signer_name"],"title":"IpaySignIn"},"IssueCodeIn":{"properties":{"ipay_reference_18":{"type":"string","maxLength":18,"minLength":18,"title":"Ipay Reference 18"},"carrier_code":{"type":"string","title":"Carrier Code","description":"UPS / DPD / POSTNL / INPOST / ALLEGRO_ONE / ..."},"locker_id":{"type":"string","title":"Locker Id"},"locker_address":{"type":"string","title":"Locker Address"},"locker_lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Locker Lat"},"locker_lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Locker Lng"},"locker_photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locker Photo Url"},"unlock_code":{"type":"string","maxLength":20,"minLength":4,"title":"Unlock Code"},"open_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Open Until"},"carrier_tracking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Tracking Url"}},"type":"object","required":["ipay_reference_18","carrier_code","locker_id","locker_address","unlock_code"],"title":"IssueCodeIn"},"KeepDiscountIn":{"properties":{"return_id":{"type":"string","title":"Return Id"}},"type":"object","required":["return_id"],"title":"KeepDiscountIn"},"LightspeedConnectIn":{"properties":{"product_line":{"type":"string","enum":["ecom","x_series"],"title":"Product Line","default":"ecom"},"cluster":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cluster","default":"api.shoplightspeed.com"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","default":"en"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"api_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Secret"},"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"personal_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Personal Token"},"auto_create_session":{"type":"boolean","title":"Auto Create Session","default":true},"trigger":{"type":"string","enum":["payment_module","tag_ipay","always"],"title":"Trigger","default":"payment_module"}},"type":"object","title":"LightspeedConnectIn"},"LinkIn":{"properties":{"hubspot_company_id":{"type":"string","title":"Hubspot Company Id"}},"type":"object","required":["hubspot_company_id"],"title":"LinkIn"},"LoginIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginIn"},"LoyaltyCardIn":{"properties":{"merchant_name":{"type":"string","title":"Merchant Name"},"card_type":{"type":"string","title":"Card Type"},"card_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Number"},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Barcode"},"qr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qr"},"pin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pin"},"balance_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance Eur"},"expiry_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiry Date"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"merchant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"},"can_use_with_ipay":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Can Use With Ipay","default":"unknown"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["merchant_name","card_type"],"title":"LoyaltyCardIn"},"LoyaltyCardUpdate":{"properties":{"merchant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Name"},"card_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Type"},"card_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Number"},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Barcode"},"qr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qr"},"pin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pin"},"balance_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance Eur"},"expiry_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiry Date"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"merchant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"},"can_use_with_ipay":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Can Use With Ipay"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"LoyaltyCardUpdate"},"MagentoConnectIn":{"properties":{"shop_url":{"type":"string","title":"Shop Url"},"admin_username":{"type":"string","title":"Admin Username"},"admin_password":{"type":"string","title":"Admin Password"},"auto_create_session":{"type":"boolean","title":"Auto Create Session","default":true},"trigger":{"type":"string","enum":["payment_module","tag_ipay","always"],"title":"Trigger","default":"payment_module"}},"type":"object","required":["shop_url","admin_username","admin_password"],"title":"MagentoConnectIn"},"MagicLinkIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"MagicLinkIn"},"MarkStatementResolvedIn":{"properties":{"resolution_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Note"}},"type":"object","title":"MarkStatementResolvedIn"},"MerchantGdprRequestIn":{"properties":{"merchant_id":{"type":"string","title":"Merchant Id"},"action":{"type":"string","enum":["export","delete","rectification","portability","restrict"],"title":"Action","default":"export"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["merchant_id"],"title":"MerchantGdprRequestIn"},"MerchantOverrideIn":{"properties":{"merchant_id":{"type":"string","title":"Merchant Id"},"country":{"type":"string","title":"Country"},"payment_method":{"type":"string","title":"Payment Method"},"primary_partner_id":{"type":"string","title":"Primary Partner Id"},"backup_partner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backup Partner Id"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["merchant_id","country","payment_method","primary_partner_id"],"title":"MerchantOverrideIn"},"MerchantOverrideUpdate":{"properties":{"primary_partner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Partner Id"},"backup_partner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backup Partner Id"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"MerchantOverrideUpdate"},"MerchantProfilePatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"website_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website Url"},"branche":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branche"},"segments":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Segments"},"customer_since":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Since"},"kyc_status":{"anyOf":[{"type":"string","enum":["pending","in_review","approved","rejected"]},{"type":"null"}],"title":"Kyc Status"},"psp_online":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Psp Online"},"psp_via_ipay":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Psp Via Ipay"},"psp_link_signed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Psp Link Signed"},"psp_link_signed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Psp Link Signed At"},"contract_signed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Contract Signed"},"contract_signed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Signed At"},"special_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Special Terms"},"ipay_fee_per_order_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ipay Fee Per Order Eur"},"ipay_contract_signed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ipay Contract Signed At"},"ipay_contract_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ipay Contract Notes"},"naw":{"anyOf":[{"$ref":"#/components/schemas/NAWIn"},{"type":"null"}]}},"type":"object","title":"MerchantProfilePatch"},"MerchantSettingsIn":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"otp_required_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Otp Required Default"},"enabled_payment_methods":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Enabled Payment Methods"},"cash_cod_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cash Cod Enabled"}},"type":"object","title":"MerchantSettingsIn"},"NAWIn":{"properties":{"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"kvk_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kvk Number"},"vat_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Number"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"postal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},"type":"object","title":"NAWIn"},"NopCommerceConnectIn":{"properties":{"shop_url":{"type":"string","title":"Shop Url"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"auto_create_session":{"type":"boolean","title":"Auto Create Session","default":true},"trigger":{"type":"string","enum":["payment_module","tag_ipay","always"],"title":"Trigger","default":"payment_module"}},"type":"object","required":["shop_url","client_id","client_secret"],"title":"NopCommerceConnectIn"},"OAuthCallbackIn":{"properties":{"code":{"type":"string","title":"Code"},"state":{"type":"string","title":"State"}},"type":"object","required":["code","state"],"title":"OAuthCallbackIn"},"OdooConnectIn":{"properties":{"shop_url":{"type":"string","title":"Shop Url"},"database":{"type":"string","title":"Database"},"username":{"type":"string","title":"Username"},"api_key":{"type":"string","title":"Api Key"},"auto_create_session":{"type":"boolean","title":"Auto Create Session","default":true},"trigger":{"type":"string","enum":["payment_module","tag_ipay","always"],"title":"Trigger","default":"payment_module"}},"type":"object","required":["shop_url","database","username","api_key"],"title":"OdooConnectIn"},"OfferAccept":{"properties":{"offer_id":{"type":"string","title":"Offer Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["offer_id"],"title":"OfferAccept"},"OpenCartConnectIn":{"properties":{"shop_url":{"type":"string","title":"Shop Url"},"api_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Token"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"auto_create_session":{"type":"boolean","title":"Auto Create Session","default":true},"trigger":{"type":"string","enum":["payment_module","tag_ipay","always"],"title":"Trigger","default":"payment_module"}},"type":"object","required":["shop_url"],"title":"OpenCartConnectIn"},"OrderIn":{"properties":{"customer_name":{"type":"string","title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"customer_address":{"type":"string","title":"Customer Address"},"customer_country":{"type":"string","title":"Customer Country","default":"US"},"customer_postal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Postal"},"amount":{"type":"number","title":"Amount"},"currency":{"type":"string","title":"Currency","default":"EUR"},"weight_kg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight Kg"},"length_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Length Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"volume_l":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume L"},"carrier_code":{"type":"string","title":"Carrier Code","default":"UPS"},"origin_country":{"type":"string","enum":["NL","BE","FR"],"title":"Origin Country","default":"NL"},"type_goods":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type Goods"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"dangerous_goods_declared":{"type":"boolean","title":"Dangerous Goods Declared","default":false},"ipay_flag":{"type":"boolean","title":"Ipay Flag","default":true},"external_order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Order Id"},"checkout_payment_method":{"type":"string","enum":["ipay","cod","prepaid"],"title":"Checkout Payment Method","default":"ipay"}},"type":"object","required":["customer_name","customer_address","amount"],"title":"OrderIn"},"OtpStrategyIn":{"properties":{"carrier_code":{"type":"string","title":"Carrier Code"},"strategy":{"type":"string","enum":["deterministic","random_4","random_6","carrier_keeps","no_otp"],"title":"Strategy"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["carrier_code","strategy"],"title":"OtpStrategyIn"},"PSPRailUpdate":{"properties":{"psp_rail":{"type":"string","title":"Psp Rail"},"psp_rail_locked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Psp Rail Locked"}},"type":"object","required":["psp_rail"],"title":"PSPRailUpdate"},"PackageDimensions":{"properties":{"actual_weight_kg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actual Weight Kg"},"length_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Length Cm"},"width_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Cm"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"volumetric_weight_kg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volumetric Weight Kg"},"contents_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contents Description","default":""}},"type":"object","title":"PackageDimensions"},"ParcelStatusIn":{"properties":{"parcel_status":{"type":"string","enum":["LABEL_READY","PICKED_UP","SORTING","IN_HUB","IN_DELIVERY","DELIVERED","RETURNED"],"title":"Parcel Status"}},"type":"object","required":["parcel_status"],"title":"ParcelStatusIn"},"PartnerChatRequest":{"properties":{"partner_id":{"type":"string","maxLength":64,"minLength":1,"title":"Partner Id"},"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","required":["partner_id","message"],"title":"PartnerChatRequest"},"PartnerContact":{"properties":{"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},"type":"object","required":["name"],"title":"PartnerContact"},"PartnerCreate":{"properties":{"name":{"type":"string","title":"Name"},"partner_type":{"type":"string","title":"Partner Type"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"legal_entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Entity"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"countries_active":{"items":{"type":"string"},"type":"array","title":"Countries Active"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"priority_score":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority Score","default":"C"},"strategic_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategic Rationale"},"expected_monthly_volume":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Monthly Volume"},"onboarding_status":{"type":"string","title":"Onboarding Status","default":"lead"},"commercial_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commercial Owner"},"technical_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Technical Owner"},"legal_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Owner"},"crm_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"contacts":{"items":{"$ref":"#/components/schemas/PartnerContact"},"type":"array","title":"Contacts"},"koppelstrategie":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Koppelstrategie"},"layer":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Layer"},"payment_methods_supported":{"items":{"type":"string"},"type":"array","title":"Payment Methods Supported"},"is_primary_or_backup":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Is Primary Or Backup"}},"type":"object","required":["name","partner_type"],"title":"PartnerCreate"},"PartnerPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"partner_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Type"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"legal_entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Entity"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"countries_active":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Countries Active"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"priority_score":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority Score"},"strategic_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategic Rationale"},"expected_monthly_volume":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Monthly Volume"},"onboarding_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Onboarding Status"},"commercial_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commercial Owner"},"technical_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Technical Owner"},"legal_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Owner"},"crm_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"contacts":{"anyOf":[{"items":{"$ref":"#/components/schemas/PartnerContact"},"type":"array"},{"type":"null"}],"title":"Contacts"}},"type":"object","title":"PartnerPatch"},"PartnerSignIn":{"properties":{"signer_name":{"type":"string","title":"Signer Name"},"signer_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signer Role","default":"Authorised signatory"},"consent":{"type":"boolean","title":"Consent","default":false}},"type":"object","required":["signer_name"],"title":"PartnerSignIn"},"PicqerConnectIn":{"properties":{"subdomain":{"type":"string","title":"Subdomain"},"api_key":{"type":"string","title":"Api Key"},"auto_create_session":{"type":"boolean","title":"Auto Create Session","default":true},"trigger":{"type":"string","enum":["payment_module","custom_field_ipay","always"],"title":"Trigger","default":"payment_module"},"custom_field_name":{"type":"string","title":"Custom Field Name","default":"ipay_reference_18"}},"type":"object","required":["subdomain","api_key"],"title":"PicqerConnectIn"},"PostExactIn":{"properties":{"force":{"type":"boolean","title":"Force","default":false}},"type":"object","title":"PostExactIn"},"PrestaShopConnectIn":{"properties":{"shop_url":{"type":"string","title":"Shop Url"},"api_key":{"type":"string","title":"Api Key"},"auto_create_session":{"type":"boolean","title":"Auto Create Session","default":true},"trigger":{"type":"string","enum":["payment_module","tag_ipay","always"],"title":"Trigger","default":"payment_module"}},"type":"object","required":["shop_url","api_key"],"title":"PrestaShopConnectIn"},"PreventionOfferIn":{"properties":{"merchant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"},"offer_type":{"type":"string","enum":["exchange_size","exchange_colour","exchange_replacement","keep_discount","wallet_bonus","free_replacement","voucher","support_contact"],"title":"Offer Type"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"description":{"type":"string","maxLength":500,"title":"Description","default":""},"discount_pct":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Discount Pct","default":0},"bonus_pct":{"type":"number","maximum":50.0,"minimum":0.0,"title":"Bonus Pct","default":0},"applies_to_reasons":{"items":{"type":"string"},"type":"array","title":"Applies To Reasons"},"min_order_value_eur":{"type":"number","minimum":0.0,"title":"Min Order Value Eur","default":0},"active":{"type":"boolean","title":"Active","default":true},"priority":{"type":"integer","minimum":0.0,"title":"Priority","default":0}},"type":"object","required":["offer_type","title"],"title":"PreventionOfferIn","description":"Operator-configurable prevention offer."},"ProfilePatch":{"properties":{"section":{"type":"string","enum":["legal","data","psp","carrier","access","documents","risk","tech","testing","approval"],"title":"Section"},"updates":{"additionalProperties":true,"type":"object","title":"Updates"}},"type":"object","required":["section","updates"],"title":"ProfilePatch"},"ProfileUpdateIn":{"properties":{"preferred_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Language"},"marketing_opt_in":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Marketing Opt In"},"transactional_opt_in":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transactional Opt In"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"date_of_birth":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Of Birth"},"default_delivery_address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Delivery Address"},"preferred_carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Carrier"},"preferred_locker_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Locker Id"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","title":"ProfileUpdateIn"},"PublicStepNote":{"properties":{"step_key":{"type":"string","title":"Step Key"},"note":{"type":"string","title":"Note"}},"type":"object","required":["step_key","note"],"title":"PublicStepNote"},"PublicTaskCompleteIn":{"properties":{"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"type":"object","title":"PublicTaskCompleteIn"},"QuickQRAdminIn":{"properties":{"amount":{"type":"number","title":"Amount","default":49.95},"currency":{"type":"string","title":"Currency","default":"EUR"},"customer_name":{"type":"string","title":"Customer Name","default":"Demo Customer"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"customer_country":{"type":"string","title":"Customer Country","default":"NL"},"carrier_code":{"type":"string","title":"Carrier Code","default":"UPS"},"otp_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Otp Required"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"},"reason_code":{"type":"string","maxLength":200,"minLength":3,"title":"Reason Code","description":"Audit reason — required for every Quick QR generation"},"target_merchant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Merchant Id","description":"Optional — generate the QR under a specific merchant (defaults to a system merchant if not provided)"},"target_shipment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Shipment Id","description":"Optional — link to existing shipment/tracking_number for the 1-active-QR rule"}},"type":"object","required":["reason_code"],"title":"QuickQRAdminIn","description":"Extends QuickQRIn with admin-required reason_code + optional merchant target."},"QuickQRIn":{"properties":{"amount":{"type":"number","title":"Amount","default":49.95},"currency":{"type":"string","title":"Currency","default":"EUR"},"customer_name":{"type":"string","title":"Customer Name","default":"Demo Customer"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"customer_country":{"type":"string","title":"Customer Country","default":"NL"},"carrier_code":{"type":"string","title":"Carrier Code","default":"UPS"},"otp_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Otp Required"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}},"type":"object","title":"QuickQRIn"},"QuoteIn":{"properties":{"merchant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"},"merchant_name":{"type":"string","title":"Merchant Name"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"contact_person":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Person"},"sales_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sales Owner"},"hubspot_deal_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hubspot Deal Id"},"customer_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Address"},"customer_postal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Postal"},"customer_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer City"},"customer_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Country"},"issue_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issue Date"},"issue_place":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issue Place"},"intro_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intro Text"},"selected_countries_in_appendix":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Selected Countries In Appendix"},"monthly_parcels":{"type":"integer","minimum":0.0,"title":"Monthly Parcels"},"expected_growth_pct":{"type":"number","title":"Expected Growth Pct","default":0.0},"contract_duration_months":{"type":"integer","title":"Contract Duration Months","default":12},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"country_mix":{"items":{"$ref":"#/components/schemas/CountryMix"},"type":"array","title":"Country Mix"},"weight_mix":{"items":{"$ref":"#/components/schemas/WeightMix"},"type":"array","title":"Weight Mix"},"delivery_mix":{"$ref":"#/components/schemas/DeliveryMix","default":{"home_delivery_pct":70.0,"pickup_pct":15.0,"locker_pct":15.0,"returns_pct":5.0}},"extras":{"$ref":"#/components/schemas/ExtraServices","default":{"ipay_enabled":true,"insurance":false,"signature":false,"saturday_delivery":false,"evening_delivery":false,"returns":false}},"margin_method":{"type":"string","enum":["fixed_eur","percentage","min_eur","min_percentage","target_sell_price"],"title":"Margin Method","default":"percentage"},"margin_value":{"type":"number","title":"Margin Value","default":25.0},"ipay_fee_eur":{"type":"number","title":"Ipay Fee Eur","default":2.0},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["merchant_name","monthly_parcels","country_mix","weight_mix"],"title":"QuoteIn"},"QuoteSendIn":{"properties":{"to_email":{"type":"string","format":"email","title":"To Email"},"cc_emails":{"items":{"type":"string","format":"email"},"type":"array","title":"Cc Emails","default":[]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"body_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Message"}},"type":"object","required":["to_email"],"title":"QuoteSendIn"},"QuoteSettingsIn":{"properties":{"min_margin_pct":{"type":"number","maximum":80.0,"minimum":0.0,"title":"Min Margin Pct","default":5.0},"default_intro_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Intro Text"},"default_issue_place":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Issue Place"}},"type":"object","title":"QuoteSettingsIn"},"QuoteStatusIn":{"properties":{"status":{"type":"string","enum":["draft","approved","sent","won","lost","expired","withdrawn"],"title":"Status"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["status"],"title":"QuoteStatusIn"},"ReasonIn":{"properties":{"merchant_id":{"type":"string","title":"Merchant Id"},"label":{"type":"string","title":"Label"},"category":{"type":"string","title":"Category"},"sub_reasons":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Sub Reasons"},"priority":{"type":"integer","title":"Priority","default":50},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["merchant_id","label","category"],"title":"ReasonIn"},"ReconciliationRunRequest":{"properties":{"period_start":{"type":"string","title":"Period Start"},"period_end":{"type":"string","title":"Period End"},"carrier_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Code"}},"type":"object","required":["period_start","period_end"],"title":"ReconciliationRunRequest"},"RefundChoiceV041":{"properties":{"refund_choice":{"type":"string","enum":["money","app_credit","exchange","keep_item_discount"],"title":"Refund Choice"},"exchange_variant_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exchange Variant Note"},"accepted_offer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accepted Offer Id"}},"type":"object","required":["refund_choice"],"title":"RefundChoiceV041","description":"v0.41 expanded refund choice."},"RefundMethodIn":{"properties":{"return_id":{"type":"string","title":"Return Id"},"method":{"type":"string","title":"Method"}},"type":"object","required":["return_id","method"],"title":"RefundMethodIn"},"RefundRequest":{"properties":{"amount_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount Cents"},"currency":{"type":"string","title":"Currency","default":"EUR"},"description":{"type":"string","title":"Description","default":"IPAY refund"}},"type":"object","required":["amount_cents"],"title":"RefundRequest"},"RegisterIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"name":{"type":"string","title":"Name"},"role":{"type":"string","enum":["merchant","operator","driver","cfo","sales_manager","partner","carrier","investor","test_consumer","test_merchant"],"title":"Role","default":"merchant"},"merchant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Name"}},"type":"object","required":["email","password","name"],"title":"RegisterIn"},"RejectBatchIn":{"properties":{"reason":{"type":"string","title":"Reason"}},"type":"object","required":["reason"],"title":"RejectBatchIn"},"ReleaseEventIn":{"properties":{"shipment_id":{"type":"string","title":"Shipment Id"},"new_state":{"type":"string","enum":["no_hold","hold_payment_pending","hold_customs_missing","hold_duties_unpaid","hold_fraud_review","released","delivered","cancelled"],"title":"New State"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","default":""},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["shipment_id","new_state"],"title":"ReleaseEventIn"},"ReturnChoice":{"properties":{"refund_choice":{"type":"string","enum":["money","app_credit"],"title":"Refund Choice"}},"type":"object","required":["refund_choice"],"title":"ReturnChoice"},"ReturnInitiate":{"properties":{"ipay_reference_18":{"type":"string","maxLength":18,"minLength":18,"title":"Ipay Reference 18"},"customer_email":{"type":"string","format":"email","title":"Customer Email"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons","default":[]},"item_ids":{"items":{"type":"string"},"type":"array","title":"Item Ids","default":[]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["ipay_reference_18","customer_email"],"title":"ReturnInitiate"},"ReturnRuleIn":{"properties":{"name":{"type":"string","title":"Name"},"threshold_return_rate_pct":{"type":"number","title":"Threshold Return Rate Pct","default":40.0},"min_orders":{"type":"integer","title":"Min Orders","default":3},"action":{"type":"string","enum":["warn","review","block"],"title":"Action","default":"warn"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["name"],"title":"ReturnRuleIn"},"RiskRegisterEntry":{"properties":{"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"type":"string","title":"Category"},"likelihood":{"type":"string","enum":["very_low","low","medium","high","very_high"],"title":"Likelihood","default":"medium"},"impact":{"type":"string","enum":["very_low","low","medium","high","very_high"],"title":"Impact","default":"medium"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"},"mitigation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mitigation"},"status":{"type":"string","enum":["open","mitigated","accepted","closed"],"title":"Status","default":"open"},"target_resolution_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Resolution Date"}},"type":"object","required":["title","category"],"title":"RiskRegisterEntry"},"RoutingRuleIn":{"properties":{"country":{"type":"string","title":"Country"},"payment_method":{"type":"string","title":"Payment Method"},"primary_partner_id":{"type":"string","title":"Primary Partner Id"},"backup_partner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backup Partner Id"},"second_backup_partner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Second Backup Partner Id"},"failover_allowed":{"type":"boolean","title":"Failover Allowed","default":true},"failover_threshold_error_pct":{"type":"number","title":"Failover Threshold Error Pct","default":5.0},"failover_threshold_latency_ms":{"type":"integer","title":"Failover Threshold Latency Ms","default":5000},"primary_fee_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Primary Fee Pct"},"backup_fee_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Backup Fee Pct"},"priority":{"type":"integer","title":"Priority","default":100},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["country","payment_method","primary_partner_id"],"title":"RoutingRuleIn"},"RoutingRuleUpdate":{"properties":{"primary_partner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Partner Id"},"backup_partner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backup Partner Id"},"second_backup_partner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Second Backup Partner Id"},"failover_allowed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Failover Allowed"},"failover_threshold_error_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Failover Threshold Error Pct"},"failover_threshold_latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Failover Threshold Latency Ms"},"primary_fee_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Primary Fee Pct"},"backup_fee_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Backup Fee Pct"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"RoutingRuleUpdate"},"RuleIn":{"properties":{"name":{"type":"string","title":"Name"},"rule_type":{"type":"string","title":"Rule Type"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"},"conditions":{"items":{"$ref":"#/components/schemas/Condition"},"type":"array","title":"Conditions","default":[]},"conditions_logic":{"type":"string","enum":["AND","OR"],"title":"Conditions Logic","default":"AND"},"actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Actions"},"merchant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"},"active":{"type":"boolean","title":"Active","default":true},"valid_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid From"},"valid_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid Until"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name","rule_type","actions"],"title":"RuleIn"},"RulePatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"rule_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Type"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"},"conditions":{"anyOf":[{"items":{"$ref":"#/components/schemas/Condition"},"type":"array"},{"type":"null"}],"title":"Conditions"},"conditions_logic":{"anyOf":[{"type":"string","enum":["AND","OR"]},{"type":"null"}],"title":"Conditions Logic"},"actions":{"anyOf":[{"items":{"$ref":"#/components/schemas/Action"},"type":"array"},{"type":"null"}],"title":"Actions"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"RulePatch"},"SavingsCalculatorRequest":{"properties":{"monthly_volume":{"type":"integer","exclusiveMinimum":0.0,"title":"Monthly Volume"},"avg_weight_kg":{"type":"number","exclusiveMinimum":0.0,"title":"Avg Weight Kg"},"countries":{"items":{"type":"string"},"type":"array","title":"Countries","default":[]},"delivery_mix":{"additionalProperties":{"type":"number"},"type":"object","title":"Delivery Mix"}},"type":"object","required":["monthly_volume","avg_weight_kg"],"title":"SavingsCalculatorRequest"},"SendReminderIn":{"properties":{"to_email":{"type":"string","minLength":4,"title":"To Email"},"custom_message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Custom Message"}},"type":"object","required":["to_email"],"title":"SendReminderIn"},"SendStatementIn":{"properties":{"to_email":{"type":"string","title":"To Email"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","required":["to_email"],"title":"SendStatementIn"},"SendcloudOriginIn":{"properties":{"label":{"type":"string","maxLength":100,"minLength":1,"title":"Label","description":"e.g. 'Amsterdam HQ'"},"sender_address_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Address Id","description":"Sendcloud Sender Address ID"},"company_name":{"type":"string","maxLength":100,"minLength":1,"title":"Company Name"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"address_line1":{"type":"string","title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"postal_code":{"type":"string","title":"Postal Code"},"city":{"type":"string","title":"City"},"country":{"type":"string","maxLength":2,"minLength":2,"title":"Country"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"is_default":{"type":"boolean","title":"Is Default","default":false}},"type":"object","required":["label","company_name","address_line1","postal_code","city","country"],"title":"SendcloudOriginIn"},"SendcloudSettingsIn":{"properties":{"tariff_source":{"type":"string","enum":["sendcloud_negotiated","ipay_negotiated"],"title":"Tariff Source","description":"Which contract rates to use when generating labels.","default":"ipay_negotiated"},"default_carrier_priority":{"items":{"type":"string"},"type":"array","title":"Default Carrier Priority","description":"Carrier preference order"},"fallback_to_other_origins":{"type":"boolean","title":"Fallback To Other Origins","description":"If primary origin out-of-stock, route via secondary origin","default":true},"auto_book_pickup":{"type":"boolean","title":"Auto Book Pickup","default":true},"label_size":{"type":"string","enum":["A4","A6"],"title":"Label Size","default":"A6"}},"type":"object","title":"SendcloudSettingsIn"},"SenderAddressIn":{"properties":{"label":{"type":"string","title":"Label"},"sender_country":{"type":"string","maxLength":2,"minLength":2,"title":"Sender Country"},"warehouse_address_line1":{"type":"string","title":"Warehouse Address Line1"},"warehouse_address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warehouse Address Line2","default":""},"postal_code":{"type":"string","title":"Postal Code"},"city":{"type":"string","title":"City"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name","default":""},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone","default":""},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email","default":""},"return_address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Address Line1","default":""},"return_postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Postal Code","default":""},"return_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return City","default":""},"return_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Country","default":""},"customs_sender_legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customs Sender Legal Name","default":""},"vat_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Number","default":""},"eori_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eori Number","default":""},"default_carrier_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Carrier Code","default":""},"pickup_schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pickup Schedule","default":""},"cutoff_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cutoff Time","default":""},"is_default":{"type":"boolean","title":"Is Default","default":false},"is_active":{"type":"boolean","title":"Is Active","default":true},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","default":""}},"type":"object","required":["label","sender_country","warehouse_address_line1","postal_code","city"],"title":"SenderAddressIn"},"SenderAddressPatch":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"sender_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Country"},"warehouse_address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warehouse Address Line1"},"warehouse_address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warehouse Address Line2"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"return_address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Address Line1"},"return_postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Postal Code"},"return_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return City"},"return_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Country"},"customs_sender_legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customs Sender Legal Name"},"vat_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Number"},"eori_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eori Number"},"default_carrier_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Carrier Code"},"pickup_schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pickup Schedule"},"cutoff_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cutoff Time"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"SenderAddressPatch"},"SetRefundOptionIn":{"properties":{"return_case_id":{"type":"string","title":"Return Case Id"},"option":{"type":"string","title":"Option"}},"type":"object","required":["return_case_id","option"],"title":"SetRefundOptionIn"},"SettingsIn":{"properties":{"credit_bonus_pct":{"type":"number","maximum":50.0,"minimum":0.0,"title":"Credit Bonus Pct","default":10.0}},"type":"object","title":"SettingsIn"},"ShareRequestIn":{"properties":{"order_id":{"type":"string","title":"Order Id"}},"type":"object","required":["order_id"],"title":"ShareRequestIn"},"ShipmentIn":{"properties":{"order_id":{"type":"string","title":"Order Id"},"sender_address_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Address Id"},"carrier_code":{"type":"string","title":"Carrier Code"},"service_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Code","default":"standard"},"delivery_type":{"type":"string","enum":["home","pickup_point","locker","freight"],"title":"Delivery Type","default":"home"},"packages":{"items":{"$ref":"#/components/schemas/PackageDimensions"},"type":"array","title":"Packages","default":[]},"tracking_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Number","default":""},"label_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Url","default":""},"eta_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eta Date","default":""},"carrier_cost_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Carrier Cost Eur"},"charge_to_customer_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Charge To Customer Eur"},"ipay_fee_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ipay Fee Eur"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","default":""}},"type":"object","required":["order_id","carrier_code"],"title":"ShipmentIn"},"ShippingRateIn":{"properties":{"country_code":{"type":"string","title":"Country Code","default":"US"},"zone":{"type":"string","title":"Zone","default":"ZONE_1"},"weight_min_kg":{"type":"number","title":"Weight Min Kg","default":0},"weight_max_kg":{"type":"number","title":"Weight Max Kg","default":5},"volume_min_l":{"type":"number","title":"Volume Min L","default":0},"volume_max_l":{"type":"number","title":"Volume Max L","default":50},"base_price":{"type":"number","title":"Base Price"},"sales_price":{"type":"number","title":"Sales Price"},"currency":{"type":"string","title":"Currency","default":"EUR"}},"type":"object","required":["base_price","sales_price"],"title":"ShippingRateIn"},"ShopifyConnectIn":{"properties":{"shop_url":{"type":"string","title":"Shop Url"},"access_token":{"type":"string","title":"Access Token"},"auto_create_session":{"type":"boolean","title":"Auto Create Session","default":true},"trigger":{"type":"string","enum":["gateway_cod","tag_ipay","always"],"title":"Trigger","default":"gateway_cod"}},"type":"object","required":["shop_url","access_token"],"title":"ShopifyConnectIn"},"ShopwareConnectIn":{"properties":{"shop_url":{"type":"string","title":"Shop Url"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"auto_create_session":{"type":"boolean","title":"Auto Create Session","default":true},"trigger":{"type":"string","enum":["payment_module","tag_ipay","always"],"title":"Trigger","default":"payment_module"}},"type":"object","required":["shop_url","client_id","client_secret"],"title":"ShopwareConnectIn"},"SimulatedConnectIn":{"properties":{"api_key":{"type":"string","title":"Api Key","default":""},"seller_id":{"type":"string","title":"Seller Id","default":""},"auto_create_session":{"type":"boolean","title":"Auto Create Session","default":true},"trigger":{"type":"string","enum":["always","ipay_only","cod_only"],"title":"Trigger","default":"always"}},"type":"object","title":"SimulatedConnectIn"},"SplitConfigIn":{"properties":{"split_enabled":{"type":"boolean","title":"Split Enabled","default":true},"ipay_destination_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ipay Destination Account Id"},"ipay_amount_includes_vat":{"type":"boolean","title":"Ipay Amount Includes Vat","default":true},"carrier_destination_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Destination Account Id"},"carrier_amount_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Carrier Amount Eur"}},"type":"object","title":"SplitConfigIn"},"StageMapPutIn":{"properties":{"pipeline_id":{"type":"string","title":"Pipeline Id"},"mapping":{"items":{"$ref":"#/components/schemas/StageMappingEntry"},"type":"array","title":"Mapping"}},"type":"object","required":["pipeline_id","mapping"],"title":"StageMapPutIn"},"StageMappingEntry":{"properties":{"hubspot_stage_id":{"type":"string","title":"Hubspot Stage Id"},"ipay_phase_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ipay Phase Key"},"label_default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Default"}},"type":"object","required":["hubspot_stage_id"],"title":"StageMappingEntry"},"StartPaymentIn":{"properties":{"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"},"method":{"type":"string","enum":["stripe","simulate"],"title":"Method","default":"stripe"},"demo_payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Demo Payment Method"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"}},"type":"object","title":"StartPaymentIn"},"StartReturnIn":{"properties":{"order_id":{"type":"string","title":"Order Id"},"reason_id":{"type":"string","title":"Reason Id"},"comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comments"}},"type":"object","required":["order_id","reason_id"],"title":"StartReturnIn"},"StepStatusUpdate":{"properties":{"status":{"type":"string","title":"Status"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"assignee":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee"}},"type":"object","required":["status"],"title":"StepStatusUpdate"},"SubstatusIn":{"properties":{"substatus":{"type":"string","enum":["not_started","in_progress","waiting_for_merchant","waiting_for_ipay","waiting_for_psp","waiting_for_carrier","waiting_for_contract","blocked","completed"],"title":"Substatus"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["substatus"],"title":"SubstatusIn"},"SurchargeEventIn":{"properties":{"shipment_id":{"type":"string","title":"Shipment Id"},"surcharge_type":{"type":"string","enum":["fuel","remote_area","overweight","oversize","address_correction","failed_delivery","return_handling","customs_handling","saturday_delivery","weekend_pickup","manual_intervention","other"],"title":"Surcharge Type"},"amount_eur":{"type":"number","title":"Amount Eur"},"carrier_invoice_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Invoice Ref","default":""},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"recovered_from_merchant":{"type":"boolean","title":"Recovered From Merchant","default":false}},"type":"object","required":["shipment_id","surcharge_type","amount_eur"],"title":"SurchargeEventIn"},"SurchargeRecoverBody":{"properties":{"surcharge_id":{"type":"string","title":"Surcharge Id"},"method":{"type":"string","enum":["wallet_deduct","invoice_next_settlement","absorb"],"title":"Method","default":"wallet_deduct"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","default":""}},"type":"object","required":["surcharge_id"],"title":"SurchargeRecoverBody"},"TaskIn":{"properties":{"case_id":{"type":"string","title":"Case Id"},"step_key":{"type":"string","title":"Step Key"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"assignee_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee User Id"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date"},"priority":{"type":"string","enum":["low","medium","high"],"title":"Priority","default":"medium"}},"type":"object","required":["case_id","step_key","title"],"title":"TaskIn"},"TaskPatch":{"properties":{"status":{"anyOf":[{"type":"string","enum":["open","in_progress","done","blocked","cancelled"]},{"type":"null"}],"title":"Status"},"assignee_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee User Id"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"completed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Completed"}},"type":"object","title":"TaskPatch"},"TestCheckoutIn":{"properties":{"amount_eur":{"type":"number","title":"Amount Eur","default":25.0},"description":{"type":"string","title":"Description","default":"IPAY test checkout"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email","default":"test@ipay.eu"},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"}},"type":"object","title":"TestCheckoutIn"},"TilePrefsIn":{"properties":{"enabled_tiles":{"items":{"type":"string"},"type":"array","title":"Enabled Tiles"}},"type":"object","required":["enabled_tiles"],"title":"TilePrefsIn"},"TopupRequest":{"properties":{"amount_eur":{"type":"number","exclusiveMinimum":0.0,"title":"Amount Eur"},"method":{"type":"string","enum":["stripe_card","ipay_balance","sepa","ideal","manual"],"title":"Method","default":"stripe_card"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","default":""}},"type":"object","required":["amount_eur"],"title":"TopupRequest"},"UpdateInvoiceMetaIn":{"properties":{"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Number"}},"type":"object","title":"UpdateInvoiceMetaIn"},"UseCaseUpdate":{"properties":{"use_case_name":{"type":"string","title":"Use Case Name"},"selected":{"type":"boolean","title":"Selected","default":true},"phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phase"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","default":"not_started"},"commercial_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commercial Model"},"technical_dependency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Technical Dependency"}},"type":"object","required":["use_case_name"],"title":"UseCaseUpdate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyOtpIn":{"properties":{"ipay_reference_18":{"type":"string","title":"Ipay Reference 18"},"otp_code":{"type":"string","title":"Otp Code"}},"type":"object","required":["ipay_reference_18","otp_code"],"title":"VerifyOtpIn"},"VerifyWebsiteIn":{"properties":{"url":{"type":"string","maxLength":500,"minLength":4,"title":"Url"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["url"],"title":"VerifyWebsiteIn"},"VintedConnectIn":{"properties":{"access_token":{"type":"string","title":"Access Token"},"environment":{"type":"string","enum":["production","sandbox"],"title":"Environment","default":"production"},"auto_create_session":{"type":"boolean","title":"Auto Create Session","default":true}},"type":"object","required":["access_token"],"title":"VintedConnectIn"},"WalletConfigPatch":{"properties":{"auto_topup_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Topup Enabled"},"auto_topup_threshold_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auto Topup Threshold Eur"},"auto_topup_amount_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auto Topup Amount Eur"},"low_balance_warning_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Low Balance Warning Email"}},"type":"object","title":"WalletConfigPatch"},"WalletTransferIn":{"properties":{"recipient_email":{"type":"string","format":"email","title":"Recipient Email"},"amount_eur":{"type":"number","title":"Amount Eur"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["recipient_email","amount_eur"],"title":"WalletTransferIn"},"WebhookConfigIn":{"properties":{"url":{"type":"string","maxLength":500,"minLength":8,"title":"Url"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["url"],"title":"WebhookConfigIn"},"WeightMix":{"properties":{"band_key":{"type":"string","title":"Band Key"},"percentage":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Percentage"}},"type":"object","required":["band_key","percentage"],"title":"WeightMix"},"WooConnectIn":{"properties":{"shop_url":{"type":"string","title":"Shop Url"},"consumer_key":{"type":"string","title":"Consumer Key"},"consumer_secret":{"type":"string","title":"Consumer Secret"},"auto_create_session":{"type":"boolean","title":"Auto Create Session","default":true},"trigger":{"type":"string","enum":["payment_module","tag_ipay","always"],"title":"Trigger","default":"payment_module"}},"type":"object","required":["shop_url","consumer_key","consumer_secret"],"title":"WooConnectIn"},"routers__ai_assistant__MerchantChatRequest":{"properties":{"merchant_id":{"type":"string","maxLength":64,"minLength":1,"title":"Merchant Id"},"message":{"type":"string","maxLength":2000,"minLength":1,"title":"Message"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","required":["merchant_id","message"],"title":"MerchantChatRequest"},"routers__merchants_360__ContactIn":{"properties":{"name":{"type":"string","title":"Name"},"role":{"type":"string","enum":["commercial","finance","tech","operations","other"],"title":"Role","default":"commercial"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"is_primary":{"type":"boolean","title":"Is Primary","default":false},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name"],"title":"ContactIn"},"routers__merchants_360_ext__MerchantChatRequest":{"properties":{"message":{"type":"string","maxLength":2000,"minLength":1,"title":"Message"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","required":["message"],"title":"MerchantChatRequest"},"routers__sales__ContactIn":{"properties":{"company_id":{"type":"string","title":"Company Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"is_primary":{"type":"boolean","title":"Is Primary","default":false}},"type":"object","required":["company_id","first_name"],"title":"ContactIn"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}