I’m working with my nation’s donation data, and I’d like to be able to search by more than just succeeded since, created since, failed since, and donor id.
Is there any reason why I can’t pass tracking_code_id as a search parameter, or any of the other fields? Right now, my flow looks like this:
Pull the entire list of donations that might match (say, by succeeded since date, or just pull them all)
Parse through and check the value/run my own search algorithm on the entire results I just pulled
Do my processing
Since I’m sometimes interested in searching all of our donations, that means each time I do this, I’m pulling down almost all of our donations, even if only 5-10 of them will match a criteria, like a tracking_code_id – it’s much slower than it needs to be, I think.
Have I missed something? Is there a better way to use the search endpoint? What’s in the way of giving us access to this?
Considering
Official response from Farz SokhansanjTyler,
At this point we have only exposed the succeeded_at, created_since, failed_since, and donor_id search params for the donation search endpoint. There is not a way to run a targeted query via the API for just tracking codes.
We will consider adding a tracking_code_slug param in the future and will update this card and notify you when that is complete.
Showing 5 reactions
Sign in with
Certified Developer
What’s the chance of opening it up to search by any parameter? I know nothing is ever “simple”, but I imagine the same process of adding tracking_code_slug would be applicable to any other parameters we wanted, and probably maintains the same level of abstraction over the database, just more and better options.
This kind of search functionality comes up for me pretty often, actually, in the People resources as well. That has more flexibility, but I still find a ton of my applications are pulling huge lists just to run searches on them that would be much faster at the database level, I’m sure. I’m at the point where it almost makes sense to mirror the database on a local server so I can actually run SQL queries on it myself. Is that a common workflow for other developers out there? Am I over or under thinking it?
Certified Developer
I’m working with my nation’s donation data, and I’d like to be able to search by more than just succeeded since, created since, failed since, and donor id.
Is there any reason why I can’t pass tracking_code_id as a search parameter, or any of the other fields? Right now, my flow looks like this:
Pull the entire list of donations that might match (say, by succeeded since date, or just pull them all)
Parse through and check the value/run my own search algorithm on the entire results I just pulled
Do my processing
Since I’m sometimes interested in searching all of our donations, that means each time I do this, I’m pulling down almost all of our donations, even if only 5-10 of them will match a criteria, like a tracking_code_id – it’s much slower than it needs to be, I think.
Have I missed something? Is there a better way to use the search endpoint? What’s in the way of giving us access to this?
Certified Developer