[#1403] API Query: getCartesianStartTimeMatrix returns service_id: 0 - Need to get start times of all events in one call

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.

Redmine Admin wrote:

hi, there is no way to do it in a single call. If you faced the API limit please check our Enterprise solution

Anas Nab wrote:

Redmine Admin wrote in #note-1:

hi, there is no way to do it in a single call. If you faced the API limit please check our Enterprise solution

But why getCartesianStartTimeMatrix doesn’t return the expected result in the “service_id” prop? why does it return 0? isn’t this a bug? it only returns the correct service_id if I added parameter “eventId” in the request. Please recheck my message

Redmine Admin wrote:

the method works as expected, eventid is mandatory

Anas Nab wrote:

Redmine Admin wrote in #note-3:

the method works as expected, eventid is mandatory

Why can this method getCartesianStartTimeMatrix return the times for service provider while cannot return time for services themselves and associate the timeslots with the service_id? what’s the point of the prop “service_id” here if I have to include the service id anyways in the params?? why is it so hard to include the service_id or group by it here?
{
“result”: [
{
“provider_id”: 9,
“service_id”: 0,
“timeslots”: {
“2025-04-21”:
}
},
{
“provider_id”: 12,
“service_id”: 0,
“timeslots”: {
“2025-04-21”: [
“16:00:00”,
“16:15:00”,
“16:30:00”,
“16:45:00”,
“17:00:00”,
“17:15:00”,
“17:30:00”,
“17:45:00”,
“18:00:00”,
“18:15:00”,
“18:30:00”,
“18:45:00”,
“19:00:00”,
“19:15:00”,
“19:30:00”,
“19:45:00”,
“20:00:00”,
“20:15:00”,
“20:30:00”,
“20:45:00”,
“21:00:00”,
“21:15:00”,
“21:30:00”,
“21:45:00”,
“22:00:00”,
“22:15:00”,
“22:30:00”,
“22:45:00”
]
}
},