Developer Resourcesconfig
Config API
Shipping fee and social links configuration endpoints
Config API
Social Links
Social links are stored as a singleton config row and exposed through:
- admin write/read endpoint for backoffice management
- public read endpoint for website/mobile footer/header links
Endpoints
1. Admin: Get Social Links
GET /api/admin/config/social-links
- Auth: Bearer token
- Guards:
JwtAuthGuard,RoleGuard - Permission:
Settings_READ
Response payload:
{
"message": "Social links fetched successfully",
"data": {
"facebookUrl": "https://www.facebook.com/nepathangka",
"instagramUrl": "https://www.instagram.com/nepathangka",
"whatsappUrl": "https://wa.me/9779800000000",
"updatedAt": "2026-04-26T12:00:00.000Z"
}
}2. Admin: Create Social Links
POST /api/admin/config/social-links
- Auth: Bearer token
- Guards:
JwtAuthGuard,RoleGuard - Permission:
Settings_UPDATE
Request body:
{
"facebookUrl": "https://www.facebook.com/nepathangka",
"instagramUrl": "https://www.instagram.com/nepathangka",
"whatsappUrl": "https://wa.me/9779800000000"
}Notes:
- endpoint creates singleton row with
id = 1 - if row already exists, returns conflict (use PATCH endpoint to edit)
3. Admin: Update Social Links
PATCH /api/admin/config/social-links
- Auth: Bearer token
- Guards:
JwtAuthGuard,RoleGuard - Permission:
Settings_UPDATE
Request body:
{
"instagramUrl": "https://www.instagram.com/nepathangka"
}Notes:
- partial updates allowed; only provided fields are changed
- if row does not exist yet, returns not found (create first using POST)
4. Public: Get Social Links
GET /api/config/social-links
- Auth: public
Response behavior:
- returns configured values if present
- returns
nullvalues when not configured yet
5. Mobile-Composed Public Route
GET /api/mobile/config/social-links
This is the same public customer controller mounted under /mobile via MobileModule composition routing.
Schema
Table: social_links
id serial primary keywith checkid = 1(singleton)facebook_url varchar(512) nullableinstagram_url varchar(512) nullablewhatsapp_url varchar(512) nullablecreated_at timestamptz not null default now()updated_at timestamptz not null default now()