Migrated from Redmine #206 | Author: Luiz Soares
Status: New | Priority: Normal | Created: 2018-07-30
Hi, I’m using the trying to get the client bookings and somehow the API is returning the same booking multiple times.
Request:
{
"jsonrpc":"2.0",
"method":"getClientBookings",
"params":[11, "", {"upcoming_only" : true, "confirmed_only" : false}],
"id":1
}
Response:
{
"result": [
{
"service_id": "1",
"provider_id": "2",
"start_date": "2018-07-31",
"start_time": "17:00:00",
"end_date": "2018-07-31",
"end_time": "18:00:00",
"id": "714",
"code": "5akjt6i0",
"hash": "410617a862676e57d36927fe3e86e9e0",
"time_offset": "0",
"status": "pending",
"is_cancellable": "1",
"price_without_tax": 20,
"price_with_tax": 20,
"show_tax": true,
"currency": "BRL",
"products": [],
"additional_fields_values": [...]
},
{
"service_id": "1",
"provider_id": "2",
"start_date": "2018-07-31",
"start_time": "17:00:00",
"end_date": "2018-07-31",
"end_time": "18:00:00",
"id": "714",
"code": "5akjt6i0",
"hash": "410617a862676e57d36927fe3e86e9e0",
"time_offset": "0",
"status": "pending",
"is_cancellable": "1",
"price_without_tax": 20,
"price_with_tax": 20,
"show_tax": true,
"currency": "BRL",
"products": [],
"additional_fields_values": [...]
},
{
"service_id": "1",
"provider_id": "2",
"start_date": "2018-07-31",
"start_time": "17:00:00",
"end_date": "2018-07-31",
"end_time": "18:00:00",
"id": "714",
"code": "5akjt6i0",
"hash": "410617a862676e57d36927fe3e86e9e0",
"time_offset": "0",
"status": "pending",
"is_cancellable": "1",
"price_without_tax": 20,
"price_with_tax": 20,
"show_tax": true,
"currency": "BRL",
"products": [],
"additional_fields_values": [...]
},
{
"service_id": "1",
"provider_id": "2",
"start_date": "2018-07-31",
"start_time": "17:00:00",
"end_date": "2018-07-31",
"end_time": "18:00:00",
"id": "714",
"code": "5akjt6i0",
"hash": "410617a862676e57d36927fe3e86e9e0",
"time_offset": "0",
"status": "pending",
"is_cancellable": "1",
"price_without_tax": 20,
"price_with_tax": 20,
"show_tax": true,
"currency": "BRL",
"products": [],
"additional_fields_values": [...]
}
...
Please note that the bookings have the same ID.
Regards