Skip to content

Circulars API

The Circulars API provides access to digital flyers and promotional circulars with complete layout data for rendering.

Endpoints

MethodEndpointDescription
GET/api/v1/public/circularsList available circulars
GET/api/v1/public/circulars/{id}Get circular with full layout

List Circulars

Retrieve a paginated list of ready and in-use circulars.

http
GET /api/v1/public/circulars

Query Parameters

ParameterTypeDefaultDescription
per_pageinteger20Number of items per page (1-50)
pageinteger1Page number
formatstring-Filter by paper format

Format Values

FormatDescription
tabloidTabloid size (11" x 17")
letterLetter size (8.5" x 11")
customCustom dimensions

Visibility Rules

Only circulars with the following statuses are returned:

  • ready - Circular is complete and ready for use
  • in_use - Circular is currently active

Draft and archived circulars are not accessible via the public API.

Example Request

javascript
const response = await fetch(
  'https://cdn.engagehq.retailsuccessplatform.com/api/v1/public/circulars?format=tabloid&per_page=5',
  {
    headers: {
      'Authorization': `Bearer ${token}`,
    },
  }
);

Response

json
{
  "success": true,
  "message": "Circulars retrieved",
  "data": [
    {
      "id": "cir_00000a1B2c3D4e5",
      "name": "Weekly Ad - June 1-7",
      "description": "This week's best deals on groceries and household items",
      "status": "in_use",
      "total_pages": 8,
      "format": "tabloid",
      "dimensions": {
        "width": 800,
        "height": 1000
      },
      "thumbnail_url": "https://cdn.example.com/circulars/weekly-jun-1/thumb.jpg",
      "last_used_at": "2024-06-01T08:00:00+00:00",
      "created_at": "2024-05-25T14:30:00+00:00"
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 2,
    "per_page": 5,
    "total": 8
  }
}

Response Fields (List)

FieldTypeDescription
idstringUnique circular identifier (hashkey)
namestringCircular name
descriptionstringBrief description
statusstringCurrent status (ready or in_use)
total_pagesintegerNumber of pages
formatstringPaper format
dimensionsobjectSize in pixels
dimensions.widthintegerWidth in pixels
dimensions.heightintegerHeight in pixels
thumbnail_urlstringPreview thumbnail URL
last_used_atstringISO 8601 timestamp of last use
created_atstringISO 8601 creation timestamp

Sort Order

Results are sorted by:

  1. Most recently used (last_used_at descending)
  2. Most recently created (created_at descending)

Caching

CacheTTL
Browser (max-age)60 seconds
CDN24 hours (invalidated on publish)
Stale-while-revalidate300 seconds

Get Circular

Retrieve a single circular with full layout data for rendering.

http
GET /api/v1/public/circulars/{id}

Path Parameters

ParameterTypeDescription
idstringThe circular hashkey (e.g., cir_00000a1B2c3D4e5)

Example Request

javascript
const response = await fetch(
  'https://cdn.engagehq.retailsuccessplatform.com/api/v1/public/circulars/cir_00000a1B2c3D4e5',
  {
    headers: {
      'Authorization': `Bearer ${token}`,
    },
  }
);

Response

json
{
  "success": true,
  "message": "Circular retrieved",
  "data": {
    "id": "cir_00000a1B2c3D4e5",
    "name": "Weekly Ad - June 1-7",
    "description": "This week's best deals on groceries and household items",
    "status": "in_use",
    "total_pages": 8,
    "format": "tabloid",
    "dimensions": {
      "width": 800,
      "height": 1000
    },
    "thumbnail_url": "https://cdn.example.com/circulars/weekly-jun-1/thumb.jpg",
    "last_used_at": "2024-06-01T08:00:00+00:00",
    "created_at": "2024-05-25T14:30:00+00:00",
    "layout_data": {
      "pages": [
        {
          "page_number": 1,
          "regions": [
            {
              "id": "region_1",
              "position": { "x": 0, "y": 0 },
              "dimensions": { "width": 400, "height": 300 },
              "content": {
                "type": "image",
                "url": "https://cdn.example.com/images/hero.jpg",
                "alt": "Summer savings"
              }
            },
            {
              "id": "region_2",
              "position": { "x": 0, "y": 300 },
              "dimensions": { "width": 200, "height": 200 },
              "content": {
                "type": "product",
                "product_id": "prd_00000x1Y2z3A4b5",
                "price": "$2.99",
                "sale_price": "$1.99"
              }
            }
          ]
        }
      ],
      "fonts": ["Arial", "Helvetica", "Open Sans"],
      "colors": {
        "primary": "#FF0000",
        "secondary": "#0066CC",
        "background": "#FFFFFF"
      }
    },
    "metadata": {
      "created_by": "jane.doe@example.com",
      "version": 3,
      "last_modified": "2024-05-30T16:45:00+00:00",
      "effective_date": "2024-06-01",
      "end_date": "2024-06-07"
    }
  }
}

Additional Response Fields (Detail)

The detail response includes all list fields plus:

FieldTypeDescription
layout_dataobjectComplete layout for rendering
layout_data.pagesarrayArray of page objects
layout_data.fontsarrayFonts used in the circular
layout_data.colorsobjectColor palette
metadataobjectExtended metadata

Layout Data Structure

Page Object

FieldTypeDescription
page_numberintegerPage number (1-indexed)
regionsarrayArray of region objects

Region Object

FieldTypeDescription
idstringUnique region identifier
positionobjectX/Y coordinates
dimensionsobjectWidth/height in pixels
contentobjectRegion content (varies by type)

Rendering Tips

Scaling

Use the dimensions to calculate proper scaling ratios. The layout is designed for the specified width/height in pixels.

Fonts

Ensure fonts listed in layout_data.fonts are loaded before rendering to prevent layout shifts.

Caching

CacheTTL
Browser (max-age)300 seconds
CDN24 hours (invalidated on publish)
Stale-while-revalidate300 seconds

Error Responses

400 Bad Request

json
{
  "success": false,
  "message": "Organization context required",
  "errors": null
}

404 Not Found

json
{
  "success": false,
  "message": "Circular not found",
  "errors": null
}

The circular either:

  • Doesn't exist
  • Is not in ready or in_use status
  • Belongs to a different organization

Changelog
DateChange
2026-02-23Updated for CloudFront CDN delivery.
2026-01-28Expanded documentation.
2026-01-15Initial publication.

EngageHQ Public Content Delivery API