Live REST API · Laravel 13.24.0
Learn APIs by building against a real one.
Welcome, students. In this course we practise how modern apps talk to a server: sending requests, reading JSON, logging in with tokens and handling errors. Every endpoint here is live, so the todo, notes, blog and shop apps you build will work for real.
Base URL
https://api-practice.aakifraza.com/api/v1
$ curl https://api-practice.aakifraza.com/api/v1/auth/login \ -H "Accept: application/json" \ -d email=student1@example.com \ -d password=password \ -d device_name=laptop # 200 OK { "token": "1|f8Kq2...xYz", "token_type": "Bearer", "user": { "id": 1, "name": "Student 1", "email": "student1@example.com", ... } }
- live endpoints
- 51
- resources to explore
- 9
- platforms with sample code
- 5
- daily data reset (PKT)
- 12:00 AM
What we will practise
Everything a real app needs from its backend
HTTP fundamentals
GET, POST, PUT, PATCH and DELETE. Status codes like 200, 201, 401, 404 and 422, and what each one means for your app.
Token authentication
Register, log in, keep a bearer token, log out one device or all of them. Laravel Sanctum under the hood.
CRUD resources
Create, read, update and delete your own todos, notes and contacts. Each student only ever sees their own data.
Validation & errors
Send bad data on purpose and learn to read 422 responses and show field errors in your forms.
Files & relationships
Upload avatars and blog covers with multipart requests. Work with comments, likes and categories.
A complete shop flow
Browse products, manage a cart, place orders and cancel them, just like a real e-commerce app.
Quick start
Your first request in three steps
Use any tool you like: cURL, Postman, a browser fetch(), React, React Native or Flutter.
-
1
Get a token
Register your own account, or log in with a demo student. Save the
tokenfrom the response.POST /auth/register
POST /auth/login -
2
Send it with every request
Endpoints marked with a lock need these two headers. Without the token you will get
401.Authorization: Bearer <token>
Accept: application/json -
3
Build something
Start with a todo list, then move on to notes, contacts, a blog and finally a full shop with cart and orders.
GET /todos
POST /todos
Demo student accounts
Ten ready-made students, each with their own todos, notes and contacts.
- student1@example.com … student10@example.com
- password
- password
No-token playground
Brand new to APIs? Begin with the open blog API. No login, no headers, just requests and responses.
https://api-practice.aakifraza.com/api/blog
Experiment freely. All practice data is wiped and re-seeded every night at 12:00 AM Pakistan time.
API reference
51 endpoints, grouped by resource
All paths are relative to /api/v1. Ready-to-copy code for cURL, JavaScript, React, React Native and Flutter lives in the admin panel's API guide.
Token required
Authentication & profile
12-
POST
/auth/registerRegister -
POST
/auth/loginLogin -
GET
/auth/meGet current user -
POST
/auth/logoutLogout -
POST
/auth/logout-allLogout all devices -
GET
/auth/tokensList devices -
DELETE
/auth/tokens/2Logout device -
PUT
/auth/profileUpdate profile -
PUT
/auth/passwordChange password -
POST
/auth/avatarUpload avatar -
DELETE
/auth/avatarRemove avatar -
DELETE
/auth/accountDelete account
Todos
6-
GET
/todos?status=pending&page=1List todos -
POST
/todosCreate todo -
GET
/todos/1Get todo -
PATCH
/todos/1Update todo -
PATCH
/todos/1/toggleToggle todo -
DELETE
/todos/1Delete todo
Notes
5-
GET
/notes?search=lectureList notes -
POST
/notesCreate note -
GET
/notes/1Get note -
PATCH
/notes/1Update note -
DELETE
/notes/1Delete note
Contacts
5-
GET
/contacts?search=ali&favorites=1List contacts -
POST
/contactsCreate contact -
GET
/contacts/1Get contact -
PATCH
/contacts/1Update contact -
DELETE
/contacts/1Delete contact
Blogs, comments & likes
11-
GET
/blogs?search=flutter&category=flutter&sort=popular&page=1List blogs -
GET
/blogs/1Get blog -
POST
/blogsCreate blog -
PATCH
/blogs/1Update blog -
POST
/blogs/1/coverUpload cover image -
DELETE
/blogs/1Delete blog -
POST
/blogs/1/likeLike blog -
DELETE
/blogs/1/likeUnlike blog -
GET
/blogs/1/commentsList comments -
POST
/blogs/1/commentsAdd comment -
DELETE
/comments/1Delete comment
Categories
1-
GET
/categoriesList categories
Products
2-
GET
/products?search=mouse&sort=price_asc&in_stock=1List products -
GET
/products/1Get product
Cart
5-
GET
/cartGet cart -
POST
/cart/itemsAdd to cart -
PATCH
/cart/items/1Update cart item -
DELETE
/cart/items/1Remove from cart -
DELETE
/cartClear cart
Orders
4-
POST
/ordersCheckout -
GET
/orders?status=pendingList orders -
GET
/orders/1Get order -
POST
/orders/1/cancelCancel order
Your teacher
Muhammad Aakif Raza
aakifraza.comI build and run real production platforms, and this lab is built the same way. The API you are practising with follows the same patterns used in the projects below, so what you learn here carries straight over to real work.
Visit my website