{
  "info": {
    "_postman_id": "aa3a6fd1-ecf4-4d24-97d8-d7648f3e7fd1",
    "name": "Mwallif API",
    "description": "Single Postman collection for the Mwallif Django backend. Includes authentication, accounts, contact messages, blog, site settings, taxonomy, partner applications, brands, brand reviews, and products endpoints.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "base_url",
      "value": "http://127.0.0.1:8000"
    },
    {
      "key": "access_token",
      "value": ""
    },
    {
      "key": "refresh_token",
      "value": ""
    },
    {
      "key": "reset_uid",
      "value": ""
    },
    {
      "key": "reset_token",
      "value": ""
    },
    {
      "key": "customer_email",
      "value": "customer@example.com"
    },
    {
      "key": "customer_password",
      "value": "StrongPass123!"
    },
    {
      "key": "admin_email",
      "value": "admin@example.com"
    },
    {
      "key": "admin_password",
      "value": "StrongPass123!"
    },
    {
      "key": "contact_message_id",
      "value": "1"
    },
    {
      "key": "blog_post_id",
      "value": "1"
    },
    {
      "key": "blog_post_slug",
      "value": "how-to-choose-the-right-supplier"
    },
    {
      "key": "blog_category_id",
      "value": "1"
    },
    {
      "key": "blog_tag_id",
      "value": "1"
    },
    {
      "key": "social_link_id",
      "value": "1"
    },
    {
      "key": "main_category_id",
      "value": "1"
    },
    {
      "key": "sub_category_id",
      "value": "1"
    },
    {
      "key": "partner_application_id",
      "value": "1"
    },
    {
      "key": "brand_id",
      "value": "1"
    },
    {
      "key": "brand_slug",
      "value": "modern-home"
    },
    {
      "key": "gallery_item_id",
      "value": "1"
    },
    {
      "key": "brand_location_id",
      "value": "1"
    },
    {
      "key": "brand_social_link_id",
      "value": "1"
    },
    {
      "key": "supplier_user_id",
      "value": "2"
    },
    {
      "key": "product_id",
      "value": "1"
    },
    {
      "key": "product_slug",
      "value": "luxury-wall-paint"
    },
    {
      "key": "product_image_id",
      "value": "1"
    },
    {
      "key": "brand_review_id",
      "value": "1"
    }
  ],
  "item": [
    {
      "name": "Auth",
      "description": "Authentication and password-management endpoints.",
      "item": [
        {
          "name": "Register Customer",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"full_name\": \"Customer One\",\n  \"email\": \"{{customer_email}}\",\n  \"phone_number\": \"+201000000001\",\n  \"password\": \"{{customer_password}}\",\n  \"confirm_password\": \"{{customer_password}}\",\n  \"role\": \"customer\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/accounts/register/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "accounts",
                "register"
              ]
            },
            "description": "Creates a customer account and stores the returned access and refresh tokens in collection variables."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  const data = pm.response.json();",
                  "  pm.collectionVariables.set('access_token', data.access || '');",
                  "  pm.collectionVariables.set('refresh_token', data.refresh || '');",
                  "}"
                ]
              }
            }
          ],
          "response": []
        },
        {
          "name": "Register Supplier",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"full_name\": \"Supplier One\",\n  \"email\": \"supplier@example.com\",\n  \"phone_number\": \"+201000000002\",\n  \"password\": \"StrongPass123!\",\n  \"confirm_password\": \"StrongPass123!\",\n  \"role\": \"supplier\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/accounts/register/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "accounts",
                "register"
              ]
            },
            "description": "Creates a supplier account."
          },
          "response": []
        },
        {
          "name": "Login",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"identifier\": \"{{customer_email}}\",\n  \"password\": \"{{customer_password}}\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/accounts/login/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "accounts",
                "login"
              ]
            },
            "description": "Authenticates a user with email or phone number and updates the stored access and refresh tokens."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 200) {",
                  "  const data = pm.response.json();",
                  "  pm.collectionVariables.set('access_token', data.access || '');",
                  "  pm.collectionVariables.set('refresh_token', data.refresh || '');",
                  "}"
                ]
              }
            }
          ],
          "response": []
        },
        {
          "name": "Refresh Token",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"refresh\": \"{{refresh_token}}\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/accounts/token/refresh/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "accounts",
                "token",
                "refresh"
              ]
            },
            "description": "Uses the stored refresh token to issue a new access token. The rotated refresh token is also saved if returned."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 200) {",
                  "  const data = pm.response.json();",
                  "  pm.collectionVariables.set('access_token', data.access || '');",
                  "  pm.collectionVariables.set('refresh_token', data.refresh || pm.collectionVariables.get('refresh_token'));",
                  "}"
                ]
              }
            }
          ],
          "response": []
        },
        {
          "name": "Forgot Password",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"{{customer_email}}\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/accounts/forgot-password/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "accounts",
                "forgot-password"
              ]
            },
            "description": "Requests a password reset. In DEBUG mode, this stores reset_uid and reset_token variables automatically."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 200) {",
                  "  const data = pm.response.json();",
                  "  if (data.reset_uid) pm.collectionVariables.set('reset_uid', data.reset_uid);",
                  "  if (data.reset_token) pm.collectionVariables.set('reset_token', data.reset_token);",
                  "}"
                ]
              }
            }
          ],
          "response": []
        },
        {
          "name": "Reset Password",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reset_uid\": \"{{reset_uid}}\",\n  \"reset_token\": \"{{reset_token}}\",\n  \"new_password\": \"NewStrongPass123!\",\n  \"confirm_password\": \"NewStrongPass123!\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/accounts/reset-password/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "accounts",
                "reset-password"
              ]
            },
            "description": "Completes the password reset using the saved reset values."
          },
          "response": []
        },
        {
          "name": "Logout",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"refresh\": \"{{refresh_token}}\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/accounts/logout/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "accounts",
                "logout"
              ]
            },
            "description": "Logs out the current user and blacklists the current refresh token."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Users",
      "description": "Authenticated and admin-only user endpoints.",
      "item": [
        {
          "name": "Get Current User",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/accounts/me/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "accounts",
                "me"
              ]
            },
            "description": "Returns the currently authenticated user."
          },
          "response": []
        },
        {
          "name": "Update Current User",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"full_name\": \"Updated Customer\",\n  \"phone_number\": \"+201000000099\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/accounts/me/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "accounts",
                "me"
              ]
            },
            "description": "Updates the logged-in user's full name and phone number."
          },
          "response": []
        },
        {
          "name": "List Users As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/accounts/users/?name=&email=&phone=&role=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "accounts",
                "users"
              ],
              "query": [
                {
                  "key": "name",
                  "value": ""
                },
                {
                  "key": "email",
                  "value": ""
                },
                {
                  "key": "phone",
                  "value": ""
                },
                {
                  "key": "role",
                  "value": ""
                }
              ]
            },
            "description": "Requires a platform administrator token. Supports filtering by name, email, phone, and role."
          },
          "response": []
        },
        {
          "name": "Get User Detail As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/accounts/users/1/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "accounts",
                "users",
                "1"
              ]
            },
            "description": "Requires a platform administrator token. Returns one user's details."
          },
          "response": []
        },
        {
          "name": "Update User Profile As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"full_name\": \"Updated Supplier\",\n  \"email\": \"updated-supplier@example.com\",\n  \"phone_number\": \"+201000000088\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/accounts/users/1/profile/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "accounts",
                "users",
                "1",
                "profile"
              ]
            },
            "description": "Requires a platform administrator token. Updates a user's profile fields."
          },
          "response": []
        },
        {
          "name": "Get User Stats As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/accounts/users/stats/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "accounts",
                "users",
                "stats"
              ]
            },
            "description": "Requires a platform administrator token. Returns user counts by role and activation status."
          },
          "response": []
        },
        {
          "name": "Invite User As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"full_name\": \"Invited Admin\",\n  \"email\": \"invited-admin@example.com\",\n  \"phone_number\": \"+201000000077\",\n  \"role\": \"platform_admin\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/accounts/invite-user/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "accounts",
                "invite-user"
              ]
            },
            "description": "Requires a platform administrator token. Creates a supplier or platform admin account and may return a generated temporary password."
          },
          "response": []
        },
        {
          "name": "Change User Role As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"role\": \"supplier\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/accounts/users/1/role/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "accounts",
                "users",
                "1",
                "role"
              ]
            },
            "description": "Requires a platform administrator token. Updates the target user's role."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Contact Messages",
      "description": "Public contact form endpoint plus platform-admin inbox management.",
      "item": [
        {
          "name": "Submit Contact Message",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Website Visitor\",\n  \"email\": \"visitor@example.com\",\n  \"phone\": \"+96891234567\",\n  \"subject\": \"Need supplier partnership details\",\n  \"message\": \"Please share the packages and onboarding steps.\",\n  \"service_type\": \"partnership\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/contact-messages/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "contact-messages"
              ]
            },
            "description": "Creates a public contact message and stores the returned message id."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  const data = pm.response.json();",
                  "  if (data.message && data.message.id) pm.collectionVariables.set('contact_message_id', data.message.id);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "List Inbox As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/contact-messages/admin/?status=&priority=&service_type=&search=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "contact-messages",
                "admin"
              ],
              "query": [
                {
                  "key": "status",
                  "value": ""
                },
                {
                  "key": "priority",
                  "value": ""
                },
                {
                  "key": "service_type",
                  "value": ""
                },
                {
                  "key": "search",
                  "value": ""
                }
              ]
            },
            "description": "Lists contact messages for the admin inbox with optional filters."
          }
        },
        {
          "name": "Update Message As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"status\": \"replied\",\n  \"priority\": \"high\",\n  \"admin_notes\": \"Shared the onboarding deck by email.\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/contact-messages/admin/{{contact_message_id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "contact-messages",
                "admin",
                "{{contact_message_id}}"
              ]
            },
            "description": "Updates the admin workflow fields for a specific message."
          }
        },
        {
          "name": "Archive Message As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "DELETE",
            "url": {
              "raw": "{{base_url}}/api/contact-messages/admin/{{contact_message_id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "contact-messages",
                "admin",
                "{{contact_message_id}}"
              ]
            },
            "description": "Soft-deletes a message by moving it to the archived state."
          }
        },
        {
          "name": "Get Inbox Stats As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/contact-messages/admin/stats/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "contact-messages",
                "admin",
                "stats"
              ]
            },
            "description": "Returns contact-message totals by status and priority."
          }
        }
      ]
    },
    {
      "name": "Blog",
      "description": "Public blog endpoints and platform-admin CMS endpoints.",
      "item": [
        {
          "name": "List Public Blog Posts",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/blog/posts/?category=&tag=&search=&featured=&page=1&page_size=10",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "blog",
                "posts"
              ],
              "query": [
                {
                  "key": "category",
                  "value": ""
                },
                {
                  "key": "tag",
                  "value": ""
                },
                {
                  "key": "search",
                  "value": ""
                },
                {
                  "key": "featured",
                  "value": ""
                },
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "page_size",
                  "value": "10"
                }
              ]
            },
            "description": "Returns the public blog listing with search, category, tag, featured, and pagination support. Paginated responses include count, total_pages, boolean next/previous, and results."
          }
        },
        {
          "name": "Get Blog Post By Slug",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/blog/posts/{{blog_post_slug}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "blog",
                "posts",
                "{{blog_post_slug}}"
              ]
            },
            "description": "Returns one published blog post by slug."
          }
        },
        {
          "name": "Create Blog Post As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "title",
                  "value": "Admin Demo Post",
                  "type": "text"
                },
                {
                  "key": "slug",
                  "value": "admin-demo-post",
                  "type": "text"
                },
                {
                  "key": "excerpt",
                  "value": "A short summary for the admin demo post.",
                  "type": "text"
                },
                {
                  "key": "content",
                  "value": "<p>This is the admin demo post body.</p>",
                  "type": "text"
                },
                {
                  "key": "cover_image",
                  "type": "file",
                  "src": ""
                },
                {
                  "key": "author_name",
                  "value": "Mwallif Editorial Team",
                  "type": "text"
                },
                {
                  "key": "status",
                  "value": "published",
                  "type": "text"
                },
                {
                  "key": "is_featured",
                  "value": "true",
                  "type": "text"
                },
                {
                  "key": "seo_title",
                  "value": "Admin Demo Post",
                  "type": "text"
                },
                {
                  "key": "seo_description",
                  "value": "Demo post created from Postman.",
                  "type": "text"
                },
                {
                  "key": "seo_keywords",
                  "value": "demo, blog, cms",
                  "type": "text"
                },
                {
                  "key": "published_at",
                  "value": "2026-04-13T12:00:00Z",
                  "type": "text"
                },
                {
                  "key": "category_ids",
                  "value": "[{{blog_category_id}}]",
                  "type": "text"
                },
                {
                  "key": "tag_ids",
                  "value": "[{{blog_tag_id}}]",
                  "type": "text"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/blog/admin/posts/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "blog",
                "admin",
                "posts"
              ]
            },
            "description": "Creates a blog post from the admin CMS endpoint using multipart form-data and one uploaded file field named cover_image. The backend generates processed WebP main and thumbnail images, then stores the returned id and slug."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  const data = pm.response.json();",
                  "  pm.collectionVariables.set('blog_post_id', data.id || '');",
                  "  pm.collectionVariables.set('blog_post_slug', data.slug || '');",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Update Blog Post As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [],
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "excerpt",
                  "value": "Updated excerpt from Postman.",
                  "type": "text"
                },
                {
                  "key": "is_featured",
                  "value": "false",
                  "type": "text"
                },
                {
                  "key": "cover_image",
                  "type": "file",
                  "src": ""
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/blog/admin/posts/{{blog_post_id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "blog",
                "admin",
                "posts",
                "{{blog_post_id}}"
              ]
            },
            "description": "Partially updates one admin blog post. Upload a new cover_image file to regenerate processed WebP main and thumbnail files and remove the old files."
          }
        },
        {
          "name": "Get Blog Stats As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/blog/admin/posts/stats/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "blog",
                "admin",
                "posts",
                "stats"
              ]
            },
            "description": "Returns blog post totals by status and featured flag."
          }
        }
      ]
    },
    {
      "name": "Site Settings",
      "description": "Public website settings endpoint plus platform-admin settings management.",
      "item": [
        {
          "name": "Get Public Site Settings",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/site-settings/public/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "site-settings",
                "public"
              ]
            },
            "description": "Returns the public company contact data and active social links used by the website."
          }
        },
        {
          "name": "Update Site Settings As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"support_email\": \"support@mwallif.om\",\n  \"primary_phone\": \"+968 2412 3000\",\n  \"secondary_phone\": \"+968 9123 4000\",\n  \"working_hours\": \"Sun - Thu, 9:00 AM - 6:00 PM\",\n  \"footer_summary\": \"Updated summary from Postman.\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/site-settings/admin/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "site-settings",
                "admin"
              ]
            },
            "description": "Updates the singleton site-settings record."
          }
        },
        {
          "name": "Create Social Link As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"platform_key\": \"youtube\",\n  \"display_name\": \"YouTube\",\n  \"url\": \"https://youtube.com/@mwallif\",\n  \"sort_order\": 10,\n  \"is_active\": true\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/site-settings/admin/social-links/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "site-settings",
                "admin",
                "social-links"
              ]
            },
            "description": "Creates a social-link record and stores the returned id."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  const data = pm.response.json();",
                  "  pm.collectionVariables.set('social_link_id', data.id || '');",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Update Social Link As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"display_name\": \"YouTube Channel\",\n  \"is_active\": false\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/site-settings/admin/social-links/{{social_link_id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "site-settings",
                "admin",
                "social-links",
                "{{social_link_id}}"
              ]
            },
            "description": "Updates one social-link record."
          }
        }
      ]
    },
    {
      "name": "Taxonomy",
      "description": "Marketplace main-category and subcategory endpoints with upload-or-URL image support.",
      "item": [
        {
          "name": "Get Main Categories",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/taxonomy/main-categories/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "taxonomy",
                "main-categories"
              ]
            },
            "description": "Returns active main categories with nested active subcategories. Send Accept-Language: ar for Arabic localized fields.",
            "header": [
              {
                "key": "Accept-Language",
                "value": "en"
              }
            ]
          }
        },
        {
          "name": "Get Subcategories",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/taxonomy/subcategories/?main_category=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "taxonomy",
                "subcategories"
              ],
              "query": [
                {
                  "key": "main_category",
                  "value": ""
                }
              ]
            },
            "description": "Returns active subcategories. Send Accept-Language: ar for Arabic localized fields.",
            "header": [
              {
                "key": "Accept-Language",
                "value": "en"
              }
            ]
          }
        },
        {
          "name": "List Main Categories As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/taxonomy/admin/main-categories/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "taxonomy",
                "admin",
                "main-categories"
              ]
            },
            "description": "Lists all main categories for platform admins."
          }
        },
        {
          "name": "Create Main Category With External URL",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name_en\": \"Electrical\",\n  \"name_ar\": \"????????\",\n  \"description_en\": \"Electrical equipment, wiring, lighting, and installation services.\",\n  \"description_ar\": \"????? ???????? ?????? ?????? ?????? ?????.\",\n  \"image_external_url\": \"https://example.com/images/electrical-category.jpg\",\n  \"is_active\": true,\n  \"sort_order\": 1\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/taxonomy/admin/main-categories/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "taxonomy",
                "admin",
                "main-categories"
              ]
            },
            "description": "Creates a bilingual main category using an external image URL and stores the returned id."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  const data = pm.response.json();",
                  "  pm.collectionVariables.set('main_category_id', data.id || '');",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Create Main Category With Upload",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "name_en",
                  "value": "Plumbing",
                  "type": "text"
                },
                {
                  "key": "name_ar",
                  "value": "???????",
                  "type": "text"
                },
                {
                  "key": "description_en",
                  "value": "Pipes, valves, fittings, and plumbing services.",
                  "type": "text"
                },
                {
                  "key": "description_ar",
                  "value": "?????? ??????? ?????? ?????? ???????.",
                  "type": "text"
                },
                {
                  "key": "image",
                  "type": "file",
                  "src": ""
                },
                {
                  "key": "is_active",
                  "value": "true",
                  "type": "text"
                },
                {
                  "key": "sort_order",
                  "value": "2",
                  "type": "text"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/taxonomy/admin/main-categories/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "taxonomy",
                "admin",
                "main-categories"
              ]
            },
            "description": "Creates a bilingual main category from an uploaded image."
          }
        },
        {
          "name": "Create Subcategory With External URL",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"main_category\": \"{{main_category_id}}\",\n  \"name_en\": \"Cables and Wires\",\n  \"name_ar\": \"???????? ????????\",\n  \"description_en\": \"Power cables, control cables, and wire accessories.\",\n  \"description_ar\": \"?????? ???? ??????? ???? ??????? ???????.\",\n  \"products_count\": 90,\n  \"image_external_url\": \"https://example.com/images/cables.jpg\",\n  \"is_active\": true,\n  \"sort_order\": 1\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/taxonomy/admin/subcategories/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "taxonomy",
                "admin",
                "subcategories"
              ]
            },
            "description": "Creates a bilingual subcategory, including products_count, and stores the returned id."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  const data = pm.response.json();",
                  "  pm.collectionVariables.set('sub_category_id', data.id || '');",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Update Main Category With Upload",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "name",
                  "value": "?????? ?????",
                  "type": "text"
                },
                {
                  "key": "description",
                  "value": "??? ???? ?????? ?? ????? ??????.",
                  "type": "text"
                },
                {
                  "key": "image",
                  "type": "file",
                  "src": ""
                },
                {
                  "key": "sort_order",
                  "value": "5",
                  "type": "text"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/taxonomy/admin/main-categories/{{main_category_id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "taxonomy",
                "admin",
                "main-categories",
                "{{main_category_id}}"
              ]
            },
            "description": "Updates one language variant on a main category using Accept-Language and optionally replaces the image.",
            "header": [
              {
                "key": "Accept-Language",
                "value": "ar"
              }
            ]
          }
        }
      ]
    },
    {
      "name": "Partner Applications",
      "description": "Public partner-application submission plus platform-admin review endpoints.",
      "item": [
        {
          "name": "Submit Partner Application",
          "request": {
            "method": "POST",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "company_name",
                  "value": "Future Build LLC",
                  "type": "text"
                },
                {
                  "key": "field_specialization",
                  "value": "Construction and fit-out",
                  "type": "text"
                },
                {
                  "key": "company_number",
                  "value": "FB-2026-001",
                  "type": "text"
                },
                {
                  "key": "branch_count",
                  "value": "3",
                  "type": "text"
                },
                {
                  "key": "founding_year",
                  "value": "2016",
                  "type": "text"
                },
                {
                  "key": "commercial_registration",
                  "value": "CR-998877",
                  "type": "text"
                },
                {
                  "key": "years_experience",
                  "value": "10",
                  "type": "text"
                },
                {
                  "key": "projects_count",
                  "value": "120",
                  "type": "text"
                },
                {
                  "key": "major_projects",
                  "value": "Commercial towers, villa compounds, and retail stores.",
                  "type": "text"
                },
                {
                  "key": "technicians_count",
                  "value": "45",
                  "type": "text"
                },
                {
                  "key": "team_count",
                  "value": "8",
                  "type": "text"
                },
                {
                  "key": "production_capacity",
                  "value": "Large-scale interior fit-out and turnkey execution.",
                  "type": "text"
                },
                {
                  "key": "monthly_capacity",
                  "value": "8 to 10 active projects monthly.",
                  "type": "text"
                },
                {
                  "key": "product_warranty",
                  "value": "2-year workmanship warranty.",
                  "type": "text"
                },
                {
                  "key": "certifications",
                  "value": "ISO 9001, OSHA compliance, local municipality approvals.",
                  "type": "text"
                },
                {
                  "key": "service_prices",
                  "value": "Project-based pricing after site survey.",
                  "type": "text"
                },
                {
                  "key": "pricing_scope",
                  "value": "Mid to premium range.",
                  "type": "text"
                },
                {
                  "key": "payment_methods",
                  "value": "Bank transfer, certified cheque, milestone-based billing.",
                  "type": "text"
                },
                {
                  "key": "cancellation_policy",
                  "value": "Cancelled bookings after mobilization may incur charges.",
                  "type": "text"
                },
                {
                  "key": "responsible_person",
                  "value": "Aisha Al Balushi",
                  "type": "text"
                },
                {
                  "key": "phone1",
                  "value": "+96879114144",
                  "type": "text"
                },
                {
                  "key": "phone2",
                  "value": "+96891234567",
                  "type": "text"
                },
                {
                  "key": "email",
                  "value": "partners@futurebuild.om",
                  "type": "text"
                },
                {
                  "key": "website",
                  "value": "https://futurebuild.om",
                  "type": "text"
                },
                {
                  "key": "social_media",
                  "value": "[\"https://instagram.com/futurebuild\",\"https://linkedin.com/company/futurebuild\"]",
                  "type": "text"
                },
                {
                  "key": "project_images",
                  "type": "file",
                  "src": []
                },
                {
                  "key": "project_images",
                  "type": "file",
                  "src": []
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/partner-applications/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "partner-applications"
              ]
            },
            "description": "Public multipart submission for the /partner/application flow. Accepts the full form plus multiple project_images uploads."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  const data = pm.response.json();",
                  "  if (data.application && data.application.id) pm.collectionVariables.set('partner_application_id', data.application.id);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "List Partner Applications As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/partner-applications/admin/?status=&search=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "partner-applications",
                "admin"
              ],
              "query": [
                {
                  "key": "status",
                  "value": ""
                },
                {
                  "key": "search",
                  "value": ""
                }
              ]
            },
            "description": "Lists partner applications for platform admins with optional status and search filters."
          }
        },
        {
          "name": "Get Partner Application As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/partner-applications/admin/{{partner_application_id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "partner-applications",
                "admin",
                "{{partner_application_id}}"
              ]
            },
            "description": "Returns the full details for one submitted partner application."
          }
        },
        {
          "name": "Update Partner Application Review",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"status\": \"approved\",\n  \"admin_notes\": \"Strong portfolio and complete documentation. Ready for supplier onboarding.\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/partner-applications/admin/{{partner_application_id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "partner-applications",
                "admin",
                "{{partner_application_id}}"
              ]
            },
            "description": "Approves or rejects a partner application and stores admin review notes."
          }
        },
        {
          "name": "Get Partner Application Stats As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/partner-applications/admin/stats/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "partner-applications",
                "admin",
                "stats"
              ]
            },
            "description": "Returns partner application totals by status for the admin dashboard."
          }
        }
      ]
    },
    {
      "name": "Brands",
      "description": "Public brand discovery, supplier my-brand dashboard endpoints, and admin brand management.",
      "item": [
        {
          "name": "List Active Brands",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept-Language",
                "value": "en"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/brands/?q=&main_category=&subcategory=&city=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brands"
              ],
              "query": [
                {
                  "key": "q",
                  "value": ""
                },
                {
                  "key": "main_category",
                  "value": ""
                },
                {
                  "key": "subcategory",
                  "value": ""
                },
                {
                  "key": "city",
                  "value": ""
                }
              ]
            },
            "description": "Returns only active brands for the public website."
          }
        },
        {
          "name": "Get Brand Detail",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept-Language",
                "value": "ar"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/brands/{{brand_slug}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brands",
                "{{brand_slug}}"
              ]
            },
            "description": "Returns one active brand by slug with localized fields."
          }
        },
        {
          "name": "Get My Brand As Supplier",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/brands/my-brand/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brands",
                "my-brand"
              ]
            },
            "description": "Main supplier dashboard endpoint. Uses the logged-in supplier token to return the linked brand."
          }
        },
        {
          "name": "Update My Brand As Supplier",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [
              {
                "key": "Accept-Language",
                "value": "en"
              }
            ],
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "name_en",
                  "value": "Modern Home",
                  "type": "text"
                },
                {
                  "key": "name_ar",
                  "value": "مودرن هوم",
                  "type": "text"
                },
                {
                  "key": "tagline_en",
                  "value": "Interior finishing experts",
                  "type": "text"
                },
                {
                  "key": "description_en",
                  "value": "Trusted supplier brand profile for premium finishing solutions.",
                  "type": "text"
                },
                {
                  "key": "phone",
                  "value": "+201000000099",
                  "type": "text"
                },
                {
                  "key": "subcategory_ids",
                  "value": "[1,2]",
                  "type": "text"
                },
                {
                  "key": "logo",
                  "type": "file",
                  "src": []
                },
                {
                  "key": "header_image",
                  "type": "file",
                  "src": []
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/brands/my-brand/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brands",
                "my-brand"
              ]
            },
            "description": "Updates the logged-in supplier brand and accepts uploaded logo/header images."
          }
        },
        {
          "name": "Submit My Brand For Review",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "url": {
              "raw": "{{base_url}}/api/brands/my-brand/submit-review/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brands",
                "my-brand",
                "submit-review"
              ]
            },
            "description": "Moves a draft supplier brand to pending_review."
          }
        },
        {
          "name": "Create Gallery Item As Supplier",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "caption_en",
                  "value": "Showroom highlight",
                  "type": "text"
                },
                {
                  "key": "caption_ar",
                  "value": "لقطة من المعرض",
                  "type": "text"
                },
                {
                  "key": "sort_order",
                  "value": "1",
                  "type": "text"
                },
                {
                  "key": "image",
                  "type": "file",
                  "src": []
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/brands/my-brand/gallery/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brands",
                "my-brand",
                "gallery"
              ]
            },
            "description": "Creates one gallery item for the supplier brand."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  const data = pm.response.json();",
                  "  if (data.id) pm.collectionVariables.set('gallery_item_id', data.id);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Create Brand Location As Supplier",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name_en\": \"Main Showroom\",\n  \"name_ar\": \"المعرض الرئيسي\",\n  \"country\": \"Egypt\",\n  \"city\": \"Cairo\",\n  \"phone\": \"+201000000099\",\n  \"email\": \"cairo@modernhome.example.com\",\n  \"address_en\": \"90 El Teseen Street\",\n  \"address_ar\": \"90 شارع التسعين\",\n  \"google_map_url\": \"https://maps.google.com/?q=Cairo\",\n  \"is_primary\": true,\n  \"is_active\": true\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/brands/my-brand/locations/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brands",
                "my-brand",
                "locations"
              ]
            },
            "description": "Creates one supplier brand location."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  const data = pm.response.json();",
                  "  if (data.id) pm.collectionVariables.set('brand_location_id', data.id);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Create Social Link As Supplier",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"platform_key\": \"instagram\",\n  \"display_name\": \"Instagram\",\n  \"url\": \"https://instagram.com/modernhome\",\n  \"sort_order\": 1,\n  \"is_active\": true\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/brands/my-brand/social-links/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brands",
                "my-brand",
                "social-links"
              ]
            },
            "description": "Creates one social link for the supplier brand."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  const data = pm.response.json();",
                  "  if (data.id) pm.collectionVariables.set('brand_social_link_id', data.id);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "List Brands As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/brands/admin/?q=&status=&owner=&country=&city=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brands",
                "admin"
              ],
              "query": [
                {
                  "key": "q",
                  "value": ""
                },
                {
                  "key": "status",
                  "value": ""
                },
                {
                  "key": "owner",
                  "value": ""
                },
                {
                  "key": "country",
                  "value": ""
                },
                {
                  "key": "city",
                  "value": ""
                }
              ]
            },
            "description": "Lists brands for platform admins with text, owner, status, and location filters."
          }
        },
        {
          "name": "Create Brand As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "name_en",
                  "value": "Modern Home",
                  "type": "text"
                },
                {
                  "key": "name_ar",
                  "value": "مودرن هوم",
                  "type": "text"
                },
                {
                  "key": "description_en",
                  "value": "Premium finishing and fit-out specialists.",
                  "type": "text"
                },
                {
                  "key": "description_ar",
                  "value": "متخصصون في التشطيبات والتجهيزات الداخلية.",
                  "type": "text"
                },
                {
                  "key": "status",
                  "value": "draft",
                  "type": "text"
                },
                {
                  "key": "subcategory_ids",
                  "value": "[1,2]",
                  "type": "text"
                },
                {
                  "key": "logo",
                  "type": "file",
                  "src": []
                },
                {
                  "key": "header_image",
                  "type": "file",
                  "src": []
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/brands/admin/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brands",
                "admin"
              ]
            },
            "description": "Creates one brand as a platform admin."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  const data = pm.response.json();",
                  "  if (data.id) pm.collectionVariables.set('brand_id', data.id);",
                  "  if (data.slug) pm.collectionVariables.set('brand_slug', data.slug);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Update Brand Status As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"status\": \"active\",\n  \"is_verified\": true\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/brands/admin/{{brand_id}}/status/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brands",
                "admin",
                "{{brand_id}}",
                "status"
              ]
            },
            "description": "Updates a brand review/status state as admin."
          }
        },
        {
          "name": "Assign Supplier Owner As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"supplier_user_id\": {{supplier_user_id}},\n  \"is_primary\": true\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/brands/admin/{{brand_id}}/assign-owner/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brands",
                "admin",
                "{{brand_id}}",
                "assign-owner"
              ]
            },
            "description": "Links an existing supplier user to the brand."
          }
        },
        {
          "name": "Remove Supplier Owner As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"supplier_user_id\": {{supplier_user_id}}\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/brands/admin/{{brand_id}}/remove-owner/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brands",
                "admin",
                "{{brand_id}}",
                "remove-owner"
              ]
            },
            "description": "Removes a supplier owner from the brand if the current business rules allow it."
          }
        }
      ]
    },
    {
      "name": "Brand Reviews",
      "description": "Public brand-review listing, authenticated customer review submission, and platform-admin moderation endpoints.",
      "item": [
        {
          "name": "List Brand Reviews",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept-Language",
                "value": "en"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/brands/{{brand_slug}}/reviews/?page=1&page_size=10",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brands",
                "{{brand_slug}}",
                "reviews"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "page_size",
                  "value": "10"
                }
              ]
            },
            "description": "Returns approved reviews for one active brand, plus average_rating and reviews_count. Paginated responses include count, total_pages, boolean next/previous, and results."
          }
        },
        {
          "name": "Create Brand Review As Customer",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"brand\": \"{{brand_id}}\",\n  \"rating\": 5,\n  \"message\": \"Great quality, clean work, and fast delivery.\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/api/brand-reviews/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brand-reviews"
              ]
            },
            "description": "Authenticated customers submit a brand review. New reviews always start as pending until a platform admin approves them."
          }
        },
        {
          "name": "List My Brand Reviews As Customer",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/brand-reviews/my-reviews/?page=1&page_size=10",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brand-reviews",
                "my-reviews"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "page_size",
                  "value": "10"
                }
              ]
            },
            "description": "Authenticated customers list their own submitted reviews and moderation statuses."
          }
        },
        {
          "name": "List Brand Reviews As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/brand-reviews/admin/?status=&brand=&user=&search=&page=1&page_size=10",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brand-reviews",
                "admin"
              ],
              "query": [
                {
                  "key": "status",
                  "value": ""
                },
                {
                  "key": "brand",
                  "value": ""
                },
                {
                  "key": "user",
                  "value": ""
                },
                {
                  "key": "search",
                  "value": ""
                },
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "page_size",
                  "value": "10"
                }
              ]
            },
            "description": "Platform-admin review inbox with filters by status, brand, user, and search text."
          }
        },
        {
          "name": "Get Brand Review As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/brand-reviews/admin/{{brand_review_id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brand-reviews",
                "admin",
                "{{brand_review_id}}"
              ]
            },
            "description": "Platform-admin gets one review with related brand and user details."
          }
        },
        {
          "name": "Moderate Brand Review As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"status\": \"approved\",\n  \"admin_notes\": \"Approved after moderation review.\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/api/brand-reviews/admin/{{brand_review_id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brand-reviews",
                "admin",
                "{{brand_review_id}}"
              ]
            },
            "description": "Platform-admin approves or rejects a review. Moderation changes automatically recalculate Brand.rating."
          }
        },
        {
          "name": "Delete Brand Review As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "DELETE",
            "url": {
              "raw": "{{base_url}}/api/brand-reviews/admin/{{brand_review_id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "brand-reviews",
                "admin",
                "{{brand_review_id}}"
              ]
            },
            "description": "Platform-admin deletes a review. If the review was approved, Brand.rating is recalculated automatically."
          }
        }
      ]
    },
    {
      "name": "Products",
      "description": "Public product discovery, supplier product management, and platform-admin product review endpoints.",
      "item": [
        {
          "name": "List Active Products",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept-Language",
                "value": "en"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/products/?q=&brand=&main_category=&subcategory=&featured=&page=1&page_size=12",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "products"
              ],
              "query": [
                {
                  "key": "q",
                  "value": ""
                },
                {
                  "key": "brand",
                  "value": ""
                },
                {
                  "key": "main_category",
                  "value": ""
                },
                {
                  "key": "subcategory",
                  "value": ""
                },
                {
                  "key": "featured",
                  "value": ""
                },
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "page_size",
                  "value": "12"
                }
              ]
            },
            "description": "Lists active public products with localized title, description, features, and page-number pagination using page/page_size. Paginated responses include count, total_pages, boolean next/previous, and results."
          }
        },
        {
          "name": "Get Product Detail",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept-Language",
                "value": "ar"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/products/{{product_slug}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "products",
                "{{product_slug}}"
              ]
            },
            "description": "Returns one active public product by slug with carousel images."
          }
        },
        {
          "name": "List My Products As Supplier",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/products/my-products/?page=1&page_size=12",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "products",
                "my-products"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "page_size",
                  "value": "12"
                }
              ]
            },
            "description": "Lists products belonging to the logged-in supplier brand."
          }
        },
        {
          "name": "Create My Product As Supplier",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "title_en",
                  "value": "Luxury Wall Paint",
                  "type": "text"
                },
                {
                  "key": "title_ar",
                  "value": "???? ???? ????",
                  "type": "text"
                },
                {
                  "key": "description_en",
                  "value": "Premium washable paint for interiors.",
                  "type": "text"
                },
                {
                  "key": "description_ar",
                  "value": "???? ???? ???? ????? ????????? ???????.",
                  "type": "text"
                },
                {
                  "key": "features",
                  "value": "[{\"en\":\"Water resistant\",\"ar\":\"????? ?????\"}]",
                  "type": "text"
                },
                {
                  "key": "subcategory_ids",
                  "value": "[1,2]",
                  "type": "text"
                },
                {
                  "key": "images",
                  "type": "file",
                  "src": []
                },
                {
                  "key": "images",
                  "type": "file",
                  "src": []
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/products/my-products/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "products",
                "my-products"
              ]
            },
            "description": "Creates a product for the logged-in supplier brand. Brand is taken from the supplier token and status is forced to pending_review for admin approval."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  const data = pm.response.json();",
                  "  if (data.id) pm.collectionVariables.set('product_id', data.id);",
                  "  if (data.slug) pm.collectionVariables.set('product_slug', data.slug);",
                  "  if (data.images && data.images[0]) pm.collectionVariables.set('product_image_id', data.images[0].id);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Update My Product As Supplier",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "title_en",
                  "value": "Updated Luxury Wall Paint",
                  "type": "text"
                },
                {
                  "key": "features",
                  "value": "[{\"en\":\"Water resistant\",\"ar\":\"????? ?????\"},{\"en\":\"Low odor\",\"ar\":\"????? ??????\"}]",
                  "type": "text"
                },
                {
                  "key": "images",
                  "type": "file",
                  "src": []
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/products/my-products/{{product_id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "products",
                "my-products",
                "{{product_id}}"
              ]
            },
            "description": "Updates a supplier-owned product, can append more images, and moves status back to pending_review for admin approval."
          }
        },
        {
          "name": "Update My Product Image",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "url": {
              "raw": "{{base_url}}/api/products/my-products/{{product_id}}/images/{{product_image_id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "products",
                "my-products",
                "{{product_id}}",
                "images",
                "{{product_image_id}}"
              ]
            },
            "description": "Updates product image ordering or primary flag.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sort_order\": 0,\n  \"is_primary\": true\n}"
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ]
          }
        },
        {
          "name": "List Products As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/products/admin/?status=&brand=&page=1&page_size=12",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "products",
                "admin"
              ],
              "query": [
                {
                  "key": "status",
                  "value": ""
                },
                {
                  "key": "brand",
                  "value": ""
                },
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "page_size",
                  "value": "12"
                }
              ]
            },
            "description": "Lists all products for platform admins."
          }
        },
        {
          "name": "Create Product As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "brand_id",
                  "value": "{{brand_id}}",
                  "type": "text"
                },
                {
                  "key": "title_en",
                  "value": "Luxury Wall Paint",
                  "type": "text"
                },
                {
                  "key": "title_ar",
                  "value": "???? ???? ????",
                  "type": "text"
                },
                {
                  "key": "description_en",
                  "value": "Premium washable paint for interiors.",
                  "type": "text"
                },
                {
                  "key": "description_ar",
                  "value": "???? ???? ???? ????? ????????? ???????.",
                  "type": "text"
                },
                {
                  "key": "features",
                  "value": "[{\"en\":\"Water resistant\",\"ar\":\"????? ?????\"}]",
                  "type": "text"
                },
                {
                  "key": "subcategory_ids",
                  "value": "[1,2]",
                  "type": "text"
                },
                {
                  "key": "images",
                  "type": "file",
                  "src": []
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/products/admin/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "products",
                "admin"
              ]
            },
            "description": "Creates one product as admin with multiple image upload support. If status is omitted, the backend defaults it to active so it is approved immediately."
          }
        },
        {
          "name": "Update Product Status As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "url": {
              "raw": "{{base_url}}/api/products/admin/{{product_id}}/status/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "products",
                "admin",
                "{{product_id}}",
                "status"
              ]
            },
            "description": "Approves, rejects, activates, or deactivates one product.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"status\": \"active\",\n  \"is_featured\": true\n}"
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ]
          }
        },
        {
          "name": "Delete Product Image As Admin",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "DELETE",
            "url": {
              "raw": "{{base_url}}/api/products/admin/{{product_id}}/images/{{product_image_id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "products",
                "admin",
                "{{product_id}}",
                "images",
                "{{product_image_id}}"
              ]
            },
            "description": "Deletes one product image and removes generated files."
          }
        }
      ]
    }
  ]
}
