İpsizcambaz’da bulunan tüm kategorileri bilgilerini elde etmek için kullanılır.
Kategori Listesi
İpsizcambaz’da bulunan tüm ürün kategorilerinde filtreleme yapmak için kullanılır.
Örnekler
Curl ile istek atmak için bu örnek kullanılabilir.
curl -X GET \ 'https://api.allesgo.com/v1.0/category?access_token={ACCESS_TOKEN}' \ -H 'Accept: application/json' \ -H 'Cache-Control: no-cache' \ -H 'Connection: keep-alive' \ -H 'Host: api.allesgo.com' \ -H 'cache-control: no-cache'
PHP ile istek atmak için bu örnek kullanılabilir. Örnekte Curl kullanılmaktadır.
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.allesgo.com/v1.0/category?access_token={ACCESS_TOKEN}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array( "Accept: application/json", "Cache-Control: no-cache", "Connection: keep-alive", "Host: api.allesgo.com", "cache-control: no-cache", ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
Python ile istek atmak için bu örnek kullanılabilir. Örnekte requests kullanılmaktadır.
import requests url = "https://api.allesgo.com/v1.0/category" querystring = {"access_token":"{{ACCESS_TOKEN}}"} headers = { 'Accept': "application/json", 'Cache-Control': "no-cache", 'Host': "api.allesgo.com", 'Connection': "keep-alive", 'cache-control': "no-cache" } response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
Node.js ile istek atmak için bu örnek kullanılabilir. Örnekte request kullanılmaktadır.
var request = require('request'); var options = { method: 'GET', url: 'https://api.allesgo.com/v1.0/category', qs: { access_token: '{ACCESS_TOKEN}' }, headers: { 'cache-control': 'no-cache', Connection: 'keep-alive', Host: 'api.allesgo.com', Accept: 'application/json', }, }; request(options, (error, response, body) => { if (error) throw new Error(error); console.log(body); });
Javascipt ile istek atmak için bu örnek kullanılabilir. Örnekte xhr kullanılmakdır. Not: Bilgi amaçlıdır. Javascipt ile yazılan bu kod'ta Kullanıcı access token'a erişebildiğinden, kullanmanızı önermiyoruz.
var data = null; var xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener('readystatechange', function () { if (this.readyState === 4) { console.log(this.responseText); } }); xhr.open('GET', 'https://api.allesgo.com/v1.0/category?access_token={ACCESS_TOKEN}'); xhr.setRequestHeader('Accept', 'application/json'); xhr.setRequestHeader('Cache-Control', 'no-cache'); xhr.setRequestHeader('Host', 'api.allesgo.com'); xhr.setRequestHeader('Connection', 'keep-alive'); xhr.setRequestHeader('cache-control', 'no-cache'); xhr.send(data);
C Sharp ile istek atmak için bu örnek kullanılabilir. Bu örnekte RestSharp kullanılmaktadır.
var client = new RestClient("https://api.allesgo.com/v1.0/category?access_token={ACCESS_TOKEN}"); var request = new RestRequest(Method.GET); request.AddHeader("cache-control", "no-cache"); request.AddHeader("Connection", "keep-alive"); request.AddHeader("Host", "api.allesgo.com"); request.AddHeader("Cache-Control", "no-cache"); request.AddHeader("Accept", "application/json"); IRestResponse response = client.Execute(request);
Java ile istek atmak için bu örnek kullanılabilir. Örnekte Ok Http kullanılmaktadır.
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.allesgo.com/v1.0/category?access_token={ACCESS_TOKEN}") .get() .addHeader("Accept", "application/json") .addHeader("Cache-Control", "no-cache") .addHeader("Host", "api.allesgo.com") .addHeader("Connection", "keep-alive") .addHeader("cache-control", "no-cache") .build(); Response response = client.newCall(request).execute();
Go ile istek atmak için bu örnek kullanılabilir. Örnekte net/http kullanılmaktadır.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.allesgo.com/v1.0/category?access_token={ACCESS_TOKEN}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Accept", "*/*") req.Header.Add("Cache-Control", "no-cache") req.Header.Add("Host", "api.allesgo.com") req.Header.Add("Connection", "keep-alive") req.Header.Add("cache-control", "no-cache") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
API Referansı
Request query strings
Parametre | Türkçe | Tür | Zorunlu | Geçerli Değerler | Varsayılan | Açıklama |
---|---|---|---|---|---|---|
limit | Limit | Integer | false | 20 | Limit (max: 50). | |
page | Sayfa | Integer | false | 1 | Belirlediğiniz sayfaya göre kategorileri listelersiniz. | |
ids | Id'ler | ObjectId | false | Kategorileri ID numarasına göre getirirsiniz. Birden fazla ID ile arama yapılacaksa aralara virgül koymayı unutmayın. | ||
search | Anahtar Kelime | String | false | Kategorileri ismine göre getirirsiniz. |
Sunucudan dönecek cevabın örneği.
{
"data": {
"total": "Integer",
"result": [
{
"id": "ObjectId",
"google_id": "String",
"name": "String",
"parent": "Category",
"vat": "Number",
"commission": "Integer",
"max_installment": "Integer",
"volumetric_weight": "Integer",
"is_adult": "Boolean",
"category_path": "String",
"category_tree": "Array"
}
]
}
}
Google ID’ye göre Kategori Listesi
Google Product Category ID'ye göre allesgo.com kategorileri arasında filtreleme yapmak için kullanılır
Örnekler
Curl ile istek atmak için bu örnek kullanılabilir.
curl -X GET \ 'https://api.allesgo.com/v1.0/category/get-by-google-id/{GOOGLE_CATEGORY_ID}?access_token={ACCESS_TOKEN}' \ -H 'Accept: application/json' \ -H 'Cache-Control: no-cache' \ -H 'Connection: keep-alive' \ -H 'Host: api.allesgo.com' \ -H 'cache-control: no-cache'
PHP ile istek atmak için bu örnek kullanılabilir. Örnekte Curl kullanılmaktadır.
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.allesgo.com/v1.0/category/get-by-google-id/{GOOGLE_CATEGORY_ID}?access_token={ACCESS_TOKEN}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array( "Accept: application/json", "Cache-Control: no-cache", "Connection: keep-alive", "Host: api.allesgo.com", "cache-control: no-cache", ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
Python ile istek atmak için bu örnek kullanılabilir. Örnekte requests kullanılmaktadır.
import requests url = "https://api.allesgo.com/v1.0/category/get-by-google-id/{{GOOGLE_CATEGORY_ID}}" querystring = {"access_token":"{{ACCESS_TOKEN}}"} headers = { 'Accept': "application/json", 'Cache-Control': "no-cache", 'Host': "api.allesgo.com", 'Connection': "keep-alive", 'cache-control': "no-cache" } response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
Node.js ile istek atmak için bu örnek kullanılabilir. Örnekte request kullanılmaktadır.
var request = require('request'); var options = { method: 'GET', url: 'https://api.allesgo.com/v1.0/category/get-by-google-id/{GOOGLE_CATEGORY_ID}', qs: { access_token: '{ACCESS_TOKEN}' }, headers: { 'cache-control': 'no-cache', Connection: 'keep-alive', Host: 'api.allesgo.com', Accept: 'application/json', }, }; request(options, (error, response, body) => { if (error) throw new Error(error); console.log(body); });
Javascipt ile istek atmak için bu örnek kullanılabilir. Örnekte xhr kullanılmakdır. Not: Bilgi amaçlıdır. Javascipt ile yazılan bu kod'ta Kullanıcı access token'a erişebildiğinden, kullanmanızı önermiyoruz.
var data = null; var xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener('readystatechange', function () { if (this.readyState === 4) { console.log(this.responseText); } }); xhr.open('GET', 'https://api.allesgo.com/v1.0/category/get-by-google-id/{GOOGLE_CATEGORY_ID}?access_token={ACCESS_TOKEN}'); xhr.setRequestHeader('Accept', 'application/json'); xhr.setRequestHeader('Cache-Control', 'no-cache'); xhr.setRequestHeader('Host', 'api.allesgo.com'); xhr.setRequestHeader('Connection', 'keep-alive'); xhr.setRequestHeader('cache-control', 'no-cache'); xhr.send(data);
C Sharp ile istek atmak için bu örnek kullanılabilir. Bu örnekte RestSharp kullanılmaktadır.
var client = new RestClient("https://api.allesgo.com/v1.0/category/get-by-google-id/{GOOGLE_CATEGORY_ID}?access_token={ACCESS_TOKEN}"); var request = new RestRequest(Method.GET); request.AddHeader("cache-control", "no-cache"); request.AddHeader("Connection", "keep-alive"); request.AddHeader("Host", "api.allesgo.com"); request.AddHeader("Cache-Control", "no-cache"); request.AddHeader("Accept", "application/json"); IRestResponse response = client.Execute(request);
Java ile istek atmak için bu örnek kullanılabilir. Örnekte Ok Http kullanılmaktadır.
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.allesgo.com/v1.0/category/get-by-google-id/{GOOGLE_CATEGORY_ID}?access_token={ACCESS_TOKEN}") .get() .addHeader("Accept", "application/json") .addHeader("Cache-Control", "no-cache") .addHeader("Host", "api.allesgo.com") .addHeader("Connection", "keep-alive") .addHeader("cache-control", "no-cache") .build(); Response response = client.newCall(request).execute();
Go ile istek atmak için bu örnek kullanılabilir. Örnekte net/http kullanılmaktadır.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.allesgo.com/v1.0/category/get-by-google-id/{GOOGLE_CATEGORY_ID}?access_token={ACCESS_TOKEN}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Accept", "*/*") req.Header.Add("Cache-Control", "no-cache") req.Header.Add("Host", "api.allesgo.com") req.Header.Add("Connection", "keep-alive") req.Header.Add("cache-control", "no-cache") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
API Referansı
Request URL parameters
Parametre | Türkçe | Tür | Zorunlu | Geçerli Değerler | Varsayılan | Açıklama |
---|---|---|---|---|---|---|
googleCategoryId | Google Kategori ID'si | Integer | true | Google Kategori ID'si |
Sunucudan dönecek cevabın örneği.
{
"data": {
"id": "ObjectId",
"google_id": "String",
"name": "String",
"parent": "Category",
"commission": "Integer",
"vat": "Number",
"max_installment": "Integer",
"volumetric_weight": "Integer",
"is_adult": "Boolean",
"category_path": "String",
"category_tree": "Array",
"properties": [
{
"property_options": [
{
"id": "String",
"display_name": "String",
"tag": "String"
}
],
"name": "String",
"id": "ObjectId"
}
]
}
}
Kategori Değer ve Özellikleri
Bir kategoriye ait özelliklerin tümü kategori ID kullanılarak listelenir.
Örnekler
Curl ile istek atmak için bu örnek kullanılabilir.
curl -X GET \ 'https://api.allesgo.com/v1.0/category/get-properties/{CATEGORY_ID}?access_token={ACCESS_TOKEN}' \ -H 'Accept: application/json' \ -H 'Cache-Control: no-cache' \ -H 'Connection: keep-alive' \ -H 'Host: api.allesgo.com' \ -H 'cache-control: no-cache'
PHP ile istek atmak için bu örnek kullanılabilir. Örnekte Curl kullanılmaktadır.
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.allesgo.com/v1.0/category/get-properties/{CATEGORY_ID}?access_token={ACCESS_TOKEN}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array( "Accept: application/json", "Cache-Control: no-cache", "Connection: keep-alive", "Host: api.allesgo.com", "cache-control: no-cache", ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
Python ile istek atmak için bu örnek kullanılabilir. Örnekte requests kullanılmaktadır.
import requests url = "https://api.allesgo.com/v1.0/category/get-properties/{{CATEGORY_ID}}" querystring = {"access_token":"{{ACCESS_TOKEN}}"} headers = { 'Accept': "application/json", 'Cache-Control': "no-cache", 'Host': "api.allesgo.com", 'Connection': "keep-alive", 'cache-control': "no-cache" } response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
Node.js ile istek atmak için bu örnek kullanılabilir. Örnekte request kullanılmaktadır.
var request = require('request'); var options = { method: 'GET', url: 'https://api.allesgo.com/v1.0/category/get-properties/{CATEGORY_ID}', qs: { access_token: '{ACCESS_TOKEN}' }, headers: { 'cache-control': 'no-cache', Connection: 'keep-alive', Host: 'api.allesgo.com', Accept: 'application/json', }, }; request(options, (error, response, body) => { if (error) throw new Error(error); console.log(body); });
Javascipt ile istek atmak için bu örnek kullanılabilir. Örnekte xhr kullanılmakdır. Not: Bilgi amaçlıdır. Javascipt ile yazılan bu kod'ta Kullanıcı access token'a erişebildiğinden, kullanmanızı önermiyoruz.
var data = null; var xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener('readystatechange', function () { if (this.readyState === 4) { console.log(this.responseText); } }); xhr.open('GET', 'https://api.allesgo.com/v1.0/category/get-properties/{CATEGORY_ID}?access_token={ACCESS_TOKEN}'); xhr.setRequestHeader('Accept', 'application/json'); xhr.setRequestHeader('Cache-Control', 'no-cache'); xhr.setRequestHeader('Host', 'api.allesgo.com'); xhr.setRequestHeader('Connection', 'keep-alive'); xhr.setRequestHeader('cache-control', 'no-cache'); xhr.send(data);
C Sharp ile istek atmak için bu örnek kullanılabilir. Bu örnekte RestSharp kullanılmaktadır.
var client = new RestClient("https://api.allesgo.com/v1.0/category/get-properties/{CATEGORY_ID}?access_token={ACCESS_TOKEN}"); var request = new RestRequest(Method.GET); request.AddHeader("cache-control", "no-cache"); request.AddHeader("Connection", "keep-alive"); request.AddHeader("Host", "api.allesgo.com"); request.AddHeader("Cache-Control", "no-cache"); request.AddHeader("Accept", "application/json"); IRestResponse response = client.Execute(request);
Java ile istek atmak için bu örnek kullanılabilir. Örnekte Ok Http kullanılmaktadır.
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.allesgo.com/v1.0/category/get-properties/{CATEGORY_ID}?access_token={ACCESS_TOKEN}") .get() .addHeader("Accept", "application/json") .addHeader("Cache-Control", "no-cache") .addHeader("Host", "api.allesgo.com") .addHeader("Connection", "keep-alive") .addHeader("cache-control", "no-cache") .build(); Response response = client.newCall(request).execute();
Go ile istek atmak için bu örnek kullanılabilir. Örnekte net/http kullanılmaktadır.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.allesgo.com/v1.0/category/get-properties/{CATEGORY_ID}?access_token={ACCESS_TOKEN}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Accept", "*/*") req.Header.Add("Cache-Control", "no-cache") req.Header.Add("Host", "api.allesgo.com") req.Header.Add("Connection", "keep-alive") req.Header.Add("cache-control", "no-cache") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
API Referansı
Request URL parameters
Parametre | Türkçe | Tür | Zorunlu | Geçerli Değerler | Varsayılan | Açıklama |
---|---|---|---|---|---|---|
categoryId | Kategori ID'si | ObjectId | true | Kategori ID'si |
Sunucudan dönecek cevabın örneği.
{
"data": [
{
"property_options": [
{
"id": "String",
"display_name": "String",
"tag": "String"
}
],
"name": "String",
"id": "ObjectId"
}
]
}