Skip to main content

Banner Management

1 API call in this section.

List Banners​

Storefront & Commerce / Banner Management
GET/storefront/banners

Retrieves banners for the tenant's market with advanced filtering and pagination. Only accessible by tenant administrators for banner management.

  • Required: Valid Bearer token with tenant admin permissions

Search & Filter Features

  • Content Search: Find banners by title, description, or URL text

  • Position Filtering: Filter by specific banner positions

  • Status Filtering: Filter by active/inactive status

  • Combination Filters: Use multiple filters together for precise results

  • Client-Side Implementation: All filtering is performed on fetched data for optimal performance

Features

  • Admin-only access for banner management

  • Advanced search and filtering capabilities

  • Position-based filtering for layout management

  • Status-based filtering for workflow management

  • Content-based search for quick finding

  • Paginated results for large banner collections

  • Complete banner details with positioning info

  • Optimized performance with client-side filtering

Performance Optimization

  • Client-Side Filtering: All search and filtering operations are performed after fetching the data

  • Benefits: Faster initial query execution and reduced database complexity

  • Implementation: JavaScript-based filtering on the frontend for optimal user experience

Response Data

  • Complete banner details with content

  • Position and layout information

  • Active status and sort order

  • Title, description, and URL data

  • Creation and modification timestamps

  • Pagination metadata

Use Cases

  • Banner management dashboard

  • Layout and positioning workflows

  • Content moderation and review

  • Banner performance analysis

  • Bulk banner operations

  • Position-specific management

  • Campaign banner organization

Query parameters

ParameterTypeDescription
pageOptionalstring

Page number for pagination (default: 1)

Example: 1

limitOptionalstring

Items per page (default: 20, max: 100)

Example: 20

searchOptionalstring

Search banners by title, description, or URL content

Example: sale

is_activeOptionalstring

Filter by active status (true/false)

Example: true

positionOptionalstring

Filter by banner position (header, footer, sidebar, etc.)

Example: header

Headers

ParameterTypeDescription
AuthorizationRequiredstring

JWT token for tenant admin users (required)

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/storefront/banners?page=1&limit=20&search=sale&is_active=true&position=header" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "banners": [5      {6        "id": "banner-uuid-1",7        "url": "https://example.com/summer-sale-banner.jpg",8        "title": {9          "en": "Summer Sale",10          "ar": "تخفيضات الصيف",11          "ku": "فرۆشتنی هاوین"12        },13        "description": {14          "en": "Get up to 50% off on all summer items",15          "ar": "احصل على خصم يصل إلى 50% على جميع العناصر الصيفية",16          "ku": "تا 50% داشکاندن لەسەر هەموو بابەتەکانی هاوین"17        },18        "link_url": "/categories/summer-collection",19        "position": "header",20        "is_active": true,21        "sort_order": 1,22        "created_at": "2024-05-15T10:00:00Z",23        "updated_at": "2024-05-15T10:00:00Z"24      }25    ],26    "pagination": {27      "page": 1,28      "limit": 20,29      "total": 1,30      "totalPages": 131    }32  }33}