What's the best way to get the main currency for a company using the QBO API? - intuit-partner-platform

Using the QBO API how do I determine what currency the company is using in their QuickBooks file or overall as a company? Thanks!

Okay, chalk this up to not reading a little more into the docs, you can easily find this under the Company Preferences under "HomeCurrency", using the QBO api v3 you can find it under this url:
https://qb.sbfinance.intuit.com/v3/company/realm_id_goes_here/preferences
And should see some json like this:
...
"CurrencyPrefs": {
"MultiCurrencyEnabled": false,
"HomeCurrency": {
"value": "USD"
}
},
....

Related

How can I use marketing email templates with an API request?

I'm trying to set up an API request for Dynamics 365 to send an email template to a specific user, and I am having a lot of difficulty getting it to do what I want.
I'm using the SendEmailFromTemplate action and so far only have access to global templates. Whenever I try to use a marketing email template, it says it's not found. Is it even possible for me to use Marketing email templates with this action?
Response
"error": {
"code": "0x80040217",
"message": "template With Id = 41deb0fa-c108-eb11-a813-000d3a8c09cf Does Not Exist"
}
Additionally, I've not been able to embed user data in the global templates such as {{contact.address1_city}}.
Current request:
{
"TemplateId": "TEMPLATE-ID",
"Regarding": {
"contactid": "CONTACT-ID",
"#odata.type": "Microsoft.Dynamics.CRM.contact"
},
"Target": {
"regardingobjectid_contact#odata.bind": "/contacts(CONTACT-ID)",
"email_activity_parties": [{
"partyid_systemuser#odata.bind": "/systemusers(SYSTEMUSER-ID)",
"participationtypemask": 1
}, {
"partyid_contact#odata.bind": "/contacts(CONTACT-ID))",
"participationtypemask": 2
}],
"#odata.type": "Microsoft.Dynamics.CRM.email"
}
}
I might be going about it the wrong way. Any assistance is appreciated.
Thanks!
No this is not supported.
Marketing emails and CDS emails are two separate things - both business-wise and technically. Marketing emails are meant for sending emails in business to business and business to customer scenarios and are part of marketing solution. CDS emails are piece of core functionality.
If you do want to send marketing email your best shot is to use "quick send" instead.

DropboxPaper API "paper/docs/create" doesn't work

I'm trying to create new DropboxPaper document in my account [email address redacted],
I'm use official Api and try to create file by "https://api.dropboxapi.com/2/paper/docs/create", the returned result is:
{
"error_summary": "insufficient_permissions/.",
"error": {
".tag": "insufficient_permissions"
}
}
Somebody know what's is wrong? Please help me)
[Cross-linking for reference: https://www.dropboxforum.com/t5/API-Support-Feedback/Paper-API-Create-Paper-Document/m-p/375961/highlight/true#M21093 ]
It sounds like you're probably using a new Dropbox account, so the Dropbox Paper functionality is only available in the Dropbox filesystem, and not via the legacy Paper API endpoints. You can find more information here:
https://www.dropbox.com/lp/developers/reference/paper-migration-guide

Implementing tripadvisor traveller rating

my goal is to show TripAdvisor score rank inside my app alongside other ranking system. Keep in mind that my application is a B2B app, not B2C.
What i can not understand even after reading the developer documentation is what kind of API should i eventually ask for.
The Content API is only for B2C purposes...but, apparently, it is the only one that send me in response the actual TripAdvisor rating (the only thing i actually want from all TripAdvisor information).
Has anyone implemented TripAdvisor in an OTA (online travel agency) application and can guide me on which APIs to request?
Thank you in advice
I have not implemented TripAdvisor ratings in a B2B system, but helped on a B2C project that used Tripadvisor data.
Your findings regarding Content API is correct, this is the only API where you find ratings.
Rating is TripAdvisor "selling point", so this data protected and can only be used by following their presentation terms. Check out how here: https://developer-tripadvisor.com/content-api/display-requirements/
You have 6 months implementation time and have to get Tripadvisor approval, or they cancel your API key. By using their API you commit not to store any data retrieved from their API.
Quick guide to use their API: https://developer-tripadvisor.com/content-api/documentation/
Call the locator_mapper to get possible location_id(s)
http://api.tripadvisor.com/api/partner/2.0/location_mapper/42.344978,-71.119030?key=[YOUR_KEY_HERE]-mapper&category=hotels&q=Beacon%20Townhouse%20Inn%201023
It returns a JSON with possible locations,
{
"data": [
{
"location_id": "89575",
Then call location with the id to get ratings: http://api.tripadvisor.com/api/partner/2.0/location/89575?key=[YOUR_KEY_HERE]
"review_rating_count": {
"1": "18",
"2": "22",
"3": "63",
"4": "269",
"5": "1408"
},
Use this data, together with the presentation and links back to tripadvisor to comply with their license.

How to get a list of views (profiles) in google analytics api v4

I'm trying to upgrade my script from using version 3 of the google analytics API to version 4.
In version 3, I could get listings of accounts, properties, and views from the api (see API reference for version 3). However, the API reference for version 4 does not seem to show the same thing.
How do I get those listings now?
TLDR: You get the view listings the same way you always have.
The Analytics Reporting API V4 is a stand alone API for querying an Analytics View for data. There is not V4 management API, only the Analytics Management API V3. The two APIs are designed to be used together.
To load both the V3 and V4 libraries in Python:
from apiclient.discovery import build;
analytics = build('analytics', 'v3', http=http)
analyticsReporting = build('analyticsreporting','v4', http=http)
The best way to list all the views of a user is to call accountsummaries.list() -- See the method reference docs for details.
account_summaries = analytics.management().accountSummaries().list().execute()
Parse the response to get the viewId of interest, and call the V4 API:
response = analyticsreporting.reports().batchGet(
body={
"reportRequests":[
{
"viewId": viewId,
"dateRanges":[
{
"startDate":"2015-06-15",
"endDate":"2015-06-30"
}],
"metrics":[
{
"expression":"ga:sessions"
}],
"dimensions": [
{
"name":"ga:browser"
}]
}]
}
).execute()

Linkedin rest api to search people with name

Is there any LinkedIn Rest API available to search people with first and last name?
I am not able to find anything on their developer website.
I found this url from some other question: http://api.linkedin.com/v1/people-search:(people:(id))?first-name=bill&last-name=gates
But when I am trying to hit this url from APIGee REST console I am getting response as 403 permission denied. I am using oAuth with my LinkedIn account.
I am currently using free account on LinkedIn, is because of that.
Linked has closed its API some time ago. See a detailed announcement here.
You have to get Vetted API access from Linkedin in order to do People Search. For more information please look into this link
You can use LinkedIn Public Search Results Scraper API to achieve this.
Here is an example. Response for a profile found look like this:
{
"id": "jimmy-neutron-b914a91a5",
"name": "Jimmy Neutron",
"occupation": "Chief Executive Officer at NASA - National Aeronautics and Space Administration",
"location": "Houston, TX",
"last_job": "NASA - National Aeronautics and Space Administration",
"last_education": "Harvard University",
"thumbnail": "https://media-exp1.licdn.com/dms/image/C4D03AQE7YG6jwNNy2Q/profile-displayphoto-shrink_200_200/0/1584908070871?e=1620259200&v=beta&t=QJREJQLCsAIaDiQCOZJ6Nu6QoyUPWK8ytJAWU52icRU",
"link": "https://www.linkedin.com/in/jimmy-neutron-b914a91a5?trk=people-guest_people_search-card"
},
Now LinkedIn does not provide search people apis for the reason for data-stealing.
thanks