Xero API - how to retrieve online Quote URL or Quote PDF - xero-api

Does anyone know of a way to retrieve a quote URL or Quote in PDF format using the Xero API? I know this is possible with Invoices but for some reason the API is lacking on the Quote side.
If not possible, is there a workaround?

The documentation for the API says "Individual quotes (e.g. Quotes/97c2dc5-cc47-4afd-8ec8-74990b8761e9) can also be returned as PDF's see our HTTP GET documentation" - that link then says "Individual Invoices, Individual Quotes and Credit Notes can also be returned in PDF format by setting the “Accept” value in the http header to “application/pdf”."
https://developer.xero.com/documentation/api/accounting/quotes#overview
https://developer.xero.com/documentation/api/accounting/requests-and-responses#http-get
Are you saying that doesn't work?

Related

Using Microsoft Access VBA to Update Teamup Calendar via API

I'm an experienced VBA programmer but have little experience with API's.
My goal is to use VBA to add an event to a Teamup calendar with the click of a button. The required data is present in the database, I have a Teamup API key and Teamup has provided the following rules:
API access MUST be done over TLS/SSL via https://api.teamup.com/
All API requests must include an API key in a request header
Strings in requests and responses MUST be using the UTF-8 character set
Successful responses will have status codes in the 200-299 range
Client errors will have status codes in the 400-499 range
Server errors will have status codes in the 500-599 range
Placeholders in URL examples are indicated by curly braces, e.g. {eventId}
API responses are in JSON using the application/json content type
Any help figuring this out, or in pointing me to the right resources would be appreciated.
I've played around with CreateObject("MSXML2.XMLHTTP"), but not sure if I'm on the right track.
In advance, thank you!

How to search and filter tweetts using Twitter API?

I am exploring how to search and filter tweets using the Twitter API version 2 which as of this writing has been newly released. The documentation for this particular endpoint is available here.
I tried successfully searching for the following query:
https://api.twitter.com/2/tweets/search/recent?query=puppy
As I needed to be more specific, I checked out v1.1 docs for rules and filtering and tried to look for tweets containing puppy images (filter:image) and no retweets (-filter:retweets) but I could not get the query in v2 (preferably) or v1.1 working with postman even though I tried percent-encoding for the special characters.
It is also not clear to me from the documentation (though mentioned in the docs) how to specify a certain language like English (lang=english) and a certain distance in the query "37.781157,-122.398720,1mi"
Does somebody know how to pass it into the query?
For language filter you can refer the post
https://community.postman.com/t/define-the-language-of-tweets/20643
But I am not sure about the image filter. But in recent times a developer sean.keegan from Postman is talking more about twitter API's in Postman. Please do check out https://community.postman.com/search?q=twitter and https://www.youtube.com/watch?v=ySbLo13Fk-c
I hope these will be helpful for you!!

Get wikitext from wikipedia API?

I'm looking at the API documentation here,
https://www.mediawiki.org/wiki/API:Query
Getting the wikitext for a page is mentioned in the beginning of the documentation,
The action=query module allows you to get information about a wiki and the data stored in it, such as the wikitext of a particular page, the links and categories of a set of pages, or the token you need to change wiki content.
but I cant seem to figure out what parameters to pass in the API request to return the wikitext for a given page. Anyone know how to do this?
I've tried parameters like,
{'action':'query', 'titles':'Anarchism', 'prop':'wikitext', 'format':'json'}
You must use this query .
https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=json&titles=Anarchism&rvslots=main

What is the technical term for when a URL is repeated within the same URL?

I have an API that returns URL that render an image from Adobe Scene7. The API is doubling up, or repeating, the URL in the xml return and is causing parsing issues in my presentation. Is there a technical term for this repeated URL? I need to know how to report this to my developers.
Here is an example, in the url can see where the protocol starts and repeats the exact same URL...
<d1p1:ProductImageUrl>http://s7d7.scene7.com/is/image/BBE004?&op_colorize=0f5196http://s7d7.scene7.com/is/image/BBE004?&op_colorize=0f5196</d1p1:ProductImageUrl>
I think the technical term for this is "invalid URL".

How to get image URLs in different pages using a single WIKI api call?

We can get text extract of different pages in a single wiki api call by using pipe character ( | ).
For eg : http://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exlimit=max&explaintext&exintro&titles=Yahoo|Google&redirects=
By using this api call, we can get datas about Google and Yahoo in text format. Here we get datas of both Google and Yahoo in a single api call.
I want to get image urls of both Google and Yahoo in a single wiki api call.
Is there any method to get all image urls of different pages in a single wiki api call?
Yes, just switch prop=extracts to prop=images. Works exactly the same way:
http://en.wikipedia.org/w/api.php?action=query&titles=Yahoo|Google&prop=images
The full documentation is here: http://www.mediawiki.org/wiki/API:Properties
To get the url of an image, use prop=imageinfo&iiprop=url for the corresponding file page.
Finally, you can combine it all in one single request, by using the prop=images result as a generator for the prop=imageinfo call:
http://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&iiprop=url&generator=images&titles=Google|Yahoo!
There are some warning because you are missing the format=json. So the correct is
https://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&format=json&iiprop=url&generator=images&titles=Google|Yahoo