Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Fireinthebellyy/ftb-web/llms.txt
Use this file to discover all available pages before exploring further.
The Toolkits API allows you to manage educational content, create toolkits, and handle purchases with Razorpay integration.
Authentication
- GET /api/toolkits: Public endpoint
- GET /api/toolkits/: Public endpoint (shows additional info for authenticated users)
- POST /api/toolkits: Admin only
- POST /api/toolkits/: Requires authentication (for purchases)
curl -X GET "https://ftbhustle.com/api/toolkits"
Retrieve all active toolkits.
Response
Array of toolkit objects
Unique identifier for the toolkit
Detailed description of the toolkit
Original price (for displaying discounts)
URL to toolkit content page (legacy)
Category for filtering (e.g., “Career”, “Skills”)
Array of feature highlights (e.g., [“10 lessons”, “Lifetime access”])
Total duration (e.g., “2h 30m”)
Whether the toolkit is active
Whether to show a sale badge
Creation timestamp (ISO 8601 format)
Last update timestamp (ISO 8601 format)
[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Complete Web Development Course",
"description": "Master web development from scratch",
"price": 1999,
"originalPrice": 2999,
"coverImageUrl": "https://example.com/cover.jpg",
"videoUrl": "https://youtube.com/watch?v=xyz",
"contentUrl": null,
"category": "Skills",
"highlights": [
"15 video lessons",
"Lifetime access",
"Certificate of completion"
],
"totalDuration": "5h 30m",
"lessonCount": 15,
"isActive": true,
"showSaleBadge": true,
"userId": "creator123",
"creatorName": "John Doe",
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-03-01T14:30:00Z"
}
]
curl -X GET "https://ftbhustle.com/api/toolkits/550e8400-e29b-41d4-a716-446655440000" \
-H "Cookie: session=YOUR_SESSION_TOKEN"
Retrieve detailed information about a specific toolkit, including content items and purchase status.
Path Parameters
The unique identifier of the toolkit
Response
The toolkit object with all details
Array of content items in the toolkit
Unique identifier for the content item
HTML content (for articles)
Bunny CDN video URL (for videos)
Whether the current user has purchased this toolkit
Array of content item IDs the user has completed
{
"toolkit": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Complete Web Development Course",
"description": "Master web development from scratch",
"price": 1999,
"originalPrice": 2999,
"coverImageUrl": "https://example.com/cover.jpg",
"videoUrl": "https://youtube.com/watch?v=xyz",
"contentUrl": null,
"category": "Skills",
"highlights": ["15 video lessons", "Lifetime access"],
"totalDuration": "5h 30m",
"lessonCount": 15,
"isActive": true,
"userId": "creator123",
"creatorName": "John Doe",
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-03-01T14:30:00Z"
},
"contentItems": [
{
"id": "item-1",
"toolkitId": "550e8400-e29b-41d4-a716-446655440000",
"title": "Introduction to HTML",
"type": "video",
"content": null,
"bunnyVideoUrl": "https://cdn.bunny.net/video123",
"orderIndex": 0,
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z"
}
],
"hasPurchased": true,
"completedItemIds": ["item-1"]
}
curl -X POST "https://ftbhustle.com/api/toolkits" \
-H "Cookie: session=YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "New Course",
"description": "Learn something new",
"price": 999,
"originalPrice": 1499,
"category": "Skills",
"lessonCount": 10,
"totalDuration": "3h 00m"
}'
Create a new toolkit. Admin only.
Request Body
Original price (for discounts)
Content page URL (legacy)
Array of feature highlights
Response
The created toolkit object
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"title": "New Course",
"description": "Learn something new",
"price": 999,
"originalPrice": 1499,
"coverImageUrl": null,
"videoUrl": null,
"contentUrl": null,
"category": "Skills",
"highlights": null,
"totalDuration": "3h 00m",
"lessonCount": 10,
"isActive": false,
"showSaleBadge": null,
"userId": "admin123",
"createdAt": "2024-03-15T14:30:00Z",
"updatedAt": "2024-03-15T14:30:00Z"
}
curl -X POST "https://ftbhustle.com/api/toolkits/550e8400-e29b-41d4-a716-446655440000" \
-H "Cookie: session=YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"couponCode": "SAVE100"
}'
Initiate a toolkit purchase with optional coupon code. Returns Razorpay order details for payment.
Path Parameters
The unique identifier of the toolkit to purchase
Request Body
Optional coupon code for discount
Response
Indicates if the purchase initiation was successful
Whether the purchase is free (fully covered by coupon)
Razorpay order details (not present if free=true)
Razorpay key ID for frontend integration
The toolkit being purchased
Discount applied in rupees
Final price after discount in rupees
{
"success": true,
"free": false,
"order": {
"id": "order_ABC123XYZ",
"amount": 189900,
"currency": "INR"
},
"key": "rzp_live_XXXXXXXXXX",
"purchase": {
"id": "purchase-id-123",
"userId": "user123",
"toolkitId": "550e8400-e29b-41d4-a716-446655440000",
"razorpayOrderId": "order_ABC123XYZ",
"paymentStatus": "pending",
"amountPaid": 189900,
"couponId": "coupon-id-456",
"createdAt": "2024-03-15T14:30:00Z"
},
"toolkit": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Complete Web Development Course",
"price": 1999
},
"discountAmount": 100,
"finalPrice": 1899
}
Coupon Validation Errors
Error message for coupon issues
Possible coupon error responses (400 Bad Request):
Invalid coupon code: Coupon does not exist
Coupon is not active: Coupon has been deactivated
Coupon has expired: Coupon expiration date has passed
You have already used this coupon: User has reached per-user limit
Coupon usage limit reached: Total usage limit reached
Toolkit already purchased: User already owns this toolkit
Error Responses
All API endpoints return appropriate HTTP status codes:
- 401 Unauthorized: User is not authenticated (where required)
- 403 Forbidden: User doesn’t have admin privileges
- 404 Not Found: Toolkit not found
- 400 Bad Request: Validation error or coupon issue
- 500 Internal Server Error: Server error
{
"error": "Failed to fetch toolkit"
}