Migrated from Redmine #1403 | Author: Anas Nab
Status: New | Priority: Immediate, there is BUG! | Created: 2025-04-07
Good day,
I’m using the API to retrieve all available start times for my services/events within a specific date range (from/to). My goal is to get this information in a single call to avoid hitting API limits when displaying calendar availability on my website.
I found the getCartesianStartTimeMatrix method, which seems ideal. However, when I call it without specifying an eventId (to get times for all events), the service_id field in the response consistently returns 0 for every provider. This makes it impossible to associate the returned timeslots with their corresponding service/event.
Example Request (all events):
{
“jsonrpc”: “2.0”,
“method”: “getCartesianStartTimeMatrix”,
“params”: { “from”: “2025-04-21”, “to”: “2025-04-21” },
“id”: 1
}
Use code with caution.
Json
Example Snippet of Response (all events):
{
“result”: [
// … other providers …
{
“provider_id”: 12,
“service_id”: 0, // ← Problem: This is always 0
“timeslots”: { “2025-04-21”: [“16:00:00”, “16:15:00”, …] }
},
// … other providers …
],
// …
}
Use code with caution.
Json
Conversely, if I include a specific eventId in the parameters, the service_id is returned correctly, but this only gives me data for one event at a time. Calling this repeatedly for each event is not feasible due to API rate limits.
Example Request (specific event):
{
“jsonrpc”: “2.0”,
“method”: “getCartesianStartTimeMatrix”,
“params”: { “from”: “2025-04-21”, “to”: “2025-04-21”, “eventId”: “68” },
“id”: 1
}
Use code with caution.
Json
Example Response (specific event):
{
“result”: [
{ “provider_id”: 27, “service_id”: 68, /* … timeslots … */ } // ← Correct service_id
],
// …
}
Use code with caution.
Json
I also reviewed getServiceAvailableTimeIntervals, but it only provides broad start/end ranges for a day and doesn’t give the distinct start times for multiple, different event sessions occurring within that range.
My Question:
Is the behavior of getCartesianStartTimeMatrix returning service_id: 0 when called without an eventId expected? If so, what is the recommended API method or strategy to efficiently retrieve all specific start times for all events within a given date range, ensuring I can associate each timeslot with its correct service/event ID?
Thank you for your assistance.