POST
/scheduleCreate Schedule
Create Schedule
Implementation Notes:
This endpoint allows you to create custom schedules for executing review shops at specified dates and times.
Parameters
- Year: Specifies the years for scheduling.
- "*": No specific year
- "2016": Only in 2016
- "2016, 2017": In 2016 and 2017
- Month: Specifies the months for scheduling.
- "*": All 12 months
- "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 and March
- Day of Week: Specifies the days of the week for scheduling.
- "*": All days
- "1": Monday
- "2": Tuesday
- "3": Wednesday
- "4": Thursday
- "5": Friday
- "6": Saturday
- "0": Sunday
- "1,3,5": Monday, Wednesday, and Friday
- Day: Specifies the days of the month for scheduling.
- "*": All days
- "1-31": Specific days or ranges within the month (e.g., "1,3,5")
- Hour: Specifies the hour of the day (0-23) when the review shop is triggered.
- "*": Any hour within the day
- Minute: Specifies the minute (0-59) within the hour when the review shop is triggered.
- Seconds: Specifies the second (0-59) within the minute when the review shop is triggered
- Status: Indicates whether the schedule is active or inactive.
- 1 - Active
- 0 - Inactive
- startdate: Specifies when the schedule should start.
- enddate: Specifies when the schedule should end. If left undefined, the schedule will run indefinitely.
Note: All schedules are queued every fifteen minutes. Therefore, jobs scheduled within the current fifteen minutes will run from the next hour.
Mandatory Fields:
- scheduleName
- shopId
- year
- month
- dow
- day
- hour
- minute
- seconds
- startDate
POST
/scheduleParameter Details
| Name | In | Type | Required | Description |
|---|---|---|---|---|
body | body | object | Optional | none |
» scheduleName | body | string | Optional | Enter the name of the schedule. |
» shopId | body | number | Optional | Unique code of the shopId which match from shops |
» year | body | string | Optional | The year component of the schedule. Use '*' to match any year. |
» month | body | string | Optional | The month component of the schedule. Use '*' to match any month. |
» dow | body | string | Optional | The day of the week component of the schedule. Use '*' to match any day of the week. |
» day | body | string | Optional | The day of the month component of the schedule. Use '*' to match any day of the month. |
» hour | body | string | Optional | The hour component of the schedule. Use '*' to match any hour of the day. |
» minute | body | string | Optional | The minute component of the schedule. Use '*' to match any minute of the hour. |
» seconds | body | string | Optional | The second component of the schedule. Use '*' to match any second of the minute. |
» startDate | body | string(date) | Optional | The start date of the schedule. |
» endDate | body | string(date) | Optional | The end date of the schedule. |
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Created | |
| 400 | Bad Request | Bad Request | None |
| 401 | Unauthorized | Authorization Failed | None |
| 404 | Not Found | Not found | 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 http://localhost:3000/schedule \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
Body parameter
{
"scheduleName": "X-Mas",
"shopId": 1234,
"year": "*",
"month": "*",
"dow": "*",
"day": "*",
"hour": "1",
"minute": "00",
"seconds": "00",
"startDate": "2019-08-24",
"endDate": "2019-08-24"
}
Example responses
201 Response
{
"message": "Schedule details inserted successfully!",
"scheduleId": 2233
}
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.