Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4082

Trouble Adding Phone Number into Zoho CRM

$
0
0

So, I have a 'Company' Module,below is the screenshot of the field that it containsenter image description here

I am trying to add a phone number to the field named "Contact Phone" but it does not get added or visible on the record once added.Below is the code that i am using to make requet to append data.

`import requestsdef add_companies(access_token):    url = "https://www.zohoapis.ca/crm/v2/companies"    headers = {"Authorization": f"Zoho-oauthtoken {access_token}","Content-Type": "application/json"    }    company_data_example = {"data": [{"Name": "Example Company Name","Company Name": "Example Company",  "Email": "example@example.com","Phone": "8883169888" # not getting added into the field    }]}   data = {"data": [company_data_example]}   print(data)     try:        response = requests.post(url, headers=headers, json=company_data_example)        response.raise_for_status()        return response.json()    except requests.exceptions.RequestException as e:        print(f"Error adding vehicle: {e}")        return None    passACCESS_TOKEN = regenerate_token()response = add_companies(access_token=ACCESS_TOKEN)if response:    print(response)else:    print("An error occurred while adding the company.")`

enter image description here

I am trying to figure where it went wrong,any help would be highly appreciated.


Viewing all articles
Browse latest Browse all 4082

Trending Articles