Get all user transactions with executeUserSearchRequest - yodlee

I'm using the Yodlee REST API and am trying to retrieve all user transactions in giving dates.
When calling executeUserSearchRequest with the following params, I get only 13 transactions instead of more.
transactionSearchRequest.containerType=all
transactionSearchRequest.higherFetchLimit=500
transactionSearchRequest.lowerFetchLimit=1
transactionSearchRequest.resultRange.startNumber=1
transactionSearchRequest.resultRange.endNumber=500
transactionSearchRequest.searchClients.clientId=1
transactionSearchRequest.searchClients.clientName=DataSearchService
transactionSearchRequest.searchFilter.currencyCode=ILS
transactionSearchRequest.ignoreUserInput=true
transactionSearchRequest.searchFilter.transactionSplitType=ALL_TRANSACTION
transactionSearchRequest.searchFilter.postDateRange.fromDate=01-01-2014
transactionSearchRequest.searchFilter.postDateRange.toDate=04-01-2014
Following this didn't help, since it's not updated.
Update: I've corrected the dates, it was a typo here and didn't appear on the actual request.

Dates sent to Yodlee are not ISO standard and can be done as
MM-dd-yyyy
or
MM-dd-yyyyTHH:mm:ss.000Z.
e.g. :
"transactionSearchRequest.searchFilter.postDateRange.fromDate":"03-22-2014T00:00:00.000Z",
"transactionSearchRequest.searchFilter.postDateRange.toDate":"06-21-2014T23:59:59.000Z",
HOWEVER outbound dates are ISO standard e.g.
"postDate" : "2014-06-20T00:00:00-0700",
The REST API needs a lot of work, this is just one of the many issues we have come across. Don't get me started the on the lacking documentation, the incorrect documentation, ignoring HTTP protocols, mixed serialization approaches, java exceptions over the wire...
IMO It is not good enough for a paid for service
:(

transactionSearchRequest.searchFilter.postDateRange.fromDate=04-01-2014
transactionSearchRequest.searchFilter.postDateRange.toDate=01-01-2014
Can you try swap those date range values and try? Are you sure these date range has more transactions.

Could you please change the fromDate/toDate's value, as it should in chronological order. And the date format is in format as MM-DD-YYYY.

First remove the two date criteria lines and see what you get. If you get>13 txns then try the below:
Assuming you want txns between 01-Jan-2014 to 01-Apr-2014. Do something like this:
transactionSearchRequest.searchFilter.postDateRange.fromDate="01-01-2014T00:00:000Z"
transactionSearchRequest.searchFilter.postDateRange.toDate="04-01-2014T00:00:000Z"
There seems to be a mismatch between your existing txns dates and search criteria you are providing. It could be timezone issue also, so please consider that.

Related

Amazon Marketing Cloud - CAST Function and SQL Documentation

I am using Amazon Marketing Cloud (AMC) for work and I am having trouble applying a WHERE [column] <> ''.
The CSV file that is output is large and it contains many records with nothing in the main ID column. I am able to filter out the nulls, but not the ''.
This is the error message I get when I CAST: "No match found for function signature type(<RecordType(BIGINT order, VARCHAR campaign)>)"
The field is compiled in a CTE using NAMED_ROW('order', ROW_NUMBER() OVER(PARTITION BY imp_user_id ORDER BY impression_timestamp),'campaign', campaign) AS campaign_order.
Then, the next CTE turns it into an array using ARRAY_SORT(COLLECT(distinct a.campaign_order)) AS path.
An example of the output is [[1, <Name of Campaign 1>],[2, <Name of Campaign 2>],...[N, <Name of Campaign N>]]
I know that AMC is based on Presto Database Engine, but when looking for documentation I am not sure whether to look at Presto, Hive, or Apache. Whenever I search for something one of those 3 sources usually comes up. I have luck sometimes and other times I do not. It would help if I knew exactly what form of SQL AMC was using so I can narrow down the documentation, syntax, etc.
This platform is still in beta I believe and is relatively exclusive in terms of access. So, I am not sure if many people will be able to help.
In short, I want to filter out records = '', but due to the data type of the field it won't let me.
How do I cast "type(<RecordType(BIGINT order, VARCHAR campaign)" so that I can filter out ''? Also, what documentation should I be using for AMC?
I am considering using LEN() so that I can filter out any records with length = 0.
Anyways, any and all help is appreciated!
If you need more information, then please let me know.
Thank you!
AMC documentation is available at https://advertising.amazon.com/marketing-cloud/documentation (Amazon Advertising account with AMC access is required).
In general AMC SQL is closer to PostgreSQL rather than Presto syntax.
It's a little hard to see why you are trying to cast a record to a string. I think it might be easier to filter the records before the window function is applied. I might be able to help more if you share the relevant part of your query. Alternatively, feel free to contact AMC support by email or via your sales rep.

What is date range format for Juriscraper REST API?

I phrased this question in a specific manner, but I'm more interested in how one generally approaches the problem of figuring out the input parameters for an API. I am trying to filter by date_created__range for the option endpoint in this API and I can't figure out how it wants the date range formatted. They specify that they use the ISO-8601 format, but I have tried all the following to no avail:
https://www.courtlistener.com/api/rest/v3/opinions/?date_created__range=2020-12-01--20-12-10
https://www.courtlistener.com/api/rest/v3/opinions/?date_created__range=2020-12-01..20-12-10
https://www.courtlistener.com/api/rest/v3/opinions/?date_created__range=2020-12-01/20-12-10
I've also tried with those date ranges reversed. All of these fail with the message "Enter a valid date/time." I've even tried downloading the source code for the API and searching through it, but I haven't found anything relevant to this question. How would you go about figuring this out?
I tried this and it might be what you're looking for!
https://www.courtlistener.com/api/rest/v3/opinions/?date_created__range=2013-01-01T00:00:00Z,2013-01-03T00:00:00Z
For reference on process, I just copied one of the dates they used in their example date_modified query
curl https://www.courtlistener.com/api/rest/v3/dockets/?court__date_modified__gt=2013-01-01T00:00:00Z and added a second one separated by a comma, since you had already tried dashes, periods, and a slash.

How do you write a test for dynamic API content?

I am working on a wrapper for an API, and one of the endpoints returns data that doesn't have the same results each time.
What is a good strategy to test that the endpoint is still valid?
This is a general question, although I am mostly interested in getting this to work in Python.
You need to define what you actually expect from the result. What are the statements that always hold for the result?
Popular candidates/examples are
it is valid JSON/HTML/XML
it contains certain substrings
it has certain "fields"
certain fields can be parsed as a date using a specific format, and the resulting date is within +/-1h of now.

Microsoft Access 2010 Date Conversion

I don't have much experience so I apologize in advance for a potentially dumb question. I did not create these tables nor the queries that have been used in the past. With that said --
For the past several months I have been using a date conversion query that was given to me to update columns from an integer to a date. It used to work just fine and I swear everything is the same for my latest data extractions, but at some point the dates started getting wonky. For example, a typical date column might look like:
58222
58158
59076
58103
And the conversion query looks something like this:
IIf([D_posting]<>0,[D_posting]-18261,0)
And returns the above dates as:
05/27/2059
03/24/2059
09/27/2061
01/28/2059
Which obviously is wrong. The situation kind of reminds me of how I remember we generated random numbers in C++ (which was a long time ago), but for the life of me I can't figure out how to reverse engineer the correct subtraction factor without a reference point.
I also tried using the CDate() function instead, and it resulted in a bunch of future dates also, leading me to wonder if there's something else wrong. I work for a small physicians group so it might be something in the Electronic Health Records software, but I'd like suggestion on what I should check to make sure it's nothing that I've done.
You could create a query that uses the 'cdate' function (see below) to return the date. You can modify the code so that it subtracts the offset (maybe 18261?)
In the immediate window of VBA you can tinker with the following:
The 'cdate' will take a number and convert it to a date:
?cdate(41925)
10/13/2014
The 'cdbl' will take a date and convert to a number.
?CDbl(Date())
41926

How can I fix the date filter issue on ActiveAdmin?

I have a Reports Resource on ActiveAdmin and a date filter.
The problem is I can set the second date field to be prior to the first date field and if I make a search like this, no results show up.How can I fix it?
I have a date column in my db.
Thanks!
I'm not sure this is a problem. Although filtering with dates like this isn't useful, as it will always return zero results, it doesn't mean that the search is invalid.
I think this is a case of the designers of ActiveAdmin deciding to make it work in a way that's valid but different to what you expect.