POST/schedule

Create Schedule

Create schedule

Implementation Notes

This API call allows a user to create a timetable for running a specific shop at a predetermined date and time on a set schedule. While creating the schedule, the user can also define the mode of delivery — either via a Web-Hook or a queue ID.

Parameter Details:

  • scheduleName: The name under which the schedule will be created.
  • shopId: A unique ID generated when creating the shop.
  • year:
    • "*" – No specification.
    • "2025" – Single year.
    • "2025,2026" – Multiple years.
  • month:
    • "*" – All 12 months.
    • "1" – January
      "2" – February
      ...
      "12" – December
    • "1,3" – January & March.
  • dow (Day of the Week):
    • "*" – All days.
    • "0" – Sunday
      "1" – Monday
      "2" – Tuesday
      "3" – Wednesday
      "4" – Thursday
      "5" – Friday
      "6" – Saturday
    • "1,3,5" – Runs every Monday, Wednesday, and Friday.
  • day:
    • "*" – All days in the month.
    • "1-31" – Day of the month. Can be passed as an expression (e.g., "1,3,5").
  • hour:
    • "*" – Every hour.
    • "0-23" – Specific hours (e.g., "1,3,5").
  • minute:
    • "0-59" – A single minute value (e.g., "30").
  • startDate: Date when the schedule starts.
  • endDate: Date when the schedule ends. If undefined, the schedule runs indefinitely.

Mandatory Fields:

  • scheduleName
  • shopId
  • year
  • month
  • dow
  • day
  • hour
  • minute
  • startDate
  • endDate

Note:
Schedule times are in UTC by default (hh:mm format, 24-hour — e.g., 16:30).

POST/schedule

Parameter Details

NameInTypeRequiredDescription
bodybodyobjectRequirednone
» scheduleNamebodystringOptionalName of the schedule.
» shopIdbodyintegerOptionalUnique ID generated when creating the shop.
» yearbodystring(date)OptionalYear(s) the schedule runs.
» monthbodystringOptionalMonth(s) the schedule runs.
» dowbodystringOptionalDays of the week the schedule runs.
» daybodystringOptionalDays of the month the schedule runs.
» hourbodystringOptionalHours the schedule runs.
» minutebodystringOptionalMinutes the schedule runs.
» startDatebodystring(date)OptionalStart date of the schedule (UTC format).
» endDatebodystring(date)OptionalEnd date of the schedule. If undefined, runs indefinitely.

Responses

StatusMeaningDescriptionSchema
201CreatedCreated
400Bad RequestBad RequestNone
401UnauthorizedUnauthorizedNone
403ForbiddenForbidden - Access deniedNone
404Not FoundSchedule not foundNone
429Too Many RequestsToo Many RequestsNone
500Internal Server ErrorInternal Server ErrorNone

Example Request

# You can also use wget
curl -X POST /schedule \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "scheduleName": "My Schedule",
  "shopId": 0,
  "year": "*",
  "month": "*",
  "dow": "*",
  "day": "*",
  "hour": "*",
  "minute": "00",
  "startDate": "2019-08-24",
  "endDate": "2019-08-24"
}

Example responses

201 Response
{
  "message": "Schedule created successfully.",
  "scheduleId": 1
}

Need Support?

Our team is here to help you integrate and make the most of our APIs. Get in touch for technical support, custom solutions, or any questions.