latestOpenAPI 3.0.02026-08-105585620.8 KB
18e2f2e178dd
Mockup Generator API
Create a mockup generation task
Creates an asynchronous mockup generation task. Generation result can be retrieved using mockup generation task retrieval endpoint.<br> Rate limiting: Up to 10 requests per 60 seconds for established stores; 2 requests per 60 seconds for new stores. Currently available rate is returned in response headers. A 60 seconds lockout is applied if request count is exceeded. We also limit the number of files that may be generated to 20,000 files per account in a 24-hour period.
post/mockup-generator/create-task/{id}
Path parameters
idinteger required
Product ID.
Headers
X-PF-Store-Idstring
Use this to specify which store you want to use (required only for account level token).
The store IDs can be retrieved with the Get basic information about stores endpoint.
Request body
Example request
{
"variant_ids": [
4012,
4013,
4014,
4017,
4018,
4019
],
"format": "jpg",
"files": [
{
"placement": "front",
"image_url": "http://your-site/path-to-front-printfile.jpg",
"position": {
"area_width": 1800,
"area_height": 2400,
"width": 1800,
"height": 1800,
"top": 300
},
"options": [
{
"id": "template_type",
"value": "native"
}
]
}
],
"product_template_id": 123
}Response
OK
Example response
{
"code": 200,
"result": {
"task_key": "123456",
"status": "completed",
"mockups": [
{
"placement": "front",
"display_name": "Front Print",
"variant_ids": [
4011,
4012,
4013
],
"extra": [
{
"url": "https://url-to/extra-mockup.png"
}
]
}
],
"printfiles": [
{
"variant_ids": [
4012,
4013,
4014,
4017,
4018,
4019
],
"placement": "front",
"url": "https://url-to/printfile.png"
}
]
}
}