{"openapi":"3.1.0","info":{"title":"Travel Certificate PDF Generator","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}},"/test_token_decryption":{"get":{"summary":"Test Token Decryption","operationId":"test_token_decryption_test_token_decryption_get","parameters":[{"name":"tok","in":"query","required":true,"schema":{"type":"string","title":"Tok"}},{"name":"policy_number","in":"query","required":false,"schema":{"type":"string","default":"","title":"Policy Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/expired":{"get":{"summary":"Expired Page","description":"Dedicated endpoint for expired token notification.\n\nDisplays a message to the user that their token has expired and a fresh link\nhas been requested. The user should check their email for the new link.\nThe policy number is read from cookies (if available) via JavaScript in the template.\n\nArgs:\n    request: FastAPI request object","operationId":"expired_page_expired_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"The Boss","operationId":"the_boss__get","parameters":[{"name":"tok","in":"query","required":true,"schema":{"type":"string","title":"Tok"}},{"name":"policy_number","in":"query","required":false,"schema":{"type":"string","default":"","title":"Policy Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/battleface/{order_number}":{"get":{"summary":"Get Battleface Order","description":"Get Battleface order details synchronously.","operationId":"get_battleface_order_battleface__order_number__get","parameters":[{"name":"order_number","in":"path","required":true,"schema":{"type":"string","title":"Order Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/battleface":{"get":{"summary":"The Boss With Bf Addition","description":"Enhanced endpoint with Battleface integration for document freshness validation.\n\nThis endpoint validates that the PDF document is up-to-date with the latest\nBattleface order status by comparing timestamps.\n\nFlow:\n1) Verify token\n2) Concurrently look up the current attachment, fetch the token PDF, and fetch BF order data\n3) Replace the PDF if policy_doc differs, then parse its metadata\n4) Compare BF status_updated_at with PDF metadata /BFLastUpdatedAt\n5) If timestamps differ, trigger document regeneration\n6) If timestamps match, stream the PDF\n\nArgs:\n    request: FastAPI request object\n    tok: Encrypted token containing policy info\n    order_number: Battleface order number (e.g., \"440-OCT88B9-D2DE8B184FAC\")\n    policy_number: Optional policy number for logging","operationId":"the_boss_with_bf_addition_battleface_get","parameters":[{"name":"tok","in":"query","required":true,"schema":{"type":"string","title":"Tok"}},{"name":"order_number","in":"query","required":false,"schema":{"type":"string","default":"","title":"Order Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"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"}}}}