APIs & Integrations

bdrf
Member

How can I create a quote through the API that inherits default branding?

Hi there,

 

Perhaps I'm doing something wrong, but is there a way when creating a quote through the API to pull the default company name, address, etc in the same way that it happens when creating a quote in app? I can set those properties manually ("hs_sender_company_name" for example) but there also doesn't seem like there's an endpoint to pull this information.

 

Thanks!

0 Upvotes
2 Replies 2
Jaycee_Lewis
Community Manager
Community Manager

How can I create a quote through the API that inherits default branding?

Hey, @bdrf 👋 Can you share an example (screenshots are fine) of a quote created in-app vs using the Quotes API where the details are different/not what you expected? 

Other questions to help give our community members more information:

  • when using the API are you associating your quote to the same template as your in-app quote?
  • is it a custom-coded quote template or one you modified in-app through Settings > Quotes?

Additionally, you can get all available quote properties from the Properties API.

 

Thanks! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
bdrf
Member

How can I create a quote through the API that inherits default branding?

Sure, can do!

 

When I make the following API request:

{
  "properties": {
    "hs_title": "new deal with contact",
    "hs_expiration_date": "2025-01-16",
    "hs_status": "DRAFT",
    "hs_language": "en"
  },
  "associations": [
    {
      "to": {
        "id": "29941800297"
      },
      "types": [
        {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 64
        }
      ]
    },
    {
      "to": {
        "id": "26638936870"
      },
      "types": [
        {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 67
        }
      ]
    },
    {
      "to": {
        "id": "26638030348"
      },
      "types": [
        {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 67
        }
      ]
    },
    {
      "to": {
        "id": "26638781989"
      },
      "types": [
        {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 67
        }
      ]
    },
    {
      "to": {
        "id": "382050996270"
      },
      "types": [
        {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 286
        }
      ]
    },
    {
      "to": {
        "id": "77130241717"
      },
      "types": [
        {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 69
        }
      ]
    },
    {
      "to": {
        "id": "25811241479"
      },
      "types": [
        {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 71
        }
      ]
    }
  ]
}

 

Here is the screenshot of the created quote from the app:

Quotes.jpeg

There's no quote sender or company information set. I can set that manually by sending in hs_sender_firstname and stuff like that, but when I create a quote normally, it pulls the company branding settings, as well as the creator's name.

Quotes · 2.52pm · 12-17.jpeg

 

Does that make sense?

 

Thanks!

Brian

0 Upvotes