{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"b974edd2-81af-4e0b-b446-cface9818848","name":"MEGA APIs Collection Document","description":"## API Documentation – Introduction\n\n### What is an API?\n\nAn API (Application Programming Interface) is like a messenger that allows different software applications to talk to each other.\n\nThink of it like a restaurant:\n\n- You (the client) tell the waiter what you want\n    \n- The waiter takes your order to the kitchen (the server)\n    \n- The kitchen prepares your food\n    \n- The waiter brings it back to you\n    \n\nIn the same way, an API lets your application:\n\n- Ask for data (e.g., “Get all users”)\n    \n- Perform actions (e.g., “Create a blog”, “Upload an image”, “Login a user”)\n    \n\nYour app sends a **request**, and the server sends back a **response**.\n\n---\n\n### What is Postman?\n\nPostman is a tool that makes working with APIs simple and visual. Instead of writing code just to test APIs, Postman lets you:\n\n- Send API requests with a few clicks\n    \n- See responses in a clean, readable format\n    \n- Save and organize all API calls in one place\n    \n- Test features before integrating them into your app\n    \n- Share API collections with your team\n    \n\nThis entire documentation is built as a Postman Collection so anyone—developer, tester, or new joiner—can explore and use the APIs easily.\n\n---\n\n### About This Documentation\n\nThis is the centralized documentation for all backend APIs of the MEGA backend service.  \nIt is organized into modules that represent different parts of the system:\n\n**Available Modules:**\n\n- Authentication – Login, signup, and token handling\n    \n- Users – Manage users and roles\n    \n- Media – Upload and manage files\n    \n- Products – Product and catalog management\n    \n- Blogs – Blog and content management\n    \n- And more…\n    \n\nEach request includes:\n\n- What the API does in simple terms\n    \n- Required headers and body fields\n    \n- Example requests and responses\n    \n- Common errors and notes\n    \n\n---\n\n## How to Use This Documentation\n\n### Step 1: Understanding Environments\n\nPostman Environments let you switch between different stages of your application:\n\n- **Development** – For local or feature testing\n    \n- **Staging** – Pre-production testing\n    \n- **Production** – Live system\n    \n\nEach environment contains variables like:\n\n- `URL` – Base API URL\n    \n- `jwt` – Authentication token (set automatically after login)\n    \n\nSelect the correct environment from the top-right dropdown in Postman before sending any request.\n\n---\n\n### Step 2: Authentication\n\nMost APIs are protected and require you to be logged in.\n\n1. Open the **Authentication** folder\n    \n2. Send a Login request (SuperAdmin, Admin, or User)\n    \n3. On success, you will receive an **access token (JWT)**\n    \n4. This collection automatically saves that token into the `jwt` environment variable\n    \n\nYou do **not** need to manually copy it.  \nAll secured requests already use:\n\n```\nAuthorization: Bearer {{jwt}}\n\n ```\n\n---\n\n### Step 3: Making Requests\n\nOnce logged in:\n\n1. Browse folders in the left sidebar\n    \n2. Click any request\n    \n3. Review URL, method, headers, and body\n    \n4. Click **Send**\n    \n5. View the response in the bottom panel\n    \n\nYou are now interacting with the real backend APIs.\n\n---\n\n### HTTP Methods Explained\n\nYou will see these common request types:\n\n- **GET** – Retrieve data (like viewing a page)\n    \n- **POST** – Create new data (like submitting a form)\n    \n- **PUT / PATCH** – Update existing data\n    \n- **DELETE** – Remove data\n    \n\n---\n\n### Understanding Responses\n\nEvery response contains:\n\n- **Status Code**\n    \n    - `200–299` → Success\n        \n    - `400–499` → Client error (something wrong in the request)\n        \n    - `500–599` → Server error\n        \n- **Response Body** – The actual data (usually JSON)\n    \n- **Headers** – Metadata about the response","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"27575218","team":5156005,"collectionId":"b974edd2-81af-4e0b-b446-cface9818848","publishedId":"2sBXVbHZTp","public":true,"publicUrl":"https://documenter-api.postman.tech/view/27575218/2sBXVbHZTp","privateUrl":"https://go.postman.co/documentation/27575218-b974edd2-81af-4e0b-b446-cface9818848","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"4362A7"},"documentationLayout":"classic-single-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":"https://content.pstmn.io/627c0b54-01a2-446d-8645-58cc3421520b/bWVnYS1sb2dvLWZvb3Rlci5wbmc=","colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"4362A7"}},{"name":"light","logo":"https://content.pstmn.io/869ed1bd-8b2a-41b4-8189-862bbe77bcc8/bWVnYS1sb2dvLWZvb3Rlci5wbmc=","colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"4362A7"}}]}},"version":"8.10.1","publishDate":"2026-01-06T11:22:46.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":"https://content.pstmn.io/869ed1bd-8b2a-41b4-8189-862bbe77bcc8/bWVnYS1sb2dvLWZvb3Rlci5wbmc=","logoDark":"https://content.pstmn.io/627c0b54-01a2-446d-8645-58cc3421520b/bWVnYS1sb2dvLWZvb3Rlci5wbmc="}},"statusCode":200},"environments":[{"name":"Doc Env","id":"e129fe17-7c12-4b49-86f7-164feb92aa76","owner":"27575218","values":[{"key":"URL","value":"","enabled":true,"type":"default"},{"key":"jwt","value":"","enabled":true,"type":"default"},{"key":"country_id","value":"","enabled":true,"type":"default"},{"key":"team_id","value":"","enabled":true,"type":"default"},{"key":"member_id","value":"","enabled":true,"type":"default"},{"key":"lang_id","value":"","enabled":true,"type":"default"},{"key":"superadmin_password","value":"","enabled":true,"type":"default"},{"key":"superadmin_email","value":"","enabled":true,"type":"default"},{"key":"admin_email","value":"","enabled":true,"type":"default"},{"key":"admin_password","value":"","enabled":true,"type":"default"},{"key":"adminuser_password","value":"","enabled":true,"type":"default"},{"key":"adminuser_email","value":"","enabled":true,"type":"default"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/e4c3e19a296ec584e0fa03d87fc4a7690f92074ba966602c99ecdba480cca385","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Doc Env","value":"27575218-e129fe17-7c12-4b49-86f7-164feb92aa76"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2sBXVbHZTp"}