【发布时间】:2021-08-29 19:36:28
【问题描述】:
当我尝试通过 hubspot api 创建交易时,即使我正在通过填充数据,所创建的只是一个完全空白的交易
API 网址:https://developers.hubspot.com/docs/api/crm/deals
这是我正在尝试的以下代码:
import json
import requests
hubspot_api_key = "MY_API_KEY"
url = 'https://api.hubapi.com/crm/v3/objects/deals?hapikey={}'.format(hubspot_api_key)
headers = {"Content-Type": "application/json"}
deals_post = {
'amount': "4034.75",
'closedate': '2021-05-10T12:04:00.000Z',
'dealname': 'Custom data integrations',
'dealstage': 'closedwon',
'hubspot_owner_id': "5448459615",
'pipeline': 'default'
}
response = requests.post(url, headers=headers, data=json.dumps(deals_post))
print(response.text)
这是它的结果:
【问题讨论】:
标签: python api python-requests crm hubspot