Last active
July 28, 2021 14:47
-
-
Save BoldBigflank/230e5e3427e80006aa50cab654b47114 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Replace this with your recipe id from https://www.gooten.com/Admin/#/settings/api | |
const RECIPE_ID = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; | |
fetch(`https://api.print.io/api/v/5/source/api/productpreview/?recipeid=${RECIPE_ID}`, { | |
"method": "POST", | |
"headers": { | |
"content-type": "application/json" | |
}, | |
"body": JSON.stringify({ | |
"Sku": "PremiumPhoneCase-iPhone-12-SnapCaseGloss", | |
"Images": [ | |
{ | |
"Image": { | |
"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); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment