{ "info": { "_postman_id": "zoneco-org-api-collection", "name": "Zoneco ORG API", "description": "مجموعه کامل APIهای بک‌اند Zoneco ORG — شامل Contact Us، Compositions (با آپلود چند تصویر) و Campaigns.\n\nمتغیرها:\n- base_url: آدرس سرور (پیش‌فرض http://localhost:8000)\n- composition_id: شناسه ترکیب برای تست\n- image_id: شناسه تصویر ترکیب\n\nبرای درخواست‌های ادمین از Basic Auth استفاده کنید.", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Contact Us", "description": "APIهای فرم تماس با ما", "item": [ { "name": "GET All Contact Us", "request": { "method": "GET", "header": [], "url": "{{base_url}}/api/contact-us/" } }, { "name": "GET Contact Us by ID", "request": { "method": "GET", "header": [], "url": "{{base_url}}/api/contact-us/1/" } }, { "name": "POST Create Contact Us", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"احمد محمدی\",\n \"email_or_phone\": \"ahmad@example.com\",\n \"description\": \"سلام، می‌خواستم در مورد خدمات شما اطلاعات بیشتری دریافت کنم.\",\n \"category\": \"پشتیبانی\"\n}" }, "url": "{{base_url}}/api/contact-us/" } }, { "name": "GET Contact Us by Category", "request": { "method": "GET", "header": [], "url": { "raw": "{{base_url}}/api/contact-us/by_category/?category=پشتیبانی", "host": ["{{base_url}}"], "path": ["api", "contact-us", "by_category", ""], "query": [ { "key": "category", "value": "پشتیبانی", "description": "همکاری | فروش | پشتیبانی | درخواست مشاور | سایر" } ] } } }, { "name": "PATCH Update Contact Us (Admin)", "request": { "auth": { "type": "basic", "basic": [ {"key": "username", "value": "{{admin_username}}", "type": "string"}, {"key": "password", "value": "{{admin_password}}", "type": "string"} ] }, "method": "PATCH", "header": [ {"key": "Content-Type", "value": "application/json"} ], "body": { "mode": "raw", "raw": "{\n \"name\": \"نام بروزرسانی شده\"\n}" }, "url": "{{base_url}}/api/contact-us/1/" } }, { "name": "DELETE Contact Us (Admin)", "request": { "auth": { "type": "basic", "basic": [ {"key": "username", "value": "{{admin_username}}", "type": "string"}, {"key": "password", "value": "{{admin_password}}", "type": "string"} ] }, "method": "DELETE", "header": [], "url": "{{base_url}}/api/contact-us/1/" } } ] }, { "name": "Compositions", "description": "APIهای ترکیبات — پشتیبانی از آپلود چند تصویر با تصویر اصلی", "item": [ { "name": "GET All Compositions", "request": { "method": "GET", "header": [], "url": "{{base_url}}/api/compositions/" } }, { "name": "GET Composition by ID", "request": { "method": "GET", "header": [], "url": "{{base_url}}/api/compositions/{{composition_id}}/" } }, { "name": "GET Compositions by Created At", "request": { "method": "GET", "header": [], "url": { "raw": "{{base_url}}/api/compositions/by-created-at/?from=2026-01-01T00:00:00Z&to=2026-12-31T23:59:59Z", "host": ["{{base_url}}"], "path": ["api", "compositions", "by-created-at", ""], "query": [ { "key": "from", "value": "2026-01-01T00:00:00Z", "description": "Start datetime — ISO 8601 (UTC). At least one of from/to required." }, { "key": "to", "value": "2026-12-31T23:59:59Z", "description": "End datetime — ISO 8601 (UTC). At least one of from/to required." } ] } } }, { "name": "POST Create Composition (JSON)", "request": { "method": "POST", "header": [ {"key": "Content-Type", "value": "application/json"} ], "body": { "mode": "raw", "raw": "{\n \"name\": \"ترکیب تست\",\n \"description\": \"این یک ترکیب تستی است\"\n}" }, "url": "{{base_url}}/api/compositions/" } }, { "name": "POST Create Composition with Images", "request": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ {"key": "name", "value": "ترکیب با تصویر", "type": "text"}, {"key": "description", "value": "ترکیب با چند تصویر", "type": "text"}, {"key": "uploaded_images", "type": "file", "src": []}, {"key": "uploaded_images", "type": "file", "src": []}, {"key": "main_image_index", "value": "0", "type": "text", "description": "ایندکس تصویر اصلی (از 0)"} ] }, "url": "{{base_url}}/api/compositions/" } }, { "name": "POST Add Images to Composition (Admin)", "request": { "auth": { "type": "basic", "basic": [ {"key": "username", "value": "{{admin_username}}", "type": "string"}, {"key": "password", "value": "{{admin_password}}", "type": "string"} ] }, "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ {"key": "uploaded_images", "type": "file", "src": []}, {"key": "main_image_index", "value": "0", "type": "text"} ] }, "url": "{{base_url}}/api/compositions/{{composition_id}}/add-images/" } }, { "name": "POST Set Main Image (Admin)", "request": { "auth": { "type": "basic", "basic": [ {"key": "username", "value": "{{admin_username}}", "type": "string"}, {"key": "password", "value": "{{admin_password}}", "type": "string"} ] }, "method": "POST", "header": [ {"key": "Content-Type", "value": "application/json"} ], "body": { "mode": "raw", "raw": "{\n \"image_id\": {{image_id}}\n}" }, "url": "{{base_url}}/api/compositions/{{composition_id}}/set-main-image/" } }, { "name": "DELETE Composition Image (Admin)", "request": { "auth": { "type": "basic", "basic": [ {"key": "username", "value": "{{admin_username}}", "type": "string"}, {"key": "password", "value": "{{admin_password}}", "type": "string"} ] }, "method": "DELETE", "header": [], "url": "{{base_url}}/api/compositions/{{composition_id}}/images/{{image_id}}/" } }, { "name": "PATCH Update Composition (Admin)", "request": { "auth": { "type": "basic", "basic": [ {"key": "username", "value": "{{admin_username}}", "type": "string"}, {"key": "password", "value": "{{admin_password}}", "type": "string"} ] }, "method": "PATCH", "header": [ {"key": "Content-Type", "value": "application/json"} ], "body": { "mode": "raw", "raw": "{\n \"name\": \"نام بروزرسانی شده\"\n}" }, "url": "{{base_url}}/api/compositions/{{composition_id}}/" } }, { "name": "DELETE Composition (Admin)", "request": { "auth": { "type": "basic", "basic": [ {"key": "username", "value": "{{admin_username}}", "type": "string"}, {"key": "password", "value": "{{admin_password}}", "type": "string"} ] }, "method": "DELETE", "header": [], "url": "{{base_url}}/api/compositions/{{composition_id}}/" } } ] }, { "name": "Campaigns", "description": "APIهای کمپین‌ها", "item": [ { "name": "GET All Campaigns", "request": { "method": "GET", "header": [], "url": "{{base_url}}/api/campaigns/" } }, { "name": "GET Campaign by ID", "request": { "method": "GET", "header": [], "url": "{{base_url}}/api/campaigns/1/" } }, { "name": "POST Create Campaign", "request": { "method": "POST", "header": [ {"key": "Content-Type", "value": "application/json"} ], "body": { "mode": "raw", "raw": "{\n \"name\": \"کمپین تست\",\n \"description\": \"این یک کمپین تستی است\",\n \"start_time\": \"2026-06-01T00:00:00Z\",\n \"end_time\": \"2026-12-31T23:59:59Z\"\n}" }, "url": "{{base_url}}/api/campaigns/" } }, { "name": "POST Create Campaign with Image", "request": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ {"key": "name", "value": "کمپین با تصویر", "type": "text"}, {"key": "description", "value": "توضیحات کمپین", "type": "text"}, {"key": "start_time", "value": "2026-06-01T00:00:00Z", "type": "text"}, {"key": "end_time", "value": "2026-12-31T23:59:59Z", "type": "text"}, {"key": "image", "type": "file", "src": []} ] }, "url": "{{base_url}}/api/campaigns/" } }, { "name": "GET Active Campaigns", "request": { "method": "GET", "header": [], "url": "{{base_url}}/api/campaigns/active/" } }, { "name": "GET Upcoming Campaigns", "request": { "method": "GET", "header": [], "url": "{{base_url}}/api/campaigns/upcoming/" } }, { "name": "GET Ended Campaigns", "request": { "method": "GET", "header": [], "url": "{{base_url}}/api/campaigns/ended/" } }, { "name": "PATCH Update Campaign (Admin)", "request": { "auth": { "type": "basic", "basic": [ {"key": "username", "value": "{{admin_username}}", "type": "string"}, {"key": "password", "value": "{{admin_password}}", "type": "string"} ] }, "method": "PATCH", "header": [ {"key": "Content-Type", "value": "application/json"} ], "body": { "mode": "raw", "raw": "{\n \"name\": \"نام بروزرسانی شده\"\n}" }, "url": "{{base_url}}/api/campaigns/1/" } }, { "name": "DELETE Campaign (Admin)", "request": { "auth": { "type": "basic", "basic": [ {"key": "username", "value": "{{admin_username}}", "type": "string"}, {"key": "password", "value": "{{admin_password}}", "type": "string"} ] }, "method": "DELETE", "header": [], "url": "{{base_url}}/api/campaigns/1/" } } ] } ], "variable": [ { "key": "base_url", "value": "http://localhost:8000", "type": "string" }, { "key": "composition_id", "value": "1", "type": "string" }, { "key": "image_id", "value": "1", "type": "string" }, { "key": "admin_username", "value": "Zoneco_@1405", "type": "string" }, { "key": "admin_password", "value": "Fun_@_zone2026", "type": "string" } ] }