Sections
Function-calling namespace: sections
- Base URL:
https://api.aivida.in - Engine endpoint:
POST /api - Auth: Stack token middleware enabled in
optionalmode. - Send token in header:
x-stack-access-token: <access_token>(orAuthorization: Bearer <access_token>). - In
optionalmode: no token is allowed; invalid token is rejected with401.
addProducts
Source: backend/endpoints/sections/add_products
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
sectionId | string | Yes | - |
subCategoryId | string | No | - |
productIds | array<string> | Yes | - |
displayOrder | array<integer> | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "sections",
"apiName": "addProducts",
"data": {
"sectionId": "section_123",
"productIds": [
"value"
]
}
}'Example Response
{ "status": "ok", "data": {} }create
Source: backend/endpoints/sections/create
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
title | string | Yes | - |
subTitle | string | No | - |
code | string | No | - |
categoryId | string | No | - |
homeCollectionId | string | No | - |
serviceIds | array<object> | No | - |
type | string | No | - |
parentId | string | No | - |
layoutType | string | No | - |
layoutConfig | array<object> | No | - |
moduleType | string | No | - |
subCategoryConfigs | array<object> | No | - |
labCategoryIds | array<object> | No | - |
labPackageIds | array<object> | No | - |
brandIds | array<object> | No | - |
productIds | array<object> | No | - |
categoryIds | array<object> | No | - |
organizationIds | array<object> | No | - |
displayOrder | integer | No | - |
isActive | boolean | No | - |
Nested Field Structures
serviceIds item
| Field | Type | Required | Constraints |
|---|---|---|---|
serviceId | string | No | - |
order | integer | No | - |
layoutConfig item
| Field | Type | Required | Constraints |
|---|---|---|---|
headline | string | No | - |
subText | string | No | - |
imageUrl | string | No | - |
ctaText | string | No | - |
priceLabel | string | No | - |
serviceIds | array<object> | No | - |
organizationIds | array<object> | No | - |
subCategoryConfigs item
| Field | Type | Required | Constraints |
|---|---|---|---|
subCategoryId | string | No | - |
order | integer | No | - |
categoryId | string | No | - |
name | string | No | - |
slug | string | No | - |
imageUrl | string | No | - |
isActive | boolean | No | - |
products | array<object> | No | - |
labCategoryIds item
| Field | Type | Required | Constraints |
|---|---|---|---|
categoryId | string | No | - |
order | integer | No | - |
labPackageIds item
| Field | Type | Required | Constraints |
|---|---|---|---|
labPackageId | string | No | - |
order | integer | No | - |
brandIds item
| Field | Type | Required | Constraints |
|---|---|---|---|
brandId | string | No | - |
order | integer | No | - |
productIds item
| Field | Type | Required | Constraints |
|---|---|---|---|
productId | string | No | - |
order | integer | No | - |
categoryIds item
| Field | Type | Required | Constraints |
|---|---|---|---|
categoryId | string | No | - |
displayOrder | integer | No | - |
organizationIds item
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | No | - |
order | integer | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "sections",
"apiName": "create",
"data": {
"title": "value"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/sections/delete
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "sections",
"apiName": "delete",
"data": {
"id": "id_123"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/sections/get_by_id
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "sections",
"apiName": "getById",
"data": {
"id": "id_123"
}
}'Example Response
{ "status": "ok", "data": {} }list
Source: backend/endpoints/sections/list
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
categoryId | string | No | - |
homeCollectionId | string | No | - |
parentId | string | No | - |
type | string | No | - |
moduleType | string | No | - |
organizationTypeId | string | No | - |
organizationTypeName | string | No | - |
isActive | boolean | No | nullable |
search | string | No | - |
page | integer | No | - |
pageSize | integer | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "sections",
"apiName": "list",
"data": {
"categoryId": "category_123",
"homeCollectionId": "homecollection_123",
"parentId": "parent_123",
"type": "general",
"moduleType": "general",
"organizationTypeId": "organizationtype_123"
}
}'Example Response
{ "status": "ok", "data": {} }listActiveSalon
Source: backend/endpoints/sections/list_active_salon
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
categoryId | array<string> | No | - |
search | string | No | - |
minPrice | number | No | nullable |
maxPrice | number | No | nullable |
rating | number | No | nullable |
sortBy | string | No | - |
page | integer | No | - |
pageSize | integer | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "sections",
"apiName": "listActiveSalon",
"data": {
"categoryId": "category_123",
"search": "value",
"minPrice": 1,
"maxPrice": 1,
"rating": 1,
"sortBy": "value"
}
}'Example Response
{ "status": "ok", "data": {} }listAllLab
Source: backend/endpoints/sections/list_all_lab
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
isActive | boolean | No | nullable |
search | string | No | - |
page | integer | No | - |
pageSize | integer | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "sections",
"apiName": "listAllLab",
"data": {
"isActive": true,
"search": "value",
"page": 1,
"pageSize": 1
}
}'Example Response
{ "status": "ok", "data": {} }listAllSalon
Source: backend/endpoints/sections/list_all_salon
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
items | array<object> | No | - |
Nested Field Structures
items item
| Field | Type | Required | Constraints |
|---|---|---|---|
sectionId | string | No | - |
title | string | No | - |
subTitle | string | No | - |
slug | string | No | - |
code | string | No | - |
categoryId | string | No | - |
homeCollectionId | string | No | - |
serviceIds | array<object> | No | - |
type | string | No | - |
parentId | string | No | - |
layoutType | string | No | - |
layoutConfig | array<object> | No | - |
moduleType | string | No | - |
subCategoryConfigs | array<object> | No | - |
labCategoryIds | array<object> | No | - |
labPackageIds | array<object> | No | - |
brandIds | array<object> | No | - |
productIds | array<object> | No | - |
categoryIds | array<object> | No | - |
organizationIds | array<object> | No | - |
displayOrder | integer | No | - |
subCategories | array<object> | No | - |
isActive | boolean | No | - |
createdAt | integer | No | unix-ms timestamp |
updatedAt | integer | No | unix-ms timestamp |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "sections",
"apiName": "listAllSalon",
"data": {
"items": [
{
"sectionId": "section_123",
"title": "value",
"subTitle": "value",
"slug": "value",
"code": "value",
"categoryId": "category_123",
"homeCollectionId": "homecollection_123",
"serviceIds": [
{
"serviceId": "service_123",
"order": 1
}
],
"type": "general",
"parentId": "parent_123",
"layoutType": "general",
"layoutConfig": [
{
"headline": "value",
"subText": "value",
"imageUrl": "value",
"ctaText": "value",
"serviceIds": [
{
"serviceId": "service_123",
"order": 1,
"name": "value",
"code": "value",
"description": "value",
"imageUrl": [
"value"
],
"price": 1,
"mrp": 1,
"currency": "INR",
"platformCategoryId": "platformcategory_123",
"averageRating": 1,
"totalReviews": 1,
"isActive": true
}
],
"organizationIds": [
{
"organizationId": "org_123",
"order": 1
}
]
}
],
"moduleType": "general",
"subCategoryConfigs": [
{
"subCategoryId": "subcategory_123",
"order": 1,
"categoryId": "category_123",
"name": "value",
"slug": "value",
"imageUrl": "value",
"isActive": true,
"products": [
{
"productId": "product_123",
"order": 1,
"name": "value",
"slug": "value",
"imageUrl": "value",
"mrp": 1,
"basePrice": 1,
"sellingPrice": 1,
"discountPercentage": 1,
"stock": 1,
"isActive": true
}
]
}
],
"labCategoryIds": [
{
"categoryId": "category_123",
"order": 1
}
],
"labPackageIds": [
{
"labPackageId": "labpackage_123",
"order": 1
}
],
"brandIds": [
{
"brandId": "brand_123",
"order": 1
}
],
"productIds": [
{
"productId": "product_123",
"order": 1
}
],
"categoryIds": [
{
"categoryId": "category_123",
"displayOrder": 1,
"name": "value",
"slug": "value",
"code": "value",
"description": "value",
"imageUrl": "value",
"isActive": true
}
],
"organizationIds": [
{
"organizationId": "org_123",
"order": 1
}
],
"displayOrder": 1,
"subCategories": [
{
"subCategoryId": "subcategory_123",
"title": "value",
"displayOrder": 1,
"products": [
{
"productId": "product_123",
"order": 1,
"name": "value",
"slug": "value",
"imageUrl": "value",
"mrp": 1,
"basePrice": 1,
"sellingPrice": 1,
"discountPercentage": 1,
"stock": 1,
"isActive": true
}
]
}
],
"isActive": true,
"createdAt": 1710201600000,
"updatedAt": 1710201600000
}
]
}
}'Example Response
{ "status": "ok", "data": {} }listSupplementProductSections
Source: backend/endpoints/sections/list_supplement_product_sections
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
homeCollectionId | string | No | - |
organizationTypeId | string | No | - |
organizationTypeName | string | No | - |
isActive | boolean | No | nullable |
search | string | No | - |
page | integer | No | - |
pageSize | integer | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "sections",
"apiName": "listSupplementProductSections",
"data": {
"homeCollectionId": "homecollection_123",
"organizationTypeId": "organizationtype_123",
"organizationTypeName": "value",
"isActive": true,
"search": "value",
"page": 1
}
}'Example Response
{ "status": "ok", "data": {} }removeProducts
Source: backend/endpoints/sections/remove_products
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
sectionId | string | Yes | - |
productIds | array<string> | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "sections",
"apiName": "removeProducts",
"data": {
"sectionId": "section_123",
"productIds": [
"value"
]
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/sections/update
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
sectionId | string | Yes | - |
title | string | No | - |
subTitle | string | No | - |
code | string | No | - |
categoryId | string | No | - |
homeCollectionId | string | No | - |
serviceIds | array<object> | No | - |
type | string | No | - |
parentId | string | No | - |
layoutType | string | No | - |
layoutConfig | array<object> | No | - |
moduleType | string | No | nullable |
subCategoryConfigs | array<object> | No | - |
labCategoryIds | array<object> | No | - |
labPackageIds | array<object> | No | - |
brandIds | array<object> | No | - |
productIds | array<object> | No | - |
categoryIds | array<object> | No | - |
organizationIds | array<object> | No | - |
displayOrder | integer | No | nullable |
isActive | boolean | No | nullable |
Nested Field Structures
serviceIds item
| Field | Type | Required | Constraints |
|---|---|---|---|
serviceId | string | No | - |
order | integer | No | - |
layoutConfig item
| Field | Type | Required | Constraints |
|---|---|---|---|
headline | string | No | - |
subText | string | No | - |
imageUrl | string | No | - |
ctaText | string | No | - |
priceLabel | string | No | - |
serviceIds | array<object> | No | - |
organizationIds | array<object> | No | - |
subCategoryConfigs item
| Field | Type | Required | Constraints |
|---|---|---|---|
subCategoryId | string | No | - |
order | integer | No | - |
categoryId | string | No | - |
name | string | No | - |
slug | string | No | - |
imageUrl | string | No | - |
isActive | boolean | No | - |
products | array<object> | No | - |
labCategoryIds item
| Field | Type | Required | Constraints |
|---|---|---|---|
categoryId | string | No | - |
order | integer | No | - |
labPackageIds item
| Field | Type | Required | Constraints |
|---|---|---|---|
labPackageId | string | No | - |
order | integer | No | - |
brandIds item
| Field | Type | Required | Constraints |
|---|---|---|---|
brandId | string | No | - |
order | integer | No | - |
productIds item
| Field | Type | Required | Constraints |
|---|---|---|---|
productId | string | No | - |
order | integer | No | - |
categoryIds item
| Field | Type | Required | Constraints |
|---|---|---|---|
categoryId | string | No | - |
displayOrder | integer | No | - |
organizationIds item
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | No | - |
order | integer | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "sections",
"apiName": "update",
"data": {
"sectionId": "section_123"
}
}'Example Response
{ "status": "ok", "data": {} }