Skip to content

Customization

The customization module stores the visual appearance (icon, color, theme) for savings products: saving_goal, saving_circle, commodity_financing, charitable_cause. Customization records are created automatically by each product’s service (the POST endpoint is disabled); FE only accesses them through list, detail, update, and delete on the /customizations route.

PropertyValue
Base URL{HOST}/v1
AuthBearer JWT (header Authorization) or access_token cookie
Content-Typeapplication/json
Error envelope{ "message": string | string[], "statusCode": number, "error": string }
ValidationGlobal ValidationPipe · whitelist: true, forbidNonWhitelisted: true
Related modulessaving-goals, saving-circles, commodity-financing, charitable-cause
Document versionv1 · 2026-05-20
AudienceInternal FE devs (mobile + web)

Four active endpoints: list all customizations, get detail by UUID, update theme/icon/color, and delete. The POST /customizations endpoint exists in source but is commented-out — customization records are created as a side effect by the product modules (e.g. when creating a saving goal).

MethodPathAuthSummary
GET/v1/customizationsbearerList all customizations
GET/v1/customizations/:idbearerCustomization detail by UUID
PATCH/v1/customizations/:idbearerUpdate icon/color/theme
DELETE/v1/customizations/:idbearerSoft delete a customization

Retrieve all customizations. The service returns { customizations, total }.

bearer
{
"status": "success",
"statusCode": 200,
"message": "Customizations retrieved successfully",
"data": {
"customizations": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"reference_id": "660e8400-e29b-41d4-a716-446655440111",
"icon": "star",
"theme": "light",
"color": "#FF5733",
"reference_type": "saving_goal",
"created_by": "770e8400-e29b-41d4-a716-446655440222",
"updated_by": "770e8400-e29b-41d4-a716-446655440222",
"deleted_by": null,
"created_at": "2026-05-20T08:30:00.000Z",
"updated_at": "2026-05-20T08:30:00.000Z"
}
],
"total": 1
}
}
StatusWhen it occurs
401 UnauthorizedBearer/cookie is invalid

GET /v1/customizations/:id bearer

Section titled “GET /v1/customizations/:id ”

Detail of one customization. ID must be UUID v4.

bearer
ParamTypeNotes
idUUIDValidated via ParseUUIDPipe
{
"status": "success",
"statusCode": 200,
"message": "Customization retrieved successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"reference_id": "660e8400-e29b-41d4-a716-446655440111",
"icon": "star",
"theme": "light",
"color": "#FF5733",
"reference_type": "saving_goal",
"created_by": "770e8400-e29b-41d4-a716-446655440222",
"updated_by": "770e8400-e29b-41d4-a716-446655440222",
"deleted_by": null,
"created_at": "2026-05-20T08:30:00.000Z",
"updated_at": "2026-05-20T08:30:00.000Z"
}
}
StatusWhen it occurs
400 Bad Requestid is not a UUID
401 UnauthorizedBearer/cookie is invalid
404 Not FoundCustomization not found

PATCH /v1/customizations/:id bearer

Section titled “PATCH /v1/customizations/:id ”

Update a customization. The theme field is required (see DTO). Other fields are optional via PartialType(CreateCustomizationDto).

bearer
ParamTypeNotes
idUUIDValidated via ParseUUIDPipe
FieldTypeRequiredNotes
themeenum Themedark, light, system (entity default: light)
refrence_idstringoptionalNote: the DTO spelling is indeed refrence_id (without the second “e”). Mobile FE already consumes this name — leave it as-is.
iconstringoptionalIcon name or URL
colorstringoptionalHex code, max length 9 chars
{
"theme": "dark",
"color": "#1E1B4B"
}
{
"status": "success",
"statusCode": 200,
"message": "Customization updated successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"reference_id": "660e8400-e29b-41d4-a716-446655440111",
"icon": "star",
"theme": "dark",
"color": "#1E1B4B",
"reference_type": "saving_goal",
"created_by": "770e8400-e29b-41d4-a716-446655440222",
"updated_by": "770e8400-e29b-41d4-a716-446655440222",
"deleted_by": null,
"created_at": "2026-05-20T08:30:00.000Z",
"updated_at": "2026-05-20T09:00:00.000Z"
}
}
StatusWhen it occurs
400 Bad Requestid is not a UUID, theme invalid, or non-whitelisted field
401 UnauthorizedBearer/cookie is invalid
404 Not FoundCustomization not found

DELETE /v1/customizations/:id bearer

Section titled “DELETE /v1/customizations/:id ”

Soft delete a customization. The service calls softDeleteCustomization — the record remains but deleted_at/deleted_by are set.

bearer
ParamTypeNotes
idUUIDValidated via ParseUUIDPipe
{
"status": "success",
"statusCode": 200,
"message": "Customization deleted successfully"
}
StatusWhen it occurs
400 Bad Requestid is not a UUID
401 UnauthorizedBearer/cookie is invalid
404 Not FoundCustomization not found

  • dark
  • light — entity default
  • system
  • saving_goal
  • saving_circle
  • commodity_financing
  • charitable_cause
{
"message": "Validation failed (uuid is expected)",
"statusCode": 400,
"error": "Bad Request"
}
  • 400 body/param validation
  • 401 missing / expired token
  • 404 customization not found

The POST /customizations endpoint exists in source code but is commented-out. Records are created automatically by the product modules (saving-goals, saving-circles, etc.).