I'm having a problem with Bulk Write API in Zoho CRM Plus Contacts Module
Hi . I have some questions about integrating REST API with my Nodejs App.
I'm new to Zoho and haven't used it before. The current client I have is using Zoho CRM Plus and he is requesting a csv file upload which he is going to do that an automatic process everyday , which I'm doing to achieve this by doing a cron job in my server and executing bulk write api functions.
I've already created a developer app and got the refresh token with this scope : ZohoCRM.bulk.ALL,ZohoCRM.modules.contacts.all,ZohoFiles.files.ALL,ZohoCRM.org.ALL,ZohoCRM.settings.fields.all
I can insert records manually, get records and upload file then user FILE ID in Bulk Write Job.
However when I want to do a Create a Bulk Write Job I'm having problems with the response.
POST :
https://www.zohoapis.eu/crm/bulk/v2/write
data :
{
"operation": "update",
"callback": {
"method": "post"
},
"resource": [
{
"type": "data",
"module": "contacts", // Contacts Module I want to insert/update/ data
"file_id": "1437800......." , // FILE ID I"M GETTING AFTER UPLOAD
"field_mappings": [
{
"api_name": "First_Name",
"index": 5
},
{
"api_name": "Last_Name",
"index": 6,
"default_value": {
"value": ""
}
}
]
}
]
}
There are two types of responses I get :
{
"status": "error",
"code": "MANDATORY_NOT_FOUND",
"message": "Required key find_by is not available",
"details": {}
}
and the other is about a file format problem ( Which I'm not getting when Uploading file , but only in Create bulk Write) job .
I'm not sure about it and could not find anything. Even though I upload the file with .zip and only 2MB.
My questions are :
1) How can map fields correctly with the CSV file I have.
2) Do you have any resource in NodeJs or PHP that used Bulk Write api so I can have a look ?