Skip to main content
Request

curl --location 'https://openapi.gs-robot.com/openapi/v3/schedules/plans/simple/create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{token}}' \
--data '{
"mapResourceList": [
{
"mapId": "140bbb83-fe48-4282-be25-c48252b9c660",
"mapResourceId": "327594d9-df72-4950-94b2-64e6d02abdfb",
"mapResourceType": "region"
}
],
"planExecuteType": 1,
"planRepeatType": 2,
"planRepeatWeekly": [
1,
3,
5
],
"planStartDate": "2026-08-29",
"planStartTime": "10:30",
"planStopTime": "11:30",
"robotSn": "TEST00-0000-000-B088",
"siteMode": 0,
"taskName": "Weekday cleaning schedule",
"workMode": {
"mode": "wash"
}
}'

Version requirement: This API is supported only on AIO software version 1.6 and later.

Call flow​

  1. Call /openapi/v3/maps/schedule-resources/list and obtain the robot's actual map resources and work modes from maps and workModes.
  2. Call this API to create the plan. On success, data contains the operation result returned by the schedule service; this API does not return planUuid directly.
  3. Call /openapi/v3/schedules/plans/pre-tasks/day/list for the scheduled date and obtain the planUuid needed for subsequent update, delete, or detail queries from data.preTasks[].planUuid.

Notes​

  • Mutation APIs use integer planExecuteType: 1 for a timed task and 2 for a quantitative task. Query APIs return TIMED_SCHEDULING_TASK and QUANTITATIVE_SCH_TASK, respectively.
  • planRepeatType=0 means one-time; planRepeatType=2 means weekly, in which case planRepeatWeekly is required and non-empty. Values 0 through 6 represent Sunday through Saturday.
  • Times use HH:mm in 24-hour format. The start date cannot be in the past; for the current date, the start time must also be later than the current time. A timed task requires a non-empty planStopTime. A quantitative task may omit it, and the service treats it as one minute after the start time. An explicit end time must be later than the start time; crossing midnight is not supported.
  • Do not send siteId when siteMode=0; siteId is required when siteMode=1.
  • Use maps[].robotMapUuid as mapId. Each mapResourceList item requires only mapId, mapResourceId, and mapResourceType; do not send a separate robotMapUuid.
  • All workMode fields must be based on the actual workModes response. If mode alone does not identify exactly one configuration, also send subType, type, or strength. Omitting strength uses the default strength.
Response

{
"code": 0,
"data": {},
"msg": "success"
}