POST/schedule

Create 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:

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

Optional Fields:

  • dayOfWeek
POST/schedule

Parameter Details

NameInTypeRequiredDescription
bodybodyobjectRequirednone
» scheduleNamebodystringRequirednone
» shopIdbodynumberRequirednone
» yearbodystringRequirednone
» monthbodystringRequirednone
» dayOfWeekbodystringOptionalnone
» daybodystringRequirednone
» hourbodystringRequirednone
» minutebodystringRequirednone
» startDatebodystring(date)Requirednone
» endDatebodystring(date)Optionalnone

Responses

StatusMeaningDescriptionSchema
201CreatedSchedule 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.