API Данные для получения
Сегменты
Attributes:
- juid
string
Request
<?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
Зарегестрированные пользователи с группировкой по REFID
Attributes:
- channel
sms|email
Канал подписок - startDate
integer
- endDate
integer
Request
<?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;
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"}
]
Статусы подписки по REFID
Attributes:
- channel
email|sms
Канал подписок - start
string
- end
string
Request
<?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