Generate a QR Code
/
https://dash.stannp.com/api/v1/qrcode/create
Creates a QR code image.
You must use a PUBLIC KEY for this request. You can create a public key here
QRcodes may need to be embedded as URLs into an image source. So we recommend using a querystring to pass over the parameters for this.
Parameters
size | int | Optional. The size in pixels of the QR code. |
data | string | The content you wish the QRcode to contain. |
Request
$ curl https://dash.stannp.com/api/v1/qrcode/create?size=300&data=hello+world \ -u {API_KEY}:
define("API_KEY", "YOUR API KEY"); $opts = array( 'http' => array( 'method' => 'GET', 'header' => 'Content-type: application/x-www-form-urlencoded' ) ); $context = stream_context_create($opts); $result = file_get_contents("https://dash.stannp.com/api/v1/qrcode/create?size=300&data=hello+world?api_key=" . API_KEY, false, $context); $response = json_decode($result, true); print_r($response);
import requests response = requests.get('https://dash.stannp.com/api/v1/qrcode/create?size=300&data=hello+world?api_key={API_KEY}') print(response.text)
var client = new RestClient("https://dash.stannp.com/api/v1/qrcode/create?size=300&data=hello+world?api_key={API_KEY}"); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);Response
Merge PDF files
Merge multiple pdf files into a single file.https://dash.stannp.com/api/v1/pdf/merge
Parameters
files | mandatory |
An array of files you wish to merge together. Must be a url. eg:
files[]=https://file1.pdf&files[]=https://file2.pdf
|
Request
$ curl https://dash.stannp.com/api/v1/pdf/merge \ -u {API_KEY}: \ -d "files[0]=http://file1.pdf" \ -d "files[1]=http://file1.pdf"
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://dash.stannp.com/api/v1/pdf/merge?api_key={API_KEY}', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => array( 'files[0]' => "http://file1.pdf", 'files[1]' => "http://file1.pdf" ), )); $response = curl_exec($curl); curl_close($curl); print_r($response);
import requests data = { 'files[0]': 'http://file1.pdf', 'files[1]': 'http://file1.pdf' } response = requests.post('https://dash.stannp.com/api/v1/pdf/merge?api_key={API_KEY}', data=data) print(response.text)
var client = new RestClient("https://dash.stannp.com/api/v1/pdf/merge?api_key={API_KEY}"); var request = new RestRequest(Method.POST); request.AddParameter("files[0]", "http://file1.pdf"); request.AddParameter("files[1]", "http://file1.pdf"); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content)Response
{ "success": true, "data": "https://merged-file.pdf" }