Settings > Modules) if (!moduleOn('bookkeeping')) { http_response_code(403); echo json_encode(['success' => 'False', 'message' => moduleOffText('bookkeeping')]); exit(); } require_once 'account_map.php'; $insert_id = false; $error = ''; $in = apiFormInput($account_map); $in['currency'] = $in['currency'] ?? (string) $session_company_currency; $account_id = intval(accountSave($in, 0, $error)); if (!$account_id) { apiFormRefuse($error); } $insert_id = $account_id; $name = escapeSql(accountRow($account_id)['account_name']); logAudit("Account", "Create", "Created account $name via API ($api_key_name)", 0, $account_id); logAudit("API", "Success", "Created account $name via API ($api_key_name)", 0); // Output require_once '../create_output.php';