Skip to main content

Rate Consultation

Once a consultation is closed, you can rate the doctor by providing the consultation ID and a rating value (typically 1 to 5).

Usage Example:​

import 'package:altibbi/service/api_service.dart';

ApiService apiService = ApiService();

void handleRating(int id, int score) async {
try {
await apiService.rateConsultation(id, score);
print(\"Rating submitted successfully\");
} catch (e) {
print(\"Rating Error: $e\");
}
}

Responses​

Status 204 (No Content)​

Indicates the rating was accepted successfully.

Status 401 (Unauthorized)​

Returned if the partner token is invalid or expired.

Status 404 (Not Found)​

Returned if the consultation ID does not exist or has already been rated.