{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/":{"get":{"summary":"Health Check","operationId":"health_check__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/insert_otp":{"post":{"summary":"Insert Otp Data","operationId":"insert_otp_data_insert_otp_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insert_ping":{"post":{"summary":"Insert Ping Data","operationId":"insert_ping_data_insert_ping_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PingRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_otp":{"get":{"summary":"Get Otp Data","operationId":"get_otp_data_get_otp_get","parameters":[{"name":"sent_at","in":"query","required":true,"schema":{"type":"string","description":"Only return OTPs created after this timestamp","title":"Sent At"},"description":"Only return OTPs created after this timestamp"},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/update_otp":{"post":{"summary":"Update Otp Data","operationId":"update_otp_data_update_otp_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/execute_get_amount":{"post":{"summary":"Execute Get Amount Script","operationId":"execute_get_amount_script_execute_get_amount_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_company":{"get":{"summary":"Get Company","operationId":"get_company_get_company_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_company_count":{"get":{"summary":"Get Company Count","operationId":"get_company_count_get_company_count_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_company_by_code":{"get":{"summary":"Get Company By Code","description":"Return companies that have no monthly record for the current month and year","operationId":"get_company_by_code_get_company_by_code_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_company_by_code_for_month/{year}/{month}":{"get":{"summary":"Get Company By Code For Month","description":"Return companies that have no monthly record for the given month and year","operationId":"get_company_by_code_for_month_get_company_by_code_for_month__year___month__get","parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","title":"Month"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_pending_failed_transactions":{"get":{"summary":"Get Pending Failed Transactions","description":"Return every current-month monthly_record that has 'failed' transactions\nwhere ALL of them are pay_at more than 1 day old, across all companies in\nthis tenant schema.\n\nTNB's TotalPayable does not reflect a payment attempt until about a day after\nit was made. update_failed_transaction_status resolves each monthly_record's\n'failed' transactions individually against how much of their total has\ncleared, so a monthly_record is only included here once none of its\n'failed' transactions are still too fresh to trust against TNB — otherwise\na recent, not-yet-reflected attempt would get judged by stale-looking data.","operationId":"get_pending_failed_transactions_get_pending_failed_transactions_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_failed_monthly_record/{acc_no}":{"get":{"summary":"Get Failed Monthly Record","description":"Return the current month's monthly_record in 'review' status for the company\nmatching the given account number (company.code).","operationId":"get_failed_monthly_record_get_failed_monthly_record__acc_no__get","parameters":[{"name":"acc_no","in":"path","required":true,"schema":{"type":"string","title":"Acc No"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/update_failed_transaction_status":{"put":{"summary":"Update Failed Transaction Status","description":"Compare TNB's TotalPayable against this monthly_record's still-'unpaid'\ntransactions to resolve its 'failed' transactions:\n\n  unpaid_total = SUM(transactions.amount WHERE status = 'unpaid')\n\n  1. total_payable < 0             -> all 'failed' transactions -> 'paid'\n  2. unpaid_total == total_payable -> all 'failed' transactions -> 'paid'\n  3. unpaid_total > total_payable  -> 'failed' transactions untouched\n  4. unpaid_total < total_payable  -> 'failed' transactions -> 'unpaid',\n     FIFO by index, accumulating unpaid_total until it reaches\n     total_payable (partial coverage resolves only as many of the\n     oldest failed transactions as the extra payable amount covers).\n\n  Special case: unpaid_total == 0 (no 'unpaid' transactions at all) and\n  total_payable > 0 -> search the 'failed' transactions for a subset\n  whose amounts sum exactly to total_payable; that subset -> 'unpaid',\n  all other 'failed' transactions -> 'paid'. If no exact subset exists,\n  fall back to the rule-4 FIFO-by-index partial coverage above.\n\nCallers are expected to only invoke this for monthly_records whose 'failed'\ntransactions are ALL already known to be pay_at > 1 day old (see\n/get_pending_failed_transactions) since TNB's TotalPayable does not reflect\na payment attempt until about a day after it was made.","operationId":"update_failed_transaction_status_update_failed_transaction_status_put","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFailedTransactionStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_bank":{"get":{"summary":"Get Bank","operationId":"get_bank_get_bank_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_account":{"get":{"summary":"Get Account","operationId":"get_account_get_account_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_card_detail":{"get":{"summary":"Get Card Detail","operationId":"get_card_detail_get_card_detail_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_card_detail_by_id/{card_id}":{"get":{"summary":"Get Card Detail By Id","description":"Get a single card detail by id","operationId":"get_card_detail_by_id_get_card_detail_by_id__card_id__get","parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"integer","title":"Card Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_monthly_records":{"get":{"summary":"Get Monthly Records","description":"Get all monthly records","operationId":"get_monthly_records_get_monthly_records_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_monthly_records_by_year/{year}":{"get":{"summary":"Get Monthly Records By Year","description":"Get monthly records by year","operationId":"get_monthly_records_by_year_get_monthly_records_by_year__year__get","parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_monthly_records_by_month/{year}/{month}":{"get":{"summary":"Get Monthly Records By Month","description":"Get monthly records by year and month","operationId":"get_monthly_records_by_month_get_monthly_records_by_month__year___month__get","parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","title":"Month"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_amount_remarks":{"get":{"summary":"Get Amount Remarks","description":"Get all monthly record amount remarks joined with monthly_record and company","operationId":"get_amount_remarks_get_amount_remarks_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-based)","default":1,"title":"Page"},"description":"Page number (1-based)"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of records per page","default":20,"title":"Page Size"},"description":"Number of records per page"},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_status_remarks":{"get":{"summary":"Get Status Remarks","description":"Get all transaction status remarks joined with transactions, monthly_record, and company","operationId":"get_status_remarks_get_status_remarks_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-based)","default":1,"title":"Page"},"description":"Page number (1-based)"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of records per page","default":20,"title":"Page Size"},"description":"Number of records per page"},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_monthly_bill_list/{company_id}":{"get":{"summary":"Get Monthly Bill List","description":"Get monthly records by company_id","operationId":"get_monthly_bill_list_get_monthly_bill_list__company_id__get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_monthly_bill_list/{company_id}/{year}":{"get":{"summary":"Get Monthly Bill List By Year","description":"Get monthly records by company_id and year","operationId":"get_monthly_bill_list_by_year_get_monthly_bill_list__company_id___year__get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"year","in":"path","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_monthly_bill_list/{company_id}/{year}/{month}":{"get":{"summary":"Get Monthly Bill List By Month","description":"Get monthly records by company_id, year, and month","operationId":"get_monthly_bill_list_by_month_get_monthly_bill_list__company_id___year___month__get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"year","in":"path","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","title":"Month"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_transactions":{"get":{"summary":"Get Transactions","operationId":"get_transactions_get_transactions_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_transaction_for_web":{"get":{"summary":"Get Transaction For Web","operationId":"get_transaction_for_web_get_transaction_for_web_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Filter"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/update_transactions":{"put":{"summary":"Update Transactions","description":"Update transaction_id, status, and updated_at for a transaction by id","operationId":"update_transactions_update_transactions_put","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTransactionStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bulk_update_transactions":{"put":{"summary":"Bulk Update Transactions","description":"Update status (and optionally log a shared remark) for multiple transactions by id in one call","operationId":"bulk_update_transactions_bulk_update_transactions_put","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateTransactionStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insert_card_details":{"post":{"summary":"Insert Card Details","operationId":"insert_card_details_insert_card_details_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardDetailsRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/delete_payment_card/{card_id}":{"delete":{"summary":"Delete Payment Card","description":"Delete a payment card. Deletion is blocked if the card is linked to any payment rule.","operationId":"delete_payment_card_delete_payment_card__card_id__delete","parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"integer","title":"Card Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insert_account":{"post":{"summary":"Insert Account","operationId":"insert_account_insert_account_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insert_company":{"post":{"summary":"Insert Company","operationId":"insert_company_insert_company_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/delete_company/{company_id}":{"delete":{"summary":"Delete Company","description":"Delete a company and its associated payment rules","operationId":"delete_company_delete_company__company_id__delete","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/update_company_status/{company_id}":{"put":{"summary":"Update Company Status","description":"Update the is_active status of a company","operationId":"update_company_status_update_company_status__company_id__put","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"is_active","in":"query","required":true,"schema":{"type":"boolean","title":"Is Active"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/update_default_card":{"post":{"summary":"Update Default Card","operationId":"update_default_card_update_default_card_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDefaultCardRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insert_monthly_record":{"post":{"summary":"Insert Monthly Record","operationId":"insert_monthly_record_insert_monthly_record_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonthlyRecordRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insert_monthly_record_for_month/{year}/{month}":{"post":{"summary":"Insert Monthly Record For Month","operationId":"insert_monthly_record_for_month_insert_monthly_record_for_month__year___month__post","parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","title":"Month"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonthlyRecordRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recalculate_monthly_record_transactions":{"put":{"summary":"Recalculate Monthly Record Transactions","description":"Update monthly_record.amount and recalculate transactions for that record.\n\nPreserves completed/paid rows where:\n- transaction_id IS NOT NULL\n- status = 'paid'\n\nRebuilds only the remaining rows using payment_rule:\n- amount_each_transaction\n- card_detail_id","operationId":"recalculate_monthly_record_transactions_recalculate_monthly_record_transactions_put","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecalculateMonthlyRecordTransactionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/create_log_session":{"post":{"summary":"Create Log Session","description":"Create a new log session","operationId":"create_log_session_create_log_session_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogSessionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/update_log_session/{session_id}":{"put":{"summary":"Update Log Session","description":"Update end_time and status of a log session","operationId":"update_log_session_update_log_session__session_id__put","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLogSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/kill_log_sessions":{"put":{"summary":"Kill Log Sessions","description":"Mark all currently-running log sessions as killed","operationId":"kill_log_sessions_kill_log_sessions_put","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insert_log_line":{"post":{"summary":"Insert Log Line","description":"Insert a single log line (for live logging)","operationId":"insert_log_line_insert_log_line_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogLineRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_log_sessions":{"get":{"summary":"Get Log Sessions","description":"Get all log sessions","operationId":"get_log_sessions_get_log_sessions_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_log_lines/{session_id}":{"get":{"summary":"Get Log Lines","description":"Get a page of log lines for a session, newest page first.\n\nWithout before_id: returns the most recent `limit` lines (the live tail).\nWith before_id: returns the `limit` lines immediately preceding that line id,\nfor paging backward through long sessions.\n\nLines are always returned in chronological (ascending) order within the page.","operationId":"get_log_lines_get_log_lines__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":500,"title":"Limit"}},{"name":"before_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return the page of lines immediately before this line id (for loading older lines)","title":"Before Id"},"description":"Return the page of lines immediately before this line id (for loading older lines)"},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insert_log":{"post":{"summary":"Insert Log","operationId":"insert_log_insert_log_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/update_log/{log_id}":{"put":{"summary":"Update Log","operationId":"update_log_update_log__log_id__put","parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"integer","title":"Log Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_log_files":{"get":{"summary":"Get Log Files","description":"List all log records from database","operationId":"get_log_files_get_log_files_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_log_content/{log_id}":{"get":{"summary":"Get Log Content","description":"Read full content of a specific log record","operationId":"get_log_content_get_log_content__log_id__get","parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"integer","title":"Log Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insert_schedule":{"post":{"summary":"Insert Schedule","description":"Insert or update a schedule record","operationId":"insert_schedule_insert_schedule_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_schedules":{"get":{"summary":"Get Schedules","description":"Get all schedule records","operationId":"get_schedules_get_schedules_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/delete_schedule/{schedule_id}":{"delete":{"summary":"Delete Schedule","description":"Delete a schedule record","operationId":"delete_schedule_delete_schedule__schedule_id__delete","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"integer","title":"Schedule Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insert_execution_log":{"post":{"summary":"Insert Execution Log","description":"Insert a new execution request","operationId":"insert_execution_log_insert_execution_log_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionLogRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_execution_logs":{"get":{"summary":"Get Execution Logs","description":"Get all execution logs","operationId":"get_execution_logs_get_execution_logs_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insert_payment_rule":{"post":{"summary":"Insert Payment Rule","description":"Insert or update a payment rule","operationId":"insert_payment_rule_insert_payment_rule_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRuleRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_payment_rules/{company_id}":{"get":{"summary":"Get Payment Rules","description":"Get payment rules by company_id","operationId":"get_payment_rules_get_payment_rules__company_id__get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_payment_rule/{payment_rule_id}":{"get":{"summary":"Get Payment Rule","description":"Get a specific payment rule by id","operationId":"get_payment_rule_get_payment_rule__payment_rule_id__get","parameters":[{"name":"payment_rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Payment Rule Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/delete_payment_rule/{payment_rule_id}":{"delete":{"summary":"Delete Payment Rule","description":"Delete a payment rule","operationId":"delete_payment_rule_delete_payment_rule__payment_rule_id__delete","parameters":[{"name":"payment_rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Payment Rule Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extract_pdf":{"post":{"summary":"Extract Pdf","description":"Extract TNB transactions from a bank statement PDF (page 5 onwards),\nsum all matching amounts, and update the amount column in bank_reconcile\nfor the matching year/month row.","operationId":"extract_pdf_extract_pdf_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_pdf_extract_pdf_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_bill_summary/{company_id}":{"get":{"summary":"Get Bill Summary","description":"Get bill summary per month for a company, joining monthly_record and transactions","operationId":"get_bill_summary_get_bill_summary__company_id__get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Month"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/enqueue_job":{"post":{"summary":"Enqueue Job","description":"Add a job to the job_queue table for the worker to pick up","operationId":"enqueue_job_enqueue_job_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobQueueRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/job_status/{job_id}":{"get":{"summary":"Job Status","description":"Poll the status and result of a queued job","operationId":"job_status_job_status__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_job_queue/{job_id}":{"get":{"summary":"Get Job Queue By Id","description":"Get a single job_queue record by id, including all fields and payload","operationId":"get_job_queue_by_id_get_job_queue__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/update_job_queue_status/{job_id}":{"put":{"summary":"Update Job Queue Status","description":"Let the RPA worker itself set a terminal job_queue status (e.g. 'ot' when it\nstops early because working hours ended). Only applies while the job is still\n'running' so it doesn't clobber a status already changed elsewhere\n(e.g. /cancel_rpa or scheduler.py's finish_job).","operationId":"update_job_queue_status_update_job_queue_status__job_id__put","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateJobQueueStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/job_queue_refresh/{job_id}":{"put":{"summary":"Job Queue Refresh","description":"Set the refresh flag on a job_queue row so the frontend knows to reload","operationId":"job_queue_refresh_job_queue_refresh__job_id__put","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}},{"name":"refresh","in":"query","required":true,"schema":{"type":"boolean","title":"Refresh"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trigger_rpa":{"post":{"summary":"Trigger Rpa","description":"Enqueue an RPA job for the local worker (scheduler.py) to pick up and execute.\nThe API runs in a cloud container so it cannot launch OS processes directly —\nthe local Windows machine running scheduler.py polls job_queue and runs the RPA.\nGuards against concurrent launches via DB conflict check.","operationId":"trigger_rpa_trigger_rpa_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerRPARequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cancel_rpa":{"post":{"summary":"Cancel Rpa","description":"Cancel a queued/running RPA by marking its job_queue entry as failed.\nThe local scheduler.py worker on the Windows machine detects the status\nchange and stops processing. OS-level process killing is not possible\nfrom the cloud container — the local worker handles that.","operationId":"cancel_rpa_cancel_rpa_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerRPARequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/set_working_hours":{"post":{"summary":"Set Working Hours","operationId":"set_working_hours_set_working_hours_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkingHourRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_working_hours":{"get":{"summary":"Get Working Hours","description":"Get the current working hours","operationId":"get_working_hours_get_working_hours_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_email_setting":{"get":{"summary":"Get Email Setting","description":"Get the current email setting (To address + CC list) for this company","operationId":"get_email_setting_get_email_setting_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insert_email_setting":{"post":{"summary":"Insert Email Setting","description":"Create or update the company's email setting.\n\nUpserts the single To address, and replaces the entire CC list with the\none provided (omit cc_emails, or pass an empty list, to clear all CC addresses).","operationId":"insert_email_setting_insert_email_setting_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSettingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insert_email_setting_cc":{"post":{"summary":"Insert Email Setting Cc","description":"Add a single CC email address. Fails if no email_setting (To address) exists yet.","operationId":"insert_email_setting_cc_insert_email_setting_cc_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSettingCcRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/delete_email_setting_cc/{cc_id}":{"delete":{"summary":"Delete Email Setting Cc","description":"Remove a single CC email address by id","operationId":"delete_email_setting_cc_delete_email_setting_cc__cc_id__delete","parameters":[{"name":"cc_id","in":"path","required":true,"schema":{"type":"integer","title":"Cc Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/delete_email_setting":{"delete":{"summary":"Delete Email Setting","description":"Delete the company's email setting (To address) and all its CC addresses","operationId":"delete_email_setting_delete_email_setting_delete","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_total_amount":{"get":{"summary":"Get Total Amount","operationId":"get_total_amount_get_total_amount_get","parameters":[{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Month"}},{"name":"monthly_record_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of monthly record IDs","title":"Monthly Record Ids"},"description":"Comma-separated list of monthly record IDs"},{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by company id","title":"Company Id"},"description":"Filter by company id"},{"name":"type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by company type_id; use 'null' for untyped companies","title":"Type Id"},"description":"Filter by company type_id; use 'null' for untyped companies"},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_today_transaction_count":{"get":{"summary":"Get Today Transaction Count","description":"Return the count of transactions completed today (transaction_id IS NOT NULL\nand updated_at falls on today's date) together with max_trans_per_day.","operationId":"get_today_transaction_count_get_today_transaction_count_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insert_user":{"post":{"summary":"Insert User","description":"Insert or update the user record (single row upsert)","operationId":"insert_user_insert_user_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_user":{"get":{"summary":"Get User","description":"Get the single user record","operationId":"get_user_get_user_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/login":{"post":{"summary":"Login","description":"Authenticate a user by username and password","operationId":"login_login_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/download_transaction_report":{"get":{"summary":"Download Transaction Report","description":"Download a transaction report filtered by a date range (from_date / to_date).\n\nIncludes per-row:\n  - Reference ID (transaction_id)\n  - Payment amount\n  - Bill account code (company code + store code)\n  - Status\n  - Bank (card_detail.bank_code)\n  - Pay At\n\nSummary footer:\n  - Total number of transactions\n  - Total processed amount\n\nSupported formats: pdf, excel","operationId":"download_transaction_report_download_transaction_report_get","parameters":[{"name":"format","in":"query","required":true,"schema":{"type":"string","description":"Export format: 'pdf' or 'excel'","title":"Format"},"description":"Export format: 'pdf' or 'excel'"},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date inclusive (YYYY-MM-DD)","title":"From Date"},"description":"Start date inclusive (YYYY-MM-DD)"},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date inclusive (YYYY-MM-DD)","title":"To Date"},"description":"End date inclusive (YYYY-MM-DD)"},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status, e.g. 'paid'","title":"Status Filter"},"description":"Filter by status, e.g. 'paid'"},{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by company id","title":"Company Id"},"description":"Filter by company id"},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/send_run_notification":{"post":{"summary":"Send Run Notification","description":"Query the total amount to be processed and send a 'run started' email.\nCalled by the RPA client (main.py) at the start of a payment run.","operationId":"send_run_notification_send_run_notification_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_summary":{"get":{"summary":"Get Summary","description":"Return high-level financial summary:\n  - total_account : number of companies\n  - total_due     : sum of monthly_record.amount for the period\n  - total_paid    : sum of transactions.amount where status IN ('paid', 'failed') for the period\n  - total_balance : sum of transactions.amount where status = 'unpaid' for the period\n\nPeriod logic:\n  - year + month → filter by both\n  - year only    → filter by year\n  - neither      → current month/year (existing behaviour)\n\nOptional: type_id → filter companies by type:\n  - omitted        → no filter\n  - 'null' / 'none' → WHERE type_id IS NULL\n  - integer        → WHERE type_id = <value>","operationId":"get_summary_get_summary_get","parameters":[{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Month"}},{"name":"type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_job_queue":{"get":{"summary":"Get Job Queue","description":"Fetch all job_queue rows ordered by queued_at DESC for the dashboard queue table.","operationId":"get_job_queue_get_job_queue_get","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":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_types":{"get":{"summary":"Get Types","description":"Get all type records","operationId":"get_types_get_types_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insert_type":{"post":{"summary":"Insert Type","description":"Insert or update a type record","operationId":"insert_type_insert_type_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/delete_type/{type_id}":{"delete":{"summary":"Delete Type","description":"Delete a type record","operationId":"delete_type_delete_type__type_id__delete","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"integer","title":"Type Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_transactions_by_filter":{"get":{"summary":"Get Transactions By Filter","description":"Query transactions joined with monthly_record and company,\nfiltered by any combination of company_ids, monthly_record_ids, type_ids, and transaction_ids.\nAll filters are optional; omitting all returns all transactions.","operationId":"get_transactions_by_filter_get_transactions_by_filter_get","parameters":[{"name":"company_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of company IDs","title":"Company Ids"},"description":"Comma-separated list of company IDs"},{"name":"monthly_record_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of monthly record IDs","title":"Monthly Record Ids"},"description":"Comma-separated list of monthly record IDs"},{"name":"type_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of type IDs","title":"Type Ids"},"description":"Comma-separated list of type IDs"},{"name":"transaction_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of transaction IDs","title":"Transaction Ids"},"description":"Comma-separated list of transaction IDs"},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by monthly_record year","title":"Year"},"description":"Filter by monthly_record year"},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by monthly_record month","title":"Month"},"description":"Filter by monthly_record month"},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/update_monthly_record_status/{monthly_record_id}":{"put":{"summary":"Update Monthly Record Status","description":"Derive and update the status of a monthly_record row based on its transactions:\n  - Any transaction with status='failed'  → set monthly_record status to 'review'\n  - Any transaction with status='unpaid'  → set monthly_record status to 'unpaid'\n  - Otherwise                             → set monthly_record status to 'paid'","operationId":"update_monthly_record_status_update_monthly_record_status__monthly_record_id__put","parameters":[{"name":"monthly_record_id","in":"path","required":true,"schema":{"type":"integer","title":"Monthly Record Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_bank_reconciliation_files":{"get":{"summary":"Get Bank Reconciliation Files","operationId":"get_bank_reconciliation_files_get_bank_reconciliation_files_get","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/upload_bank_reconciliation_file":{"post":{"summary":"Upload Bank Reconciliation File","operationId":"upload_bank_reconciliation_file_upload_bank_reconciliation_file_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_bank_reconciliation_file_upload_bank_reconciliation_file_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/delete_bank_reconciliation_file/{record_id}":{"delete":{"summary":"Delete Bank Reconciliation File","operationId":"delete_bank_reconciliation_file_delete_bank_reconciliation_file__record_id__delete","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}},{"name":"year","in":"query","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"month","in":"query","required":true,"schema":{"type":"integer","title":"Month"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/download_bank_reconciliation_file/{record_id}":{"get":{"summary":"Download Bank Reconciliation File","operationId":"download_bank_reconciliation_file_download_bank_reconciliation_file__record_id__get","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccountRequest":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"AccountRequest"},"Body_extract_pdf_extract_pdf_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"year":{"type":"integer","title":"Year"},"month":{"type":"integer","title":"Month"}},"type":"object","required":["file","year","month"],"title":"Body_extract_pdf_extract_pdf_post"},"Body_upload_bank_reconciliation_file_upload_bank_reconciliation_file_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"year":{"type":"integer","title":"Year"},"month":{"type":"integer","title":"Month"}},"type":"object","required":["file","year","month"],"title":"Body_upload_bank_reconciliation_file_upload_bank_reconciliation_file_post"},"BulkUpdateTransactionStatusRequest":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"},"status":{"type":"string","title":"Status"},"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark"}},"type":"object","required":["ids","status"],"title":"BulkUpdateTransactionStatusRequest"},"CardDetailsRequest":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"card_number":{"type":"string","title":"Card Number"},"cvv":{"type":"string","title":"Cvv"},"bank_code":{"type":"string","title":"Bank Code"}},"type":"object","required":["card_number","cvv","bank_code"],"title":"CardDetailsRequest"},"CompanyRequest":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"store_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Store Code"},"type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Type Id"}},"type":"object","required":["code","name"],"title":"CompanyRequest"},"EmailSettingCcRequest":{"properties":{"cc_email":{"type":"string","title":"Cc Email"}},"type":"object","required":["cc_email"],"title":"EmailSettingCcRequest"},"EmailSettingRequest":{"properties":{"to_email":{"type":"string","title":"To Email"},"cc_emails":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Cc Emails"}},"type":"object","required":["to_email"],"title":"EmailSettingRequest"},"ExecutionLogRequest":{"properties":{"type":{"type":"string","title":"Type"},"schedule_date":{"type":"string","title":"Schedule Date"},"schedule_time":{"type":"string","title":"Schedule Time"}},"type":"object","required":["type","schedule_date","schedule_time"],"title":"ExecutionLogRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"JobQueueRequest":{"properties":{"rpa_type":{"type":"string","title":"Rpa Type"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority","default":0},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload","default":{}},"max_retries":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Retries","default":3},"scheduled_for":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduled For"}},"type":"object","required":["rpa_type"],"title":"JobQueueRequest"},"LogLineRequest":{"properties":{"session_id":{"type":"integer","title":"Session Id"},"message":{"type":"string","title":"Message"},"timestamp":{"type":"string","title":"Timestamp"}},"type":"object","required":["session_id","message","timestamp"],"title":"LogLineRequest"},"LogRequest":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"LogRequest"},"LogSessionRequest":{"properties":{"start_time":{"type":"string","title":"Start Time"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","required":["start_time"],"title":"LogSessionRequest"},"LoginRequest":{"properties":{"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"}},"type":"object","required":["username","password"],"title":"LoginRequest"},"MonthlyRecordRequest":{"properties":{"amount":{"type":"number","title":"Amount"},"consumption":{"type":"integer","title":"Consumption"},"company_id":{"type":"integer","title":"Company Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","default":"unpaid"},"balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance","default":0.0},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date"}},"type":"object","required":["amount","consumption","company_id"],"title":"MonthlyRecordRequest"},"OtpRequest":{"properties":{"phone_sms_id":{"type":"integer","title":"Phone Sms Id"},"code":{"type":"string","title":"Code"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"reference_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Number"}},"type":"object","required":["phone_sms_id","code"],"title":"OtpRequest"},"PaymentRuleRequest":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"company_id":{"type":"integer","title":"Company Id"},"card_detail_id":{"type":"integer","title":"Card Detail Id"},"amount_each_transaction":{"type":"number","title":"Amount Each Transaction"},"max_amount":{"type":"number","title":"Max Amount"}},"type":"object","required":["company_id","card_detail_id","amount_each_transaction","max_amount"],"title":"PaymentRuleRequest"},"PingRequest":{"properties":{"log":{"type":"string","title":"Log"}},"type":"object","required":["log"],"title":"PingRequest"},"RecalculateMonthlyRecordTransactionsRequest":{"properties":{"monthly_record_id":{"type":"integer","title":"Monthly Record Id"},"amount":{"type":"number","title":"Amount"},"remark":{"type":"string","title":"Remark"}},"type":"object","required":["monthly_record_id","amount","remark"],"title":"RecalculateMonthlyRecordTransactionsRequest"},"ScheduleRequest":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"type":{"type":"string","title":"Type"},"from_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"From Day"},"to_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"To Day"},"time":{"type":"string","title":"Time"},"enable":{"type":"boolean","title":"Enable"},"rpa_type":{"type":"string","title":"Rpa Type"},"type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Type Id"}},"type":"object","required":["type","time","enable","rpa_type"],"title":"ScheduleRequest"},"TriggerRPARequest":{"properties":{"rpa_type":{"type":"string","title":"Rpa Type"},"type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Type Id"},"type_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Type Ids"},"company_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Company Ids"},"monthly_record_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Monthly Record Ids"},"transaction_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Transaction Ids"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Month"}},"type":"object","required":["rpa_type"],"title":"TriggerRPARequest"},"TypeRequest":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"TypeRequest"},"UpdateDefaultCardRequest":{"properties":{"card_id":{"type":"integer","title":"Card Id"}},"type":"object","required":["card_id"],"title":"UpdateDefaultCardRequest"},"UpdateFailedTransactionStatusRequest":{"properties":{"monthly_record_id":{"type":"integer","title":"Monthly Record Id"},"total_payable":{"type":"number","title":"Total Payable"}},"type":"object","required":["monthly_record_id","total_payable"],"title":"UpdateFailedTransactionStatusRequest"},"UpdateJobQueueStatusRequest":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"UpdateJobQueueStatusRequest"},"UpdateLogSessionRequest":{"properties":{"end_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Time"},"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"UpdateLogSessionRequest"},"UpdateTransactionStatusRequest":{"properties":{"id":{"type":"integer","title":"Id"},"transaction_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transaction Id"},"status":{"type":"string","title":"Status"},"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark"}},"type":"object","required":["id","status"],"title":"UpdateTransactionStatusRequest"},"UsersRequest":{"properties":{"username":{"type":"string","title":"Username"},"name":{"type":"string","title":"Name"},"password":{"type":"string","title":"Password"}},"type":"object","required":["username","name","password"],"title":"UsersRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WorkingHourRequest":{"properties":{"from_time":{"type":"string","format":"time","title":"From Time"},"to_time":{"type":"string","format":"time","title":"To Time"},"max_trans_per_day":{"type":"integer","title":"Max Trans Per Day"}},"type":"object","required":["from_time","to_time","max_trans_per_day"],"title":"WorkingHourRequest"}}}}