Dwolla MassPay get data for each user? - dwolla

Its not clear from Dwolla's API if there is a way to get info for each user's failed vs. succeeded payment using Dwolla's MassPayCreate() or MassPayDetails() API calls?
Both API calls seem to report the aggregated data which seems confusing because I'd expect MassPayDetails() to return an array of data that could be parsed to get transaction details for each user.
What's the deal with this?

I've extended the JobByID() API call to accept an "include_details" parameter, which when specified True, returns the job's rows and their details.
Additionally, I've added another API call, RowByID(), which accepts a job row ID, and returns detailed information for the specified row only.

Related

Determine the proper REST API method

I have the following functionalities in my API:
Getting a user by their name
Getting a user by their ID
Getting a user, or if it doesn't exist create one
Getting multiple users by their ID
Currently I'm handling the two first functionalities with a GET request, and the third with a POST request. I could use a GET request for getting multiple users, but sending potentially hundreds of IDs through a query parameter seems like the wrong approach, as I would get a very long URL. I could also use a POST request to send the long list of IDs through its body, but I doubt a POST request is meant for this purpose.
What method would be appropriate to use for the last one?
I see 2 possible ways here:
Get all users and do your filtering post response.
Get a range of IDs, which resumes to only 2 parameters, the lower and the upper limits of the interval. (If this satisfy your needs)
Behaving the way you described and avoiding long URLs in the same time will not work together.

Page size in List By Factory method in REST API

I'm trying to list all the pipelines stored in the Azure Data Factory instance. I want to use Azure Data Factory REST API v2, Pipelines - List By Factory method.
I noticed the "nextLink" field in the PipelineListResponse, which contains the link to the next page of results, if any remaining results exist.
My question is, how many PipelineResources are sent in a single page of the response?
I didn't find any documentation regarding this question.
How many PipelineResources are sent in a single page of the response?
In normal, the list operation response includes the nextLink property when the list operation returns more than 1,000 items. For more details, please refer to here.

Paypal - request multiple authorizations for an order

How do I create multiple authorizations for an order?
According to the docs:
An order is valid for 29 days. During this period, you can request from one to ten or more authorizations to ensure the availability of funds. By default, you can make up to ten basic authorizations for each order. https://developer.paypal.com/docs/integration/direct/payments/orders/#overview
I tried creating an order with intent=authorize and then post with
https://api.paypal.com/v2/checkout/orders/orderId/authorize
First it succeeded, yet when I want to create another authorization, it gave me error:
issue":"ORDER_ALREADY_AUTHORIZED","description":"Order already authorized.If 'intent=AUTHORIZE' only one authorization per order is allowed." "debug_id":"47084737aefa3"
So I canceled the original authorization and then tried to create a new one, still got the same error.
Then I changed intent=capture, it gave me
"name":"UNPROCESSABLE_ENTITY","details":[{"issue":"ACTION_DOES_NOT_MATCH_INTENT","description":"Order was created with an intent to 'CAPTURE'. Please use v2/checkout/orders/order_id/capture to complete the transaction or alternately Create an order with an intent of 'AUTHORIZE'."
"message":"The requested action could not be performed, semantically incorrect, or failed business validation.","debug_id":"8c381672a8f1e"
Any help would be much appreciated!!!
The documentation you linked to is for v1/payments/orders, which are deprecated and very different in function and purpose from v2/checkout/orders.
v2/checkout/orders can only be captured a single time. An intervening authorization step is optional, if you need it.

Possible to specify date_preset with insights edge in Facebook Ads API?

For the Marketing API, I know that I'm able to make one call to retrieve all of the adsets from a certain account along with their insights, but am I able to specify the date_preset for the insights edge in that same call?
For example, the following gives me lifetime insights stats:
/v2.4/{accountID}/adcampaigns?fields=insights
To be clear - I know this is possible to retrieve by making separate calls for each adset id (where I know I can specify the date_preset); instead, I'd like to do this via the call where I get a long list of the ad sets plus their insights details in one go.
Yes this is possible using query expansion, however you probably should not do it in this anyway.
Using query expansion results in multiple requests being executed in one HTTP call, in this case one to get all the adcampaigns, and then N requests where N is the number of adcampaigns returned. This will in turn affect your rate limiting.
The most efficient way to request all insights for all adcampaigns (ad sets) is instead to request them at the account level, specifying aggregation level:
/v2.4/act_{ADACCOUNT_ID}/insights?date_preset=last_7_days&level=campaign
This requires just 1 request, or the number of requests to retrieve the total number of pages.
If you really want to achieve this with query expansion, you can do the following for example:
/v2.4/act_{ADACCOUNT_ID}/adcampaigns?fields=insights.date_preset(last_30_days).time_increment(all_days)
You can see the parameters to insights that would normally be query parameters of the form param_name=param_value are now in the form of param_name(param_value).
To specify the date_preset , here is the correct format . Its important to use insights as edge to get the date_preset filtering .
/v2.10/act_{ADACCOUNT_ID}/insights?fields=impressions,clicks,ctr,unique_clicks,unique_ctr,spend,cpc&date_preset=last_3d
The above one is tested with latest Graph Api version(2.10) as of now . FOr more info related to the date_preset values refer to there api docs .
https://developers.facebook.com/docs/marketing-api/insights/parameters

How do i get the list of all the leads in Marketo

I want to get all leads in Marketo using their Rest Apis. Is there a way to do this? I have already tried the getLeadChanges api, however that only returns leads with changed fields.
Leads in Marketo are assigned lead ids in sequential order starting with 1. Using the Get Multiple Leads by Filter Type REST API endpoint, you can query 300 leads by lead id with each call.
You will have to specify id as the filterType and the lead ids as the filterValues with each call to this endpoint. To get all leads, you would iterate through the total number of leads 300 at a time.
The first API call would be (replace ... with all the values in between):
/rest/v1/leads.json?filterType=Id&filterValues=1,2,3,...,298,299,300
The second API call, and each subsequent API call would follow the same pattern:
/rest/v1/leads.json?filterType=Id&filterValues=301,302,303,...,598,599,600
By Marketo REST API you can request only static lists, and the "All leads" is dynamic.
Easyest way will be:
Create static list
Add all existing leads to this list
Create a Marketo campaign to add every new lead to this Static list.
then just query leads in this list. e.g.: https://%yourSubdomain%.mktorest.com/rest/v1/lists/%listId%/leads.json
Hope it will help.