Copy link to clipboard
Copied
I am trying to use the Adobe PDF Services API for Document Generation.
I have already set up my credentials in the Adobe Developer Console (OAuth Server-to-Server integration, PDF Services API is enabled).
What I am doing:
POST https://pdf-services.adobe.io/operation/documentgeneration
Authorization: Bearer <access_token>
x-api-key: <client_id_from_console>
Content-Type: application/json
{
"outputFormat": "docx",
"templateContent": "<base64 encoded docx file here>",
"jsonDataForMerge": {
"Table1": [
{ "Col1": "AAA", "Col2": "Married", "Col3": "50000" },
{ "Col1": "BBB", "Col2": "Married", "Col3": "100000" }
]
}
}
Problem:
Every request fails with status 400 error:
{"error":{"code":"UNSUPPORTED_OPERATION","message":"Unsupported Operation."}}
Notes:
Question:
Am I missing something in the JSON structure or headers?
Please can someone let me know ASAP
templateContent is not a valid parameter. You need to upload the template, then reference its assetID. Please see the documentation here. https://developer.adobe.com/document-services/docs/apis/#tag/Document-Generation
Copy link to clipboard
Copied
templateContent is not a valid parameter. You need to upload the template, then reference its assetID. Please see the documentation here. https://developer.adobe.com/document-services/docs/apis/#tag/Document-Generation
Find more inspiration, events, and resources on the new Adobe Community
Explore Now