ForumCategory: OtherThe response of workdays API
akim asked 49 years ago

Hi, 
When I get the information of workdays by API, the response seems weird. I expect the date in the response should be the latest dates. But, that’s not true. You can see the following example, I have just requested the API today, but the date is 2018-11-19T09:00:00 etc. 

Start your code here
[
{
"id": 800233951,
"deleted": false,
"name": "スケジュール平日",
"description": "",
"isDefault": true,
"events": [
{
"start": {
"dateTime": "2018-11-19T09:00:00",
"timeZone": "Asia/Tokyo"
},
"end": {
"dateTime": "2018-11-19T18:00:00",
"timeZone": "Asia/Tokyo"
},
"recurrence": [
"RRULE:FREQ=WEEKLY"
]
},
{
"start": {
"dateTime": "2018-11-20T09:00:00",
"timeZone": "Asia/Tokyo"
},
"end": {
"dateTime": "2018-11-20T18:00:00",
"timeZone": "Asia/Tokyo"
},
"recurrence": [
"RRULE:FREQ=WEEKLY"
]
},
{
"start": {
"dateTime": "2018-11-21T09:00:00",
"timeZone": "Asia/Tokyo"
},
"end": {
"dateTime": "2018-11-21T18:00:00",
"timeZone": "Asia/Tokyo"
},
"recurrence": [
"RRULE:FREQ=WEEKLY"
]
},
{
"start": {
"dateTime": "2018-11-22T09:00:00",
"timeZone": "Asia/Tokyo"
},
"end": {
"dateTime": "2018-11-22T18:00:00",
"timeZone": "Asia/Tokyo"
},
"recurrence": [
"RRULE:FREQ=WEEKLY"
]
},
{
"start": {
"dateTime": "2018-11-23T09:00:00",
"timeZone": "Asia/Tokyo"
},
"end": {
"dateTime": "2018-11-23T18:00:00",
"timeZone": "Asia/Tokyo"
},
"recurrence": [
"RRULE:FREQ=WEEKLY"
]
}
]
},
{
"id": 800234251,
"deleted": false,
"name": "スケジュール24/7",
"description": "",
"isDefault": false,
"events": [
{
"start": {
"dateTime": "2018-11-19",
"timeZone": "Asia/Tokyo"
},
"end": {
"dateTime": "2018-11-20",
"timeZone": "Asia/Tokyo"
},
"recurrence": [
"RRULE:FREQ=WEEKLY"
]
},
{
"start": {
"dateTime": "2018-11-20",
"timeZone": "Asia/Tokyo"
},
"end": {
"dateTime": "2018-11-21",
"timeZone": "Asia/Tokyo"
},
"recurrence": [
"RRULE:FREQ=WEEKLY"
]
},
{
"start": {
"dateTime": "2018-11-21",
"timeZone": "Asia/Tokyo"
},
"end": {
"dateTime": "2018-11-22",
"timeZone": "Asia/Tokyo"
},
"recurrence": [
"RRULE:FREQ=WEEKLY"
]
},
{
"start": {
"dateTime": "2018-11-22",
"timeZone": "Asia/Tokyo"
},
"end": {
"dateTime": "2018-11-23",
"timeZone": "Asia/Tokyo"
},
"recurrence": [
"RRULE:FREQ=WEEKLY"
]
},
{
"start": {
"dateTime": "2018-11-23",
"timeZone": "Asia/Tokyo"
},
"end": {
"dateTime": "2018-11-24",
"timeZone": "Asia/Tokyo"
},
"recurrence": [
"RRULE:FREQ=WEEKLY"
]
},
{
"start": {
"dateTime": "2018-11-24",
"timeZone": "Asia/Tokyo"
},
"end": {
"dateTime": "2018-11-25",
"timeZone": "Asia/Tokyo"
},
"recurrence": [
"RRULE:FREQ=WEEKLY"
]
},
{
"start": {
"dateTime": "2018-11-18",
"timeZone": "Asia/Tokyo"
},
"end": {
"dateTime": "2018-11-19",
"timeZone": "Asia/Tokyo"
},
"recurrence": [
"RRULE:FREQ=WEEKLY"
]
}
]
}
]
1 Answers
Mark Manguno answered 6 months ago

Hi @akim,
This is the expected behavior of the workdays API. It will return the dates originally configured for each workdays profile.

akim replied 6 months ago

Hi @Mark Manguno Thanks. I got it. I found an API called “Shift Status API”. I think the use case should use this API. Thanks!!