Skip to main content

List Aggregates

Retrieve a paginated list of all sub-tenants (aggregates) under your aggregator store.


Endpoint

GET /api/v3/aggregates

Query Parameters

ParameterTypeDefaultDescription
per_pageinteger100Items per page (1-100)
cursorstring-Cursor token from links.next or links.prev
includestring-Comma-separated list of extra fields: api_key

Response

Success Response (200 OK)

{
"data": [
{
"id": 42,
"slug": "my-bookstore",
"name": "My Bookstore",
"final_domain": "mybookstore.publica.la",
"lang": "en",
"timezone": "America/New_York",
"support_email": "[email protected]",
"primary_color": "#336699",
"secondary_color": "#FF6600",
"logo_url": "https://example.com/logo.png",
"icon_url": "https://example.com/icon.png",
"created_at": "2026-03-24T15:30:00+00:00"
},
{
"id": 43,
"slug": "another-store",
"name": "Another Store",
"final_domain": "another-store.publica.la",
"lang": "es",
"timezone": "America/Mexico_City",
"support_email": "[email protected]",
"primary_color": "#1A237E",
"secondary_color": "#FF6F00",
"logo_url": null,
"icon_url": null,
"created_at": "2026-03-20T10:00:00+00:00"
}
],
"links": {
"next": "https://yourstore.publica.la/api/v3/aggregates?cursor=eyJjcmVhdGVkX2F0...",
"prev": null
},
"meta": {
"has_more": true
}
}

Examples

Basic List

curl -X GET "https://yourstore.publica.la/api/v3/aggregates" \
-H "X-User-Token: your-api-token" \
-H "Accept: application/json"

With API Keys

curl -X GET "https://yourstore.publica.la/api/v3/aggregates?include=api_key" \
-H "X-User-Token: your-api-token" \
-H "Accept: application/json"

Pagination Flow

# First page
curl -X GET "https://yourstore.publica.la/api/v3/aggregates?per_page=50" \
-H "X-User-Token: your-api-token"

# Response includes:
# "links": { "next": "...?cursor=eyJjcmVhdGVkX2F0..." }

# Next page
curl -X GET "https://yourstore.publica.la/api/v3/aggregates?per_page=50&cursor=eyJjcmVhdGVkX2F0..." \
-H "X-User-Token: your-api-token"

Ordering

Results are ordered by creation date descending (newest first), with ID descending as a tie-breaker for deterministic pagination.


Isolation

The list only returns aggregates owned by your store. You cannot see aggregates owned by other aggregators.


Error Handling

Validation Errors (422)

{
"message": "The given data was invalid.",
"errors": {
"per_page": ["The per page must be between 1 and 100."]
}
}

Authentication Errors (401)

{
"message": "Unauthenticated."
}

Authorization Errors (403)

{
"message": "Tenant does not have aggregation capabilities."
}

See Also

X

Graph View