Get multiple address records through a GET request. This method supports all the GET parameters that are mentioned in the "Introduction" section of this documentation.
GET https://gambio-shop.de/shop1/api.php/v2/addresses
Parameter name | Value | Description | Additional |
---|---|---|---|
fields | array of string, comma separated | Optional parameter. If provided limits the properties to be included in the response. |
|
page | int64 | Optional parameter. If provided, displays the specified page. Defaults to 0. |
|
per_page | int64 | Optional parameter. If provided, limits the amount of records in the response. Defaults to 50. |
|
search | string | Optional parameter. Search for a url-encoded keyword. |
|
sort | array of string, comma separated | Optional parameter. Sorts by the desired properties. Maximum sorting fields are 5. (prefix property with + for ascending, - for descending) |
In order to provide the authentication, you must insert the Basic Auth inside the HTTP header. The Basic Auth
is an encrypted base64 string that holds the following content: admin@example.org:12345
where the structure is
as follows: username:password
.
An example header would look as follows:
Authorization: Basic YWRtaW5Ac2hvcC5kZToxMjM0NQ==
This request requires the use of one of following authorisation methods:
BASIC
.
The following HTTP status codes may be returned, optionally with a response resource.
Status code | Description | Resource |
---|---|---|
200 | OK Upon success, returns the address that was fetched |
GXAddress |
404 | Not Found (Invalid address ID) |
defaultErrorResponse |
Here are some example implementations for this operation.
curl --request GET \ --header 'Authorization: Basic REPLACE_BASIC_AUTH' \ --header 'content-type: application/json'
wget --quiet \ --method GET \ --header 'content-type: application/json' \ --header 'Authorization: Basic REPLACE_BASIC_AUTH' \ --output-document
Authorization:'Basic REPLACE_BASIC_AUTH' \ content-type:application/json
HttpResponse response = Unirest.get("https://gambio-shop.de/shop1/api.php/v2/addresses?per_page=50&page=0&sort=SOME_ARRAY_VALUE&search=SOME_STRING_VALUE&fields=SOME_ARRAY_VALUE") .header("content-type", "application/json") .header("Authorization", "Basic REPLACE_BASIC_AUTH") .asString();
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder()
.get() .addHeader("content-type", "application/json") .addHeader("Authorization", "Basic REPLACE_BASIC_AUTH") .build(); Response response = client.newCall(request).execute();
var request = new RestRequest(Method.GET); request.AddHeader("content-type", "application/json"); request.AddHeader("Authorization", "Basic REPLACE_BASIC_AUTH"); IRestResponse response = client.Execute(request);
const http = require("https"); const options = {
"method": "GET", "hostname": "gambio-shop.de", "port": null, "path": "/shop1/api.php/v2/addresses?per_page=50&page=0&sort=SOME_ARRAY_VALUE&search=SOME_STRING_VALUE&fields=SOME_ARRAY_VALUE", "headers": { "content-type": "application/json",
"Authorization": "Basic REPLACE_BASIC_AUTH" }
}; const req = http.request(options, function (res) {
const chunks = []; res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString()); });
}); req.end();
const request = require('request'); const options = {
method: 'GET', qs: { per_page: '50',
page: '0', sort: 'SOME_ARRAY_VALUE', search: 'SOME_STRING_VALUE', fields: 'SOME_ARRAY_VALUE' },
headers: {'content-type': 'application/json', Authorization: 'Basic REPLACE_BASIC_AUTH'} }; request(options, function (error, response, body) {
if (error) throw new Error(error); console.log(body);
});
const unirest = require("unirest"); const req = unirest("GET", "https://gambio-shop.de/shop1/api.php/v2/addresses");
req.query({
"per_page": "50", "page": "0", "sort": "SOME_ARRAY_VALUE", "search": "SOME_STRING_VALUE", "fields": "SOME_ARRAY_VALUE" }); req.headers({
"content-type": "application/json", "Authorization": "Basic REPLACE_BASIC_AUTH" }); req.end(function (res) {
if (res.error) throw new Error(res.error); console.log(res.body);
});
const data = null; const xhr = new XMLHttpRequest();
xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) { console.log(this.responseText);
}
}); xhr.setRequestHeader("content-type", "application/json"); xhr.setRequestHeader("Authorization", "Basic REPLACE_BASIC_AUTH"); xhr.send(data);
const settings = { "async": true, "crossDomain": true, "method": "GET", "headers": { "content-type": "application/json",
"Authorization": "Basic REPLACE_BASIC_AUTH" }
}; $.ajax(settings).done(function (response) {
console.log(response); });
<?php $curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Basic REPLACE_BASIC_AUTH",
"content-type: application/json" ],
]); $response = curl_exec($curl);
$err = curl_error($curl); curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err; } else { echo $response; }
<?php $request = new HttpRequest();
$request->setUrl('https://gambio-shop.de/shop1/api.php/v2/addresses'); $request->setMethod(HTTP_METH_GET); $request->setQueryData([
'per_page' => '50', 'page' => '0', 'sort' => 'SOME_ARRAY_VALUE', 'search' => 'SOME_STRING_VALUE', 'fields' => 'SOME_ARRAY_VALUE' ]); $request->setHeaders([
'content-type' => 'application/json', 'Authorization' => 'Basic REPLACE_BASIC_AUTH' ]); try {
$response = $request->send(); echo $response->getBody();
} catch (HttpException $ex) { echo $ex; }
<?php $client = new http\Client;
$request = new http\Client\Request; $request->setRequestUrl('https://gambio-shop.de/shop1/api.php/v2/addresses');
$request->setRequestMethod('GET'); $request->setQuery(new http\QueryString([ 'per_page' => '50', 'page' => '0', 'sort' => 'SOME_ARRAY_VALUE', 'search' => 'SOME_STRING_VALUE', 'fields' => 'SOME_ARRAY_VALUE' ])); $request->setHeaders([
'content-type' => 'application/json', 'Authorization' => 'Basic REPLACE_BASIC_AUTH' ]); $client->enqueue($request)->send();
$response = $client->getResponse(); echo $response->getBody();
import http.client conn = http.client.HTTPSConnection("gambio-shop.de")
headers = {
'content-type': "application/json",
'Authorization': "Basic REPLACE_BASIC_AUTH" } conn.request("GET", "/shop1/api.php/v2/addresses?per_page=50&page=0&sort=SOME_ARRAY_VALUE&search=SOME_STRING_VALUE&fields=SOME_ARRAY_VALUE", headers=headers)
res = conn.getresponse()
data = res.read() print(data.decode("utf-8"))
import requests querystring = {"per_page":"50","page":"0","sort":"SOME_ARRAY_VALUE","search":"SOME_STRING_VALUE","fields":"SOME_ARRAY_VALUE"}
headers = {
"content-type": "application/json",
"Authorization": "Basic REPLACE_BASIC_AUTH" }
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)
require 'uri' require 'net/http' require 'openssl' http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url)
request["content-type"] = 'application/json' request["Authorization"] = 'Basic REPLACE_BASIC_AUTH' response = http.request(request)
puts response.read_body
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://gambio-shop.de/shop1/api.php/v2/addresses?per_page=50&page=0&sort=SOME_ARRAY_VALUE&search=SOME_STRING_VALUE&fields=SOME_ARRAY_VALUE"); struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json"); headers = curl_slist_append(headers, "Authorization: Basic REPLACE_BASIC_AUTH"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
package main import (
"fmt"
"net/http" "io/ioutil" )
func main() {
url := "https://gambio-shop.de/shop1/api.php/v2/addresses?per_page=50&page=0&sort=SOME_ARRAY_VALUE&search=SOME_STRING_VALUE&fields=SOME_ARRAY_VALUE"
req, _ := http.NewRequest("GET", url, nil) req.Header.Add("content-type", "application/json") req.Header.Add("Authorization", "Basic REPLACE_BASIC_AUTH") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
#import NSDictionary *headers = @{ @"content-type": @"application/json",
@"Authorization": @"Basic REPLACE_BASIC_AUTH" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://gambio-shop.de/shop1/api.php/v2/addresses?per_page=50&page=0&sort=SOME_ARRAY_VALUE&search=SOME_STRING_VALUE&fields=SOME_ARRAY_VALUE"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0]; [request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers]; NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume];
import Foundation let headers = [
"content-type": "application/json", "Authorization": "Basic REPLACE_BASIC_AUTH" ] let request = NSMutableURLRequest(url: NSURL(string: "https://gambio-shop.de/shop1/api.php/v2/addresses?per_page=50&page=0&sort=SOME_ARRAY_VALUE&search=SOME_STRING_VALUE&fields=SOME_ARRAY_VALUE")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0) request.httpMethod = "GET"
request.allHTTPHeaderFields = headers let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse) }
}) dataTask.resume()
open Cohttp_lwt_unix open Cohttp open Lwt let headers = Header.add_list (Header.init ()) [ ("content-type", "application/json"); ("Authorization", "Basic REPLACE_BASIC_AUTH"); ] in Client.call ~headers `GET uri
= fun (res, body_stream) ->
(* Do stuff with the result *)