Send template to a client
POST https://services.leadconnectorhq.com/proposals/templates/send
Authorization
Body
Responses
200 - Document sent successfully
success (boolean, required): Success status Example: True
links (object[], required): Links for all recipients
referenceId (string, required): Reference ID Example: 550e8400-e29b-41d4-a716-446655440000
documentId (string, required): Document ID Example: c1e87a91-93b2-4b78-821f-85cf0e1f925b
recipientId (string, required): Recipient ID Example: u240JcS0E5qE0ziHnwMm
entityName (string, required): Entity name that the recipient belongs to Possible values: 'contacts', 'users' Example: contacts
recipientCategory (string, required): Recipient category (recipient, cc, or bcc) Possible values: 'recipient', 'cc', 'bcc' Example: recipient
documentRevision (number, required): Document revision number Example: 1
createdBy (string, required): Created by user ID Example: b6d8fa28-1112-4dc7-b9d2-f22b75a477ea
deleted (boolean, required): Whether the document is deleted Example: False
{
"success": true,
"links": [
{
"referenceId": "550e8400-e29b-41d4-a716-446655440000",
"documentId": "c1e87a91-93b2-4b78-821f-85cf0e1f925b",
"recipientId": "u240JcS0E5qE0ziHnwMm",
"entityName": "contacts",
"recipientCategory": "recipient",
"documentRevision": 1,
"createdBy": "b6d8fa28-1112-4dc7-b9d2-f22b75a477ea",
"deleted": false
}
]
}
400 - Unprocessable Entity
statusCode (number): Example: 400
message (string): Example: Bad Request
{
"statusCode": 400,
"message": "Bad Request"
}
Example
curl -X POST 'https://services.leadconnectorhq.com/proposals/templates/send' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"templateId": "hTlkh7t8gujsahgg93",
"userId": "hTlkh7t8gujsahgg93",
"sendDocument": true,
"locationId": "hTlkh7t8gujsahgg93",
"contactId": "hTlkh7t8gujsahgg93",
"opportunityId": "hTlkh7t8gujsahgg93"
}'
const response = await fetch('https://services.leadconnectorhq.com/proposals/templates/send', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"templateId": "hTlkh7t8gujsahgg93", "userId": "hTlkh7t8gujsahgg93", "sendDocument": true, "locationId": "hTlkh7t8gujsahgg93", "contactId": "hTlkh7t8gujsahgg93", "opportunityId": "hTlkh7t8gujsahgg93"}),
});
const data = await response.json();
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/proposals/templates/send',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"templateId": "hTlkh7t8gujsahgg93", "userId": "hTlkh7t8gujsahgg93", "sendDocument": true, "locationId": "hTlkh7t8gujsahgg93", "contactId": "hTlkh7t8gujsahgg93", "opportunityId": "hTlkh7t8gujsahgg93"},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/proposals/templates/send');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'templateId': 'hTlkh7t8gujsahgg93', 'userId': 'hTlkh7t8gujsahgg93', 'sendDocument': true, 'locationId': 'hTlkh7t8gujsahgg93', 'contactId': 'hTlkh7t8gujsahgg93', 'opportunityId': 'hTlkh7t8gujsahgg93'}),
]);
$data = json_decode(curl_exec($ch), true);