EndpointsSections

Sections

Function-calling namespace: sections

  • Base URL: https://api.aivida.in
  • Engine endpoint: POST /api
  • Auth: Stack token middleware enabled in optional mode.
  • Send token in header: x-stack-access-token: <access_token> (or Authorization: Bearer <access_token>).
  • In optional mode: no token is allowed; invalid token is rejected with 401.

addProducts

Source: backend/endpoints/sections/add_products

Input Fields

FieldTypeRequiredConstraints
sectionIdstringYes-
subCategoryIdstringNo-
productIdsarray<string>Yes-
displayOrderarray<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

FieldTypeRequiredConstraints
titlestringYes-
subTitlestringNo-
codestringNo-
categoryIdstringNo-
homeCollectionIdstringNo-
serviceIdsarray<object>No-
typestringNo-
parentIdstringNo-
layoutTypestringNo-
layoutConfigarray<object>No-
moduleTypestringNo-
subCategoryConfigsarray<object>No-
labCategoryIdsarray<object>No-
labPackageIdsarray<object>No-
brandIdsarray<object>No-
productIdsarray<object>No-
categoryIdsarray<object>No-
organizationIdsarray<object>No-
displayOrderintegerNo-
isActivebooleanNo-

Nested Field Structures

serviceIds item

FieldTypeRequiredConstraints
serviceIdstringNo-
orderintegerNo-

layoutConfig item

FieldTypeRequiredConstraints
headlinestringNo-
subTextstringNo-
imageUrlstringNo-
ctaTextstringNo-
priceLabelstringNo-
serviceIdsarray<object>No-
organizationIdsarray<object>No-

subCategoryConfigs item

FieldTypeRequiredConstraints
subCategoryIdstringNo-
orderintegerNo-
categoryIdstringNo-
namestringNo-
slugstringNo-
imageUrlstringNo-
isActivebooleanNo-
productsarray<object>No-

labCategoryIds item

FieldTypeRequiredConstraints
categoryIdstringNo-
orderintegerNo-

labPackageIds item

FieldTypeRequiredConstraints
labPackageIdstringNo-
orderintegerNo-

brandIds item

FieldTypeRequiredConstraints
brandIdstringNo-
orderintegerNo-

productIds item

FieldTypeRequiredConstraints
productIdstringNo-
orderintegerNo-

categoryIds item

FieldTypeRequiredConstraints
categoryIdstringNo-
displayOrderintegerNo-

organizationIds item

FieldTypeRequiredConstraints
organizationIdstringNo-
orderintegerNo-

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

FieldTypeRequiredConstraints
idstringYes-

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

FieldTypeRequiredConstraints
idstringYes-

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

FieldTypeRequiredConstraints
categoryIdstringNo-
homeCollectionIdstringNo-
parentIdstringNo-
typestringNo-
moduleTypestringNo-
organizationTypeIdstringNo-
organizationTypeNamestringNo-
isActivebooleanNonullable
searchstringNo-
pageintegerNo-
pageSizeintegerNo-

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

FieldTypeRequiredConstraints
categoryIdarray<string>No-
searchstringNo-
minPricenumberNonullable
maxPricenumberNonullable
ratingnumberNonullable
sortBystringNo-
pageintegerNo-
pageSizeintegerNo-

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

FieldTypeRequiredConstraints
isActivebooleanNonullable
searchstringNo-
pageintegerNo-
pageSizeintegerNo-

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

FieldTypeRequiredConstraints
itemsarray<object>No-

Nested Field Structures

items item

FieldTypeRequiredConstraints
sectionIdstringNo-
titlestringNo-
subTitlestringNo-
slugstringNo-
codestringNo-
categoryIdstringNo-
homeCollectionIdstringNo-
serviceIdsarray<object>No-
typestringNo-
parentIdstringNo-
layoutTypestringNo-
layoutConfigarray<object>No-
moduleTypestringNo-
subCategoryConfigsarray<object>No-
labCategoryIdsarray<object>No-
labPackageIdsarray<object>No-
brandIdsarray<object>No-
productIdsarray<object>No-
categoryIdsarray<object>No-
organizationIdsarray<object>No-
displayOrderintegerNo-
subCategoriesarray<object>No-
isActivebooleanNo-
createdAtintegerNounix-ms timestamp
updatedAtintegerNounix-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

FieldTypeRequiredConstraints
homeCollectionIdstringNo-
organizationTypeIdstringNo-
organizationTypeNamestringNo-
isActivebooleanNonullable
searchstringNo-
pageintegerNo-
pageSizeintegerNo-

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

FieldTypeRequiredConstraints
sectionIdstringYes-
productIdsarray<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

FieldTypeRequiredConstraints
sectionIdstringYes-
titlestringNo-
subTitlestringNo-
codestringNo-
categoryIdstringNo-
homeCollectionIdstringNo-
serviceIdsarray<object>No-
typestringNo-
parentIdstringNo-
layoutTypestringNo-
layoutConfigarray<object>No-
moduleTypestringNonullable
subCategoryConfigsarray<object>No-
labCategoryIdsarray<object>No-
labPackageIdsarray<object>No-
brandIdsarray<object>No-
productIdsarray<object>No-
categoryIdsarray<object>No-
organizationIdsarray<object>No-
displayOrderintegerNonullable
isActivebooleanNonullable

Nested Field Structures

serviceIds item

FieldTypeRequiredConstraints
serviceIdstringNo-
orderintegerNo-

layoutConfig item

FieldTypeRequiredConstraints
headlinestringNo-
subTextstringNo-
imageUrlstringNo-
ctaTextstringNo-
priceLabelstringNo-
serviceIdsarray<object>No-
organizationIdsarray<object>No-

subCategoryConfigs item

FieldTypeRequiredConstraints
subCategoryIdstringNo-
orderintegerNo-
categoryIdstringNo-
namestringNo-
slugstringNo-
imageUrlstringNo-
isActivebooleanNo-
productsarray<object>No-

labCategoryIds item

FieldTypeRequiredConstraints
categoryIdstringNo-
orderintegerNo-

labPackageIds item

FieldTypeRequiredConstraints
labPackageIdstringNo-
orderintegerNo-

brandIds item

FieldTypeRequiredConstraints
brandIdstringNo-
orderintegerNo-

productIds item

FieldTypeRequiredConstraints
productIdstringNo-
orderintegerNo-

categoryIds item

FieldTypeRequiredConstraints
categoryIdstringNo-
displayOrderintegerNo-

organizationIds item

FieldTypeRequiredConstraints
organizationIdstringNo-
orderintegerNo-

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": {} }