def new_project(
**kwargs):
''''''
headers = {
'Authorization': 'Zoho-oauthtoken '+access_token
}
portal_name = "XXXXXX"
url = f'https://projectsapi.zoho.com/restapi/portal/{portal_name}/projects/'
params = {
template_id = "TEST",
UDF_USER1 = "xxxx" ,
UDF_USER2 = "XXX",
UDF_USER3 = "XXX",
start_date = "04-01-2021",
UDF_CHAR1 = "XXX",
UDF_CHAR2 = "XXX",
end_date = "05-01-2021"
)
}
response = requests.post(url, params=params, headers=headers)
print(response.status_code)
if response is not None:
if response.status_code < 400:
return response.json()
else:
raise Exception(response)
else:
print("we got no response")