API Documentation

API Documentation for Website

Please Make sure before /api/ add your domain Example: https://yourstore.com/api/tenant/v1/ <- API FEATURE ->

Featured Products

GET
/api/tenant/v1/featured/product/{limit?}
Retrieves featured products with an optional limit.
GET /api/tenant/v1/featured/product/6

Recent Products

GET
/api/tenant/v1/recent/product/{limit?}
Retrieves recently added products with an optional limit.
GET /api/tenant/v1/recent/product/10

Campaign Products

GET
/api/tenant/v1/campaign/product/{id?}
Retrieves products associated with a campaign by ID.
GET /api/tenant/v1/campaign/product/123

Get All Campaigns

GET
/api/tenant/v1/campaign
Retrieves all available campaigns.
GET /api/tenant/v1/campaign

Search Products

GET
/api/tenant/v1/product
Searches for products based on criteria.
GET /api/tenant/v1/product?q=keyword

Search Items

GET
/api/tenant/v1/search-items
Searches for items based on criteria.
GET /api/tenant/v1/search-items?q=keyword

Product Detail

GET
/api/tenant/v1/product/{id}
Retrieves details of a specific product by ID.
GET /api/tenant/v1/product/123

Price Range of Products

GET
/api/tenant/v1/product/price-range
Retrieves the price range of available products.
GET /api/tenant/v1/product/price-range

Store Product Review

POST
/api/tenant/v1/product-review
Stores a review for a product.
POST /api/tenant/v1/product-review { "product_id": 123, "rating": 4, "comment": "Great product!" }

Products by Category

POST
/api/tenant/v1/category/{id}
Retrieves products belonging to a specific category by ID.
POST /api/tenant/v1/category/5

Products by Subcategory

POST
/api/tenant/v1/subcategory/{id}
Retrieves products belonging to a specific subcategory by ID.
POST /api/tenant/v1/subcategory/10

Apply Coupon to Product

POST
/api/tenant/v1/coupon
Applies a coupon to a product or order.
POST /api/tenant/v1/coupon { "coupon_code": "SUMMER20", "product_id": 123 }

Calculate Shipping Charges

POST
/api/tenant/v1/shipping-charge
Calculates shipping charges for an order.
POST /api/tenant/v1/shipping-charge { "address": "123 Main St, Anytown, USA", "products": [ { "product_id": 123, "quantity": 2 }, { "product_id": 456, "quantity": 1 } ] }

Checkout

POST
/api/tenant/v1/checkout
Initiates the checkout process for an order.
POST /api/tenant/v1/checkout { "customer_id": 123, "products": [ { "product_id": 123, "quantity": 2 }, { "product_id": 456, "quantity": 1 } ], "payment_method": "credit_card", "shipping_address": "123 Main St, Anytown, USA", "coupon_code": "SUMMER20" }

Update Payment Information

POST
/api/tenant/v1/update-payment
Updates payment information for an order.
POST /api/tenant/v1/update-payment { "order_id": 123, "payment_method": "credit_card", "card_number": "1234 5678 9012 3456", "expiry_date": "12/24", "cvv": "123" }