Skip to main content

Update Aggregate

Modify the configuration of an existing sub-tenant (aggregate). All fields are optional; only include fields you want to change.


Endpoint

PUT /api/v3/aggregates/{id}

Path Parameters

ParameterTypeDescription
idstringAggregate's tenant ID

Request Body

All fields are optional. Only include fields you want to update. Omitted fields are left unchanged.

Core Fields

FieldTypeDescription
namestringStore name (max 255 characters)
final_domainstringStore domain; platform subdomain or custom domain (max 255 characters, must be unique)
langstringStore language (ISO 639-1 code)
timezonestringStore timezone (IANA format)
support_emailstringSupport and notifications email address (max 255 characters)

Branding Fields

FieldTypeDescription
primary_colorstringPrimary brand color (hex format, e.g., #336699)
secondary_colorstringSecondary brand color (hex format, e.g., #FF6600)
logo_urlstringURL to the store logo image (max 2048 characters)
icon_urlstringURL to the store icon/favicon (max 2048 characters)
Nullable Fields

primary_color, secondary_color, logo_url, and icon_url accept null to clear the value.


Request Examples

Update Store Name

curl -X PUT "https://yourstore.publica.la/api/v3/aggregates/42" \
-H "X-User-Token: your-api-token" \
-H "Content-Type: application/json" \
-d '{
"name": "My Updated Bookstore"
}'

Update Branding

curl -X PUT "https://yourstore.publica.la/api/v3/aggregates/42" \
-H "X-User-Token: your-api-token" \
-H "Content-Type: application/json" \
-d '{
"primary_color": "#1A237E",
"secondary_color": "#FF6F00",
"logo_url": "https://example.com/new-logo.png"
}'

Update Domain and Language

curl -X PUT "https://yourstore.publica.la/api/v3/aggregates/42" \
-H "X-User-Token: your-api-token" \
-H "Content-Type: application/json" \
-d '{
"final_domain": "new-bookstore-domain.publica.la",
"lang": "es",
"timezone": "America/Buenos_Aires"
}'

Update Support Email

curl -X PUT "https://yourstore.publica.la/api/v3/aggregates/42" \
-H "X-User-Token: your-api-token" \
-H "Content-Type: application/json" \
-d '{
"support_email": "[email protected]"
}'

Combined Update

curl -X PUT "https://yourstore.publica.la/api/v3/aggregates/42" \
-H "X-User-Token: your-api-token" \
-H "Content-Type: application/json" \
-d '{
"name": "Rebranded Bookstore",
"primary_color": "#006341",
"secondary_color": null,
"logo_url": "https://example.com/rebrand-logo.png",
"support_email": "[email protected]"
}'

Response

Success Response (200 OK)

{
"data": {
"id": 42,
"slug": "my-bookstore",
"name": "My Updated Bookstore",
"final_domain": "mybookstore.publica.la",
"lang": "en",
"timezone": "America/New_York",
"support_email": "[email protected]",
"primary_color": "#1A237E",
"secondary_color": "#FF6F00",
"logo_url": "https://example.com/new-logo.png",
"icon_url": null,
"created_at": "2026-03-24T15:30:00+00:00"
}
}

Error Handling

Not Found (404)

Returned when the aggregate does not exist or does not belong to your store:

{
"message": "Not found."
}

Validation Errors (422)

{
"message": "The given data was invalid.",
"errors": {
"final_domain": ["The final domain has already been taken."],
"primary_color": ["The primary color format is invalid."]
}
}

Authentication Errors (401)

{
"message": "Unauthenticated."
}

Authorization Errors (403)

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

Validation Rules

FieldRules
nameOptional, string, max 255 characters
final_domainOptional, string, max 255 characters, unique (excluding current), valid format
langOptional, valid language code
timezoneOptional, valid IANA timezone
support_emailOptional, valid email, max 255 characters
primary_colorOptional, nullable, hex color format (#RRGGBB)
secondary_colorOptional, nullable, hex color format (#RRGGBB)
logo_urlOptional, nullable, valid URL, max 2048 characters
icon_urlOptional, nullable, valid URL, max 2048 characters

See Also

X

Graph View