Purchase an artwork

Purchase the print-quality version of the user's artwork.

When an end user purchases a print via a partner's website, the partner must purchase the print-quality version of the user's artwork from Canva. In response to this purchase, Canva immediately provides a URL to download the print-quality artwork.

POST

https://api.canva.com/_tpi/partnership/<partner_id>/artworks/<artwork_id>
bash
HeaderDescription
AuthorizationThe integration's Artwork API secret.
ParameterTypeRequiredDescription
partner_idstringYesThe integration's Partner ID.
artwork_idstringYesThe ID of the user's artwork.
PropertyTypeRequiredDescription
purchaseConfirmationobjectYesInformation about the purchase.
purchaseConfirmation.currencystringYesThe currency of the purchase in the ISO 4217 format.
purchaseConfirmation.discountAmountnumberYesThe amount deducted from the gross amount using coupons, gift certificates, and other redeemable incentives. If there's no discount to apply, set to 0.00.
purchaseConfirmation.grossAmountnumberYesThe price of the order excluding discounts, but including shipping fees, taxes, and other charges applied to the order value.
purchaseConfirmation.itemstringYesThe ID of the order's item in the partner's back-end system.
purchaseConfirmation.netAmountnumberYesThe price of the order excluding discounts, shipping fees, taxes, and other charges applied to the order value.
purchaseConfirmation.orderstringYesThe ID of the order in the partner's back-end system.
purchaseConfirmation.quantityint32YesThe quantity of items the user is purchasing with the order.
purchaseConfirmation.skustringYesThe SKU of the item in the partner's back-end system.
purchaseConfirmation.extraDetailsstringNoFree-form field for additional details about the purchase.
{
"purchaseConfirmation": {
"order": "OR_12345672",
"item": "IT_12345672-003",
"sku": "PS034509",
"quantity": 5,
"currency": "USD",
"grossAmount": 65.5,
"discountAmount": 6.55,
"netAmount": 58.95
}
}
json

The response when the purchase is successful.

NameTypeRequiredDescription
idstringYesThe ID of the artwork.
productionFile (deprecated)stringNoThe URL of the print-quality artwork. This URL expires after 15 minutes. This property has been superseded by productionFiles.
productionFilesstringYesA list of URLs for downloading the print-quality version of the user's artwork. For JPG and PNG file formats, there's a separate URL for each page. For PDF file formats, there's one URL for the entire artwork. The URL is in the form https://partnership-artwork.canva.com/<export_file>. If you're using the China version of the SDK, the TLD is .cn instead of .com. You can take the necessary security measures to protect the URL from any malicious attacks.
{
"id": "123456",
"productionFiles": ["https://...", "https://...", "https://..."]
}
json

The response when Canva doesn't recognize the supplied credentials.

const axios = require("axios");
(async () => {
const response = await axios.request({
baseURL: "https://api.canva.com",
url: `/_tpi/partnership/<partner_id>/artworks/<artwork_id>`,
method: "post",
headers: {
Authorization: "<artwork_api_secret>",
},
data: {
purchaseConfirmation: {
order: "OR_12345672",
item: "IT_12345672-003",
sku: "PS034509",
quantity: 5,
currency: "USD",
grossAmount: 65.5,
discountAmount: 6.55,
netAmount: 58.95,
},
},
});
console.log(response.data);
})();
javascript