POST /api/v/5/source/api/productpreview/?recipeid=f255af6f-9614-4fe2-aa8b-1b77b936d9d6 HTTP/1.1
Content-Type: application/json
Host: api.print.io
Content-Length: 256

{
  "Sku": "PremiumPhoneCase-iPhone-12-SnapCaseGloss",
  "Images": [
    {
      "Images": {
          "Url": "http://app-imgs.print.io/temp/4a6d6997-347e-44a1-aef7-63f3bdc0f8b3-test092214b.jpg"
      } 
    }
  ],
  "MaxWidth": 2000,
  "MaxHeight": 2000
}
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.print.io/api/v/5/source/api/productpreview/?recipeid=f255af6f-9614-4fe2-aa8b-1b77b936d9d6",
  "method": "POST",
  "headers": {
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{\n  \"Sku\": \"PremiumPhoneCase-iPhone-12-SnapCaseGloss\",\n  \"Images\": [\n    {\n      \"Images\": {\n          \"Url\": \"http://app-imgs.print.io/temp/4a6d6997-347e-44a1-aef7-63f3bdc0f8b3-test092214b.jpg\"\n      } \n    }\n  ],\n  \"MaxWidth\": 2000,\n  \"MaxHeight\": 2000\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
fetch("https://api.print.io/api/v/5/source/api/productpreview/?recipeid=f255af6f-9614-4fe2-aa8b-1b77b936d9d6", {
  "method": "POST",
  "headers": {
    "content-type": "application/json"
  },
  "body": {
    "Sku": "PremiumPhoneCase-iPhone-12-SnapCaseGloss",
    "Images": [
      {
        "Images": {
          "Url": "http://app-imgs.print.io/temp/4a6d6997-347e-44a1-aef7-63f3bdc0f8b3-test092214b.jpg"
        }
      }
    ],
    "MaxWidth": 2000,
    "MaxHeight": 2000
  }
})
.then(response => {
  console.log(response);
})
.catch(err => {
  console.log(err);
});
var data = JSON.stringify({
  "Sku": "PremiumPhoneCase-iPhone-12-SnapCaseGloss",
  "Images": [
    {
      "Images": {
        "Url": "http://app-imgs.print.io/temp/4a6d6997-347e-44a1-aef7-63f3bdc0f8b3-test092214b.jpg"
      }
    }
  ],
  "MaxWidth": 2000,
  "MaxHeight": 2000
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.print.io/api/v/5/source/api/productpreview/?recipeid=f255af6f-9614-4fe2-aa8b-1b77b936d9d6");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.print.io/api/v/5/source/api/productpreview/?recipeid=f255af6f-9614-4fe2-aa8b-1b77b936d9d6",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n  \"Sku\": \"PremiumPhoneCase-iPhone-12-SnapCaseGloss\",\n  \"Images\": [\n    {\n      \"Images\": {\n          \"Url\": \"http://app-imgs.print.io/temp/4a6d6997-347e-44a1-aef7-63f3bdc0f8b3-test092214b.jpg\"\n      } \n    }\n  ],\n  \"MaxWidth\": 2000,\n  \"MaxHeight\": 2000\n}",
  CURLOPT_HTTPHEADER => array(
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
<?php

$request = new HttpRequest();
$request->setUrl('https://api.print.io/api/v/5/source/api/productpreview/');
$request->setMethod(HTTP_METH_POST);

$request->setQueryData(array(
  'recipeid' => 'f255af6f-9614-4fe2-aa8b-1b77b936d9d6'
));

$request->setHeaders(array(
  'content-type' => 'application/json'
));

$request->setBody('{
  "Sku": "PremiumPhoneCase-iPhone-12-SnapCaseGloss",
  "Images": [
    {
      "Images": {
          "Url": "http://app-imgs.print.io/temp/4a6d6997-347e-44a1-aef7-63f3bdc0f8b3-test092214b.jpg"
      } 
    }
  ],
  "MaxWidth": 2000,
  "MaxHeight": 2000
}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{
  "Sku": "PremiumPhoneCase-iPhone-12-SnapCaseGloss",
  "Images": [
    {
      "Images": {
          "Url": "http://app-imgs.print.io/temp/4a6d6997-347e-44a1-aef7-63f3bdc0f8b3-test092214b.jpg"
      } 
    }
  ],
  "MaxWidth": 2000,
  "MaxHeight": 2000
}');

$request->setRequestUrl('https://api.print.io/api/v/5/source/api/productpreview/');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setQuery(new http\QueryString(array(
  'recipeid' => 'f255af6f-9614-4fe2-aa8b-1b77b936d9d6'
)));

$request->setHeaders(array(
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
import http.client

conn = http.client.HTTPSConnection("api.print.io")

payload = "{\n  \"Sku\": \"PremiumPhoneCase-iPhone-12-SnapCaseGloss\",\n  \"Images\": [\n    {\n      \"Images\": {\n          \"Url\": \"http://app-imgs.print.io/temp/4a6d6997-347e-44a1-aef7-63f3bdc0f8b3-test092214b.jpg\"\n      } \n    }\n  ],\n  \"MaxWidth\": 2000,\n  \"MaxHeight\": 2000\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/api/v/5/source/api/productpreview/?recipeid=f255af6f-9614-4fe2-aa8b-1b77b936d9d6", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "https://api.print.io/api/v/5/source/api/productpreview/"

querystring = {"recipeid":"f255af6f-9614-4fe2-aa8b-1b77b936d9d6"}

payload = "{\n  \"Sku\": \"PremiumPhoneCase-iPhone-12-SnapCaseGloss\",\n  \"Images\": [\n    {\n      \"Images\": {\n          \"Url\": \"http://app-imgs.print.io/temp/4a6d6997-347e-44a1-aef7-63f3bdc0f8b3-test092214b.jpg\"\n      } \n    }\n  ],\n  \"MaxWidth\": 2000,\n  \"MaxHeight\": 2000\n}"
headers = {'content-type': 'application/json'}

response = requests.request("POST", url, data=payload, headers=headers, params=querystring)

print(response.text)
curl --request POST \
  --url 'https://api.print.io/api/v/5/source/api/productpreview/?recipeid=f255af6f-9614-4fe2-aa8b-1b77b936d9d6' \
  --header 'content-type: application/json' \
  --data '{
  "Sku": "PremiumPhoneCase-iPhone-12-SnapCaseGloss",
  "Images": [
    {
      "Images": {
          "Url": "http://app-imgs.print.io/temp/4a6d6997-347e-44a1-aef7-63f3bdc0f8b3-test092214b.jpg"
      } 
    }
  ],
  "MaxWidth": 2000,
  "MaxHeight": 2000
}'
echo '{
  "Sku": "PremiumPhoneCase-iPhone-12-SnapCaseGloss",
  "Images": [
    {
      "Images": {
          "Url": "http://app-imgs.print.io/temp/4a6d6997-347e-44a1-aef7-63f3bdc0f8b3-test092214b.jpg"
      } 
    }
  ],
  "MaxWidth": 2000,
  "MaxHeight": 2000
}' |  \
  http POST 'https://api.print.io/api/v/5/source/api/productpreview/?recipeid=f255af6f-9614-4fe2-aa8b-1b77b936d9d6' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "Sku": "PremiumPhoneCase-iPhone-12-SnapCaseGloss",\n  "Images": [\n    {\n      "Images": {\n          "Url": "http://app-imgs.print.io/temp/4a6d6997-347e-44a1-aef7-63f3bdc0f8b3-test092214b.jpg"\n      } \n    }\n  ],\n  "MaxWidth": 2000,\n  "MaxHeight": 2000\n}' \
  --output-document \
  - 'https://api.print.io/api/v/5/source/api/productpreview/?recipeid=f255af6f-9614-4fe2-aa8b-1b77b936d9d6'