cURL
curl --request GET \
--url https://{base-address}/apis/ecommerce-service/public/discovery/v2/bannersimport requests
url = "https://{base-address}/apis/ecommerce-service/public/discovery/v2/banners"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{base-address}/apis/ecommerce-service/public/discovery/v2/banners', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{base-address}/apis/ecommerce-service/public/discovery/v2/banners",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{base-address}/apis/ecommerce-service/public/discovery/v2/banners"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{base-address}/apis/ecommerce-service/public/discovery/v2/banners")
.asString();require 'uri'
require 'net/http'
url = URI("https://{base-address}/apis/ecommerce-service/public/discovery/v2/banners")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"Status": "<string>",
"Data": {
"records": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"config": {
"desktop": {
"is_hidden": true,
"type": "<string>",
"image": {
"banner_image": {
"id": "<string>",
"item": "<string>",
"relative_path": "<string>",
"file_meta_data": {
"name": "<string>",
"size": 123
},
"original_file_name": "<string>",
"field_name": "<string>"
},
"title": "<string>",
"max_height": 123,
"alt_tag": "<string>",
"redirect_url": "<string>",
"is_open_in_new_tab": true
},
"html": {
"content": "<string>",
"max_height": 123
},
"video": {
"url": "<string>",
"iframe_attributes": "<string>",
"max_height": 123,
"max_width": 123
},
"onclick_event": "<string>",
"onload_event": "<string>",
"layout_attributes": {
"id": "<string>",
"layout_name": "<string>",
"type": "<string>",
"rows": 123,
"columns": 123,
"is_full_width": true,
"layout_image": "<string>"
}
},
"tablet": {
"is_hidden": true,
"is_desktop_override": true,
"type": "<string>",
"image": {
"banner_image": {
"id": "<string>",
"item": "<string>",
"relative_path": "<string>",
"file_meta_data": {
"name": "<string>",
"size": 123
},
"original_file_name": "<string>",
"field_name": "<string>"
},
"title": "<string>",
"max_height": 123,
"alt_tag": "<string>",
"redirect_url": "<string>",
"is_open_in_new_tab": true
},
"html": {
"content": "<string>",
"max_height": 123
},
"video": {
"url": "<string>",
"iframe_attributes": "<string>",
"max_height": 123,
"max_width": 123
},
"onclick_event": "<string>",
"onload_event": "<string>",
"layout_attributes": {
"id": "<string>",
"layout_name": "<string>",
"type": "<string>",
"rows": 123,
"columns": 123,
"is_full_width": true,
"layout_image": "<string>"
}
},
"mobile": {
"is_hidden": true,
"is_desktop_override": true,
"type": "<string>",
"image": {
"banner_image": {
"id": "<string>",
"item": "<string>",
"relative_path": "<string>",
"file_meta_data": {
"name": "<string>",
"size": 123
},
"original_file_name": "<string>",
"field_name": "<string>"
},
"title": "<string>",
"max_height": 123,
"alt_tag": "<string>",
"redirect_url": "<string>",
"is_open_in_new_tab": true
},
"html": {
"content": "<string>",
"max_height": 123
},
"video": {
"url": "<string>",
"iframe_attributes": "<string>",
"max_height": 123,
"max_width": 123
},
"onclick_event": "<string>",
"onload_event": "<string>",
"layout_attributes": {
"id": "<string>",
"layout_name": "<string>",
"type": "<string>",
"rows": 123,
"columns": 123,
"is_full_width": true,
"layout_image": "<string>"
}
}
},
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
}
],
"_meta_": {
"tenant_id": "<string>",
"workspace_id": "<string>",
"env_type": "<string>",
"store_hash": "<string>",
"total_count": 123
}
}
}{
"Status": "failure",
"Data": {
"Status": "failure",
"Error": {
"message": "<string>",
"name": "<string>",
"code": "<string>"
}
}
}{
"Status": "failure",
"Data": {
"Status": "failure",
"Error": {
"message": "<string>",
"name": "<string>",
"code": "<string>"
}
}
}{
"Status": "failure",
"Data": {
"Status": "failure",
"Error": {
"message": "<string>",
"name": "<string>",
"code": "<string>"
}
}
}Discovery APIs
Get Banners By Ids
Fetch banners for display in the eCommerce interface. Supports field selection and filtering to retrieve relevant banner content.
GET
/
apis
/
ecommerce-service
/
public
/
discovery
/
v2
/
banners
cURL
curl --request GET \
--url https://{base-address}/apis/ecommerce-service/public/discovery/v2/bannersimport requests
url = "https://{base-address}/apis/ecommerce-service/public/discovery/v2/banners"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{base-address}/apis/ecommerce-service/public/discovery/v2/banners', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{base-address}/apis/ecommerce-service/public/discovery/v2/banners",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{base-address}/apis/ecommerce-service/public/discovery/v2/banners"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{base-address}/apis/ecommerce-service/public/discovery/v2/banners")
.asString();require 'uri'
require 'net/http'
url = URI("https://{base-address}/apis/ecommerce-service/public/discovery/v2/banners")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"Status": "<string>",
"Data": {
"records": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"config": {
"desktop": {
"is_hidden": true,
"type": "<string>",
"image": {
"banner_image": {
"id": "<string>",
"item": "<string>",
"relative_path": "<string>",
"file_meta_data": {
"name": "<string>",
"size": 123
},
"original_file_name": "<string>",
"field_name": "<string>"
},
"title": "<string>",
"max_height": 123,
"alt_tag": "<string>",
"redirect_url": "<string>",
"is_open_in_new_tab": true
},
"html": {
"content": "<string>",
"max_height": 123
},
"video": {
"url": "<string>",
"iframe_attributes": "<string>",
"max_height": 123,
"max_width": 123
},
"onclick_event": "<string>",
"onload_event": "<string>",
"layout_attributes": {
"id": "<string>",
"layout_name": "<string>",
"type": "<string>",
"rows": 123,
"columns": 123,
"is_full_width": true,
"layout_image": "<string>"
}
},
"tablet": {
"is_hidden": true,
"is_desktop_override": true,
"type": "<string>",
"image": {
"banner_image": {
"id": "<string>",
"item": "<string>",
"relative_path": "<string>",
"file_meta_data": {
"name": "<string>",
"size": 123
},
"original_file_name": "<string>",
"field_name": "<string>"
},
"title": "<string>",
"max_height": 123,
"alt_tag": "<string>",
"redirect_url": "<string>",
"is_open_in_new_tab": true
},
"html": {
"content": "<string>",
"max_height": 123
},
"video": {
"url": "<string>",
"iframe_attributes": "<string>",
"max_height": 123,
"max_width": 123
},
"onclick_event": "<string>",
"onload_event": "<string>",
"layout_attributes": {
"id": "<string>",
"layout_name": "<string>",
"type": "<string>",
"rows": 123,
"columns": 123,
"is_full_width": true,
"layout_image": "<string>"
}
},
"mobile": {
"is_hidden": true,
"is_desktop_override": true,
"type": "<string>",
"image": {
"banner_image": {
"id": "<string>",
"item": "<string>",
"relative_path": "<string>",
"file_meta_data": {
"name": "<string>",
"size": 123
},
"original_file_name": "<string>",
"field_name": "<string>"
},
"title": "<string>",
"max_height": 123,
"alt_tag": "<string>",
"redirect_url": "<string>",
"is_open_in_new_tab": true
},
"html": {
"content": "<string>",
"max_height": 123
},
"video": {
"url": "<string>",
"iframe_attributes": "<string>",
"max_height": 123,
"max_width": 123
},
"onclick_event": "<string>",
"onload_event": "<string>",
"layout_attributes": {
"id": "<string>",
"layout_name": "<string>",
"type": "<string>",
"rows": 123,
"columns": 123,
"is_full_width": true,
"layout_image": "<string>"
}
}
},
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
}
],
"_meta_": {
"tenant_id": "<string>",
"workspace_id": "<string>",
"env_type": "<string>",
"store_hash": "<string>",
"total_count": 123
}
}
}{
"Status": "failure",
"Data": {
"Status": "failure",
"Error": {
"message": "<string>",
"name": "<string>",
"code": "<string>"
}
}
}{
"Status": "failure",
"Data": {
"Status": "failure",
"Error": {
"message": "<string>",
"name": "<string>",
"code": "<string>"
}
}
}{
"Status": "failure",
"Data": {
"Status": "failure",
"Error": {
"message": "<string>",
"name": "<string>",
"code": "<string>"
}
}
}Before calling this endpoint, make sure you’ve generated an API token and picked the correct domain. See Authentication & Base URLs.
Headers
eCommerce provider for contextualizing the API call (e.g., shopify, magento, etc.).
Query Parameters
Comma-separated list of specific banner IDs to retrieve
Comma-separated list of fields to include in the response
Specifies the language or region for the response data
Maximum number of items to return.
Number of items to skip for pagination offset.
Field used to sort the results.
Order in which to sort assets: asc (oldest first) or desc (newest first).
⌘I