why some days don't have 'times'?

I made this query to get time slot:
item/3?start_date=20160818&end_date=20160824

the result:

rate.dates=

"20160818": {
    "status": "A",
    "price": {
        "qty": "30.00"
    },
    "dow": "4",
    "stock": {
        "T": 1,
        "B": 0,
        "A": 1
    },
    "times": {
        "09:00": {
            "A": 1
        },
        "10:00": {
            "A": 1
        },
        "11:00": {
            "A": 1
        },
        "12:00": {
            "A": 1
        },
        "13:00": {
            "A": 1
        },
        "14:00": {
            "A": 1
        },
        "15:00": {
            "A": 1
        },
        "16:00": {
            "A": 1
        }
    },
    "rates": [],
    "discount": [],
    "sub_total": 450,
    "hours": {
        "qty": 15
    }
},
"20160819": {
    "status": "A",
    "price": {
        "qty": "30.00"
    },
    "dow": "5",
    "stock": {
        "T": 1,
        "B": 0,
        "A": 1
    },
    "rates": [],
    "discount": [],
    "sub_total": 720,
    "hours": {
        "qty": 24
    }
},
"20160820": {
    "status": "A",
    "price": {
        "qty": "30.00"
    },
    "dow": "6",
    "stock": {
        "T": 1,
        "B": 0,
        "A": 1
    },
    "rates": [],
    "discount": [],
    "sub_total": 720,
    "hours": {
        "qty": 24
    }
},
......
"20160824": {
    "status": "A",
    "price": {
        "qty": "30.00"
    },
    "dow": "3",
    "stock": {
        "T": 1,
        "B": 0,
        "A": 1
    },
    "times": {
        "09:00": {
            "A": 1
        },
        "10:00": {
            "A": 1
        },
        "11:00": {
            "A": 1
        },
        "12:00": {
            "A": 1
        },
        "13:00": {
            "A": 1
        },
        "14:00": {
            "A": 1
        },
        "15:00": {
            "A": 1
        },
        "16:00": {
            "A": 1
        }
    },
    "rates": [],
    "discount": [],
    "sub_total": 300,
    "hours": {
        "qty": 10
    }
}

why only the first day "20160818" and the last day "20160824" have time slot, others don't?

if I query this: item/3?start_date=20160818&end_date=20160820

also only the first day had the last day have time slot.

It seems the api only return first and last day's time slot.

If I want to get several day's time slot(every day is needed), should get them day by day?




Comments

  • MitchMitch Checkfront Team
    Hi ljnet,

    Thanks for reaching out on the Checkfront forums! Timeslot items can only be booked for a single day, so the start and end date API query parameters are not going to work as you've described. You'll need to query the days individually to retrieve the timeslots associated with each day.

    Mitch
    Checkfront support team
  • Thanks a a lot Mitch!
Sign In or Register to comment.