POST
/scheduleCreate Schedule
Create Schedule
Implementation Notes
This endpoint allows you to create custom schedules to retrieve rate data for shops on specific date and time.
Parameters:
scheduleName:Specifies the name of the schedule.shopId:Specifies the shop ID to be scheduled.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
dayOfWeek:Specifies the days of the week."*"- All days"0"- Sunday"1"- Monday"2"- Tuesday"3"- Wednesday"4"- Thursday"5"- Friday"6"- Saturday"1,3,5"- Monday, Wednesday, Friday
day:Specifies the days of the month."*"- All days"1-31"- Specific days or ranges (e.g.,"1,3,5")
hour:Specifies the hour of the day (0-23) when the shop is triggered."*"- Run hourly
minute:Specifies the minute (0-59) within the hour when the shop is triggered.startDate:Specifies when the schedule should start.endDate:Specifies when the schedule should end.
Note: All schedules are queued at the fifty-fifth minute of the previous hour. Shops scheduled within the current hour run the next day.
Mandatory Fields:
scheduleNameshopIdyearmonthdayhourminutestartDateendDate
Optional Fields:
dayOfWeek
POST
/scheduleParameter Details
| Name | In | Type | Required | Description |
|---|---|---|---|---|
body | body | object | Required | none |
» scheduleName | body | string | Required | none |
» shopId | body | number | Required | none |
» year | body | string | Required | none |
» month | body | string | Required | none |
» dayOfWeek | body | string | Optional | none |
» day | body | string | Required | none |
» hour | body | string | Required | none |
» minute | body | string | Required | none |
» startDate | body | string(date) | Required | none |
» endDate | body | string(date) | Optional | none |
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Schedule created successfully | |
| 400 | Bad Request | Bad Request | None |
| 401 | Unauthorized | Authentication Failed or Account validity Expired | 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 /schedule \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
Body parameter
{
"scheduleName": "Sample Schedule",
"shopId": 1,
"year": "*",
"month": "1,2,12",
"dayOfWeek": "*",
"day": "1,15",
"hour": "0,12",
"minute": "0",
"startDate": "2019-08-24",
"endDate": "2019-08-24"
}
Example responses
201 Response
{
"message": "Schedule Created Successfully",
"scheduleId": 123
}
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.