Closed jointine-john closed 7 months ago
Hi @jointine-john - do you know if this works in the API previewer, or do the docs suggest filtering should work in this way?
The Xero docs say you should be able to filter on status. My test account has only has quotes with a status of SENT. I've tried the API Explorer and if I filter on ACCEPTED, no results are returned.
Using the example I provided, all quotes are returned.
So annoyingly, some endpoints and parameters in the Xero API are expected within a where
parameter, and others directly in the uri. I suspect if you swap ->where
for ->setParameter()
it'll work.
Thanks, tried that this morning and it works great
$xeroQuotes = $xero->load(Quote::class)
->setParameter('DateFrom', '2023-11-03')
->setParameter('Status', Quote::QUOTE_STATUS_ACCEPTED)
->execute();
I'm trying to pull only Quotes that have been accepted.
$xeroQuotes = $xero->load(Quote::class) ->where('Status', Quote::QUOTE_STATUS_ACCEPTED) ->execute();
But all quotes are returned regardless of status