# Values stripped from JSON on API call

**URL:** <https://forum.bubble.io/t/values-stripped-from-json-on-api-call/354893>\
**Category:** Need help\
**Created:** [January 10, 2025, 6:04pm UTC](https://forum.bubble.io/t/values-stripped-from-json-on-api-call/354893 "2025-01-10T18:04:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamie.robson.89](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jamie.robson.89/32/180213_2.png) [@jamie.robson.89](https://forum.bubble.io/u/jamie.robson.89)\
**Post date:** [January 10, 2025, 6:04pm UTC](https://forum.bubble.io/t/values-stripped-from-json-on-api-call/354893/1 "2025-01-10T18:04:08Z")

</div>

Having a very strange issue that I just cannot debug, I’ve tried everything I can think of.

I’m using T1 CSV uploader - list of JSON texts gets pased to an endpoint and then run through some workflows.

The JSON is being produced correctly from the uploader and appears to be hitting the endpoint in the right format:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/a/6/a687cd3c2ee2def1e1787d0a519a793d7a772bec.png)

But as an example, the highlighted field/value is being stripped out:

It’s not present at all in this step:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/7/1/71b3fa0ac55236f3e0b9119dadafd92e44edc8ec.png)

And you can see here, it’s showing as blank:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/8/e/8ee634163b3c76ae5022e5f176ba3a51a1658ce5.png)

When adding a debug log, I just get an empty thing separated by commas:

![image](https://us1.discourse-cdn.com/bubble/original/3X/8/9/89b6f99607e89f8b14f4f342f2dda452c82e53b6.png)

I’ve checked:

privacy rules  
CSV format  
Value in the csv  
Modify types  
Running with/without authentication

Any ideas?

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [January 10, 2025, 6:21pm UTC](https://forum.bubble.io/t/values-stripped-from-json-on-api-call/354893/2 "2025-01-10T18:21:14Z")

</div>

From what I understand, you are sending the JSON to API workflow? Using api connector? How did you set your backend WF? Can you share the whole json sent? API Connector settings? Action that encode the JSON?  
Also, the encoding seem wrong to me because the options are in a string instead of array of string…

---

<div class="post-metadata">

**Author:** ![jamie.robson.89](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jamie.robson.89/32/180213_2.png) [@jamie.robson.89](https://forum.bubble.io/u/jamie.robson.89)\
**Post date:** [January 10, 2025, 6:29pm UTC](https://forum.bubble.io/t/values-stripped-from-json-on-api-call/354893/3 "2025-01-10T18:29:13Z")

</div>

That’s correct.

I’ll refer you to this thread, in which I followed the advice of another user to get this set up.

> [@Creative solution required - CSV Upload + Overwrite data](https://forum.bubble.io/t/creative-solution-required-csv-upload-overwrite-data/352755):
>
> In need of some help with a challenging use case. My customers are vehicle lease brokers - they contact other businesses and provide them with business vehicles on a lease basis. The lease “Offers” are provided to them by various “Finance Providers”. These “Offers” are provided in a CSV format (causing me much pain and frustration). An “Offer” is effectively a combination of vehicle + lease terms + price. For example: Offer A: 2024 Audi Q6 Sportback Black Edition 65kwh 4wd - 1 month + 36 m…

Here is a snippet of the JSON being sent from the T1 CSV uploader (where the values are showing correctly in debug):

[{“Manufacturer”:“BMW”,“Model”:“C-Class”,“Variant”:“Hybrid”,“Finance Provider”:“Novuna”,“CAP ID”:5746,“CAP Code”:“CAP2198”,“Trim”:“["Standard", "Dynamic"]”,“Options”:“["Alloy Wheels", "Built-in Sat Nav"]”,“Colours”:“["Black", "White", "Red"]”,“Initial Term”:3,“Contract Length”:48,“Annual Mileage”:10000,“Upfront Cost”:9191,“Monthly Cost”:717,“hasBreakdown?”:“Yes”,“Breakdown Cover Cost”:17,“includesRoadTax?”:“No”,“Road Tax Cost”:95,“hasMaintenance?”:“Yes”,“Maintenance Cost (Monthly)”:463,“Fuel Type”:“Petrol”,“CO2 Emissions”:214,“Engine Power”:324,“Fuel Economy”:56.5,“EV Connector Type”:“Type 2”,“EV Battery Capacity”:79,“Range”:172,“Transmission”:“Manual”,“Processing fee”:99,“Delivery cost”:0,“Important info”:“No info”,“Drivebase Customer”:“Company Ltd”,“Commission Value”:300},

Here’s the API settings:

![image|503x500](upload://zpSIfPkhPNUcis9yRWVPJOLJDMA.png

Action that sends the JSON:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/2/4/24d8f5aa84d56e010467584dcfae1c0c8fb60a29.png)

Debug in that screenshot pulls value correctly from JSON.

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [January 10, 2025, 6:31pm UTC](https://forum.bubble.io/t/values-stripped-from-json-on-api-call/354893/4 "2025-01-10T18:31:01Z")

</div>

Can you provide the full json sent (put them between ````` quotes so we can read it correctly in forum) and how did you set the API endpoint in backend workflow? using detect data? manually entered values?

---

<div class="post-metadata">

**Author:** ![jamie.robson.89](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jamie.robson.89/32/180213_2.png) [@jamie.robson.89](https://forum.bubble.io/u/jamie.robson.89)\
**Post date:** [January 10, 2025, 6:33pm UTC](https://forum.bubble.io/t/values-stripped-from-json-on-api-call/354893/5 "2025-01-10T18:33:58Z")

</div>

I used detect data.

Here is the link to the pastebin:

> <https://pastebin.com/E1p3bCTd>

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [January 10, 2025, 6:55pm UTC](https://forum.bubble.io/t/values-stripped-from-json-on-api-call/354893/6 "2025-01-10T18:55:37Z")

</div>

I did a test on my side an didn’t get any issue. What I suggest is:  
A) Detect your payload again in API workflow (send the same request from pastebin using postman for example). Check field mapping after that.  
B) Validate the json sent from API connector using a [requestbin.com](http://requestbin.com) (or similar tool) to check if the json have the same structue when sent. Also, be sure to validate content-type header.

Are you sending the request after to another workflow (schedule on a list)? If yes, please share what you have set for this workflow

---

<div class="post-metadata">

**Author:** ![jamie.robson.89](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jamie.robson.89/32/180213_2.png) [@jamie.robson.89](https://forum.bubble.io/u/jamie.robson.89)\
**Post date:** [January 13, 2025, 11:34am UTC](https://forum.bubble.io/t/values-stripped-from-json-on-api-call/354893/7 "2025-01-13T11:34:07Z")

</div>

Thanks @Jici - detecting the data using the JSON I put into Pastebin has resolved the original issue, but it’s unfortunately created a new one with the “lists”.

For example:

“Colours”:“["Black", "White", "Red"]”

In the debug record, it shows exactly the same as it did before I did the new “detect data”, but the workflow produced errors and wouldn’t accept what I’d previously done:

![image](https://us1.discourse-cdn.com/bubble/original/3X/3/3/33bb76f4479147f610c2b0bd7fd1be22e3cabfad.png)

I literally just copied and pasted the JSON from pastebin - clearly I’m missing something but don’t know what.

Edit: It’s actually all the lists that are now having an issue.

---

<div class="post-metadata">

**Author:** ![jamie.robson.89](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jamie.robson.89/32/180213_2.png) [@jamie.robson.89](https://forum.bubble.io/u/jamie.robson.89)\
**Post date:** [January 13, 2025, 12:24pm UTC](https://forum.bubble.io/t/values-stripped-from-json-on-api-call/354893/8 "2025-01-13T12:24:47Z")

</div>

Don’t worry, I sorted it in the end with a “find and replace” to get rid of [ and " and then did “split by”.

Not sure if that’s the best way, but it works.

Thanks again for the assist.

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [January 13, 2025, 12:28pm UTC](https://forum.bubble.io/t/values-stripped-from-json-on-api-call/354893/9 "2025-01-13T12:28:33Z")

</div>

The payload I got from your pastebin was a string for colours

```auto
    "Colours": "[\"Black\", \"White\", \"Red\"]",

```

You can see that the array is escaped and encoded into double quotes. This mean this is a string, not an array of colours.

More than that, when there’s only one colours, this is returned as a string value without any square brackets. This could cause issue if this was in JSON. So better to keep it as string and use regex or find and replace with split by like you do.

---

<div class="post-metadata">

**Author:** ![jamie.robson.89](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jamie.robson.89/32/180213_2.png) [@jamie.robson.89](https://forum.bubble.io/u/jamie.robson.89)\
**Post date:** [January 13, 2025, 1:06pm UTC](https://forum.bubble.io/t/values-stripped-from-json-on-api-call/354893/10 "2025-01-13T13:06:32Z")

</div>

Thanks.

The T1 uploader instructs me to format the fields inside the CSV as a JSON array, which is what I’ve done - I’m guessing that’s why it’s doing this?

Should I just put them in separated by commas - it would actually be better if I don’t have to do this, as it makes it more difficult for customers to format the file properly.

![image](https://us1.discourse-cdn.com/bubble/original/3X/4/b/4bc2c46e15aa7d01e7e30cb07869a91cdb99e676.png)

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [January 13, 2025, 4:06pm UTC](https://forum.bubble.io/t/values-stripped-from-json-on-api-call/354893/11 "2025-01-13T16:06:28Z")

</div>

I don’t know how T1 work so it’s hard for me to help about formatting this correctly. The best would be to always return an array of string like you have in your screenshot, but I guess this may be something not handled by T1.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [March 21, 2025, 6:04pm UTC](https://forum.bubble.io/t/values-stripped-from-json-on-api-call/354893/12 "2025-03-21T18:04:24Z")

</div>

Closed on March 21, 2025, 6:04pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
