Apvertise API Documentation

API DOCUMENTATION – SIGNUP EVENT

Base URL:

https://lan9a6pqp3.execute-api.us-east-1.amazonaws.com

Header:

Use basic Authentication e.g: Authorization: “Basic Base64(Username:Password)”

Response Codes:

Code

00
12
14
15
92

Description

Successful
Invalid Share ID
Insufficient funds
Customer is blacklisted
Invalid Authorization Token

Field Description:

  1. Event Type: Expected values – download, signup Event type is “download” when the user first opens the app; Event type is “signup” when the user has completed registration on the app
  2. Referral Code: It is in the query parameter of the deep link. It begins with “APT, example “APT000099”. Links with the referral code starting with “APT” requires an API call to Apvertise.
  3. Share ID: It is in the query parameter of the deep link. Example “syyeli89002nbdg”
  4. Device ID: The device ID of the user’s phone
  5. Meta Data: The meta data, derived per the nomenclature below:

    Metadata Nomenclature: - Signup Phone Number | Email Address | User Name Example: 08023553004|james@gmail.com| James, Ibori

    Metadata Nomenclature: - Download 000000000 | info@apvertise.com | Info, Apvertise. It’s a constant for “download” event.

    Note: User Name = Firstname, Lastname

AUTHORIZATION

Basic Auth

Username

<username>

Password

<password>
POST
Campaign Callback
https://lan9a6pqp3.execute-api.us-east-1.amazonaws.com/dev/campaignCallBack

AUTHORIZATION

Basic Auth
This request is using Basic Auth from collectionApvertise API Documentation

BODY

raw
// eventType can be DOWNLOAD or SIGNUP
{
   "eventType": "DOWNLOAD",
   "username": "DOWNLOAD",
   "referralCode": "APT000099",
   "shareId": "xy34ewrqsyt",
   "deviceId": "89936099452",
   "metaData": "08023553004|james@gmail.com| James, Ibori"
}
curl --location --request POST 'https://lan9a6pqp3.execute-api.us-east-1.amazonaws.com/dev/campaignCallBack' \
--data-raw '// eventType can be DOWNLOAD or SIGNUP
{
   "eventType": "DOWNLOAD",
   "username": "DOWNLOAD",
   "referralCode": "APT000099",
   "shareId": "xy34ewrqsyt",
   "deviceId": "89936099452",
   "metaSata": "08023553004|james@gmail.com| James, Ibori"
}'
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
 'method': 'POST',
 'hostname': 'lan9a6pqp3.execute-api.us-east-1.amazonaws.com',
 'path': '/dev/campaignCallBack',
 'headers': {
 },
 'maxRedirects': 20
};

var req = https.request(options, function (res) {
 var chunks = [];

 res.on("data", function (chunk) {
   chunks.push(chunk);
 });

 res.on("end", function (chunk) {
   var body = Buffer.concat(chunks);
   console.log(body.toString());
 });

 res.on("error", function (error) {
   console.error(error);
 });
});

var postData =  "// eventType can be DOWNLOAD or SIGNUP\n{\n    \"eventType\": \"DOWNLOAD\",\n    \"referralCode\": \"APT000099\",\n    \"shareId\": \"xy34ewrqsyt\",\n    \"deviceId\": \"89936099452\",\n    \"metaSata\": \"08023553004|james@gmail.com| James, Ibori\"\n}";

req.write(postData);

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
 CURLOPT_URL => 'https://lan9a6pqp3.execute-api.us-east-1.amazonaws.com/dev/campaignCallBack',
 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 =>'// eventType can be DOWNLOAD or SIGNUP
{
   "eventType": "DOWNLOAD",
   "referralCode": "APT000099",
   "shareId": "xy34ewrqsyt",
   "deviceId": "89936099452",
   "metaSata": "08023553004|james@gmail.com| James, Ibori"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
{
 "responseCode": "12",
 "responseMessage": "Invalid Share ID"
}
Date: Tue, 23 Nov 2021 08:29:08 GMT
Content-Type: application/json
Content-Length: 58
Connection: keep-alive
x-amzn-RequestId: 75ef6f47-d4d6-4c77-af85-db3780fcf4e3
Access-Control-Allow-Origin: *
x-amz-apigw-id: JP7tGHO5IAMFv5g=
x-custom-header: my custom header value
X-Amzn-Trace-Id: Root=1-619ca653-777dc350024fcfe07410a0c0;Sampled=0
{
 "responseCode": "99",
 "responseMessage": "Unauthorized campaign"
}
Date: Tue, 23 Nov 2021 08:29:08 GMT
Content-Type: application/json
Content-Length: 58
Connection: keep-alive
x-amzn-RequestId: 75ef6f47-d4d6-4c77-af85-db3780fcf4e3
Access-Control-Allow-Origin: *
x-amz-apigw-id: JP7tGHO5IAMFv5g=
x-custom-header: my custom header value
X-Amzn-Trace-Id: Root=1-619ca653-777dc350024fcfe07410a0c0;Sampled=0
{
 "responseCode": "00",
 "responseMessage": "Success"
}
Date: Tue, 23 Nov 2021 08:29:08 GMT
Content-Type: application/json
Content-Length: 58
Connection: keep-alive
x-amzn-RequestId: 75ef6f47-d4d6-4c77-af85-db3780fcf4e3
Access-Control-Allow-Origin: *
x-amz-apigw-id: JP7tGHO5IAMFv5g=
x-custom-header: my custom header value
X-Amzn-Trace-Id: Root=1-619ca653-777dc350024fcfe07410a0c0;Sampled=0

Download our mobile app today

Join like minded influencers who are earning daily from content creation, building engagement, traffic and awareness for brands globally.