/scheduleCreate 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 this schedule, the user can also define the mode of delivery. Options are a Web-Hook or through a queueid.
Parameter Details:
-
scheduleName: The name under which the schedule will be created.
-
shopId: A unique ID generated while creating the shop.
-
year:
"*"- No specification."2025"- One year only."2025, 2025"- Runs for two years.
-
month:
"*"- Runs all 12 months in a year."1"- January."2"- February."3"- March."4"- April."5"- May."6"- June."7"- July."8"- August."9"- September."10"- October."11"- November."12"- December."1,3"- January & March.
-
dow:
"*"- All days in a week."1"- Monday."2"- Tuesday."3"- Wednesday."4"- Thursday."5"- Friday."6"- Saturday."7"- Sunday."1,3,5"- Runs every Monday, Wednesday, and Friday.
-
day:
"*"- All days in a month."1-31"- Any day index in a calendar month. Can be passed as an expression like"1,3,5".
-
hour:
"*"- All hours in the day."0-23"- Any hour index in a day. Can be passed as an expression like"1,3,5". If the value is"*", it is considered undefined and can be run at 10:00 AM.
-
minute:
"0-59"- Any minute index in an hour. Can be passed as an expression like"1,3,5". If the value is"*", it is considered undefined and can be run at the defined hour.
-
fetchType:
- The location/server space where the user would want their results to be stored.
- Options:
1-s3.2-endpoint.s3: Email containing the path will be sent to the user once data is executed.endpoint: User to specify a location of their preference.
-
shopType:
- The type of shop.
- Options:
1-eventsimpact.2-eventsinfo.3-hoteldemand.
-
startDate: This parameter determines when the schedule starts.
-
endDate: This parameter determines when the schedule ends. If left undefined, the schedule runs indefinitely.
Mandatory Fields:
- scheduleName
- shopId
- shopType
- fetchType
- year
- month
- dow
- day
- hour
- minute
- startDate
- endDate
/scheduleParameter Details
| Name | In | Type | Required | Description |
|---|---|---|---|---|
body | body | object | Required | none |
» scheduleName | body | string | Optional | Name of the schedule. |
» shopId | body | integer | Optional | Unique ID generated when creating the shop. |
» shopType | body | integer | Optional | Type of shop. |
» fetchType | body | integer | Optional | Where results are stored. |
» year | body | string(date) | Optional | Year(s) the schedule runs. |
» month | body | string | Optional | Month(s) the schedule runs. |
» dow | body | string | Optional | Days of the week the schedule runs. |
» day | body | string | Optional | Days of the month the schedule runs. |
» hour | body | string | Optional | Hours the schedule runs. |
» minute | body | string | Optional | Minutes the schedule runs. |
» startDate | body | string(date) | Optional | Start date of the schedule (UTC format). |
» endDate | body | string(date) | Optional | End date of the schedule. If undefined, runs indefinitely. |
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Created | |
| 400 | Bad Request | Bad Request | None |
| 401 | Unauthorized | Unauthorized | None |
| 429 | Too Many Requests | Too Many Requests | None |
| 500 | Internal Server Error | Internal Server Error | None |
Example Request
# You can also use wget
curl -X POST https://api.events.example.com/api/v1/schedule \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
Body parameter
{
"scheduleName": "",
"shopId": 0,
"shopType": 0,
"fetchType": 0,
"year": "*",
"month": "*",
"dow": "*",
"day": "*",
"hour": "*",
"minute": "*",
"startDate": "2019-08-24",
"endDate": "2019-08-24"
}
Example responses
{
"message": "Schedule created successfully.",
"scheduleId": 47
}
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.