EndpointsLab Weekly Schedule

Lab Weekly Schedule

Function-calling namespace: labWeeklySchedule

  • 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.

create

Source: backend/endpoints/lab-weekly-schedule/create

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
dayOfWeekintegerNomin: 0; max: 6
startTimestringYesformat: HH:mm
endTimestringYesformat: HH:mm
slotDurationMinutesintegerNomin: 1
isActivebooleanNonullable
capacityintegerNomin: 0
bookedCountintegerNomin: 0

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": "labWeeklySchedule",
  "apiName": "create",
  "data": {
    "organizationId": "org_123",
    "startTime": "10:30",
    "endTime": "10:30"
  }
}'

Example Response

{ "status": "ok", "data": {} }

delete

Source: backend/endpoints/lab-weekly-schedule/delete

Input Fields

FieldTypeRequiredConstraints
idstringYes-
organizationIdstringYes-

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": "labWeeklySchedule",
  "apiName": "delete",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

getById

Source: backend/endpoints/lab-weekly-schedule/get-by-id

Input Fields

FieldTypeRequiredConstraints
idstringYes-
organizationIdstringYes-

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": "labWeeklySchedule",
  "apiName": "getById",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

listByOrganization

Source: backend/endpoints/lab-weekly-schedule/list-by-organization

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
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": "labWeeklySchedule",
  "apiName": "listByOrganization",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

update

Source: backend/endpoints/lab-weekly-schedule/update

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
detailsarray<object>Yesmin: 1; dive

Nested Field Structures

details item

FieldTypeRequiredConstraints
dayOfWeekintegerNomin: 0; max: 6
startTimestringYesformat: HH:mm
endTimestringYesformat: HH:mm
slotDurationMinutesintegerNomin: 1
isActivebooleanNonullable
capacityintegerNomin: 0
bookedCountintegerNomin: 0

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": "labWeeklySchedule",
  "apiName": "update",
  "data": {
    "organizationId": "org_123",
    "details": [
      {
        "dayOfWeek": 1,
        "startTime": "10:30",
        "endTime": "10:30",
        "slotDurationMinutes": 1,
        "isActive": true,
        "capacity": 1,
        "bookedCount": 1
      }
    ]
  }
}'

Example Response

{ "status": "ok", "data": {} }

updateByOrganizationAndDay

Source: backend/endpoints/lab-weekly-schedule/update-by-organization-and-day

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
dayOfWeekintegerNomin: 0; max: 6
startTimestringNoformat: HH:mm; nullable
endTimestringNoformat: HH:mm; nullable
slotDurationMinutesintegerNomin: 1; nullable
isActivebooleanNonullable
capacityintegerNomin: 0; nullable
bookedCountintegerNomin: 0; nullable

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": "labWeeklySchedule",
  "apiName": "updateByOrganizationAndDay",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }