Welcome to Our APIs.
API Usage Instructions
- All Products: View all products available on the site.
- Product Details: View details of a specific product. Replace
<slug> with the slug of the product you wish to view.
- Product By ID: To view a product by its ID, replace
<ID> with the product ID in the URL: /product_details/products/id=<ID>.
- Filter Products: Use the
/filter/ endpoint with query parameters to filter products based on various criteria.
- Products Homepage and Catalog: Display a curated selection of products on the homepage using the
/homepage/ endpoint.
- Parent Catalog: Display the parent catalog on the homepage using the
/catalog/ endpoint. This shows categories without delving into specific products.
- Parent & Sub Catalog: Use the
/catalog/ endpoint to display both parent and sub-catalogs, giving users a view of both categories and subcategories on the homepage.
- SubCatalog: Display the SubCatalog on the homepage using the
/subcatalog/ endpoint. This focuses on subcategories within a larger category.
- User Account Home: Users can navigate to their account page to view their profile, orders, and more.
- Related Products: To view products related to a specific product, use the endpoint:
/related-products/<slug>. Replace <slug> with the slug of the product to see related items. This will return a list that includes the current product along with 5 related products from the same category or subcategory.
- Free Shipping Products: Access the
/freeshipping/ endpoint to view products that come with free shipping. This feature showcases a selection of products that are eligible for free shipping, providing an attractive option for cost-conscious shoppers.
Product Catalog Navigation
-
Parent Catalog: Display products by a specific parent category. To filter products within a parent category, append the category slug to the query parameter, like so:
/catalog/parent/?slug=example-parent-category. Replace example-parent-category with the actual slug of the parent category you wish to browse.
-
SubCatalog: Display products by a specific subcategory. To filter products within a subcategory, append the subcategory slug to the query parameter, like so:
/catalog/sub/?slug=example-subcategory. Replace example-subcategory with the actual slug of the subcategory you wish to browse.
-
Search Products: Replace
example with your search query.
Stock Management
-
Check Stock: Click and replace "your-product-sku-here" in the URL with the actual product SKU to check its stock.
-
Update Stock: To update the stock after a sale, you'll need to make a POST request to
/api/update_stock/<product_sku>/ with the quantity sold. This action typically requires a backend process or a tool like Postman.
Cart API Usage
- View Cart: Authenticated users can send a GET request to
/carts/ to view their cart which returns the current state of the user's cart, including all cart items.
BuyNow API Usage
- Browse BuyNow Products: View all products available for instant purchase.
- Product Details: Replace
<product_id> with the specific product ID to view its details and options for BuyNow.
- Child Product Details: Replace
<child_product_id> with the specific child product ID to view detailed options such as color and size.
- Initiate BuyNow Process: Send a POST request to
/orders/process-order/ with product details to create an instant order. Include the following data: { "product_id": "<product_id>", "quantity": "<quantity>" } in the request body.
Review and Media Upload API Usage
- Product Details: View Review details of a specific product. Replace
<slug> with the slug of the product you wish to view.
-
Browse Reviews:
View all user-submitted reviews.
-
Review Details:
Replace
<review_id> with the specific review ID to see the full review content.
-
Upload Image:
Send a POST request to upload an image as part of a review. Make sure to use the appropriate form data encoding when sending files.
-
Upload Video:
Send a POST request to upload a video for a review. The request must contain the video file within the form data.
Authentication and User Management
-
Sign Up:
Register as a new user by providing an email address, username, and password.
-
Login:
Access your account by entering your username and password.
-
Logout:
Sign out of your account securely.
Cart API Usage
- View Cart: Authenticated users can send a GET request to
/carts/ to view their cart which returns the current state of the user's cart, including all cart items.
Checkout API Usage
-
Initiate Checkout Process: Authenticated users can send a POST request to
/checkout/ to initiate the checkout process. Include necessary details like address, payment method, and product details in the request body.
-
Select Payment Method: By default, the payment method is set to PayPal. To select a different payment method, include the
payment_method field in your POST request with one of the following values: credit_card, bank_transfer, cod, apple_pay, google_pay, or stripe.
-
View User Orders: To view all orders associated with a user account, send a GET request to
/user-checkout/. This endpoint is for authenticated users to view their own orders.
Shipping Information API Usage
-
List Shipping Details: Retrieve a list of all shipping details for products. Use a GET request to
/shippingdetails/.
-
Shipping Detail By Product ID: Replace
<product_id> with the specific product ID in the URL to retrieve shipping details: /shippingdetails/<product_id>.
-
List Shipping Countries: Retrieve a list of all available shipping countries. Use a GET request to
/shippingcountries/.
-
Shipping Country By ID: Replace
<country_id> with the specific country ID in the URL to retrieve a country's details: /shippingcountries/<country_id>.
-
List Shipping Locations: Retrieve a list of all available shipping locations. Use a GET request to
/shippinglocations/.
-
Shipping Location By ID: Replace
<location_id> with the specific location ID in the URL to retrieve a location's details: /shippinglocations/<location_id>.
-
List Shipping Costs: Retrieve a list of all shipping costs. Use a GET request to
/shippingcosts/.
-
Shipping Cost By ID: Replace
<cost_id> with the specific cost ID in the URL to retrieve a cost's details: /shippingcosts/<cost_id>.
-
List Shipping Times: Retrieve a list of all shipping times. Use a GET request to
/shippingtimes/.
-
Shipping Time By ID: Replace
<time_id> with the specific time ID in the URL to retrieve a time's details: /shippingtimes/<time_id>.
-
List Shipping Methods: Retrieve a list of all shipping methods. Use a GET request to
/shippingmethods/.
-
Shipping Method By ID: Replace
<method_id> with the specific method ID in the URL to retrieve a method's details: /shippingmethods/<method_id>.
Affiliates Information API Usage
Manage Affiliates:
Authentication
Payment