property information used in REST API for ticket

New Contributor

Hi There,

I need list of available /custom property that I can use in POST JSON request for ticket create. How can we define custom attribute and map it to ticket property  and json request in hubspot.

From example I can only see  below filed but not like category .

Here JSON "subject" is maped to hubspot "Ticker Name" How I can check other mapping.

<span class="token punctuation">{</span>
    <span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"subject"</span><span class="token punctuation">,</span>
    <span class="token string">"value"</span><span class="token punctuation">:</span> <span class="token string">"This is an example ticket"</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  <span class="token punctuation">{</span>
    <span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"content"</span><span class="token punctuation">,</span>
    <span class="token string">"value"</span><span class="token punctuation">:</span> <span class="token string">"Here are the details of the ticket."</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  <span class="token punctuation">{</span>
    <span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"hs_pipeline"</span><span class="token punctuation">,</span>
    <span class="token string">"value"</span><span class="token punctuation">:</span> <span class="token string">"0"</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  <span class="token punctuation">{</span>
    <span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"hs_pipeline_stage"</span><span class="token punctuation">,</span>
    <span class="token string">"value"</span><span class="token punctuation">:</span> <span class="token string">"1"</span>
  <span class="token punctuation">}</span>
Reply
0 Upvotes
1 Reply 1
Highlighted
HubSpot Moderator

Hi @sranjan,

 

You can get a list of all of the properties associated to the Ticket Object by using this endpoint. In my case I'm using a test API key of "demo". You would be using your own API key to pull data relating to your specific HubSpot portal. 

 

 

This will return a JSON payload with any existing properties (default and custom). The property name is denoted by the "name" attribute returned in the response. You can use this data to create and update tickets as you like. Please also note that properties will have a "readOnlyValue" of either true or false. If this is true then you cannot write to the property.

 

I hope this helps,

Jack

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn
Reply
0 Upvotes