POST/schedule

Create Schedule

This endpoint allows you to create custom schedules to retrieve rate data for shops on specific date and time.
POST/schedule

Note

All schedules are queued at the fifty-fifth minute of the previous hour. Shops scheduled within the current hour run the next day.

Important Notes

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
    • "1,3" - January and March
  • dayOfWeek: Specifies the days of the week.
    • "*" - All days
    • "0" - Sunday
    • "1" - Monday
    • "1,3,5" - Monday, Wednesday, Friday
  • day: Specifies the days of the month.
    • "*" - All days
    • "1-31" - Specific days or ranges
  • 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.

Parameter Details

NameInTypeRequiredDescription
» scheduleNamebodystringRequiredSpecifies the name of the schedule.
» shopIdbodynumberRequiredSpecifies the shop ID to be scheduled.
» yearbodystringRequiredSpecifies the years for scheduling.
» monthbodystringRequiredSpecifies the months for scheduling.
» dayOfWeekbodystringOptionalSpecifies the days of the week.
» daybodystringRequiredSpecifies the days of the month.
» hourbodystringRequiredSpecifies the hour of the day (0-23) when the shop is triggered.
» minutebodystringRequiredSpecifies the minute (0-59) within the hour when the shop is triggered.
» startDatebodystring(date)RequiredSpecifies when the schedule should start.
» endDatebodystring(date)RequiredSpecifies when the schedule should end.

Responses

StatusMeaningDescriptionSchema
201OKSchedule created successfully
400Bad RequestBad RequestNone
401UnauthorizedAuthentication Failed or Account validity ExpiredNone
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": "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.