When using the API to retrieve orders for a given param biblio_id, it returns orders where the biblio_id is part of the orders biblio_id. F.e. if the given param is 26, the API will return orders where biblio_id is 262 Maybe this behaviour is intended in order to act as a search filter but i would expect the API, when used with biblio_id, only to return orders where the biblio_id is exactly like the one in the query. To Test: 1) go to http://localhost:8081/cgi-bin/koha/acqui/basket.pl?basketno=1 2) add an order via +Add to basket 3) use an existing record f.e. 9780596004927 4) click addOrder and enter necessary fields, then add item and choose fund to save the order 5) check the biblionumber of the ordered item f.e. 262 6) use the api to fetch orders curl -u koha:koha "http://localhost:8081/api/v1/acquisitions/orders?biblio_id=2" 7) check the biblio_id of the given response
I should have studied the API a bit more: there is a _match param which can be used with the value exact to retrieve only exact matching results. http://localhost:8080/api/v1/.html#ref-parameters-parameters_match So I should extend my query with to this: http://localhost:8081/api/v1/acquisitions/orders?biblio_id=2&_match=exact