headers = {
"Authorization": f"Zoho-oauthtoken {access_token}",
"Content-Type": "application/json"
}
# TODO: have this automatically iterate through the document_data keys and values (rather than hardcode)
payload = {
"templates": {
"field_data" : {
"field_text_data" : {
"contract_number": document_data.get("contract_number", {}),
"sow_number": document_data.get("sow_number", {})
},
"field_boolean_data" : {},
"field_date_data" : {
"effective_date": document_data.get("effective_date", {}),
"start_date": document_data.get("start_date", {}),
"end_date": document_data.get("end_date", {}),
"sow_effective_date": document_data.get("sow_effective_date", {})
}
},
"actions": [
{
"action_id": "1",
"role": "Company",
"recipient_email": "test@mosaicdesignlabs.com",
"recipient_name": "Frankie Myers",
"verify_recipient": False
},
{
"action_id": "2",
"role": "Consultant",
"recipient_email": "test2@mosaicdesignlabs.com",
"recipient_name": "test name",
"verify_recipient": False
}
],
"notes": "A contract for your review from Mosaic Engineering, LLC"
}
}