创建设计自动填充作业
开发环境
开发环境
POST
/rest/v1/autofills
type
来引用图像媒体。品牌模板中对图像媒体的引用数量目前不能超过 300 个。image``data
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/rest/v1/autofills' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"brand_template_id": "DAFVztcvd9z",
"title": "string",
"data": {
"cute_pet_image_of_the_day": {
"type": "image",
"asset_id": "Msd59349ff"
},
"cute_pet_witty_pet_says": {
"type": "text",
"text": "It was like this when I got here!"
}
}
}'
响应示例响应示例
{
"job": {
"id": "450a76e7-f96f-43ae-9c37-0e1ce492ac72",
"status": "success",
"result": {
"type": "create_design",
"design": {
"id": "DAFVztcvd9z",
"title": "My summer holiday",
"url": "https://www.canva.com/design/DAFVztcvd9z/edit",
"thumbnail": {
"width": 595,
"height": 335,
"url": "https://document-export.canva.com/Vczz9/zF9vzVtdADc/2/thumbnail/0001.png?<query-string>"
}
}
},
"error": {
"code": "autofill_error",
"message": "string"
}
}
}
请求参数
Header 参数
Authorization
string
必需
示例值:
Bearer {token}
Content-Type
string
必需
示例值:
application/json
Body 参数application/json
返回响应
修改于 2024-06-26 09:11:11