List Gallery Categories
Return the available filter values you can pass to Browse Gallery — types, seasons, features, and industries. Use the id of each entry as a filter value.
Endpoint
GET /templates/gallery/categories
Response
{
"types": [
{ "id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a", "name": "Newsletter" },
{ "id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b", "name": "Promotional" }
],
"seasons": [
{ "id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6c", "name": "Winter" }
],
"features": [
{ "id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6d", "name": "Hero Image" },
{ "id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6e", "name": "Coupon" }
],
"industries": [
{ "id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6f", "name": "E-commerce" }
]
}
| Field | Type | Description |
|---|---|---|
types | object[] | Available template_types filter values. |
seasons | object[] | Available template_seasons filter values. |
features | object[] | Available template_features filter values. |
industries | object[] | Available template_industries filter values. |
Each entry is { id: string, name: string }. The id is the value you pass to the corresponding filter on Browse Gallery.
Examples
- cURL
- JavaScript
- Python
- C#
- PHP
curl "https://api.arsel.sa/v1/templates/gallery/categories" \
-H "Authorization: Bearer be_your_api_key"
const response = await fetch(
"https://api.arsel.sa/v1/templates/gallery/categories",
{ headers: { Authorization: "Bearer be_your_api_key" } },
);
const { types, industries } = await response.json();
const newsletterId = types.find((t) => t.name === "Newsletter").id;
const ecommerceId = industries.find((i) => i.name === "E-commerce").id;
// Use these as filters
const filtered = await fetch(
`https://api.arsel.sa/v1/templates/gallery?template_types=${newsletterId}&template_industries=${ecommerceId}`,
{ headers: { Authorization: "Bearer be_your_api_key" } },
);
import requests
response = requests.get(
"https://api.arsel.sa/v1/templates/gallery/categories",
headers={"Authorization": "Bearer be_your_api_key"},
)
categories = response.json()
newsletter_id = next(t["id"] for t in categories["types"] if t["name"] == "Newsletter")
ecommerce_id = next(i["id"] for i in categories["industries"] if i["name"] == "E-commerce")
filtered = requests.get(
"https://api.arsel.sa/v1/templates/gallery",
headers={"Authorization": "Bearer be_your_api_key"},
params={"template_types": newsletter_id, "template_industries": ecommerce_id},
)
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer be_your_api_key");
var response = await client.GetAsync(
"https://api.arsel.sa/v1/templates/gallery/categories"
);
Console.WriteLine(await response.Content.ReadAsStringAsync());
<?php
$ch = curl_init("https://api.arsel.sa/v1/templates/gallery/categories");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer be_your_api_key"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
curl_close($ch);