{"openapi":"3.1.0","info":{"title":"Odoo Sidecart","description":"A secure, performant gateway to Odoo ERP","version":"1.0.0"},"paths":{"/api/v1/health":{"get":{"tags":["health"],"summary":"Health Check","description":"Check the health status of the service and its dependencies","operationId":"health_check_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheck"}}}}}}},"/api/v1/metrics":{"get":{"tags":["health"],"summary":"Prometheus Metrics","description":"Prometheus metrics endpoint for monitoring","operationId":"metrics_api_v1_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/jobs":{"get":{"tags":["jobs"],"summary":"List Job Positions","description":"Get all published job positions from Odoo with caching","operationId":"list_jobs_api_v1_jobs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"description":"Maximum number of jobs to return","title":"Limit"},"description":"Maximum number of jobs to return"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}":{"get":{"tags":["jobs"],"summary":"Get Job Details","description":"Get details of a specific job position by ID","operationId":"get_job_api_v1_jobs__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/applications":{"post":{"tags":["jobs"],"summary":"Submit Job Application","description":"Submit a job application with optional resume attachment","operationId":"submit_job_application_api_v1_jobs_applications_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_submit_job_application_api_v1_jobs_applications_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/products":{"get":{"tags":["products"],"summary":"List Products","description":"Get product catalog from Odoo with caching and B2 CDN image URLs","operationId":"list_products_api_v1_products_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"description":"Maximum number of products","title":"Limit"},"description":"Maximum number of products"},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by category ID","title":"Category Id"},"description":"Filter by category ID"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/products/{product_id}":{"get":{"tags":["products"],"summary":"Get Product Details","description":"Get details of a specific product by ID with B2 CDN image URL","operationId":"get_product_api_v1_products__product_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/products/{product_id}/inventory":{"get":{"tags":["products"],"summary":"Check Product Inventory","description":"Get current inventory levels for a product","operationId":"get_inventory_api_v1_products__product_id__inventory_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/images/jobs/cache":{"delete":{"tags":["images"],"summary":"Invalidate Product Cache","description":"Clear cached product data to force fresh fetch from Odoo","operationId":"invalidate_jobs_cache_api_v1_images_jobs_cache_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"description":"Maximum number of jobs to return","title":"Limit"},"description":"Maximum number of jobs to return"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Invalidate Jobs Cache Api V1 Images Jobs Cache Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_submit_job_application_api_v1_jobs_applications_post":{"properties":{"full_name":{"type":"string","title":"Full Name","description":"Applicant's full name"},"email":{"type":"string","title":"Email","description":"Applicant's email address"},"phone":{"type":"string","title":"Phone","description":"Applicant's phone number"},"job_id":{"type":"integer","title":"Job Id","description":"ID of the job being applied to"},"cover_letter":{"type":"string","title":"Cover Letter","description":"Cover letter / message"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address","description":"Applicant's address"},"years_experience":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Years Experience","description":"Years of experience"},"request_presigned_resume_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Presigned Resume Url","description":"Whether user needs a presigned url to upload resume"},"resume_file_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resume File Type","description":"MIME type to be able to generate a strict presigned url"},"settings":{"$ref":"#/components/schemas/Settings"}},"type":"object","required":["full_name","email","phone","job_id","cover_letter"],"title":"Body_submit_job_application_api_v1_jobs_applications_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthCheck":{"properties":{"status":{"type":"string","title":"Status","description":"Service status"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"Current timestamp"},"version":{"type":"string","title":"Version","description":"Service version"},"odoo_connected":{"type":"boolean","title":"Odoo Connected","description":"Odoo connection status"},"redis_connected":{"type":"boolean","title":"Redis Connected","description":"Redis connection status"}},"type":"object","required":["status","timestamp","version","odoo_connected","redis_connected"],"title":"HealthCheck","description":"Health check response."},"InventoryResponse":{"properties":{"product_id":{"type":"integer","title":"Product Id","description":"Product ID"},"quantity_available":{"type":"number","title":"Quantity Available","description":"Available quantity"},"cached":{"type":"boolean","title":"Cached","description":"Whether response was cached","default":false}},"type":"object","required":["product_id","quantity_available"],"title":"InventoryResponse","description":"Response model for inventory check."},"Job":{"properties":{"id":{"type":"integer","title":"Id","description":"Job ID"},"name":{"type":"string","title":"Name","description":"Job title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Job description"},"department_id":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Department Id","description":"Department"},"employment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employment Type","description":"Employment type"},"requirements":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requirements","description":"Application Requirements"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location","description":"Work location"},"no_of_recruitment":{"type":"integer","title":"No Of Recruitment","description":"Number of positions","default":1},"created_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created Date","description":"Creation date"},"write_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Write Date","description":"Creation date"},"public_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Image Url","description":"CDN url to poster image","default":""}},"type":"object","required":["id","name"],"title":"Job","description":"Job position model."},"JobApplicationResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the application was submitted successfully"},"message":{"type":"string","title":"Message","description":"Response message"},"application_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Application Id","description":"ID of the created application in Odoo"},"presigned_resume_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Presigned Resume Url","description":"Presigned URL to upload resume in case they want to upload"}},"type":"object","required":["success","message"],"title":"JobApplicationResponse","description":"Response model for job application submission."},"JobDetailResponse":{"properties":{"job":{"$ref":"#/components/schemas/Job","description":"Job details"},"cached":{"type":"boolean","title":"Cached","description":"Whether response was cached","default":false}},"type":"object","required":["job"],"title":"JobDetailResponse","description":"Response model for single job detail."},"JobListResponse":{"properties":{"jobs":{"items":{"$ref":"#/components/schemas/Job"},"type":"array","title":"Jobs","description":"List of job positions"},"total":{"type":"integer","title":"Total","description":"Total number of jobs"},"cached":{"type":"boolean","title":"Cached","description":"Whether response was cached","default":false}},"type":"object","required":["jobs","total"],"title":"JobListResponse","description":"Response model for job listings."},"Product":{"properties":{"id":{"type":"integer","title":"Id","description":"Product ID"},"name":{"type":"string","title":"Name","description":"Product name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Product description"},"standard_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Standard Price","description":"Cost price"},"public_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Image Url","description":"CDN url for poster image"}},"type":"object","required":["id","name"],"title":"Product","description":"Product model."},"ProductDetailResponse":{"properties":{"product":{"$ref":"#/components/schemas/Product","description":"Product details"},"cached":{"type":"boolean","title":"Cached","description":"Whether response was cached","default":false}},"type":"object","required":["product"],"title":"ProductDetailResponse","description":"Response model for single product detail."},"ProductListResponse":{"properties":{"products":{"items":{"$ref":"#/components/schemas/Product"},"type":"array","title":"Products","description":"List of products"},"total":{"type":"integer","title":"Total","description":"Total number of products"},"cached":{"type":"boolean","title":"Cached","description":"Whether response was cached","default":false}},"type":"object","required":["products","total"],"title":"ProductListResponse","description":"Response model for product listings."},"Settings":{"properties":{"APP_NAME":{"type":"string","title":"App Name","default":"Odoo Sidecart"},"APP_VERSION":{"type":"string","title":"App Version","default":"1.0.0"},"ENVIRONMENT":{"type":"string","title":"Environment","default":"development"},"LOG_LEVEL":{"type":"string","title":"Log Level","default":"INFO"},"ODOO_URL":{"type":"string","title":"Odoo Url"},"ODOO_DB":{"type":"string","title":"Odoo Db"},"ODOO_USERNAME":{"type":"string","title":"Odoo Username"},"ODOO_PASSWORD":{"type":"string","title":"Odoo Password"},"ODOO_API_KEY":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Odoo Api Key","description":"API key for Odoo HTTP controllers using custom auth='cony_api_key'"},"REDIS_URL":{"type":"string","title":"Redis Url","default":"redis://localhost:6379/0"},"REDIS_PASSWORD":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redis Password"},"CACHE_DEFAULT_TTL":{"type":"integer","title":"Cache Default Ttl","default":300},"API_KEY":{"type":"string","title":"Api Key"},"HMAC_SECRET_KEY":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hmac Secret Key"},"RATE_LIMIT_ENABLED":{"type":"boolean","title":"Rate Limit Enabled","default":true},"RATE_LIMIT_PER_MINUTE":{"type":"integer","title":"Rate Limit Per Minute","default":1000},"ALLOWED_ORIGINS":{"type":"string","title":"Allowed Origins","default":"http://localhost:3000"}},"type":"object","required":["ODOO_URL","ODOO_DB","ODOO_USERNAME","ODOO_PASSWORD","API_KEY"],"title":"Settings","description":"Application settings loaded from environment variables."},"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"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}