Comments (2)
You should be able to associate a contact (or company) like this:
/**
* Initialize the API with your API Key
* You can find or generate this under Integrations -> HubSpot API key
*/
var api = new HubSpotApi("demo");
/**
* Create a contact
*/
var contact = api.Contact.Create(new ContactHubSpotModel()
{
Email = "[email protected]",
FirstName = "John",
LastName = "Smith",
Phone = "00000 000000",
Company = "Squared Up Ltd."
});
/**
* Create a deal
*/
var deal = api.Deal.Create(new DealHubSpotModel()
{
Amount = 10000,
Name = "New Deal #1",
Associations = { AssociatedContacts = new []{ contact.Id.Value }} //associate here!
});
Is that not working for you?
from hubspot.net.
It's working perfectly now. Thanks so much for the help!
from hubspot.net.
Related Issues (20)
- Deal Close Date seems to be wrong type.
- HubSpotOAuthApi Authorize and Refresh Methods Return Null Token with Valid Input
- New nuget release? HOT 1
- Missing API - Best practice to contribute
- Removal of flurl broke everything. Bad query strings.
- "Engagement type cannot be null" while creating engagement. HOT 1
- Using custom properties dynamically
- v0.8.13 Released to NuGet? HOT 4
- RestSharp HOT 1
- Replacement Project
- Upload File Responses with Empty JSON
- StatusCode is private
- Most Updated/Maintained Fork? HOT 4
- Private App Support
- Endpoint not found and Bearer token not set
- HubSpot phasing out API for Private App HOT 4
- Contact Get Requests does not return 'CreatedAt' and 'UpdatedAt' HOT 1
- This hapikey doesn't exist.","correlationId":
- Map date time properties HOT 1
- Create Deals with Line Items HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hubspot.net.