Skip to main content

Promotion API

User's All Posts Promotion Status#

  • Web URL me/promotions

  • API URL api/posts/promotable

  • METHOD GET

  • Response Attribute Details

    promote_status: promoted | promotable | disable | waiting | rejected | not_requested

  • Sample Response

    {
    "success": true,
    "posts": [
    {
    "id": 61642,
    "title": "دیوار، قطعه کوچک شده‌ی تمام اقشار جامعه",
    "hash": "vhhfogbtdga9",
    "description": "aksdj kladkalsdkalsdalksdaldlasd",
    "full_description": "aksdj kladkalsdkalsdalksdaldlasd",
    "image": "https://virgool.test/upload/users/1/posts/vhhfogbtdga9/pmemxoz5merw.png",
    "published_at": "۱ ماه پیش",
    "created_at": "۱ ماه پیش",
    "reading_time": 1,
    "likes_count": "۰",
    "comments_count": "۱",
    "liked": false,
    "bookmarked": false,
    "route": "https://virgool.test/tarjomaan/%D8%AA%D8%B3%D8%AA-%D8%B3%D8%A7%DB%8C%D8%B2-%D8%B9%DA%A9%D8%B3-vhhfogbtdga9",
    "publication": {
    "name": "tarjomaan",
    "title": "ترجمان",
    "description": "sdfsdfasdsdasdfasd2",
    "main_domain": null,
    "hash": "nglf5ai499rs",
    "color": "#ff1000",
    "text_color": null,
    "header_image": null,
    "followers": 1,
    "is_premium": false,
    "link": "https://virgool.test/tarjomaan",
    "logo": "https://virgool.test/upload/publication/nglf5ai499rs/bfhhog.jpeg"
    },
    "boost_url": null,
    "read_ratio": null,
    "features": null,
    "links": {
    "rel": "self",
    "href": "https://virgool.test/tarjomaan/%D8%AA%D8%B3%D8%AA-%D8%B3%D8%A7%DB%8C%D8%B2-%D8%B9%DA%A9%D8%B3-vhhfogbtdga9"
    },
    "promote_status": "promoted",
    "promotions_history": [
    {
    "price": 10900000,
    "status": "active",
    "created_at": "۰۷ خرداد ۱۳۹۹",
    "name": "۱۰۰۰۰۰ ایمپرشن",
    "payment_status": "paid",
    "links": {
    "rel": "self",
    "href": "https://virgool.test/me/promotions/vhhfogbtdga9/history/vZfvXeP5672QAm6FWfUeAqzoNWujI0y0tZ0qDFqQNTTwzX46SWEjoSiKXktWfvvR"
    },
    "id": "vZfvXeP5672QAm6FWfUeAqzoNWujI0y0tZ0qDFqQNTTwzX46SWEjoSiKXktWfvvR"
    }
    ]
    },
    {
    "id": 61636,
    "title": "آمار بازدید پست‌های من در سال ۹۹",
    "hash": "dnnjqnzes4q5",
    "description": "گزارش آمار بازدید پست‌های من در سال ۹۹",
    "full_description": "گزارش آمار بازدید پست‌های من در سال ۹۹",
    "image": "https://virgool.test/images/annual-stats99.png",
    "published_at": "۵ ماه پیش",
    "created_at": "۵ ماه پیش",
    "reading_time": 2,
    "likes_count": "۰",
    "comments_count": "۰",
    "liked": false,
    "bookmarked": false,
    "route": "https://virgool.test/@Peyman/%D8%A2%D9%85%D8%A7%D8%B1-%D8%A8%D8%A7%D8%B2%D8%AF%DB%8C%D8%AF-%D9%BE%D8%B3%D8%AA-%D9%87%D8%A7%DB%8C-%D9%85%D9%86-%D8%AF%D8%B1-%D8%B3%D8%A7%D9%84-%DB%B9%DB%B9-dnnjqnzes4q5",
    "publication": null,
    "boost_url": null,
    "read_ratio": null,
    "features": null,
    "links": {
    "rel": "self",
    "href": "https://virgool.test/@Peyman/%D8%A2%D9%85%D8%A7%D8%B1-%D8%A8%D8%A7%D8%B2%D8%AF%DB%8C%D8%AF-%D9%BE%D8%B3%D8%AA-%D9%87%D8%A7%DB%8C-%D9%85%D9%86-%D8%AF%D8%B1-%D8%B3%D8%A7%D9%84-%DB%B9%DB%B9-dnnjqnzes4q5"
    },
    "promote_status": "promotable",
    "promotions_history": []
    }
    ],
    "remained_requests": 5,
    "max_page": 1
    }

Single Post's Promotion#

  • Web URL me/promotions/{post_hash}

  • API URL api/post/{post_hash}/promotable

  • METHOD GET

  • Response Attribute Details

    promote_status: promoted | promotable | disable | waiting | rejected | not_requested

  • Sample Response

    {
    "success": true,
    "post": {
    "id": 61642,
    "title": "دیوار، قطعه کوچک شده‌ی تمام اقشار جامعه",
    "hash": "vhhfogbtdga9",
    "description": "aksdj kladkalsdkalsdalksdaldlasd",
    "full_description": "aksdj kladkalsdkalsdalksdaldlasd",
    "image": "https://virgool.test/upload/users/1/posts/vhhfogbtdga9/pmemxoz5merw.png",
    "published_at": "۱ ماه پیش",
    "created_at": "۱ ماه پیش",
    "reading_time": 1,
    "likes_count": "۰",
    "comments_count": "۱",
    "liked": false,
    "bookmarked": false,
    "route": "https://virgool.test/tarjomaan/%D8%AA%D8%B3%D8%AA-%D8%B3%D8%A7%DB%8C%D8%B2-%D8%B9%DA%A9%D8%B3-vhhfogbtdga9",
    "publication": {
    "name": "tarjomaan",
    "title": "ترجمان",
    "description": "sdfsdfasdsdasdfasd2",
    "main_domain": null,
    "hash": "nglf5ai499rs",
    "color": "#ff1000",
    "text_color": null,
    "header_image": null,
    "followers": 1,
    "is_premium": false,
    "link": "https://virgool.test/tarjomaan",
    "logo": "https://virgool.test/upload/publication/nglf5ai499rs/bfhhog.jpeg"
    },
    "boost_url": null,
    "read_ratio": null,
    "features": null,
    "links": {
    "rel": "self",
    "href": "https://virgool.test/tarjomaan/%D8%AA%D8%B3%D8%AA-%D8%B3%D8%A7%DB%8C%D8%B2-%D8%B9%DA%A9%D8%B3-vhhfogbtdga9"
    }
    },
    "topics_details": {
    "topics": [
    {
    "id": 1,
    "name": "startup"
    },
    {
    "id": 33,
    "name": "book"
    }
    ],
    "suggested_topics": [
    {
    "topic_id": 1,
    "topic_name": "startup",
    "status": "waiting" // waiting | approved | rejected
    },
    {
    "topic_id": 33,
    "topic_name": "book",
    "status": "approved" // waiting | approved | rejected
    }
    ],
    "potential_audience": 250000
    },
    "promote_status": "promoted",
    "promotions_history": [
    {
    "price": 10900000,
    "status": "active",
    "created_at": "۰۷ خرداد ۱۳۹۹",
    "name": "۱۰۰۰۰۰ ایمپرشن",
    "payment_status": "paid",
    "links": {
    "rel": "self",
    "href": "https://virgool.test/me/promotions/vhhfogbtdga9/history/vZfvXeP5672QAm6FWfUeAqzoNWujI0y0tZ0qDFqQNTTwzX46SWEjoSiKXktWfvvR"
    },
    "id": "vZfvXeP5672QAm6FWfUeAqzoNWujI0y0tZ0qDFqQNTTwzX46SWEjoSiKXktWfvvR"
    }
    ],
    "call_to_action": {
    "enable": true,
    "title": "عنوان کال تو اکشن",
    "description": "دیوار، قطعه کوچک شده‌ی تمام اقشار جامعه",
    "button_title": "عنوان دکمه",
    "button_link": "https://virgool.io",
    "button_color": "#107abb"
    },
    "new_version": true,
    "active_package": {
    "id": 26,
    "price": 10000000,
    "discount": 0,
    "count": 100000,
    "name": "۱۰۰۰۰۰ ایمپرشن",
    "call_to_action": true
    }
    }

Search in User's Posts#

  • Web URL me/promotions

  • API URL api/promotion/search?q=

  • METHOD POST

  • Request Parameter Example

    q=سولسشر

  • Validation Note query string must contains at least 3 characters

  • Sample Response

    {
    "success": true,
    "posts": [
    {
    "id": 410,
    "title": "ماتا: اولدترافورد را خانه خودم می‌دانم؛ دورنمای سولسشر برای منچستریونایتد هیجان انگیز است",
    "hash": "zsmkfwgydcei",
    "description": "پس از تمدید قرارداد خوان ماتا با منچستریونایتد، این هافبک ۳۱ ساله از ا...",
    "full_description": "پس از تمدید قرارداد خوان ماتا با منچستریونایتد، این هافبک ۳۱ ساله از اشتیاق خود برای تداوم همکاری با اوله گونار سولسشر گرفت.به گزارش سایت ر…",
    "image": "https://virgool.test/upload/users/1/posts/zsmkfwgydcei/bxm5nnjicjsp.jpeg",
    "published_at": "۲ سال پیش",
    "created_at": "۲ سال پیش",
    "reading_time": 1,
    "likes_count": "۴",
    "comments_count": "۱",
    "liked": true,
    "bookmarked": false,
    "route": "https://vrgl-behtarin.test/ماتا-اولدترافورد-را-خانه-خودم-میدانم؛-دورنمای-سولسشر-برای-منچستریونایتد-هیجان-انگیز-است-zsmkfwgydcei",
    "publication": {
    "name": "behtarin",
    "title": "بهترین انتشارات",
    "description": "سلام بچه‌ها این بهترین انشاراتی است که تا حالا دیدید.",
    "main_domain": null,
    "hash": "bgc5ibhvtprx",
    "color": null,
    "text_color": null,
    "header_image": null,
    "followers": 1,
    "is_premium": false,
    "link": "https://vrgl-behtarin.test",
    "logo": "https://virgool.test/images/publication/cafebazaar.png"
    },
    "boost_url": null,
    "read_ratio": null,
    "features": [
    "sound"
    ],
    "links": {
    "rel": "self",
    "href": "https://vrgl-behtarin.test/ماتا-اولدترافورد-را-خانه-خودم-میدانم؛-دورنمای-سولسشر-برای-منچستریونایتد-هیجان-انگیز-است-zsmkfwgydcei"
    },
    "promote_status": "promotable",
    "promotions_history": []
    },
    {
    "id": 417,
    "title": "سولسشر: در شروع فصل کاپیتانمان را مشخص خواهیم کرد؛ اتمام فصل با کسب یک جام موجب می شود فصل موفقیت آمیزی داشته باشیم",
    "hash": "df9rli8btev9",
    "description": "مصاحبه پس از بازی",
    "full_description": "مصاحبه پس از بازی",
    "image": "https://virgool.test/upload/users/1/posts/df9rli8btev9/m1ipwruhixhe.jpeg",
    "published_at": "۲ سال پیش",
    "created_at": "۲ سال پیش",
    "reading_time": 2,
    "likes_count": "۰",
    "comments_count": "۳",
    "liked": false,
    "bookmarked": false,
    "route": "https://vrgl-behtarin.test/سولسشر-در-شروع-فصل-کاپیتانمان-را-مشخص-خواهیم-کرد؛-اتمام-فصل-با-کسب-یک-جام-موجب-می-شود-فصل-موفقیت-آمیزی-داشته-باشیم-df9rli8btev9",
    "publication": {
    "name": "behtarin",
    "title": "بهترین انتشارات",
    "description": "سلام بچه‌ها این بهترین انشاراتی است که تا حالا دیدید.",
    "main_domain": null,
    "hash": "bgc5ibhvtprx",
    "color": null,
    "text_color": null,
    "header_image": null,
    "followers": 1,
    "is_premium": false,
    "link": "https://vrgl-behtarin.test",
    "logo": "https://virgool.test/images/publication/cafebazaar.png"
    },
    "boost_url": null,
    "read_ratio": null,
    "features": [
    "sound"
    ],
    "links": {
    "rel": "self",
    "href": "https://vrgl-behtarin.test/سولسشر-در-شروع-فصل-کاپیتانمان-را-مشخص-خواهیم-کرد؛-اتمام-فصل-با-کسب-یک-جام-موجب-می-شود-فصل-موفقیت-آمیزی-داشته-باشیم-df9rli8btev9"
    },
    "promote_status": "promotable",
    "promotions_history": []
    }
    ],
    "max_page": 1
    }

History of Promoted Post#

Web => me/promotions/{hash}/history/{reference_id}

API => api/post/{hash}/history/{reference_id}

METHOD GET

Response Data:

{
"success": true,
"stats": [
{
"views": 10,
"impressions": 5000,
"created_at": "2020-05-15",
"persian_date": "۲۶ اردیبهشت"
},
{
"views": 12,
"impressions": 4052,
"created_at": "2020-05-16",
"persian_date": "۲۷ اردیبهشت"
},
...
],
"topics_details": {
"topics": [
{
"id": 1,
"name": "startup",
"fa_name": "استارتاپ"
},
{
"id": 33,
"name": "book",
"fa_name": "کتاب"
}
],
"suggested_topics": [
{
"topic_id": 1,
"topic_name": "startup",
"status": "approved"
},
{
"topic_id": 33,
"topic_name": "book",
"status": "waiting"
},
{
"topic_id": 6,
"topic_name": "marketing",
"status": "waiting"
}
],
"potential_audience": 250000
},
"promotions_history": [
{
"price": 10900000,
"status": "active",
"created_at": "۰۷ خرداد ۱۳۹۹",
"started_at": "2021-08-19 16:28:30",
"ended_at": "2020-06-16 13:21:15",
"name": "۱۰۰۰۰۰ ایمپرشن",
"payment_status": "paid",
"links": {
"rel": "self",
"href": "https://virgool.test/me/promotions/vhhfogbtdga9/history/vZfvXeP5672QAm6FWfUeAqzoNWujI0y0tZ0qDFqQNTTwzX46SWEjoSiKXktWfvvR"
},
"id": "vZfvXeP5672QAm6FWfUeAqzoNWujI0y0tZ0qDFqQNTTwzX46SWEjoSiKXktWfvvR"
}
],
"total_views": 126,
"total_impressions": 24982,
"package": 60000,
"post_title": "عنوان پست"
}