# Bad API response?

**URL:** <https://community.hubspot.com/t/bad-api-response/11759>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [November 1, 2018, 1:07am UTC](https://community.hubspot.com/t/bad-api-response/11759 "2018-11-01T01:07:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 1, 2018, 1:07am UTC](https://community.hubspot.com/t/bad-api-response/11759/1 "2018-11-01T01:07:10Z")

</div>

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&includeAssociations=false&limit=250&offset=250992365&properties=costo\_panel&properties=costo\_inversor&properties=costo\_bos&properties=costo\_racking\_y\_estructura&properties=costo\_monitor\_consumo&properties=folio\_adminpaq&properties=inventario\_controlado&properties=epc\_costo&properties=epc\_viaticos&properties=cfe\_costo&properties=cfe\_viaticos&properties=gestor\_cfe&properties=trabajos\_preparativos\_1&properties=costo\_preparativos\_1&properties=trabajos\_preparativos\_2&properties=costo\_preparativos\_2&properties=tipo\_costo\_extra\_1&properties=costo\_extra\_1&properties=tipo\_costo\_extra\_2&properties=costo\_extra\_2&properties=viaticos\_ccs&properties=viaticos\_cts\_ccts&properties=dealstage&properties=calificacion\_nps&properties=nps\_correo\_electr\_nico&properties=nps\_nombre&properties=costo\_inicial\_inventario&properties=cierre\_admin\_controlado](https://api.hubapi.com/deals/v1/deal/paged?hapikey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&includeAssociations=false&limit=250&offset=250992365&properties=costo_panel&properties=costo_inversor&properties=costo_bos&properties=costo_racking_y_estructura&properties=costo_monitor_consumo&properties=folio_adminpaq&properties=inventario_controlado&properties=epc_costo&properties=epc_viaticos&properties=cfe_costo&properties=cfe_viaticos&properties=gestor_cfe&properties=trabajos_preparativos_1&properties=costo_preparativos_1&properties=trabajos_preparativos_2&properties=costo_preparativos_2&properties=tipo_costo_extra_1&properties=costo_extra_1&properties=tipo_costo_extra_2&properties=costo_extra_2&properties=viaticos_ccs&properties=viaticos_cts_ccts&properties=dealstage&properties=calificacion_nps&properties=nps_correo_electr_nico&properties=nps_nombre&properties=costo_inicial_inventario&properties=cierre_admin_controlado)

I’d really appreciate your help here, please.

Best,

Humberto

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [November 1, 2018, 3:05pm UTC](https://community.hubspot.com/t/bad-api-response/11759/2 "2018-11-01T15:05:53Z")

</div>

Hi [@Humberto](https://community.hubspot.com/u/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?

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 1, 2018, 6:15pm UTC](https://community.hubspot.com/t/bad-api-response/11759/3 "2018-11-01T18:15:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [November 5, 2018, 7:27pm UTC](https://community.hubspot.com/t/bad-api-response/11759/4 "2018-11-05T19:27:04Z")

</div>

Hi [@Humberto](https://community.hubspot.com/u/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](https://app.hubspot.com/contacts/757020/deal/251001188/properties?search=nps) has the value `10`.
2. [Deal 254394652](https://app.hubspot.com/contacts/757020/deal/254394652/properties?search=nps) 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:

```auto
{
 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:[]
}

```

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 5, 2018, 9:34pm UTC](https://community.hubspot.com/t/bad-api-response/11759/5 "2018-11-05T21:34:17Z")

</div>

> [Isaac\_Takushi](https://integrate.hubspot.com/u/isaac_takushi)  
> HubSpotter
> 
> ```auto
> November 5
> 
> ```
> 
> Hi [@Humberto](https://integrate.hubspot.com/u/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](https://app.hubspot.com/contacts/757020/deal/251001188/properties?search=nps) has the value `10`.
> 2. [Deal 254394652](https://app.hubspot.com/contacts/757020/deal/254394652/properties?search=nps) 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:

> ```auto
> { 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](https://integrate.hubspot.com/t/bad-api-response/13758/5) or reply to this email to respond.

> To unsubscribe from these emails, [click here](https://integrate.hubspot.com/email/unsubscribe/75c5b23e6f5c43378bf21177ade326ce80180b3a4fe6e025c46fc45f830340d0).

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [November 7, 2018, 4:21pm UTC](https://community.hubspot.com/t/bad-api-response/11759/6 "2018-11-07T16:21:20Z")

</div>

Hi [@Humberto](https://community.hubspot.com/u/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` ?

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 7, 2018, 10:02pm UTC](https://community.hubspot.com/t/bad-api-response/11759/7 "2018-11-07T22:02:58Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [November 7, 2018, 10:08pm UTC](https://community.hubspot.com/t/bad-api-response/11759/8 "2018-11-07T22:08:13Z")

</div>

Glad to hear it, [@Humberto](https://community.hubspot.com/u/humberto)!
