Mock Reviews & Ratings API Documentation

This guide provides comprehensive documentation on the mock APIs for reviews and ratings. Use these APIs to test your applications effectively.

1. ReviewMock API

Endpoint: GET /getReviews.php

This endpoint retrieves all reviews.

Example Request

https://apitpoint.com/api/getReviews.php

Example Response

[
    {
        "review_id": 1,
        "review_text": "Great product!",
        "rating": 5,
        "reviewer_name": "John Doe"
    },
    ...
]

2. RatingSim API

Endpoint: GET /ratingSim.php

This endpoint retrieves all ratings.

Example Request

curl -X POST -d "rating=4&review_id=123" https://apitpoint.com/api/ratingSim.php
            

Example Response

[
    {
        "rating_id": 1,
        "rating": 4,
        "review_id": 1
    },
    ...
]

3. MockReview API

Endpoint: POST /mockReview.php

This endpoint simulates submitting a review.

Example Request

curl -X POST -d "review_text=Excellent service&rating=5&reviewer_name=Jane Doe" https://apitpoint.com/api/mockReview.php

Example Response

{
    "message": "Review submitted successfully (mock)",
    "review_text": "Excellent service",
    "rating": 5,
    "reviewer_name": "Jane Doe"
}

4. FeedbackSim API

Endpoint: POST /feedbackSim.php

This endpoint simulates submitting feedback.

Example Request

curl -X POST -d "feedback=Very useful&review_id=4" https://apitpoint.com/api/feedbackSim.php
            

Example Response

{
    "message": "Feedback submitted successfully (mock)",
    "feedback_text": "Very useful",
    "rating": 4
}