Mock Order & Shipping API Documentation

Welcome to the Mock Order & Shipping API documentation. This API provides endpoints for simulating order placements, shipping processes, and more. The data is not stored, and responses are simulated for testing purposes.

API Overview

Base URL

The base URL for all API requests is:

http://yourdomain.com/

API Endpoints

Endpoint Method Description Example Request Example Response cURL Command
/orderMock.php POST Simulate placing an order.

{
    "product_id": 101,
    "quantity": 2
}
                            

{
    "order_id": 1234,
    "status": "Order placed successfully (mock)"
}
                            

curl -X POST https://apitpoint.com/api/orderMock.php \
-H "Content-Type: application/json" \
-d '{"product_id": 101, "quantity": 2}'
                            
/mockShipping.php POST Simulate initiating shipping.

{
    "order_id": 1234
}
                            

{
    "tracking_number": "ABC123XYZ",
    "status": "Shipping initiated successfully (mock)"
}
                            

curl -X POST https://apitpoint.com/api/mockShipping.php \
-H "Content-Type: application/json" \
-d '{"order_id": 1234}'
                            
/shipSim.php POST Simulate shipping with estimated delivery date.

{
    "order_id": 1234
}
                            

{
    "estimated_delivery_date": "2024-09-14",
    "status": "Shipping simulated successfully (mock)"
}
                            

curl -X POST https://apitpoint.com/api/shipSim.php \
-H "Content-Type: application/json" \
-d '{"order_id": 1234}'
                            
/orderSimulate.php POST Simulate an order and provide estimated delivery date.

{
    "product_id": 101,
    "quantity": 2
}
                            

{
    "message": "Order simulation completed successfully (mock)",
    "estimated_delivery": "2024-09-24"
}
                            

curl -X POST https://apitpoint.com/api/orderSimulate.php \
-H "Content-Type: application/json" \
-d '{"product_id": 101, "quantity": 2}'