Get Ticket detail by ticket is returning hs_pipeline and hs_pipeline_stage as number

Hi,

Since you are able to manually crete several deal stages and pipelines in your hubspot account there is nothing uniqe about the either the pipeline or the stage. You may for example name a pipeline stage the same thing in two different pipelines.

You can either request the pipeline information by asking for one pipeline per id with the pipeline get integration.

But I recommend getting the full pipeline list with all its stages and creating an array early on in your code and that specifies all your names for you. I code in PHP and for me it would look similar to this:

/crm/v3/pipelines/{objectType}:

# $a_response_containing_json (where your request response is collected as a json)

foreach ($a_response_containing_json['results'] as $key => $value)

{

$pipeline_id = $a_response_containing_json['results'] [$key]['id'];

$my_pipeline_names[$pipeline_id] = $a_response_containing_json['results'] [$key]['label'];

#to get all your stage names you will have to do an other foreach loop within this array

foreach ($a_response_containing_json['results'][$key]['stages'] as $key2 => $value2){

$stage_id = $a_response_containing_json['results'] [$key]['stages'][$key2]['id'];

$my_stage_names[$stage_id] = $a_response_containing_json['results'] [$key]['stages'][$key2]['label'];

}

}

The output of this will be two arrays

$my_pipeline_names[enter your pipeline id here];

$my_stage_names[enter your stage id here];