Getting error during inserting a record in form of zoho people using zoho api
import requests
import json
# Set your access token and Zoho People API base URL
access_token = '1000.XXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX'
api_base_url = 'https://people.zoho.in/people/api/'
# Set the form name and data to be inserted
form_link_name = 'travelrequest'
record_data = {
"EmployeeID": "ABCCC 1",
"EmployeeDepartment": "HR",
"PlaceOfVisit": "Delhi",
"ExpectedDateOfDeparture": "16-Jun-2023",
"ExpectedDateOfArrival": "01-Jun-2023",
"PurposeOfVisit": "visit",
"Expectedduration": "23",
"IsBillable": "No",
"CustomerName":"bob"
# Add more fields as necessary
}
# Prepare the API URL# Prepare the API URL
api_url = f'{api_base_url}forms/json/{form_link_name}/insertRecord'
# Prepare the request headers
headers = {
'Authorization': f'Zoho-oauthtoken {access_token}',
'Content-Type': 'application/json',
}
# Prepare the request payload
payload = {
'data': [record_data],
}
# Send the request
response = requests.post(api_url, headers=headers, json=payload)
print(response.content)
# Check the response status
if response.status_code == 201:
print('Record inserted successfully.')
else:
print('Error inserting record.')
print(f'Status Code: {response.status_code}')
print(f'Response: {response.text}')
Above is my code when i run this script i get a error
Error inserting record.
Status Code: 200
Response: {"response":{"message":"Error occurred","uri":"/api/forms/json/travelrequest/insertRecord","errors":{"code":7019,"message":"Missing parameter(s) in the request"},"status":1}}
Anyone help if possible
Access your files securely from anywhere
Zoho Developer Community
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Sticky Posts
Team Zoho People in your city!
We are back with our next series of community events to meet you at your city! We are delighted to invite you to join us for a day of insightful sessions, interactions with other Zoho People users, and one-on-one sessions with our product experts. This
Come, join our HR Community!
Hello everyone, We are delighted to invite you to join the HR Community, an exclusive forum for HR professionals around the world to collaborate, learn and grow together. In the HR community, you will be part of a tight-knit HR group, wherein you can,
Ask the experts: A 5-hour live Q and A session on Zoho People
We are back with the 'Ask the experts' session of the month! Your platform to get instant answers to your questions on Zoho People is now open. Our team of experts is here, on a continuous 5-hour stretch, to answer and give expert solutions. What to ask? Your questions, doubts or any hiccup revolving Zoho People. If you do not have any questions, you can follow the post to add it to your knowledge. Where to ask? Simply use the comments' space of this post to type in your questions.You can start
Ask the experts: A 5-hour live Q and A session on Zoho People
The awaited 'Ask the experts' session of the month is here to give instant answers to your questions on Zoho People. Our team of experts is here, on a continuous 5-hour stretch, to answer and give expert solutions. What to ask? Your questions, doubts or any hiccup revolving Zoho People. If you do not have any questions, you can follow the post to add it to your knowledge. Where to ask? Simply use the comments' space of this post to type in your questions. You can start posting your questions
Webinar: What HR should be doing during this pandemic
These are testing times for organizations, especially for Human Resources. From the reallocation of resources to finding new ways to manage a remote workforce, there are so many things that HR should be focusing on right now. Now is when expert advice can help. Join us for a free webinar and hear it from one of the leading industry experts, Nick Holley, on what HR should be doing during this pandemic. This will be a partially interactive session where Nick will answer your questions once every 10
Zoho TeamInbox Resources
Zoho DataPrep Resources
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Qntrl Resources
Zoho Creator Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.