campaigns
Fetch All Campaigns

Fetch All Campaigns

This endpoint allows you to fetch all campaigns, that are currently active and belong to the tenant.

Request

Endpoint

GET https://demo.rewardadz.com/public/api/v1/gateway/campaigns

Headers

x-access-token:string

Response

if success, you will get response like this

{
  "success": true,
  "ra_message": "Campaigns fetched successfully",
  "ra_response_data": [
    {
      "_id": "6579704725ef96a79ebe60c9",
      "org_id": "6577306405afffa4c930cff5",
      "name": "Financial Litracy",
      "description": "Thank you for participating in our financial literacy survey. Your responses will help us understand your level of financial knowledge and awareness. Please answer the following questions honestly.",
      "type": "survey",
      "age": "18 - 30",
      "gender": "All",
      "location": [],
      "total_budget": 10000,
      "ad_spent": 10000,
      "payout": 50,
      "currency": "KES",
      "logo": "https://storage.googleapis.com/rewardadz-922c1.appspot.com/ra.jpeg?GoogleAccessId=firebase-adminsdk-agxoy%40rewardadz-922c1.iam.gserviceaccount.com&Expires=4856057415&Signature=qPLsy6JEB9%2B8kx1K%2BhBNX7A77%2BhlpAM6c7HLUQK9OyA3eNQ4oLS0o7oSKG%2B9sIkNtIcOOYLh7QmgmBrgiFS91Y5MlITTdAtEpJmiHlkfafgpLHoBkqQppBQgUCEWlAxok3ltAInLgS5aihSY3m6MlTJU9XgRhAfmMxxmxsd2W7fkB8bc7PAXpnbP48LOh5SL%2FfapwUvoTKIHNiL8iBosq82LrWl6i2ppXr3V8bn%2Fr3yhSf1c7J3qTHM%2BbxEewj3ATP3mAg%2BsiHJYHjrRHn12lpW7XN3OpHkbwtWSri4MBhAbXKaU3SY%2FUff1OwuDxrbh%2B14l7mE7M3VC5TmSqwNxGA%3D%3D",
      "content_file": "https://storage.googleapis.com/rewardadz-922c1.appspot.com/ra.jpeg?GoogleAccessId=firebase-adminsdk-agxoy%40rewardadz-922c1.iam.gserviceaccount.com&Expires=4856057415&Signature=qPLsy6JEB9%2B8kx1K%2BhBNX7A77%2BhlpAM6c7HLUQK9OyA3eNQ4oLS0o7oSKG%2B9sIkNtIcOOYLh7QmgmBrgiFS91Y5MlITTdAtEpJmiHlkfafgpLHoBkqQppBQgUCEWlAxok3ltAInLgS5aihSY3m6MlTJU9XgRhAfmMxxmxsd2W7fkB8bc7PAXpnbP48LOh5SL%2FfapwUvoTKIHNiL8iBosq82LrWl6i2ppXr3V8bn%2Fr3yhSf1c7J3qTHM%2BbxEewj3ATP3mAg%2BsiHJYHjrRHn12lpW7XN3OpHkbwtWSri4MBhAbXKaU3SY%2FUff1OwuDxrbh%2B14l7mE7M3VC5TmSqwNxGA%3D%3D",
      "start_time": "2023-12-12T08:30:00.000Z",
      "end_time": "2023-12-13T20:30:00.000Z",
      "active": false,
      "published": false,
      "deleted_at": null,
      "created_at": "2023-12-13T08:50:15+00:00",
      "updated_at": "2023-12-13T08:50:15+00:00",
      "__v": 0
    },
    {
      "_id": "657ac6a316e1b0f6f478f8f3",
      "org_id": "6577306405afffa4c930cff5",
      "name": "Video test campaign",
      "description": "Video test campaign",
      "type": "video",
      "age": "18 - 30",
      "gender": "All",
      "location": [],
      "total_budget": 10000,
      "ad_spent": 10000,
      "payout": 30,
      "currency": "KES",
      "logo": "https://storage.googleapis.com/rewardadz-922c1.appspot.com/favicon.ico?GoogleAccessId=firebase-adminsdk-agxoy%40rewardadz-922c1.iam.gserviceaccount.com&Expires=4856145059&Signature=Zuhr4G%2B3BpUqg%2BXWWi87WJMzbbaBoXDKxikeHyPVAjde2PACE1Y%2FVrAawKQqWQ9fmmMmJRQGz0B1%2BZUYp7sBdnd79CePR45mX%2FHcusW0uK7hmGzh%2BC6SCKYe0DEmmUOx0DIJd%2FFG8NIUZw%2Bg5NNF2afQZRQ2BQaLLab9mVzmJi2yW0TYc10UkcNvfzh7aeHCMM6iIdHU6ZqXpk8PWvw4XPzB%2FRLOGViGYN8S5hWmqwe1PJuwHSjJT9vuf8YXKk4jVNxw%2Ft4XtHaj76V%2FjA4ZHASm9JQxY9R17XA6bej%2F%2BrTtEd9%2Bo5g7KbpJj7mQtfhcAqeOSXh7pq9YGwaXb%2FtObg%3D%3D",
      "content_file": "https://storage.googleapis.com/rewardadz-922c1.appspot.com/Need%20for%20Speed%C3%A2%C2%84%C2%A2%20Most%20Wanted%202023-11-28%2018-55-22%20%281%29.mp4?GoogleAccessId=firebase-adminsdk-agxoy%40rewardadz-922c1.iam.gserviceaccount.com&Expires=4856145059&Signature=s%2F%2FHs59z1xrIm1z2oOQZfzcAxN%2FqyrIaxeVjY1v0CmSA5jd0wYFg%2Fuh88W9iQeES7fa%2F3D1jYFph2riDLQ7TgZiJuHFZALRIWZbFhaa%2B%2Brs3QXgpKbds8DyI5w9ixj67C%2Fs6lp1tSv12VmVdzzY9pcl0bDCDN01vJvHbyMjYT2LFVy4RNlz4wtKmp6wTsMRkqthwre94d47rjOKzj6N5ZHWn8%2FmrKYRgXaDCsJpFmJtjMBMAj8jVusM5bP%2Fe5s6T2VjfVb40gwHg988dr91cVfP8avwPGe6jeOukUJRuz8%2F7pHxB8ywDo1i%2Fcbfs0OlpZ6zfJKhP8HDWl0I5tBT%2FYg%3D%3D",
      "start_time": "2023-12-14T09:00:00.000Z",
      "end_time": "2023-12-15T09:07:59.000Z",
      "active": true,
      "published": true,
      "deleted_at": null,
      "created_at": "2023-12-14T09:10:59+00:00",
      "updated_at": "2023-12-14T09:10:59+00:00",
      "__v": 0
    }
  ]
}

if there are no campaigns, you will get response like this

{
  "success": true,
  "ra_message": "No campaigns found",
  "ra_response_data": []
}