Paket Listesi

Aktif uygulamaya ait paket listesini getirmek için kullanılır.

GET https://api.zotlo.com/v1/team/package
Bu servis üzerinden sadece güvenlik anahtarına ait uygulamanın fiyat detayları getirilir. Satın alma işlemlerine sadece fiyat tanımlaması yapılan ülkelerde izin verilir. Ayrıca bir paket için her ülkede farklı sağlayıcı tanımlaması yapmak da mümkündür.
Zotlo üzerinde tek seferlik ve abonelik olmak üzere 2 farklı paket türü oluşturulabilir.
#
Açıklama
subscription
Abonelik paketleridir. Bu paketlerden birine abonelik başlatan kullanıcıdan, kendisi aboneliği iptal edene kadar paketin kullanım süresi boyunca ödeme alınır.
consumable
Sadece bir kereye mahsus paket ücreti çekilir. Tek seferlik satın alınabilen ürünler için bu paket kullanılabilir.

Örnek İstek

Curl
Php
Swift
Java
Python
C+
1
curl --location --request GET 'https://api.zotlo.com/v1/team/package' \
2
--header 'AccessKey: ****' \
3
--header 'AccessSecret: ****' \
4
--header 'ApplicationId: *' \
5
--header 'Language: en'
Copied!
1
$curl = curl_init();
2
curl_setopt_array($curl, array(
3
CURLOPT_URL => "https://api.zotlo.com/v1/team/package",
4
CURLOPT_RETURNTRANSFER => true,
5
CURLOPT_TIMEOUT => 10,
6
CURLOPT_FOLLOWLOCATION => true,
7
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
8
CURLOPT_CUSTOMREQUEST => "GET",
9
CURLOPT_HTTPHEADER => array(
10
"AccessKey: ***",
11
"AccessSecret: ***",
12
"ApplicationId: *",
13
"Language: en"
14
),
15
));
16
17
$response = curl_exec($curl);
18
19
curl_close($curl);
20
echo $response;
Copied!
1
import Foundation
2
3
var semaphore = DispatchSemaphore (value: 0)
4
5
var request = URLRequest(url: URL(string: "https://api.zotlo.com/v1/team/package")!,timeoutInterval: Double.infinity)
6
request.addValue("***", forHTTPHeaderField: "AccessKey")
7
request.addValue("***", forHTTPHeaderField: "AccessSecret")
8
request.addValue("*", forHTTPHeaderField: "ApplicationId")
9
request.addValue("en", forHTTPHeaderField: "Language")
10
11
request.httpMethod = "GET"
12
13
let task = URLSession.shared.dataTask(with: request) { data, response, error in
14
guard let data = data else {
15
print(String(describing: error))
16
return
17
}
18
print(String(data: data, encoding: .utf8)!)
19
semaphore.signal()
20
}
21
22
task.resume()
23
semaphore.wait()
Copied!
1
OkHttpClient client = new OkHttpClient().newBuilder().build();
2
Request request = new Request.Builder()
3
.url("https://api.zotlo.com/v1/team/package")
4
.method("GET", null)
5
.addHeader("AccessKey", "***")
6
.addHeader("AccessSecret", "***")
7
.addHeader("ApplicationId", "*")
8
.addHeader("Language", "tr")
9
.build();
10
Response response = client.newCall(request).execute();
Copied!
1
import requests
2
3
url = "https://api.zotlo.com/v1/team/package"
4
5
payload = {}
6
headers = {
7
'AccessKey': '***',
8
'AccessSecret': '***',
9
'ApplicationId': '*',
10
'Language': 'en'
11
}
12
13
response = requests.request("GET", url, headers=headers, data = payload)
14
15
print(response.text.encode('utf8'))
Copied!
1
var client = new RestClient("https://api.zotlo.com/v1/team/package");
2
client.Timeout = -1;
3
var request = new RestRequest(Method.GET);
4
request.AddHeader("AccessKey", "***");
5
request.AddHeader("AccessSecret", "***");
6
request.AddHeader("ApplicationId", "*");
7
request.AddHeader("Language", "en");
8
IRestResponse response = client.Execute(request);
9
Console.WriteLine(response.Content);
Copied!

Başarılı Cevap

1
{
2
"meta": {
3
"requestId": "6d2989e84793-REQ-5f32a658c59fa",
4
"httpStatus": 200
5
},
6
"result": {
7
"packages": [
8
{
9
"id": 14,
10
"packageId": "zotlo-premium",
11
"name": "Zotlo Premium",
12
"packageType": "subscription",
13
"period": 30,
14
"trialPeriod": 30,
15
"price": "2.99",
16
"trialPrice": "0.00",
17
"currency": "USD",
18
"status": 1,
19
"providerId": 6,
20
"prices": [
21
{
22
"id": 18,
23
"country": "UA",
24
"price": "1.82",
25
"currency": "USD",
26
"trialPrice": "0.01",
27
"startDate": "2020-05-27 11:26:10",
28
"providerId": 6,
29
"period": 30,
30
"trialPeriod": 0,
31
"status": 1
32
}
33
{
34
"id": 36,
35
"country": "CG",
36
"price": "0.99",
37
"currency": "USD",
38
"trialPrice": "0.00",
39
"startDate": "2020-05-27 19:48:27",
40
"providerId": 6,
41
"period": 30,
42
"trialPeriod": 0,
43
"status": 1
44
},
45
{
46
"id": 37,
47
"country": "DZ",
48
"price": "0.99",
49
"currency": "USD",
50
"trialPrice": "0.00",
51
"startDate": "2020-05-27 19:49:04",
52
"providerId": 6,
53
"period": 30,
54
"trialPeriod": 0,
55
"status": 1
56
},
57
{
58
"id": 38,
59
"country": "EG",
60
"price": "0.99",
61
"currency": "USD",
62
"trialPrice": "0.00",
63
"startDate": "2020-05-27 19:50:02",
64
"providerId": 6,
65
"period": 30,
66
"trialPeriod": 0,
67
"status": 1
68
},
69
{
70
"id": 39,
71
"country": "ET",
72
"price": "0.99",
73
"currency": "USD",
74
"trialPrice": "0.00",
75
"startDate": "2020-05-27 19:50:32",
76
"providerId": 6,
77
"period": 30,
78
"trialPeriod": 0,
79
"status": 1
80
},
81
{
82
"id": 40,
83
"country": "GH",
84
"price": "0.99",
85
"currency": "USD",
86
"trialPrice": "0.00",
87
"startDate": "2020-05-27 19:51:14",
88
"providerId": 6,
89
"period": 30,
90
"trialPeriod": 0,
91
"status": 1
92
},
93
{
94
"id": 41,
95
"country": "IL",
96
"price": "4.99",
97
"currency": "USD",
98
"trialPrice": "0.00",
99
"startDate": "2020-05-27 19:51:34",
100
"providerId": 6,
101
"period": 30,
102
"trialPeriod": 0,
103
"status": 1
104
},
105
{
106
"id": 42,
107
"country": "JO",
108
"price": "0.99",
109
"currency": "USD",
110
"trialPrice": "0.00",
111
"startDate": "2020-05-27 19:52:01",
112
"providerId": 6,
113
"period": 30,
114
"trialPeriod": 0,
115
"status": 1
116
},
117
{
118
"id": 43,
119
"country": "KE",
120
"price": "0.99",
121
"currency": "USD",
122
"trialPrice": "0.00",
123
"startDate": "2020-05-27 19:52:26",
124
"providerId": 6,
125
"period": 30,
126
"trialPeriod": 0,
127
"status": 1
128
}
129
]
130
},
131
{
132
"id": 28,
133
"packageId": "consumable",
134
"name": "consumable Package",
135
"packageType": "consumable",
136
"period": 0,
137
"trialPeriod": 0,
138
"price": "500.00",
139
"trialPrice": "0.00",
140
"currency": "USD",
141
"status": 1,
142
"providerId": 6,
143
"prices": []
144
}
145
146
]
147
}
148
}
Copied!
Last modified 2mo ago