{"openapi":"3.1.0","info":{"title":"Group S Middleware API","version":"2.0.0"},"paths":{"/employees/gs/create":{"post":{"summary":"Create Gs Employee","description":"Create a PTG file for Group S employee data","operationId":"create_gs_employee_employees_gs_create_post","parameters":[{"name":"api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Employee Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bulk/employees/gs/create":{"post":{"summary":"Create Gs Employee Bulk","description":"Create a PTG file for Group S employee data","operationId":"create_gs_employee_bulk_bulk_employees_gs_create_post","parameters":[{"name":"api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Employees Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/employees/gs/create":{"post":{"summary":"Create Gs Employee V2","description":"Create a PTG file for Group S employee data","operationId":"create_gs_employee_v2_v2_employees_gs_create_post","parameters":[{"name":"api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Employee Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/bulk/employees/gs/create":{"post":{"summary":"Create Gs Employee Bulk V2","description":"Create a PTG file for Group S employee data","operationId":"create_gs_employee_bulk_v2_v2_bulk_employees_gs_create_post","parameters":[{"name":"api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Employees Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/employees/gs/advance-payment/create":{"post":{"summary":"Create Gs Employee Advance Payment V2","description":"Create a PTG file for Group S employee data","operationId":"create_gs_employee_advance_payment_v2_v2_employees_gs_advance_payment_create_post","parameters":[{"name":"api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Employee Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/bulk/employees/gs/advance-payment/create":{"post":{"summary":"Create Gs Employee Advance Payment Bulk V2","description":"Create a PTG advance payment file for Group S employee data","operationId":"create_gs_employee_advance_payment_bulk_v2_v2_bulk_employees_gs_advance_payment_create_post","parameters":[{"name":"api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Employees Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/payroll/saiau":{"post":{"summary":"Create Payroll Saiau File","description":"Create a SAIAU file for Group S payroll data","operationId":"create_payroll_saiau_file_v2_payroll_saiau_post","parameters":[{"name":"api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Payroll Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/payroll/ptg":{"post":{"summary":"Create Payroll Ptg File","description":"Create the PTG prestations file from Odoo's structured payroll export.","operationId":"create_payroll_ptg_file_v2_payroll_ptg_post","parameters":[{"name":"api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Payroll Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/sftp/send-file":{"post":{"summary":"Send File Sftp","description":"Send PTG File via SFTP","operationId":"send_file_sftp_v2_sftp_send_file_post","parameters":[{"name":"api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_send_file_sftp_v2_sftp_send_file_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sftp/send-file":{"post":{"summary":"Send File Sftp","description":"Send PTG File via SFTP","operationId":"send_file_sftp_sftp_send_file_post","parameters":[{"name":"api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_send_file_sftp_sftp_send_file_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/token":{"post":{"summary":"Login For Access Token","operationId":"login_for_access_token_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_for_access_token_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys/list":{"get":{"summary":"List Api Keys Htmx","description":"HTMX endpoint to refresh the API keys table","operationId":"list_api_keys_htmx_api_keys_list_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api-keys/export-invoice-data":{"post":{"summary":"Export Invoice Data Endpoint","description":"Export invoice data for selected API keys into the Mpleo recurrence invoice Excel template.","operationId":"export_invoice_data_endpoint_api_keys_export_invoice_data_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_export_invoice_data_endpoint_api_keys_export_invoice_data_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys/create":{"post":{"summary":"Create Api Key Endpoint","description":"Create a new API key","operationId":"create_api_key_endpoint_api_keys_create_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_create_api_key_endpoint_api_keys_create_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys/{api_key_id}":{"put":{"summary":"Update Api Key Endpoint","description":"Update an existing API key","operationId":"update_api_key_endpoint_api_keys__api_key_id__put","parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"integer","title":"Api Key Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_api_key_endpoint_api_keys__api_key_id__put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Api Key Endpoint","description":"Delete an API key","operationId":"delete_api_key_endpoint_api_keys__api_key_id__delete","parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"integer","title":"Api Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys/{api_key_id}/toggle":{"post":{"summary":"Toggle Api Key Status","description":"Toggle API key active status","operationId":"toggle_api_key_status_api_keys__api_key_id__toggle_post","parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"integer","title":"Api Key Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_toggle_api_key_status_api_keys__api_key_id__toggle_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","description":"Login page","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/login":{"post":{"summary":"Login","description":"Process login form","operationId":"login_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard":{"get":{"summary":"Dashboard","description":"Dashboard page","operationId":"dashboard_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api-keys":{"get":{"summary":"Get Api Keys Page","description":"API Keys management page","operationId":"get_api_keys_page_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/logs":{"get":{"summary":"Get Logs Page","description":"Message Flow Logs page","operationId":"get_logs_page_logs_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/settings":{"get":{"summary":"Get Settings Page","description":"Settings page","operationId":"get_settings_page_settings_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/logout":{"get":{"summary":"Logout","description":"Logout and redirect to login page","operationId":"logout_logout_get","responses":{"307":{"description":"Successful Response"}}}},"/create-test-admin":{"post":{"summary":"Create Test Admin","description":"Create a test admin user - remove in production!","operationId":"create_test_admin_create_test_admin_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/debug":{"get":{"summary":"Debug Templates","description":"Debug page to check template rendering","operationId":"debug_templates_debug_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/documentation":{"get":{"summary":"Get Documentation","description":"API Documentation page","operationId":"get_documentation_documentation_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/partials/statistics":{"get":{"summary":"Get Statistics Partial","description":"Get updated statistics for dashboard","operationId":"get_statistics_partial_partials_statistics_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api-keys/list-json":{"get":{"summary":"Get Api Keys List Json","description":"Get all API keys as JSON for select dropdowns.","operationId":"get_api_keys_list_json_api_keys_list_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/message-flow/list":{"get":{"summary":"Get Messageflow Logs Table","description":"HTMX endpoint to load and filter message flow logs.","operationId":"get_messageflow_logs_table_message_flow_list_get","parameters":[{"name":"api_key_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Api Key Id"}},{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"date_range","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Date Range"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/message-flow/list-json":{"get":{"summary":"Get Messageflow Logs Json","description":"JSON endpoint for message flow logs.","operationId":"get_messageflow_logs_json_message_flow_list_json_get","parameters":[{"name":"api_key_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Api Key Id"}},{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"date_range","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Date Range"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"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"}}}}}}}},"components":{"schemas":{"Body_create_api_key_endpoint_api_keys_create_post":{"properties":{"name":{"type":"string","title":"Name"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"payroll_sftp_host":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payroll Sftp Host"},"payroll_sftp_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payroll Sftp Username"},"payroll_sftp_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payroll Sftp Password"},"payroll_sftp_port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payroll Sftp Port"},"payroll_sftp_directory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payroll Sftp Directory"},"odoo_api_base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Odoo Api Base Url"},"odoo_allowed_user_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Odoo Allowed User Count"}},"type":"object","required":["name"],"title":"Body_create_api_key_endpoint_api_keys_create_post"},"Body_export_invoice_data_endpoint_api_keys_export_invoice_data_post":{"properties":{"api_key_ids":{"items":{"type":"integer"},"type":"array","title":"Api Key Ids"}},"type":"object","required":["api_key_ids"],"title":"Body_export_invoice_data_endpoint_api_keys_export_invoice_data_post"},"Body_login_for_access_token_token_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"password"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_login_for_access_token_token_post"},"Body_login_login_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"password"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_login_login_post"},"Body_send_file_sftp_sftp_send_file_post":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"directory":{"type":"string","title":"Directory","default":"/"},"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["host","port","username","password","file"],"title":"Body_send_file_sftp_sftp_send_file_post"},"Body_send_file_sftp_v2_sftp_send_file_post":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"directory":{"type":"string","title":"Directory","default":"/"},"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["host","port","username","password","file"],"title":"Body_send_file_sftp_v2_sftp_send_file_post"},"Body_toggle_api_key_status_api_keys__api_key_id__toggle_post":{"properties":{"new_status":{"type":"boolean","title":"New Status"}},"type":"object","required":["new_status"],"title":"Body_toggle_api_key_status_api_keys__api_key_id__toggle_post"},"Body_update_api_key_endpoint_api_keys__api_key_id__put":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"payroll_sftp_host":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payroll Sftp Host"},"payroll_sftp_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payroll Sftp Username"},"payroll_sftp_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payroll Sftp Password"},"payroll_sftp_port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payroll Sftp Port"},"payroll_sftp_directory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payroll Sftp Directory"},"odoo_api_base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Odoo Api Base Url"},"odoo_allowed_user_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Odoo Allowed User Count"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"Body_update_api_key_endpoint_api_keys__api_key_id__put"},"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"}}}}