Find goals

GET {{baseUrl}}/goals/find?type.name=<string>&title=<string>&is_active=true&assignee.id=<integer>&assignee.type=<string>&expected_outcome.target=<number>&expected_outcome.tracking_metric=<string>&expected_outcome.currency_id=<integer>&type.params.pipeline_id=<integer>&type.params.pipeline_id=<integer>&type.params.stage_id=<integer>&type.params.activity_type_id=<integer>&type.params.activity_type_id=<integer>&period.start=<date>&period.end=<date>

Returns data about goals based on criteria. For searching, append {searchField}={searchValue} to the URL, where searchField can be any one of the lowest-level fields in dot-notation (e.g. type.params.pipeline_id; title). searchValue should be the value you are looking for on that field. Additionally, is_active=<true|false> can be provided to search for only active/inactive goals. When providing period.start, period.end must also be provided and vice versa.

Request Params

KeyDatatypeRequiredDescription
type.namestringThe type of the goal. If provided, everyone's goals will be returned.
titlestringThe title of the goal
is_activebooleanWhether the goal is active or not
assignee.idstringThe ID of the user who's goal to fetch. When omitted, only your goals will be returned.
assignee.typestringThe type of the goal's assignee. If provided, everyone's goals will be returned.
expected_outcome.targetstringThe numeric value of the outcome. If provided, everyone's goals will be returned.
expected_outcome.tracking_metricstringThe tracking metric of the expected outcome of the goal. If provided, everyone's goals will be returned.
expected_outcome.currency_idstringThe numeric ID of the goal's currency. Only applicable to goals with expected_outcome.tracking_metric with value sum. If provided, everyone's goals will be returned.
type.params.pipeline_idstringAn array of pipeline IDs or null for all pipelines. If provided, everyone's goals will be returned.
type.params.pipeline_idstringAn array of pipeline IDs or null for all pipelines. If provided, everyone's goals will be returned.
type.params.stage_idstringThe ID of the stage. Applicable to only deals_progressed type of goals. If provided, everyone's goals will be returned.
type.params.activity_type_idstringAn array of IDs or null for all activity types. Only applicable for activities_completed and/or activities_added types of goals. If provided, everyone's goals will be returned.
type.params.activity_type_idstringAn array of IDs or null for all activity types. Only applicable for activities_completed and/or activities_added types of goals. If provided, everyone's goals will be returned.
period.startstringThe start date of the period for which to find goals. Date in format of YYYY-MM-DD. When period.start is provided, period.end must be provided too.
period.endstringThe end date of the period for which to find goals. Date in format of YYYY-MM-DD.

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;success&quot;:true,&quot;statusCode&quot;:20000,&quot;statusText&quot;:&quot;OK&quot;,&quot;service&quot;:&quot;statistics-goals-api&quot;,&quot;data&quot;:{&quot;goals&quot;:[{&quot;id&quot;:&quot;5665cef556ddff22606fc8f6c0004807&quot;,&quot;owner_id&quot;:987654,&quot;title&quot;:&quot;Some example goal&quot;,&quot;type&quot;:{&quot;name&quot;:&quot;Deals started&quot;,&quot;params&quot;:{&quot;pipeline_id&quot;:[5,2],&quot;activity_type_id&quot;:[9]}},&quot;assignee&quot;:{&quot;type&quot;:&quot;company&quot;,&quot;id&quot;:123456},&quot;interval&quot;:&quot;weekly&quot;,&quot;duration&quot;:{&quot;start&quot;:&quot;2019-11-01&quot;,&quot;end&quot;:&quot;2020-10-30&quot;},&quot;expected_outcome&quot;:{&quot;target&quot;:100,&quot;tracking_metric&quot;:&quot;quantity&quot;},&quot;is_active&quot;:false,&quot;report_ids&quot;:[&quot;f37bd66a2ab64d28ff6a9b6d2289813a&quot;]}]}}