📄
Epixel MLM Commission Engine API
  • Introduction
  • Authentication
  • User Registration
  • Single Sign-On
  • User Profile
  • User Address
  • About User
  • User Password
  • User Roles
  • Manage User
  • ‎Countries
  • States
  • Ewallet
  • Support Ticket
  • List Banners
  • Enrollment Packages
  • Group Attributes
  • Product Attribute
  • Product Catalogue
  • Product Details
  • Product Review
  • Product Category
  • Product
  • Order
  • Place Genealogy
  • Rank Details
  • Dashboard Data
  • Manage Network
  • Referral Link
  • FAQ
  • Leads & CRM
  • Cart
  • Whishlist
  • Payout
  • Announcement
  • Form Key
  • Prepaid Coupons(Epin)
  • P2P Transfer
  • Internal Transfer
  • History
  • KYC Details
  • Education Platform
  • Quiz
  • Lead Campaign
  • EMI
  • Multi Wallet
  • Profiles - Goals
  • Saved Cards
  • Webhook
Powered by GitBook
On this page
  • Announcement List
  • Close Announcement

Was this helpful?

Announcement

Announcement List

GET ‎https://<domain>/<api prefix>/<version>/announcements/get/list/

This API endpoint will return a list of announcements.

Query Parameters

Name
Type
Description

offset

string

limit

string

read_status

string

0(unread) or 1(readed),default value is 1

subject

string

subject text

start_date

string

formate: mm/dd/yyyy

end_date

string

formate: mm/dd/yyyy

created

string

formate: mm/dd/yyyy

Headers

Name
Type
Description

apikey*

string

apikey

Authorization*

string

Bearer access token

​HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
    "status_code": 200,
    "errors": {},
    "data": {
        "results": [
            {
                "id": <announcement_id>,
                "subject": "<announcement_subject>",
                "message": "<announcement_meessage>",
                "types": "<announcement_types>",
                "image": "<image>",
                "slug": "<announcement_slug>",
                "start_date": "<start_date>",
                "end_date": <end_date>,
                "created": "<created_date>"
            },
            ...
        ],
        "count": <list_count>,
        "previous": <previous_page_url>,
        "next": <next_page_url>
    }
}

Sample Code

Node

var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://<domain>/<api prefix>/<version>/get/announcements-list/',
  'headers': {
    'apikey': '<apikey>',
    'Authorization': 'Bearer <access token>',
  },
  formData: {}
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

PHP

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/get/announcements-list/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_POSTFIELDS => array(),
  CURLOPT_HTTPHEADER => array(
    'apikey: <apikey>',
    'Authorization: Bearer <access token>',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Error Responses

Status Code

Error Type

FIeld

Description

400

Validation Error

start_date,

end_date,

created

Invalid date format.

Close Announcement

POST ‎https://<domain>/<api prefix>/<version>/announcements/close/

This API endpoint will close an announcement.

Headers

Name
Type
Description

apikey*

string

Apikey

Authorization*

string

Bearer access token

Request Body

Name
Type
Description

slug*

string

Announcement slug

​HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
    "status_code": 200,
    "errors": {},
    "data": {}
}

Sample Code

Node

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://<domain>/<api prefix>/<version>/close/announcement/',
  'headers': {
    'apikey': '<apikey>',
    'Authorization': 'Bearer <access token>',
  },
  formData: {
    'slug': '<announcement_slug>'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

PHP

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/close/announcement/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('slug' => '<announcement_slug>'),
  CURLOPT_HTTPHEADER => array(
    'apikey: <apikey>',
    'Authorization: Bearer <access token>',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Error Responses

Status Code

Error Type

FIeld

Description

400

Validation Error

slug

This field is required.

This field may not be blank.

Requested announcement not found.

You can't close the requested announcement.

PreviousPayoutNextForm Key

Last updated 3 years ago

Was this helpful?