'cURL error: ' . curl_error($ch)]); } else { $data = json_decode($response, true); if (json_last_error() === JSON_ERROR_NONE) { echo $response; // Return the raw JSON response } else { echo json_encode(['error' => 'Invalid JSON response', 'raw_response' => $response]); } } curl_close($ch); } else { echo json_encode(['error' => 'No process ID provided']); }