How to use Deal API in Hubspot?
The Deal API is used to easy integration of Hubspot CRM. Deals API is provide a one:many relationship with contacts and companies.This is important for any integration to add deals to a contact or company. Now we can look on to the Deal API'S.
Create a Deal :
URL for posting in Hubspot is : https://api.hubapi.com/deals/v1/deal?hapikey=demo&portalId=62515
.
Required Parameters to send request :
- HubSpot OAuth Access API Key or Token
- Deal JSON : It represent deal that should be in the format
{
"associations": {
"associatedCompanyIds": [8954039],
"associatedVids": [27136]
},
"portalId": 62515,
"properties": [
{
"value": "ACC sylicon",
"name": "deal"
},
{
"value": "50000",
"name": "price"
},
{
"value": "appointmentscheduled",
"name": "dealstage"
},
{
"value": "newbusiness",
"name": "dealtype"
}
]
}
Note that you can create a deal with associations Contacts or Companies. You can also create an orphaned deal.
Update a Deal
Updates the deal with dealId. Returns JSON representing the updated deal.
URL post to Hubspot: https://api.hubapi.com/deals/v1/deal/10444744?hapikey=demo&portalId=62515
- HubSpot OAuth Access Token or API Key
- Deal Id :Used in the request URL (see above).
- Deal JSON : This is JSON that represents the changes that you are making to the specified deal. Deal JSON format is
{
"properties": [
{
"name": "price",
"value": "80000"
}
]
}
Delete a Deal
Deletes the existing deal of particular deal Id. Return JSON specified deal was actually deleted or not. Deletes the existing deal using deal Id. Return JSON deal shows it deleted or not.
Example URL:
https://api.hubapi.com/deals/v1/deal/10444744?hapikey=demo&portalId=62515
Feel free to clear your doubts and share your valuable suggestions. Do you want any-more business help, get a smart quote now.