[HTTP POST] ~/journeys/{JourneyId}/landingpages/{landingpageId}/generatePDF
Description: Create/Update a contact in a specific ContactList
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
JourneyId | integer |
Required |
|
landingpageId | integer |
Required |
QueryString Parameters
Custom Events
This Endpoint supports executing Custom Events after it Inserts/Updates Contacts.
You can execute custom events by adding a 'customevents' parameter with a comma-seperated list of Custom Event names to the Request's QueryString.
For Example: If you'd like to run the SendWelcomeEmail and SendEventInvite Custom Events with the contacts that have been successfully inserted/updated via this Call, you can do so via:
journeys/{JourneyId}/landingpages/{landingpageId}/generatePDF + "?customevents=SendWelcomeEmail,SendEventInvite"
Match Values
This Endpoint supports updating all Contacts within a given ContactList who have properties that match a given set values.
You can specify what values to match on by adding the following to the Request's QueryString:
- Adding 'match' parameter with a comma-seperated list of the PropertyNames to match on.
- If using a PATCH call - by Adding each PropertyName and required value to match upon.
- If using a POST/PUT call, make sure the specified PropertyName is a property of the ContactDTO that's being passed as part of the body.
For Example: If you'd like to update all contacts who have a specific ReferanceAccountId and EmailAddress, you would do so via:
[PATCH] journeys/{JourneyId}/landingpages/{landingpageId}/generatePDF + "?match=ReferanceAccountId,Email&ReferanceAccountId=123456&Email=pgannon@customerminds.com"
[PUT] journeys/{JourneyId}/landingpages/{landingpageId}/generatePDF + "?match=ReferanceAccountId,Email"
Body: {
values: {
"ReferanceAccountId":123456,
"Email": "pgannon@customerminds.com"
"Mobile": "353871234567" // Value to be updated
}
}
Please refer to the given ContactList's Schema/Fields as a list of valid values.
Body Parameters
Name | Description | Type | Additional information |
---|---|---|---|
Contact |
The ContactDTO |
Contact |
None. |
Config |
The PDF Document Config options |
DocumentGenerationConfig |
None. |
Formats
application/json, text/json
{ "Contact": { "EncContactId": "sample string 2", "ListId": 3, "Values": { "sample string 1": {}, "sample string 3": {} } }, "Config": { "preferredConverter": 1, "marginTop": 2, "marginBottom": 3, "marginLeft": 4, "marginRight": 5, "webPageWidth": 6, "webPageHeight": 7, "embedFonts": true, "pdfStandard": "sample string 9", "landscapeOrientation": true, "pageSize": "sample string 11", "autoFitWidth": "sample string 12", "autoFitHeight": "sample string 13", "cssMediaType": "sample string 14", "jpegCompressionEnabled": true, "jpegCompressionLevel": 16, "scaleImages": true, "hideElementsCssSelectors": "sample string 18", "applyPasswords": true, "ownerPassword": "sample string 20", "requireUserPassword": true, "contactPasswordField": "sample string 22", "minPageLoadTime": 23, "maxPageLoadTime": 24, "generateSinglePagePdf": true, "displayHeader": true, "header": { "height": 1.1, "firstPageNumber": 2, "totalPagesOffset": 3, "displayOnFirstPage": true, "displayOnOddPages": true, "displayOnEvenPages": true, "htmlContent": "sample string 7" }, "displayFooter": true, "footer": { "height": 1.1, "firstPageNumber": 2, "totalPagesOffset": 3, "displayOnFirstPage": true, "displayOnOddPages": true, "displayOnEvenPages": true, "htmlContent": "sample string 7" }, "canAssembleDocument": true, "canCopyContent": true, "canEditAnnotations": true, "canEditContent": true, "canFillFormFields": true, "canPrint": true } }
application/csp-report
{"Contact":{"EncContactId":"sample string 2","ListId":3,"Values":{"sample string 1":{},"sample string 3":{}}},"Config":{"preferredConverter":1,"marginTop":2,"marginBottom":3,"marginLeft":4,"marginRight":5,"webPageWidth":6,"webPageHeight":7,"embedFonts":true,"pdfStandard":"sample string 9","landscapeOrientation":true,"pageSize":"sample string 11","autoFitWidth":"sample string 12","autoFitHeight":"sample string 13","cssMediaType":"sample string 14","jpegCompressionEnabled":true,"jpegCompressionLevel":16,"scaleImages":true,"hideElementsCssSelectors":"sample string 18","applyPasswords":true,"ownerPassword":"sample string 20","requireUserPassword":true,"contactPasswordField":"sample string 22","minPageLoadTime":23,"maxPageLoadTime":24,"generateSinglePagePdf":true,"displayHeader":true,"header":{"height":1.1,"firstPageNumber":2,"totalPagesOffset":3,"displayOnFirstPage":true,"displayOnOddPages":true,"displayOnEvenPages":true,"htmlContent":"sample string 7"},"displayFooter":true,"footer":{"height":1.1,"firstPageNumber":2,"totalPagesOffset":3,"displayOnFirstPage":true,"displayOnOddPages":true,"displayOnEvenPages":true,"htmlContent":"sample string 7"},"canAssembleDocument":true,"canCopyContent":true,"canEditAnnotations":true,"canEditContent":true,"canFillFormFields":true,"canPrint":true}}
application/xml, text/xml
<GenerateDocumentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/W50API.Models.DTO"> <Config xmlns:d2p1="http://schemas.datacontract.org/2004/07/W50HtmlProcessor"> <d2p1:applyPasswords>true</d2p1:applyPasswords> <d2p1:autoFitHeight>sample string 13</d2p1:autoFitHeight> <d2p1:autoFitWidth>sample string 12</d2p1:autoFitWidth> <d2p1:canAssembleDocument>true</d2p1:canAssembleDocument> <d2p1:canCopyContent>true</d2p1:canCopyContent> <d2p1:canEditAnnotations>true</d2p1:canEditAnnotations> <d2p1:canEditContent>true</d2p1:canEditContent> <d2p1:canFillFormFields>true</d2p1:canFillFormFields> <d2p1:canPrint>true</d2p1:canPrint> <d2p1:contactPasswordField>sample string 22</d2p1:contactPasswordField> <d2p1:cssMediaType>sample string 14</d2p1:cssMediaType> <d2p1:displayFooter>true</d2p1:displayFooter> <d2p1:displayHeader>true</d2p1:displayHeader> <d2p1:embedFonts>true</d2p1:embedFonts> <d2p1:footer> <d2p1:displayOnEvenPages>true</d2p1:displayOnEvenPages> <d2p1:displayOnFirstPage>true</d2p1:displayOnFirstPage> <d2p1:displayOnOddPages>true</d2p1:displayOnOddPages> <d2p1:firstPageNumber>2</d2p1:firstPageNumber> <d2p1:height>1.1</d2p1:height> <d2p1:htmlContent>sample string 7</d2p1:htmlContent> <d2p1:totalPagesOffset>3</d2p1:totalPagesOffset> </d2p1:footer> <d2p1:generateSinglePagePdf>true</d2p1:generateSinglePagePdf> <d2p1:header> <d2p1:displayOnEvenPages>true</d2p1:displayOnEvenPages> <d2p1:displayOnFirstPage>true</d2p1:displayOnFirstPage> <d2p1:displayOnOddPages>true</d2p1:displayOnOddPages> <d2p1:firstPageNumber>2</d2p1:firstPageNumber> <d2p1:height>1.1</d2p1:height> <d2p1:htmlContent>sample string 7</d2p1:htmlContent> <d2p1:totalPagesOffset>3</d2p1:totalPagesOffset> </d2p1:header> <d2p1:hideElementsCssSelectors>sample string 18</d2p1:hideElementsCssSelectors> <d2p1:jpegCompressionEnabled>true</d2p1:jpegCompressionEnabled> <d2p1:jpegCompressionLevel>16</d2p1:jpegCompressionLevel> <d2p1:landscapeOrientation>true</d2p1:landscapeOrientation> <d2p1:marginBottom>3</d2p1:marginBottom> <d2p1:marginLeft>4</d2p1:marginLeft> <d2p1:marginRight>5</d2p1:marginRight> <d2p1:marginTop>2</d2p1:marginTop> <d2p1:maxPageLoadTime>24</d2p1:maxPageLoadTime> <d2p1:minPageLoadTime>23</d2p1:minPageLoadTime> <d2p1:ownerPassword>sample string 20</d2p1:ownerPassword> <d2p1:pageSize>sample string 11</d2p1:pageSize> <d2p1:pdfStandard>sample string 9</d2p1:pdfStandard> <d2p1:preferredConverter>1</d2p1:preferredConverter> <d2p1:requireUserPassword>true</d2p1:requireUserPassword> <d2p1:scaleImages>true</d2p1:scaleImages> <d2p1:webPageHeight>7</d2p1:webPageHeight> <d2p1:webPageWidth>6</d2p1:webPageWidth> </Config> <Contact> <EncContactId xmlns="http://schemas.datacontract.org/2004/07/W50Common.Model.DTO">sample string 2</EncContactId> <Id xmlns="http://schemas.datacontract.org/2004/07/W50Common.Model.DTO">1</Id> <ListId xmlns="http://schemas.datacontract.org/2004/07/W50Common.Model.DTO">3</ListId> <Values xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/W50Common.Model.DTO"> <d3p1:KeyValueOfstringanyType> <d3p1:Key>sample string 1</d3p1:Key> <d3p1:Value /> </d3p1:KeyValueOfstringanyType> <d3p1:KeyValueOfstringanyType> <d3p1:Key>sample string 3</d3p1:Key> <d3p1:Value /> </d3p1:KeyValueOfstringanyType> </Values> </Contact> </GenerateDocumentRequest>
Response Information
Description
Successful Response - OK (200):
The Contact(s) was/were created/updated, with an additional Encrypted Contact Id if contact inserted
Response Content : GenerateDocumentResponse
Name | Description | Type | Additional information |
---|---|---|---|
Contact |
The ContactDTO |
Contact |
None. |
Data |
The Document byte data |
Collection of byte |
None. |
Response Codes:
-
200 - OK
- The contact was updated successfully.
-
401 - Unauthorized
- Request has been denied as it lacks valid Authentication credentials.
-
403 - Forbidden
- The user does not have the relevant permissions to perform this action.
-
500 - InternalServerError
- An error occurred while processing this request.
Formats
application/json, text/json
{ "Contact": { "EncContactId": "sample string 2", "ListId": 3, "Values": { "sample string 1": {}, "sample string 3": {} } }, "Data": "QEA=" }
application/csp-report
{"Contact":{"EncContactId":"sample string 2","ListId":3,"Values":{"sample string 1":{},"sample string 3":{}}},"Data":"QEA="}
application/xml, text/xml
<GenerateDocumentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/W50API.Models.DTO"> <Contact> <EncContactId xmlns="http://schemas.datacontract.org/2004/07/W50Common.Model.DTO">sample string 2</EncContactId> <Id xmlns="http://schemas.datacontract.org/2004/07/W50Common.Model.DTO">1</Id> <ListId xmlns="http://schemas.datacontract.org/2004/07/W50Common.Model.DTO">3</ListId> <Values xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/W50Common.Model.DTO"> <d3p1:KeyValueOfstringanyType> <d3p1:Key>sample string 1</d3p1:Key> <d3p1:Value /> </d3p1:KeyValueOfstringanyType> <d3p1:KeyValueOfstringanyType> <d3p1:Key>sample string 3</d3p1:Key> <d3p1:Value /> </d3p1:KeyValueOfstringanyType> </Values> </Contact> <Data>QEA=</Data> </GenerateDocumentResponse>