How to use Deal API in Hubspot?
https://www.zyxware.com/sites/default/files/styles/user_image/public/default_images/index.png?itok=2YmREnrP
BY fathimath.sajila
3 years ago
API
0
comments comment

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.


RELATED ARTICLE

API
more_horiz
close

on 11th March 2015 / by fazeela.ma
Stuplefix is an API for automated video generation. Stupeflix accepts photos, music, videos, maps and text in the form of XML. XML passed along with other input parameters to Stupeflix cloud API for creating video. Stupeflix also allows us to create audio, thumbnail, upload to facebook, youtube tumblr etc. where as Postman extension is a chrome web browser extension for making calls to the Stupeflix API. Stupeflix For using stupeflix API, the API offers its customers with a free account and a premium account. Lets get started by creating an account Open https://accounts.stupeflix.com/login, and sign up for free. For creating new key, navigate to https://developer.stupeflix.com/dragon-keychain/new/ . Fill in the description and url text fields, and we are ready to go. For the first time login, you'll get a complete documentation on how to work with an API key from here, https://developer.stupeflix.com/dragon-keychain/. Postman Extension As Postman RestAPI extension is a chrome extension. It acts as a third-party for Stupeflix and the XML we create. Postman helps us to make complex requests to API, then view its results in a promising and beautiful way. Steps to install Postman extension, Go to http://www.getpostman.com/, click on download. You would be navigated to chrome web store, click on +INSTALL button and you are on. Now lets confirm whether the extension installed or not under chrome://extensions/. Make sure checkbox next to enabled checked. As it is a chrome extension, recommended to use chrome browser. Integrating Stupeflix API with Postman extension. Follow up the steps to integrate Stupeflix API with Postman extension. Download postman example collection from http://developer.stupeflix.com/dragon-keychain/postman-tasks-collection… Now launch Postman, click on Collection tab, then on Import Collection button, finally copy this link and import. The download has a many pre-defined functions like video.create, video.info etc. To run one of these pre-defined functions, in the postman tab, under collections, find Stuplefix API. Expand Stuplefix API, it will list a number of pre-defined functions. For testing I would recommend you to click on video.create from the list. On clicking, it will automatically load the normal tab. Select POST as the form method. To the right, you'll see URL params, click on it. To the very bottom of the URL, Add Authorization as the URL parameter key and value shall be prefixed by the string Secret, with a white space separating the two strings. eg., Authorization secret 12cv365b6536GF3657g56 Click on send. You will get the output just below the button in JSON format. If the status is success, you have successfully implemented the feature, if error is the result, something went wrong. Find the reason behind it here https://stupeflix-tasks-api.readthedocs.org/en/latest/api.html#http-sta… Postman extension will give a better UI for interpreting the results from Stupeflix API. Stupeflix comes a handful to automate video generation, its integration with postman extension makes it more valuable with its UI. Here is a complete documentation on how to pass the input parameters, method to call etc. https://stupeflix-tasks-api.readthedocs.org/en/latest/api.html API Leave a reply Your email address will not be published. Required fields are marker *
API
more_horiz
close

on 12th March 2015 / by arjun.s
The feedAPI module is a famous one for processing custom feeds in different formats like rss/Atom, csv, iCal etc. Now the feedAPI has upgraded to the "feeds",which have more features and easy to use and customize. However still a lot of Drupal 6 sites uses the feedAPI module for handling external feeds. Let us see how a new parser could be created in feed API module. The module provides a lot of third-party parsers to parse each kind of feed types, some are, The RSS/Atom feeds could be parsed using the Common Syndication Parser (part of FeedAPI). The iCal feeds could be parsed with the iCal parser. The CSV files could be aggregated with CSV parser. The KML feeds could be parsed with KML parser But the feedAPI module implemented each of these parsers as separate modules, so if you need to create a new parser you need create a new module for it. There will be multiple situations when you need to implement a new parser, like when you need to process some custom feed content with custom tags, or need to implement a parser for some new type of feeds for which a parser is not available. Anyway I will explain some basics for creating a new one. Creating a help case This is first step, feels like some weird way to define a new parser, however you need to implement the path 'feedapi/full_name' and need to return the name of the new feed parser here. Which means a single module can only implement a single parser. Implement the hook_feedapi_feed Now you need to implement the hook "hook_feedapi_feed" to implement the basic working of your feed parser. Here you have to define the 3 values of the operations($op) parameter, they are, type Here you can define the types of feeds your parser is going to deal with. parse Here you can actually parse the feed object you received, you can depend on the PHP's simplexml functions to convert the xml file into a feed object. All the operations related to parsing the fed object could be done here. compatible In this operation you can check whether the incoming feed is compatible for your parser or not. Implement hook_feedapi_settings_form If the parser provides any settings that are specific for the feed it handles, you could create a settings form by implementing this hook. If this hook implemented then at the time of parser choice for a particular node the settings form displayed. If no settings form created for a particular parser then the selected parser would not show upon the node edit page. API Leave a reply Your email address will not be published. Required fields are marker *
more_horiz
close

on 13th March 2015 / by fathimath.sajila
Stupeflix API is a web service for developers to generate videos using texts, images and videos. To generate videos using Stupeflix API we need to do the following steps Signup for developer account using link https://developer.stupeflix.com Signup an account using your existing email id. Stupeflix offer a free developer account with balance $10 . If you need, you can also upgrade an account using your credit card. Generate an API key Click 'Generate an API' link in the home page(see generate-api.png) it will redirect to an another page with a form. Click Create button, after filling Usage Description and Application/Website url text boxes in the form(see create-api.png). We will get an API key it is the pair of Access key and Secret key. The generated secret key passed as authorization key when we send the request to Stupeflix API. Downloaded Requests library supported by stuplefix using the link http://requests.ryanmccue.info/ Create an SXML file To generate a video from pictures and text we need to create an XML in the format http://stupeflix-sxml.readthedocs.org/en/latest/intro.html#xml-and-full…. Because SXML passed to stuplefix API as an input parameters. The whole xml wrapped inside 'movie' tag. After that add a body tag. With in the body tag we can specify texts, images etc. Stupeflix is also give lot of themes like otline, humble, classic etc. In the case of an themes we can specify text and images within in the widget tag, we can specify the theme name as a type like this type = 'director.theme.humble'. For the more information about the SXML Please look on to the link format http://stupeflix-sxml.readthedocs.org/en/latest/intro.html#xml-and-full…. Write a function to generate video using Stupeflix API After creating SXML we need to create function to send request to stupeflix and return response from stupeflix. Stupeflix provide code to generate video in link https://developer.stupeflix.com/documentation/ in different language like php, python, java etc.Please see find the code for generate video in php. require_once "pathto_Requests_library/Requests.php"; Requests::register_autoloader(); $headers = array("Authorization" => "Secret VG25JPSMLVBSFEHQ2SBFVTEYBQ"); $data = array( "tasks" => array( "task_name" => "video.create", "definition" => "sampleSXML.xml" ) ); $response = Requests::post("https://dragon.stupeflix.com/v2/create", $headers, json_encode($data)); $taskCreation = json_decode($response->body); $response = Requests::get("https://dragon.stupeflix.com/v2/status?tasks=" . $taskCreation[0]->key, $headers); $taskStatusAndResult = json_decode($response->body); First we need to include the Requests.php file from request library. Input parameters to the stupeflix API is SXML file and $headers, $headers has the secret key in an API key. Response from stupeflix is an array which has the status, result etc. The status of the response could be either "queued", "executing", "success" or "error". When the status is "success" we can downloaded generated video using the url of the video. $task_status_and_result[0]['result']['export'] is the url of the video in the $task_status_and_result array. API Stupeflix Leave a reply Your email address will not be published. Required fields are marker *
Leave a reply
Your email address will not be published. Required fields are marker *

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
The content of this field is kept private and will not be shown publicly.
CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.