I was wondering if there is a correct way to use the Rest API Orders endpoint with additional parameters used in my GET request. I am trying to get orders due today that reflect 0.0 under total paid but it seems that the response is returning all orders unless I set a limit.
The alternative solution would be to use the XML-RPC API, and query the “Invoice” table on the “TotalPaid” field when you can set to the “0” value.
As for the Date range, you can only specify one copy of the field name, and not two. So you could perform a “DateCreated” “~>=20241024T00:00:00~”, which would be equivalent of getting the Orders starting from Today onwards. But in your code you would need to filter out the other dates.
In addition, you can return the results back in Date Ascending or Descending order via the Order By parameter.
You will be able combine the “TotalPaid” and “DateCreated” query fields together.
Links to the documentation for the Data querying and Invoice table.
Isn’t the XML-RPC API going to be deprecated eventually? That’s the main reason I am trying to learn the Rest API and move whatever I need to before the legacy keys expire next week. Everything I have read is saying to start transitioning to Rest for future projects.
Yes, this is my understanding as well. The biggest challenge is that there is a lack of parity between the two APIs.
The XML-RPC is likely to give you more flexibility in searching and querying specific data, that may not be possible at this point in time with the REST API.
The XML-RPC API could have been deprecated years ago. Unfortunately the Keap API Development Team have completely made a mess of it all.
As Marion pointed out, the REST API is not comparable to the XML-RPC API. When the REST API V1 originally came out several years ago it took time for the endpoints to be added in. It became apparent that the querying functionality was not great and not everything was available either. Keap realised that it feel short and started woking on V2 of the API. Technically speaking REST API V1 is deprecated, as no more new functionality will be added to it.
From what I am seeing, the REST API V2 is heading in the same disappointing direction as V1, which questions on what Keap is going to do in the future. Keap point of view is that V2 is going to be comparable, but it will 100% not be.
A few weeks ago in another discussion, someone asked if it was possible to query the Custom Fields in REST, the answer from Keap was no, due to some technical reasons. So, we can query them in the XML-RPC, but not in REST. Well done, that is a step backwards already.
The other issue with the REST API is that it takes years to see any progress with it. They implement new endpoints, and then for several months nothing happens. Who knows when all the endpoints will be implemented. But they need to do significant work on the querying capabilities if they want developers to migrate across from XML-RPC. Otherwise it will turn into a nightmare in the future.