API to retrieve subscribers with statistics from journey in Marketing Cloud (former ExactTarget) - api

We have following task:
In the Marketing Cloud there are few journeys created by Journey Builder. They all are assigned to different Data Extensions via Event Source.
I'm going to receive all Data Extension rows that participate in specific Journey. Also we need to retrieve basic statistics by participants that shows us actual status of participant (data extension row in journey) like: what is the current place in journey for participant (received first email, received sms in line after first email etc.).
To retrieve all participants I suspect we have to use:
GET /interaction/v1/eventDefinitions/{eventDefinitionId}
where eventDefinitionId is Id from
GET /interaction/v1/interactions/{journeyId}
please correct me if I'm wrong.
The question is if there is some API that allows to retrieve statistic data described below.
Thanks,
Roman

Related

Retrieve customer related to payment

Anyone know if it's possible to retrieve the customer name related to a transaction from the API?
I see it under "Paid by" if I follow the "payment_url" in the connect v1 https://connect.squareup.com/v1/{{location_id}}/payments/{{payment_id}} endpoint but can't see to find it anywhere else
Background: I'm working on a ticketing system that breaks out items by item_category so a kitchen gets only food items and the bar gets only drink items.
I have queues and itemized tickets by category BUT I can't seem to find the customer's name anywhere
You'll need to utilize the V2 Transactions API. When you call ListTransactions or RetrieveTransaction (ListTransactions), the Transaction object will have an array of Tenders, tenders, which has a field called customer_id. With this id, you will be able to pass it to RetrieveCustomer (RetrieveCustomer) to find out their name. Note that if you're not explicitly filling out their name, the name might not be available (an "instant profile" (Instant Profiles) will be created with whatever information can be retrieve from the card used to pay).
Update: Alternatively, as suggested by #Dan, would be to strip the payment_url from a V1 RetrievePayment (RetrievePayment) which includes the transaction_id at the end of the URL: https://squareup.com/dashboard/sales/transactions/TRANSACTION_ID. This is more efficient as you won't need to loop through transactions, and allow you to send it straight to RetrieveTransaction.

Is it possible to retrive the 'account' associated with a xero bank transaction

I'm using Xero's private API to export bank transactions (so I can automate a bunch of financial reporting).
Retrieving the transactions works well (as documented here https://developer.xero.com/documentation/api/banktransactions) but this endpoint doesn't return the account field associated with each transaction, which I want to use to group the transactions into e.g. "Cost of sale", "Operating expenses" and so on.
Does anyone know of a way to find the account for a given transaction via the API?
Further info:
If the transaction contains line items, then the account associated with each line item is returned by the endpoint above. I'm mostly interested in transactions that do not include line items (the LineItems field is an empty array)
Most of the transactions i'm working with are of the "Spend Money" type
I'm currently using pyxero SDK, but open to other options
The account field is present in Xero's web interface, and on the CSV export available from the web interface.
Our contacts in Xero don't have default accounts.
It is the LineItems of Bank Transactions that have AccountCodes associated with them and I've not been able to find a bank transaction record without a line item in the data I have available to me.
Is it possible that you are not implementing paging? From the bank transactions documentation you linked to above:
Paging BankTransactions (recommended)
To utilise paging, append a page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned.
By using paging all the line item details for each bank transaction are returned which may avoid the need to retrieve each individual bank transaction.
I'm not familiar with the pyXero implementation, but it looks like they support Xero paging. From the pyXero readme:
# Grab 100 invoices created after 01-01-2013
xero.invoices.filter(since=datetime(2013, 1, 1), page=1)

How do I access all the information for a Square transaction?

I am a student (so I am pretty new to all of this stuff) trying to create a database for a coffee shop that uses Square for their register and website. I want the database to update with all the information from a transaction every time one is completed.
I have a webhook that gets me the IDs every time a transaction completes, I can send the transaction ID to the Square API with an http request and get back information about the payment, but I still cannot figure out how to get the rest of the transaction information. We want to query the database about what kinds of items are being sold when and with what modifiers, but so far the only way I can get that is through downloading a csv file with the item line information from the Square Dashboard.
If there is a way to get the line item information in some kind of way that can be automatically added to the database, I would really appreciate the help. I have been looking for a solution and cannot find it on my own.
For in-person payments the only way to see itemizations is to use V1 ListPayments (or RetrievePayment).
In order to see itemizations for online payments, you must utilize Square's Orders API. The workflow would be:
Create an order (CreateOrder) with line_items (can be ad-hoc, or use Catalog ids). Save the order_id for the next step.
When calling Charge, pass in the order_id from the previous step.
Once you are successfully attaching the order_id's, when you retrieve a transaction you will be able to call the BatchRetrieveOrders endpoint with the order_id to see the itemizations.
References:
V1 Payments
Orders Overview
Orders Reference

How to access weather data from all the stations in one country using openweathermap?

I am using Alteryx to extract weather data for a handful of cities and it works great. I'd like to expand this to able to download data for all weather stations in the UK. At the moment I am specifying which cities I want, e.g. London / Manchester.
Is there a way of specifying in the api call to download all stations in 'GB' or 'UK'?
Ideally I'd like to do this in one call rather than listing all locations which will be very laborious
Get a list of stations or cities that you want to retrieve weather data from. I found some good sources from openweather here: http://bulk.openweathermap.org/sample/
Then build a url request using the list of id's above that retrieves specific weather information. Using an id for the weather station in Cairns, id=2172797, the url ends up looking like:
http://api.openweathermap.org/data/2.5/weather?id=2172797&appid=843798874aac0ef138e6f77c72f3af80
Note that this url will return an error because this isn't a real appid. If you replace the appid with your own, this url will give you data for that station.
Putting this process into Alteryx lets you put the list of station id's together with the url and the appid to make many calls into openweather and then process all of the data together. I could not find information from the API on rate limits, so be conscious of how many requests you are posting to the service.
There is an example of this process here: https://www.dropbox.com/s/yoppbx3bw0p4rug/Get%20individual%20stations.yxzp?dl=0
Keep in mind that you have to update the Appid in the text input tool within this sample as well.

Cannot find Yodlee DAG fields in API

In the Yodlee DAG templates, there are fields for ISIN and SEDOL and some other fields that we do not see in the API. Are these fields able to be pulled via the Yodlee API?
If you have downloaded the complete Yodlee SDK folder contents and search the Javadoc/index-all.html for sedol and ISIN you will find multiple properties with these names all in Investment/SEcurities related structures/classes.
A warning, just because the property is there does not mean it's populated. Just because it's populated doesn't mean it's populated with all information (e.g often times sensitive information is obsecured to the last 4 digits such as Account #s).
The fact that I see it as a property in the SecuritiesSearchCriteria however might lend hope to the fact that it is populated with usable info.
ISIN is an unique identifier of a holding in India and SEDOL is a unique identifier used in UK and Ireland. Hence they will be populated for investment account of users from those parts. Also their population is dependent on the availability at the end site(The website from where we are scraping the data)
You can get these details through Yodlee's DataService API.
This API will return the itemSummary which contains ItemData object.
This ItemData object contains the list of accounts and then each account will have Investment data and this investment data contains Holding details which contains all the details for a holding. In the Holding details you can find the method to retrieve ISIN , SEDOL etc.