{"openapi":"3.1.0","info":{"title":"Report Defence API","version":"0.1.0"},"paths":{"/auth/register":{"post":{"summary":"Register","operationId":"register_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"summary":"Login","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/supabase":{"post":{"summary":"Auth Supabase","operationId":"auth_supabase_auth_supabase_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupabaseAuthBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/me":{"get":{"summary":"Auth Me","operationId":"auth_me_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/upgrade-role":{"patch":{"summary":"Upgrade Role","operationId":"upgrade_role_auth_upgrade_role_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeRoleBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients":{"get":{"summary":"List Clients","operationId":"list_clients_clients_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Client","operationId":"create_client_clients_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}":{"get":{"summary":"Get Client","operationId":"get_client_clients__client_id__get","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client 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 Client","operationId":"update_client_clients__client_id__patch","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Client","description":"Borrar un cliente VACIO se permite siempre: es la salida para el que se\nequivoco escribiendo el nombre el primer dia.\n\nBorrar un cliente que YA tiene reportes solo lo puede hacer Pro. Si\nFree o Basica pudieran, tendrian un Pro en cuotas: procesarian un\ncliente por vez, borrando y recreando, sin pagarlo nunca.","operationId":"delete_client_clients__client_id__delete","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/history":{"get":{"summary":"Client History","operationId":"client_history_clients__client_id__history_get","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/letters":{"get":{"summary":"Client Letters","operationId":"client_letters_clients__client_id__letters_get","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/letter-receipts":{"post":{"summary":"Create Receipt","operationId":"create_receipt_letter_receipts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/receipts":{"get":{"summary":"List Receipts","operationId":"list_receipts_clients__client_id__receipts_get","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/letter-receipts/{receipt_id}":{"patch":{"summary":"Update Receipt","operationId":"update_receipt_letter_receipts__receipt_id__patch","parameters":[{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string","title":"Receipt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Receipt","operationId":"delete_receipt_letter_receipts__receipt_id__delete","parameters":[{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string","title":"Receipt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs/{job_id}":{"get":{"summary":"Get Job","operationId":"get_job_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/upload-report":{"post":{"summary":"Upload Report","operationId":"upload_report_upload_report_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_report_upload_report_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect-identityiq":{"post":{"summary":"Connect Identityiq","description":"Pull credit report directly from IdentityIQ using client credentials.\nAuthenticates, fetches the JSON report, parses it, and stores the job\nin the same format as /upload-report.","operationId":"connect_identityiq_connect_identityiq_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectIdentityIQBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/parse-identityiq-json":{"post":{"summary":"Parse Identityiq Json Endpoint","description":"Receives the raw JSONP string fetched by the browser from IdentityIQ,\nparses it, and stores the job — same format as /upload-report.\n\nThis avoids the Imperva WAF that blocks server-side requests.\nThe browser fetches the JSON (passes WAF), sends it here for parsing.","operationId":"parse_identityiq_json_endpoint_parse_identityiq_json_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseIdentityIQBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/generate-letters":{"post":{"summary":"Generate Letters","operationId":"generate_letters_generate_letters_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateLettersBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/generate-furnisher-letters":{"post":{"summary":"Generate Furnisher Letters","operationId":"generate_furnisher_letters_generate_furnisher_letters_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateFurnisherLettersBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/generate-bundle":{"post":{"summary":"Generate Bundle","operationId":"generate_bundle_generate_bundle_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateBundleBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compare-rounds":{"post":{"summary":"Compare Rounds Endpoint","operationId":"compare_rounds_endpoint_compare_rounds_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareRoundsBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clients/{client_id}/rounds":{"get":{"summary":"Client Rounds","description":"Rondas del cliente en orden real, por fecha de reporte.","operationId":"client_rounds_clients__client_id__rounds_get","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/generate-inquiry-letters":{"post":{"summary":"Generate Inquiry Letters","operationId":"generate_inquiry_letters_generate_inquiry_letters_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateInquiryLettersBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/identity-theft/scan":{"post":{"summary":"Identity Theft Scan","operationId":"identity_theft_scan_identity_theft_scan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityTheftScanBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/identity-theft/letters":{"post":{"summary":"Identity Theft Letters","operationId":"identity_theft_letters_identity_theft_letters_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityTheftLettersBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bureau-response":{"post":{"summary":"Bureau Response","operationId":"bureau_response_bureau_response_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BureauResponseBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bureau-no-response":{"post":{"summary":"Bureau No Response","description":"El buró nunca contestó. No hay carta que pegar, así que este caso no\npuede salir de /bureau-response: sale del calendario.\n\n15 U.S.C. section 1681i(a)(1)(A): 30 días desde que el buró RECIBE la\ndisputa, 45 si el consumidor aportó información adicional durante el\nperíodo. Vencido el plazo sin respuesta, la eliminación procede como\ncuestión de derecho bajo 1681i(a)(5)(A).\n\nSi todavía estás dentro del plazo NO genera nada y te dice cuántos días\nfaltan: mandar la carta antes de tiempo debilita el reclamo.","operationId":"bureau_no_response_bureau_no_response_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BureauNoResponseBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bureau-response/pdf":{"post":{"summary":"Bureau Response Pdf","description":"Igual que /bureau-response pero subiendo el PDF (o escaneo) que mandó el buró.\nSi el PDF no trae texto (escaneo), se lee con OCR.","operationId":"bureau_response_pdf_bureau_response_pdf_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_bureau_response_pdf_bureau_response_pdf_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extract-bureau-response-text":{"post":{"summary":"Extract Bureau Response Text","description":"Lee el texto de la respuesta del buró desde un PDF o imagen (con OCR si hace\nfalta) y lo DEVUELVE para que el operador lo revise. NO genera cartas: eso lo\nhace luego /generate-letters con el texto revisado.","operationId":"extract_bureau_response_text_extract_bureau_response_text_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_bureau_response_text_extract_bureau_response_text_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extract-bureau-response-files":{"post":{"summary":"Extract Bureau Response Files","description":"Igual que /extract-bureau-response-text pero acepta VARIOS archivos (las\nrespuestas del buró suelen ser de muchas páginas y el cliente sube una foto por\npágina). Lee cada archivo EN ORDEN (imagen o PDF, con OCR si hace falta) y\ndevuelve el texto concatenado con un marcador por página, para que el operador\nlo revise antes de generar las cartas de Round 2/3.\n\nEl ORDEN es el que manda el frontend: hay que enviarlos ordenados por nombre de\narchivo (página 1, 2, 3…) para que el texto quede en secuencia. Un PDF de varias\npáginas también sirve (una sola subida, se leen todas sus páginas).","operationId":"extract_bureau_response_files_extract_bureau_response_files_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_bureau_response_files_extract_bureau_response_files_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dispatch-letter":{"post":{"summary":"Dispatch Letter","operationId":"dispatch_letter_dispatch_letter_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispatchLetterBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dispatch-letter-files":{"post":{"summary":"Dispatch Letter Files","description":"Igual que /dispatch-letter pero acepta PDFs adjuntos (multipart/form-data).\nLos adjuntos (ID, prueba de dirección, etc.) se unen a la carta y viajan\njuntos en el mismo sobre certificado.","operationId":"dispatch_letter_files_dispatch_letter_files_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_dispatch_letter_files_dispatch_letter_files_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cir/{job_id}":{"get":{"summary":"Get Cir","operationId":"get_cir_cir__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/progress/{client_id}":{"get":{"summary":"Get Progress","operationId":"get_progress_progress__client_id__get","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cir/{job_id}/pdf":{"get":{"summary":"Get Cir Pdf","operationId":"get_cir_pdf_cir__job_id__pdf_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/overview":{"get":{"summary":"Portal Overview","operationId":"portal_overview_portal_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/portal/letters":{"get":{"summary":"Portal Letters","operationId":"portal_letters_portal_letters_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/postalocity/connect":{"post":{"summary":"Postalocity Connect","description":"Verifica las credenciales (login real) y las guarda encriptadas para la agencia.","operationId":"postalocity_connect_postalocity_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostalocityConnectBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/postalocity/status":{"get":{"summary":"Postalocity Status","description":"Dice si la agencia tiene cuenta conectada (usuario enmascarado, sin la clave).","operationId":"postalocity_status_postalocity_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/postalocity/disconnect":{"delete":{"summary":"Postalocity Disconnect","operationId":"postalocity_disconnect_postalocity_disconnect_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/postalocity/sync-status":{"post":{"summary":"Postalocity Sync Status","description":"Botón 'Actualizar estado': consulta AHORA las cartas de esta agencia.","operationId":"postalocity_sync_status_postalocity_sync_status_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/postalocity/sync-all":{"post":{"summary":"Postalocity Sync All","description":"Revisión automática de TODAS las agencias. Protegido por POSTALOCITY_SYNC_KEY.\nPensado para un cron externo (Railway cron / cron-job.org) cada X horas.","operationId":"postalocity_sync_all_postalocity_sync_all_post","parameters":[{"name":"key","in":"query","required":false,"schema":{"type":"string","default":"","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reminders":{"get":{"summary":"List Reminders","description":"Recordatorios automáticos de TODOS los clientes de la agencia.","operationId":"list_reminders_reminders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/clients/{client_id}/reminders":{"get":{"summary":"List Client Reminders","description":"Recordatorios automáticos de un cliente.","operationId":"list_client_reminders_clients__client_id__reminders_get","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/plans":{"get":{"summary":"Billing Plans","description":"Catálogo de planes para pintar la pantalla de precios.","operationId":"billing_plans_billing_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/status":{"get":{"summary":"Billing Status","description":"El frontend pinta los candados con lo que dice ACA, no adivinando.\nDevuelve el plan efectivo, los limites, el uso y que puede hacer.","operationId":"billing_status_billing_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/checkout":{"post":{"summary":"Billing Checkout","operationId":"billing_checkout_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/portal":{"post":{"summary":"Billing Portal","description":"Portal de Stripe para gestionar/cancelar la suscripción.","operationId":"billing_portal_billing_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/webhook":{"post":{"summary":"Billing Webhook","description":"Stripe llama aquí al pagar / renovar / cancelar. Actualiza el plan.","operationId":"billing_webhook_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/furnisher-addresses":{"get":{"summary":"List Furnisher Addresses","operationId":"list_furnisher_addresses_furnisher_addresses_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Furnisher Address","operationId":"create_furnisher_address_furnisher_addresses_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FurnisherAddressBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/furnisher-addresses/{clave}":{"patch":{"summary":"Update Furnisher Address","operationId":"update_furnisher_address_furnisher_addresses__clave__patch","parameters":[{"name":"clave","in":"path","required":true,"schema":{"type":"string","title":"Clave"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FurnisherAddressUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/address-bounces":{"get":{"summary":"List Bounces","operationId":"list_bounces_address_bounces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Record Bounce","description":"Registra un sobre devuelto Y bloquea esa direccion.\n\nEste es el lazo que faltaba: antes el sobre volvia, nada lo anotaba, y la\nronda siguiente reimprimia el mismo apartado.","operationId":"record_bounce_address_bounces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BounceBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_bureau_response_pdf_bureau_response_pdf_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"job_id":{"type":"string","title":"Job Id"},"bureau":{"type":"string","title":"Bureau"},"response_date":{"type":"string","title":"Response Date","default":""},"dispute_date":{"type":"string","title":"Dispute Date","default":""},"consumer_name":{"type":"string","title":"Consumer Name","default":""},"round":{"type":"string","title":"Round","default":"round_2"}},"type":"object","required":["file","job_id","bureau"],"title":"Body_bureau_response_pdf_bureau_response_pdf_post"},"Body_dispatch_letter_files_dispatch_letter_files_post":{"properties":{"job_id":{"type":"string","title":"Job Id"},"letter_text":{"type":"string","title":"Letter Text"},"client_id":{"type":"string","title":"Client Id"},"recipient_name":{"type":"string","title":"Recipient Name"},"recipient_line1":{"type":"string","title":"Recipient Line1"},"recipient_city":{"type":"string","title":"Recipient City"},"recipient_state":{"type":"string","title":"Recipient State"},"recipient_zip":{"type":"string","title":"Recipient Zip"},"recipient_line2":{"type":"string","title":"Recipient Line2","default":""},"recipient_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Type"},"round":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Round"},"letter_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Letter Name"},"save_receipt":{"type":"boolean","title":"Save Receipt","default":true},"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files","default":[]}},"type":"object","required":["job_id","letter_text","client_id","recipient_name","recipient_line1","recipient_city","recipient_state","recipient_zip"],"title":"Body_dispatch_letter_files_dispatch_letter_files_post"},"Body_extract_bureau_response_files_extract_bureau_response_files_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_extract_bureau_response_files_extract_bureau_response_files_post"},"Body_extract_bureau_response_text_extract_bureau_response_text_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_extract_bureau_response_text_extract_bureau_response_text_post"},"Body_upload_report_upload_report_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"consumer_name":{"type":"string","title":"Consumer Name"},"client_id":{"type":"string","title":"Client Id"},"source":{"type":"string","title":"Source","default":"identityiq"}},"type":"object","required":["file","consumer_name","client_id"],"title":"Body_upload_report_upload_report_post"},"BounceBody":{"properties":{"clave":{"type":"string","title":"Clave"},"codigo":{"type":"string","title":"Codigo"},"fecha_etiqueta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fecha Etiqueta"},"texto_usps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Texto Usps"},"direccion_usada":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direccion Usada"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"nota":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nota"},"reemplazo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reemplazo"}},"type":"object","required":["clave","codigo"],"title":"BounceBody"},"BureauNoResponseBody":{"properties":{"job_id":{"type":"string","title":"Job Id"},"bureau":{"type":"string","title":"Bureau"},"dispute_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dispute Date","default":""},"consumer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer Name"},"round":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Round","default":"round_2"},"extended_deadline":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Extended Deadline","default":false}},"type":"object","required":["job_id","bureau"],"title":"BureauNoResponseBody"},"BureauResponseBody":{"properties":{"job_id":{"type":"string","title":"Job Id"},"bureau":{"type":"string","title":"Bureau"},"response_text":{"type":"string","title":"Response Text"},"response_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Date","default":""},"dispute_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dispute Date","default":""},"consumer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer Name"},"round":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Round","default":"round_2"}},"type":"object","required":["job_id","bureau","response_text"],"title":"BureauResponseBody"},"CheckoutBody":{"properties":{"plan":{"type":"string","title":"Plan"},"cycle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cycle","default":"monthly"}},"type":"object","required":["plan"],"title":"CheckoutBody"},"ClientCreate":{"properties":{"full_name":{"type":"string","title":"Full Name"},"email":{"type":"string","title":"Email","default":""},"phone":{"type":"string","title":"Phone","default":""},"address":{"type":"string","title":"Address","default":""},"city":{"type":"string","title":"City","default":""},"state":{"type":"string","title":"State","default":""},"zip_code":{"type":"string","title":"Zip Code","default":""},"date_of_birth":{"type":"string","title":"Date Of Birth","default":""},"notes":{"type":"string","title":"Notes","default":""}},"type":"object","required":["full_name"],"title":"ClientCreate"},"ClientUpdate":{"properties":{"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"date_of_birth":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Of Birth"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ClientUpdate"},"CompareRoundsBody":{"properties":{"job_id_anterior":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id Anterior"},"job_id_actual":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id Actual"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"consumer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer Name"},"generar_cartas":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Generar Cartas","default":false},"round":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Round","default":"round_2"},"variation_seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Variation Seed","default":0}},"type":"object","title":"CompareRoundsBody"},"ConnectIdentityIQBody":{"properties":{"client_id":{"type":"string","title":"Client Id"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"ssn_last4":{"type":"string","title":"Ssn Last4"}},"type":"object","required":["client_id","username","password","ssn_last4"],"title":"ConnectIdentityIQBody"},"DispatchLetterBody":{"properties":{"job_id":{"type":"string","title":"Job Id"},"letter_text":{"type":"string","title":"Letter Text"},"client_id":{"type":"string","title":"Client Id"},"recipient_name":{"type":"string","title":"Recipient Name"},"recipient_line1":{"type":"string","title":"Recipient Line1"},"recipient_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Line2","default":""},"recipient_city":{"type":"string","title":"Recipient City"},"recipient_state":{"type":"string","title":"Recipient State"},"recipient_zip":{"type":"string","title":"Recipient Zip"},"recipient_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Type"},"round":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Round"},"letter_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Letter Name"},"save_receipt":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Save Receipt","default":true}},"type":"object","required":["job_id","letter_text","client_id","recipient_name","recipient_line1","recipient_city","recipient_state","recipient_zip"],"title":"DispatchLetterBody"},"FurnisherAddressBody":{"properties":{"clave":{"type":"string","title":"Clave"},"nombre":{"type":"string","title":"Nombre"},"direccion1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direccion1"},"direccion2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direccion2"},"direccion3":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direccion3"},"ciudad":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ciudad"},"estado":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estado"},"zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip"},"alias":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Alias"},"producto":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Producto"},"origen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origen","default":"reporte_credito"},"fuente":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fuente"},"base_legal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Legal"},"verificado":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verificado"},"nota":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nota"}},"type":"object","required":["clave","nombre"],"title":"FurnisherAddressBody"},"FurnisherAddressUpdate":{"properties":{"nombre":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nombre"},"direccion1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direccion1"},"direccion2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direccion2"},"direccion3":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direccion3"},"ciudad":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ciudad"},"estado":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estado"},"zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip"},"alias":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Alias"},"producto":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Producto"},"origen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origen"},"fuente":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fuente"},"verificado":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verificado"},"entregado":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Entregado"},"bloqueada":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Bloqueada"},"reemplazo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reemplazo"},"nota":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nota"}},"type":"object","title":"FurnisherAddressUpdate"},"GenerateBundleBody":{"properties":{"job_id":{"type":"string","title":"Job Id"},"consumer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer Name"},"consumer_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer Address"},"consumer_city_state_zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer City State Zip"},"round":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Round","default":"round_1"}},"type":"object","required":["job_id"],"title":"GenerateBundleBody"},"GenerateFurnisherLettersBody":{"properties":{"job_id":{"type":"string","title":"Job Id"},"consumer_name":{"type":"string","title":"Consumer Name"},"consumer_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer Address"},"consumer_city_state_zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer City State Zip"},"round":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Round","default":"round_1"},"selected_furnishers":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Selected Furnishers"},"variation_seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Variation Seed","default":0}},"type":"object","required":["job_id","consumer_name"],"title":"GenerateFurnisherLettersBody"},"GenerateInquiryLettersBody":{"properties":{"job_id":{"type":"string","title":"Job Id"},"consumer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer Name"},"round":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Round","default":"round_1"}},"type":"object","required":["job_id"],"title":"GenerateInquiryLettersBody"},"GenerateLettersBody":{"properties":{"job_id":{"type":"string","title":"Job Id"},"consumer_name":{"type":"string","title":"Consumer Name"},"bureau":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bureau"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"round":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Round","default":"round_1"},"selected_accounts":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Selected Accounts"},"variation_seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Variation Seed","default":0},"bureau_response_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bureau Response Text"}},"type":"object","required":["job_id","consumer_name"],"title":"GenerateLettersBody"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IdentityTheftLettersBody":{"properties":{"job_id":{"type":"string","title":"Job Id"},"consumer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer Name"},"consumer_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer Address","default":"[Address]"},"consumer_city_state_zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer City State Zip","default":"[City, State ZIP]"},"consumer_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer Phone","default":"[Phone Number]"},"consumer_dob":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer Dob","default":""},"consumer_ssn_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer Ssn Last4","default":""},"consumer_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer State","default":""},"fraudulent_accounts":{"items":{},"type":"array","title":"Fraudulent Accounts"},"ftc_report_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ftc Report Number","default":""},"police_report_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Police Report Number","default":""},"police_department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Police Department","default":""},"incluir":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Incluir"},"fraud_alert_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fraud Alert Type","default":"initial"},"bureaus":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Bureaus"}},"type":"object","required":["job_id","fraudulent_accounts"],"title":"IdentityTheftLettersBody"},"IdentityTheftScanBody":{"properties":{"job_id":{"type":"string","title":"Job Id"},"known_creditors":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Known Creditors"}},"type":"object","required":["job_id"],"title":"IdentityTheftScanBody"},"LoginBody":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginBody"},"ParseIdentityIQBody":{"properties":{"client_id":{"type":"string","title":"Client Id"},"raw_json":{"type":"string","title":"Raw Json"}},"type":"object","required":["client_id","raw_json"],"title":"ParseIdentityIQBody"},"PostalocityConnectBody":{"properties":{"postalocity_user":{"type":"string","title":"Postalocity User"},"postalocity_pass":{"type":"string","title":"Postalocity Pass"},"env":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Env","default":"prod"}},"type":"object","required":["postalocity_user","postalocity_pass"],"title":"PostalocityConnectBody"},"ReceiptCreate":{"properties":{"client_id":{"type":"string","title":"Client Id"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"round":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Round"},"recipient_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Type"},"recipient_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Name"},"tracking_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Number"},"receipt_file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt File Url"},"postalocity_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postalocity Job Id"},"date_sent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Sent"},"return_receipt_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Receipt Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["client_id"],"title":"ReceiptCreate"},"ReceiptUpdate":{"properties":{"tracking_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Number"},"receipt_file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt File Url"},"date_sent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Sent"},"return_receipt_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Receipt Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ReceiptUpdate"},"RegisterBody":{"properties":{"full_name":{"type":"string","title":"Full Name"},"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"role":{"type":"string","title":"Role","default":"client"},"operator_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Code"}},"type":"object","required":["full_name","email","password"],"title":"RegisterBody"},"SupabaseAuthBody":{"properties":{"access_token":{"type":"string","title":"Access Token"},"email":{"type":"string","title":"Email"},"full_name":{"type":"string","title":"Full Name"}},"type":"object","required":["access_token","email","full_name"],"title":"SupabaseAuthBody"},"UpgradeRoleBody":{"properties":{"operator_code":{"type":"string","title":"Operator Code"}},"type":"object","required":["operator_code"],"title":"UpgradeRoleBody"},"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"}}}}