01 / identity
Authentication
Register, login and protect private requests.
POST
/register
Create a new student account. Password confirmation is required.
{
"name": "Rahim",
"email": "rahim@example.com",
"password": "password123",
"password_confirmation": "password123"
}
POST
/login
Login and receive the token used in protected APIs.
{
"email": "student@example.com",
"password": "password"
}
// Save response.token
GET
/me
Get the currently authenticated user.
AUTH · Bearer token
{
"user": { "id": 1, "name": "Rahim" }
}
POST
/logout
Delete the current access token.
AUTH · Bearer token
{ "message": "Logged out successfully." }
Public endpoints for your shop home screen.
GET
/categories
List active categories with product counts.
GET /categories
{ "data": { "data": [ ... ] } }
GET
/categories/{id}
Show one category and its active products.
GET /categories/1
{ "data": { "id": 1, "products": [ ... ] } }
GET
/products
List products. Filter with search, category_id, or per_page.
GET /products?search=flutter&category_id=1
{ "data": { "data": [ ... ] } }
GET
/products/{id}
Show one product with its category.
GET /products/1
{ "data": { "id": 1, "name": "Flutter API Masterclass" } }
Public notes for quick Flutter CRUD practice.
GET
/notes
Get all shared notes. No login required.
{ "message": "Notes fetched successfully.", "data": [ ... ] }
POST
/notes
Create a note with a title and details.
{
"title": "Flutter Class 01",
"details": "Learn JSON and HTTP methods."
}
GET
/notes/{id}
Get one note by its ID.
{ "data": { "id": 1, "title": "A", "details": "AASDsad" } }
PUT
/notes/{id}
Update title, details, or both.
PUT /notes/1
{
"title": "Updated title",
"details": "Updated details"
}
DELETE
/notes/{id}
Delete a note permanently.
{ "message": "Note deleted successfully." }
01 · Set headers
Every request sends Accept: application/json. Protected requests also send Authorization: Bearer token.
02 · Read JSON
Use the HTTP status code first, then read the message and data fields from the response.
03 · Hit from Flutter
Use the http package. Map response JSON into a model, then update your screen state.
+