APIs & Integrations

YLabrou
メンバー

Using POST in search ticket is returning hs_pipeline and hs_pipeline_stage as number

解決

I am using POST on search for tickets.
I get the hs_pipeline and hs_pipeline_stage as number

How can I display as text (using the pipeline name and stage) instead of a number?

Trying to intergate it to ZD AI bot

1件の承認済みベストアンサー
zach_threadint
解決策
ガイド役

Using POST in search ticket is returning hs_pipeline and hs_pipeline_stage as number

解決

Hi @YLabrou 👋

 

You'll need to perform a lookup, potentially via the Get Ticket Stages HubSpot API endpoint. For example:

 

GET https://api.hubapi.com/crm/v3/pipelines/tickets/:PIPELINE_ID/stages

e.g. GET https://api.hubapi.com/crm/v3/pipelines/tickets/0/stages

 

{
    "results": [
        {
            "label": "Support | New", // ticket status label
            "displayOrder": 0,
            "metadata": {
                "ticketState": "OPEN",
                "isClosed": "false"
            },
            "id": "1", // ticket status id
            "createdAt": "1970-01-01T00:00:00Z",
            "updatedAt": "2023-08-01T05:06:27.529Z",
            "archived": false,
            "writePermissions": "CRM_PERMISSIONS_ENFORCEMENT"
        },
        {
            "label": "Support | In Progress",
            "displayOrder": 1,
            "metadata": {
                "ticketState": "OPEN",
                "isClosed": "false"
            },
            "id": "10112923",
            "createdAt": "2021-12-16T16:13:51.492Z",
            "updatedAt": "2023-08-01T05:06:27.529Z",
            "archived": false,
            "writePermissions": "CRM_PERMISSIONS_ENFORCEMENT"
        },
        {
            "label": "Support | Resolved",
            "displayOrder": 2,
            "metadata": {
                "ticketState": "CLOSED",
                "isClosed": "true"
            },
            "id": "10112924",
            "createdAt": "2021-12-16T16:13:51.492Z",
            "updatedAt": "2023-08-01T05:06:27.529Z",
            "archived": false,
            "writePermissions": "CRM_PERMISSIONS_ENFORCEMENT"
        }
    ]
}

 

 I hope that proves helpful. Please let me know if you have any follow-up questions.

All the best,

Zach

--

Zach Klein
HubSpot Integrations & App Developer
Meanjin / Brisbane, Australia



Say g'day


If my post helped answer your query, please consider marking it as a solution.


元の投稿で解決策を見る

2件の返信
zach_threadint
解決策
ガイド役

Using POST in search ticket is returning hs_pipeline and hs_pipeline_stage as number

解決

Hi @YLabrou 👋

 

You'll need to perform a lookup, potentially via the Get Ticket Stages HubSpot API endpoint. For example:

 

GET https://api.hubapi.com/crm/v3/pipelines/tickets/:PIPELINE_ID/stages

e.g. GET https://api.hubapi.com/crm/v3/pipelines/tickets/0/stages

 

{
    "results": [
        {
            "label": "Support | New", // ticket status label
            "displayOrder": 0,
            "metadata": {
                "ticketState": "OPEN",
                "isClosed": "false"
            },
            "id": "1", // ticket status id
            "createdAt": "1970-01-01T00:00:00Z",
            "updatedAt": "2023-08-01T05:06:27.529Z",
            "archived": false,
            "writePermissions": "CRM_PERMISSIONS_ENFORCEMENT"
        },
        {
            "label": "Support | In Progress",
            "displayOrder": 1,
            "metadata": {
                "ticketState": "OPEN",
                "isClosed": "false"
            },
            "id": "10112923",
            "createdAt": "2021-12-16T16:13:51.492Z",
            "updatedAt": "2023-08-01T05:06:27.529Z",
            "archived": false,
            "writePermissions": "CRM_PERMISSIONS_ENFORCEMENT"
        },
        {
            "label": "Support | Resolved",
            "displayOrder": 2,
            "metadata": {
                "ticketState": "CLOSED",
                "isClosed": "true"
            },
            "id": "10112924",
            "createdAt": "2021-12-16T16:13:51.492Z",
            "updatedAt": "2023-08-01T05:06:27.529Z",
            "archived": false,
            "writePermissions": "CRM_PERMISSIONS_ENFORCEMENT"
        }
    ]
}

 

 I hope that proves helpful. Please let me know if you have any follow-up questions.

All the best,

Zach

--

Zach Klein
HubSpot Integrations & App Developer
Meanjin / Brisbane, Australia



Say g'day


If my post helped answer your query, please consider marking it as a solution.


GRajput
名誉エキスパート | Platinum Partner
名誉エキスパート | Platinum Partner

Using POST in search ticket is returning hs_pipeline and hs_pipeline_stage as number

解決

Hi @YLabrou 

 

You'll need to retrieve the pipeline definitions using the Pipelines API.

here is the link for your reference - https://api.hubapi.com/crm/v3/pipelines/tickets?hapikey=your_api_key

 

 

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!




Gaurav Rajput
Director, MarTech( Growth Natives)

Book a meeting


0 いいね!