APIs & Integrations

Humberto
Member

Bad API response?

SOLVE

Hello! This is my first post here.

HS support sent me here actually.

The issue that we are having is a bad response we are getting from the API when calling for a batch of deals. The property of interest here is "Calificacion NPS".

When we hit the API with the following, the response is "10" for all deals of this batch. When in reality the majority of them have that property in blank. Apparently, this happens just with this batch (offset= 250992365).

https://api.hubapi.com/deals/v1/deal/paged?hapikey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&includeAssoc...

I'd really appreciate your help here, please.

Best,

Humberto

0 Upvotes
1 Accepted solution
Humberto
Solution
Member

Bad API response?

SOLVE

Sorry, since I hit reply form the email, perhaps something went wrong.

Heres my answer to the past post:

Thank you Isaac!

Actually your answer helped me find what was wrong.

The JSON feed is flattened so it appears that the data is a normal data import. Data from parent JSON elements gets inherited to their child elements, so rows representing child elements contain the values of the rows representing their parent elements.

I just changed the inheritance properties and now the problem is solved.

Best!

View solution in original post

7 Replies 7
IsaacTakushi
HubSpot Employee
HubSpot Employee

Bad API response?

SOLVE

Glad to hear it, @Humberto!

Isaac Takushi

Associate Certification Manager
0 Upvotes
Humberto
Solution
Member

Bad API response?

SOLVE

Sorry, since I hit reply form the email, perhaps something went wrong.

Heres my answer to the past post:

Thank you Isaac!

Actually your answer helped me find what was wrong.

The JSON feed is flattened so it appears that the data is a normal data import. Data from parent JSON elements gets inherited to their child elements, so rows representing child elements contain the values of the rows representing their parent elements.

I just changed the inheritance properties and now the problem is solved.

Best!

IsaacTakushi
HubSpot Employee
HubSpot Employee

Bad API response?

SOLVE

Hi @Humberto,

I don't see any additional information in the post above — it just looks like a copy of my earlier post.

Can you send me the full JSON data for a few deals retrieved through the request URL above which show the calificacion_de_lead value of 10 ?

Isaac Takushi

Associate Certification Manager
0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Bad API response?

SOLVE

Hi @Humberto,

Apologies for the delayed response.

I have not been able to replicate this behavior. I used a simplified version of your request URL:

https://api.hubapi.com/deals/v1/deal/paged?includeAssociations=false&limit=250&offset=250992365&properties=calificacion_nps

Of the 250 deals returned, only two had any value for calificacion_de_lead at all:

  1. Deal 251001188 has the value 10.
  2. Deal 254394652 also has the value 10.

Can you send me the full JSON data for a few deals retrieved through the request URL above which show the calificacion_de_lead value of 10?

For example:

{
     portalId:757020,
     dealId:251001188,
     isDeleted:false,
     associations:null,
     properties:{
        calificacion_nps:{
          value:"10",
          timestamp:1539103633360,
          source:"CRM_UI",
          sourceId:"useremail@yourdomain.com",
          versions:[
               {
                    name:"calificacion_nps",
                    value:"10",
                    timestamp:1539103633360,
                    sourceId:"useremail@yourdomain.com",
                    source:"CRM_UI",
                    sourceVid:[ ]
               }
          ]
       }
     },
     imports:[ ],
     stateChanges:[ ]
}

Isaac Takushi

Associate Certification Manager
0 Upvotes
Humberto
Member

Bad API response?

SOLVE

Isaac_Takushi
HubSpotter

    November 5

Hi @Humberto,

Apologies for the delayed response.

I have not been able to replicate this behavior. I used a simplified version of your request URL:

[https://api.hubapi.com/deals/v1/deal/paged?includeAssociations=false&limit=250&offset=250992365&properties=calificacion_nps](https://api.hubapi.com/deals/v1/deal/paged?includeAssociations=false&limit=250&offset=250992365&properties=calificacion_nps)

Of the 250 deals returned, only two had any value for calificacion_de_lead at all:

  1. Deal 251001188 has the value 10.
  2. Deal 254394652 also has the value 10.
    Can you send me the full JSON data for a few deals retrieved through the request URL above which show the calificacion_de_lead value of 10?

For example:

     { portalId:757020, dealId:251001188, isDeleted:false, associations:null, properties:{ calificacion_nps:{ value:"10", timestamp:1539103633360, source:"CRM_UI", sourceId:"useremail@yourdomain.com          ", versions:[ { name:"calificacion_nps", value:"10", timestamp:1539103633360, sourceId:"useremail@yourdomain.com                    ", source:"CRM_UI", sourceVid:[ ] } ] } }, imports:[ ], stateChanges:[ ] }

Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

0 Upvotes
Humberto
Member

Bad API response?

SOLVE

Hi Isaac! Thank you for your answer! Here is the information your request:

  1. 757020
  2. Ticket number: #2085573
  3. I mean that the answer from HS is '10' for the 'Calificacion NPS' property of all 250 deals of the batch. The 250 deals are returned, and all othe rproperties appear to match the ones on HS UI, but this property does not.
  4. I mean that from the 250 deals of that batch, only a few actually have that property filled up on the HS UI. For the other ones, we should not receive '10' for an answer when using the Deals API.

The weird thing is that it only happens for this batch. If I call another different 250 deals, the values of the 'Calificacion NPS' property are ok.

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Bad API response?

SOLVE

Hi @Humberto,

Welcome!

To help me troubleshoot effectively, would you share:

  1. Your Hub ID.
  2. The support ticket number.
  3. What you mean by "the response is '10' for all deals of this batch." Are you referring to the fact that only ten deals are returned? What behavior are you expecting in this case?
  4. What you mean by "the majority of them have that property in blank." Do the deals returned have null values? What behavior are you expecting in this situation?

Isaac Takushi

Associate Certification Manager