Profiles (API)

Authentication and authorization

Authorization requires an API key to be sent in the header of the API request.

Request Header:

  • X-AUTH-TOKEN string – a project’s unique authorization token

Creating a profile

JUID is an identifier assigned to every user at the moment when their profile is created in Just. JUID is essential to operate subscriptions and user activity. It is associated with the website where the profile was created.

Endpoint
POST /api/user/v1/subscription/create/profile

Parameters

No parameters.

More parameters

  • ip string is required to determine a user’s geolocation and time zone. If the ip string is empty or missing, or if it is impossible to determine the geolocation, the time zone will be set to the default value, according to the settings of the specific website.
  • name string
  • gender string
  • birthDate int (timestamp)

Request

curl --request POST 'https://api.justservices.cc/api/user/v1/subscription/create/profile' \
--header 'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/subscription/create/profile',
    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('ip' => '8.8.8.8','name' => 'Bob'),
    CURLOPT_HTTPHEADER => array(
      'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS',
      'Cookie: device_view=full'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/subscription/create/profile"

payload={'ip': '8.8.8.8',
'name': 'Bob'}
files=[

]
headers = {
    'X-AUTH-TOKEN': 'cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS',
    'Cookie': 'device_view=full'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.justservices.cc/api/user/v1/subscription/create/profile"
    method := "POST"

    payload := strings.NewReader(``)

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
        return
    }
    req.Header.Add("X-AUTH-TOKEN", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")

    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(string(body))
}

Response

de6f0132ea9e412599ae31262c45633b
Error save data

Creating an EMAIL subscription

Endpoint
POST /api/user/v1/subscription/subscribe/email

Attributes:

  • juid string
  • email string

More attributes:

  • regUrl string
  • refid string
  • refidm string
  • utmSource string
  • utmMedium string
  • utmCampaign string

Request

curl --location --request POST 'https://api.justservices.cc/api/user/v1/subscription/subscribe/email' \
--header 'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS' \
--form 'juid="de6f0132ea9e412599ae31262c45633b"' \
--form 'email="email@email.com"'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/subscription/subscribe/email',
    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('juid' => 'de6f0132ea9e412599ae31262c45633b','email' => 'email@email.com'),
    CURLOPT_HTTPHEADER => array(
        'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/subscription/subscribe/email"

payload={'juid': 'de6f0132ea9e412599ae31262c45633b',
'email': 'email@email.com'}
files=[

]
headers = {
  'X-AUTH-TOKEN': 'cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
package main

import (
    "fmt"
    "bytes"
    "mime/multipart"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.justservices.cc/api/user/v1/subscription/subscribe/email"
    method := "POST"

    payload := &bytes.Buffer{}
    writer := multipart.NewWriter(payload)
    _ = writer.WriteField("juid", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")
    _ = writer.WriteField("email", "email@email.com")
    err := writer.Close()
    if err != nil {
        fmt.Println(err)
        return
    }


    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
        return
    }
    req.Header.Add("X-AUTH-TOKEN", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")

    req.Header.Set("Content-Type", writer.FormDataContentType())
    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(string(body))
}

Response


JuId empty / Not validate email
User not found
Error save data

Creating an SMS subscription

Endpoint
POST /api/user/v1/subscription/subscribe/sms

Attributes:

  • juid string
  • number string

More attributes:

  • regUrl string
  • refid string
  • refidm string
  • utmSource string
  • utmMedium string
  • utmCampaign string

Request

curl --location --request POST 'https://api.justservices.cc/api/user/v1/subscription/subscribe/sms' \
--header 'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS' \
--form 'juid="de6f0132ea9e412599ae31262c45633b"' \
--form 'number="00000000000"'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/subscription/subscribe/sms',
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('juid' => 'de6f0132ea9e412599ae31262c45633b','number' => '00000000000'),
CURLOPT_HTTPHEADER => array(
'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/subscription/subscribe/sms"

payload={'juid': 'de6f0132ea9e412599ae31262c45633b',
'number': '00000000000'}
files=[

]
headers = {
'X-AUTH-TOKEN': 'cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
package main

import (
    "fmt"
    "bytes"
    "mime/multipart"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.justservices.cc/api/user/v1/subscription/subscribe/sms"
    method := "POST"

    payload := &bytes.Buffer{}
    writer := multipart.NewWriter(payload)
    _ = writer.WriteField("juid", "de6f0132ea9e412599ae31262c45633b")
    _ = writer.WriteField("number", "00000000000")
    err := writer.Close()
    if err != nil {
      fmt.Println(err)
      return
    }


    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
        return
    }
    req.Header.Add("X-AUTH-TOKEN", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")

    req.Header.Set("Content-Type", writer.FormDataContentType())
    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(string(body))
}

Response


JuId empty | Not validate number
User not found
Error save data

Canceling an EMAIL subscription

Endpoint
POST /api/user/v1/subscription/unsubscribe/email

Attributes:

  • juid string
  • email string

Request

curl --location --request PUT 'https://api.justservices.cc/api/user/v1/subscription/unsubscribe/email' \
--header 'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS' \
--form 'juid="de6f0132ea9e412599ae31262c45633b"' \
--form 'email="email@email.com"'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/subscription/unsubscribe/email',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS => array('juid' => 'de6f0132ea9e412599ae31262c45633b','email' => 'https://everydayhoroscopes.devop/'),
  CURLOPT_HTTPHEADER => array(
    'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/subscription/unsubscribe/email"

payload={'juid': 'de6f0132ea9e412599ae31262c45633b',
'email': 'email@email.com'}
files=[

]
headers = {
  'X-AUTH-TOKEN': 'cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
}

response = requests.request("PUT", url, headers=headers, data=payload, files=files)

print(response.text)
package main

import (
    "fmt"
    "bytes"
    "mime/multipart"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.justservices.cc/api/user/v1/subscription/unsubscribe/email"
    method := "PUT"

    payload := &bytes.Buffer{}
    writer := multipart.NewWriter(payload)
    _ = writer.WriteField("juid", "de6f0132ea9e412599ae31262c45633b")
    _ = writer.WriteField("email", "email@email.com")
    err := writer.Close()
    if err != nil {
        fmt.Println(err)
        return
    }


    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
        return
    }
    req.Header.Add("X-AUTH-TOKEN", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")

    req.Header.Set("Content-Type", writer.FormDataContentType())
    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(string(body))
}

Response


JuId is missing | Mandatory parameter is missing
User not found | Subscription not found

Canceling an SMS subscription

Endpoint
POST /api/user/v1/subscription/unsubscribe/sms

Attributes:

  • juid string
  • number string

Request

curl --location --request POST 'https://api.justservices.cc/api/user/v1/subscription/subscribe/sms' \
--header 'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS' \
--form 'juid="de6f0132ea9e412599ae31262c45633b"' \
--form 'number="00000000000"'                                                                                                                                                 
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/subscription/subscribe/sms',
    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('juid' => 'de6f0132ea9e412599ae31262c45633b','number' => '00000000000'),
    CURLOPT_HTTPHEADER => array(
      'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/subscription/subscribe/sms"

payload={'juid': 'de6f0132ea9e412599ae31262c45633b',
'number': '00000000000'}
files=[

]
headers = {
  'X-AUTH-TOKEN': 'cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)                                                                                                                                                                   
package main

import (
    "fmt"
    "bytes"
    "mime/multipart"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.justservices.cc/api/user/v1/subscription/unsubscribe/sms"
    method := "PUT"

    payload := &bytes.Buffer{}
    writer := multipart.NewWriter(payload)
    _ = writer.WriteField("juid", "de6f0132ea9e412599ae31262c45633b")
    _ = writer.WriteField("number", "00000000000")
    err := writer.Close()
    if err != nil {
        fmt.Println(err)
        return
    }


    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
        return
    }
    req.Header.Add("X-AUTH-TOKEN", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")

    req.Header.Set("Content-Type", writer.FormDataContentType())
    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(string(body))
}

Response


JuId is missing | Mandatory parameter is missing
User not found | Subscription not found

Updating Parameters

Endpoint
PUT api/user/v1/subscription/update/utm-metric/channel/:channel

Attributes:

  • channel sms|email|push Subscription channel
  • data string

Request

curl --location --request PUT 'https://api.justservices.cc/api/user/v1/subscription/update/utm-metric/channel/email' \
--header 'X-AUTH-TOKEN: 0zNPYIFit4eqkGm7Mvd5WVfAU9ngXOy' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'data="{"email":"123@123.com","refid":2,"number":99988800066,"refid":"ch-api_src-tyuuyt-api","refidm":"wwwtttoedhtiuyuburoncoreg11893200170333w0722"}"'                                                                                           
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/subscription/update/utm-metric/channel/email',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => 'data=%22%7B%22email%22%3A%22123%40123.com%22%2C%22refid%22%3A2%2C%22number%22%3A99988800066%2C%22refid%22%3A%22ch-api_src-a8oPRJ4_lp-api%22%2C%22refidm%22%3A%22wwwtttoedhtiburoncoreg11893200170333w0722%22%7D%22',
CURLOPT_HTTPHEADER => array(
'X-AUTH-TOKEN: 0zNPYIFit4eqkGm7Mvd5WVfAU9ngXOy',
'Content-Type: application/x-www-form-urlencoded'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/subscription/update/utm-metric/channel/email"

payload='data=%22%7B%22email%22%3A%22123%40123.com%22%2C%22refid%22%3A2%2C%22number%22%3A99988800066%2C%22refid%22%3A%22ch-api_src-a8oPRJ4_lp-api%22%2C%22refidm%22%3A%22wwwtttoedhtiburoncoreg11893200170333w0722%22%7D%22'
headers = {
'X-AUTH-TOKEN': '0zNPYIFit4eqkGm7Mvd5WVfAU9ngXOy',
'Content-Type': 'application/x-www-form-urlencoded'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text)                                                                                                                                   
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.justservices.cc/api/user/v1/subscription/update/utm-metric/channel/email"
    method := "PUT"

    payload := strings.NewReader("data=%22%7B%22email%22%3A%22123%40123.com%22%2C%22refid%22%3A2%2C%22number%22%3A99988800066%2C%22refid%22%3A%22ch-api_src-a8oPRJ4_lp-api%22%2C%22refidm%22%3A%22wwwtttoedhtiburoncoreg11893200170333w0722%22%7D%22")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
        return
    }
    req.Header.Add("X-AUTH-TOKEN", "0zNPYIFit4eqkGm7Mvd5WVfAU9ngXOy")
    req.Header.Add("Content-Type", "application/x-www-form-urlencoded")

    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(string(body))
}

Response

Metrics updated
Invalid data
Unprocessable Entity

Recording Actions

Endpoint
POST /api/user/v1/action/

Attributes:

  • juid string
  • tags string
  • label string

More attributes:

  • article string

Request

curl --location --request POST 'https://api.justservices.cc/api/user/v1/action/' \
--header 'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS' \
--form 'juid="de6f0132ea9e412599ae31262c45633b"' \
--form 'tags="1,2,3"' \
--form 'label="login"'                                                                                                                                           
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/action/',
    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(,,),
    CURLOPT_HTTPHEADER => array(
      'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/action/"

payload={}
files=[

]
headers = {
  'X-AUTH-TOKEN': 'cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)                                                                                                                                                  
package main

import (
    "fmt"
    "bytes"
    "mime/multipart"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.justservices.cc/api/user/v1/action/"
    method := "POST"

    payload := &bytes.Buffer{}
    writer := multipart.NewWriter(payload)
    _ = writer.WriteField("juid", "de6f0132ea9e412599ae31262c45633b")
    _ = writer.WriteField("tags", "1,2,3")
    _ = writer.WriteField("label", "login")
    err := writer.Close()
    if err != nil {
    fmt.Println(err)
    return
    }


    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
    fmt.Println(err)
    return
    }
    req.Header.Add("X-AUTH-TOKEN", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")

    req.Header.Set("Content-Type", writer.FormDataContentType())
    res, err := client.Do(req)
    if err != nil {
    fmt.Println(err)
    return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
    fmt.Println(err)
    return
    }
    fmt.Println(string(body))
}

Response

Request accepted

Requesting Info about the Segments

Endpoint
POST /api/user/v1/info/segments/

Attributes:

  • juid string

Request

curl --location --request GET 'https://api.justservices.cc/api/user/v1/info/segment/?juid=de6f0132ea9e412599ae31262c45633b' \
--header 'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'                                                                                                                                                
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/info/segment/?juid=de6f0132ea9e412599ae31262c45633b',
  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_HTTPHEADER => array(
    'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
  ),
));
$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/info/segment/?juid=de6f0132ea9e412599ae31262c45633b"

payload={}
files={}
headers = {
  'X-AUTH-TOKEN': 'cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
}

response = requests.request("GET", url, headers=headers, data=payload, files=files)

print(response.text)                                                                                                                                                    
package main

import (
    "fmt"
    "bytes"
    "mime/multipart"
    "net/http"
    "io/ioutil"
)

func main() {
    url := "https://api.justservices.cc/api/user/v1/info/segment/?juid=de6f0132ea9e412599ae31262c45633b"
    method := "GET"

    payload := &bytes.Buffer{}
    writer := multipart.NewWriter(payload)
    err := writer.Close()
    if err != nil {
        fmt.Println(err)
        return
    }

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
        return
    }
    req.Header.Add("X-AUTH-TOKEN", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")

    req.Header.Set("Content-Type", writer.FormDataContentType())
    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
      fmt.Println(err)
      return
    }
    fmt.Println(string(body))
}

Response

[35,36]  
User not found | JUID not found

Requesting Info about the Number of Registered Users Grouped by Their Referral Identifier (RefID)

Endpoint
GET /api/user/v1/stat/get-count-refid/:channel                                                                                                                                                                

Attributes:

  • channel sms|email Subscription channel
  • startDate integer
  • endDate integer

Request

curl --location --request GET 'https://api.justservices.cc/api/user/v1/stat/get-count-refid/sms?startDate=1642137171&endDate=1655183571' \
--header 'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'                                                                                                                                              
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/stat/get-count-refid/sms?startDate=1642137171&endDate=1655183571',
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_HTTPHEADER => array(
'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/stat/get-count-refid/sms?startDate=1642137171&endDate=1655183571"

payload={}
headers = {
'X-AUTH-TOKEN': 'cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)                                                                                                                                                   
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.justservices.cc/api/user/v1/stat/get-count-refid/sms?startDate=1642137171&endDate=1655183571"
    method := "GET"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
        return
    }
    req.Header.Add("X-AUTH-TOKEN", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")

    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(string(body))
}

Response

[
    {"subscount":1,"refid":"ch-rewrwe-abcdt45611896543200010122w5222_lp-main"},
    {"subscount":1,"refid":"ch-cross_src-646ryhh456-crosssub"},
    {"subscount":21,"refid":"ch-645645-tr-main"},
    {"subscount":2,"refid":"ch-rewr-ewrewr-rt"},
    {"subscount":58,"refid":"ch-rewrw-rwere-mattin"},
    {"subscount":4,"refid":"ch-rewr-rewrw-ewer"},
    {"subscount":1,"refid":"ch-rwerw-rew-rewr"}
]
Invalid startDate or endDate
User not found
Error query

Requesting Subscription Status by Referral ID (RefID)

Endpoint
GET /api/user/v1/stat/stat-by-refid/channel/:channel

Attributes:

  • channel email|sms Subscription channel
  • start string
  • end string

Request

curl --location --request GET 'https://api.justservices.cc/api/user/v1/info/stat-by-refid/channel/sms?start=2020-08-11 20:38:49&end=2020-11-29 00:27:52' \
--header 'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'                                                                                                                                        
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/info/stat-by-refid/channel/sms?start=2020-08-11%2020:38:49&end=2020-11-29%2000:27:52',
  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_HTTPHEADER => array(
    'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/info/stat-by-refid/channel/sms?start=2020-08-11 20:38:49&end=2020-11-29 00:27:52"

payload={}
headers = {
'X-AUTH-TOKEN': 'cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)                                                                                                                                                   
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.justservices.cc/api/user/v1/info/stat-by-refid/channel/sms?start=2020-08-11%2020:38:49&end=2020-11-29%2000:27:52"
    method := "GET"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
        return
    }
    req.Header.Add("X-AUTH-TOKEN", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")

    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(string(body))
}

Response

{
    "2020-08-11":{
        "ch-direct_src-direct_lp-main":1
    },
    "2020-11-04":{
        "ch-direct_src-direct_lp-main":1,
        "ch-direct_src-direct_lp-main2":1
    },
    "2020-11-06":{
        "ch-direct_src-direct_lp-main1":1
    }
}
Invalid start or end date
Error service
Error query