Is it possible to export to Bubble a list of things?

I’m getting an error with my JSON when trying to use the Bubble export and I’m wondering if it’s because Bubble does not yet allow you to send it a “list of things” via API. The CSV I’m working with seems to work fine when uploaded directly within Bubble.

Here’s the error I’m getting back:

{
  "body": {
    "message": "Invalid data for field Main_Models: [1:1 Matched Reference] cannot be parsed as a JSON",
    "status": "INVALID_DATA"
  },
  "statusCode": 400
}

And here’s what I’m sending it:

{
“data”: {
“Main_Brand”: “1:1 Matched Reference”,
“Main_Models”: “[1:1 Matched Reference]”
},
“headers”: {
“Authorization”: “Bearer XXX”
},
“method”: “POST”,
“url”: “https://app.subaligner.com/version-test/api/1.1/obj/MBM/”
}

I realize that the first item you see in the code is not a list of things. Some rows have a list. Some don’t. Again, it works fine uploading directly to Bubble from the App Data table, but nowhere else.

Hi @Nathan_Lively - I’m not as familiar with the limitations of the Bubble API, but I think I see two problems that might be causing the error.

The list you’re sending should look like this: ["1:1 Matched Reference"]. Each array value needs to be wrapped in quotes.

You probably also don’t need quotes around the JSON object. The data you’re sending through the API body should look like this:

“Main_Brand”: “1:1 Matched Reference”,
“Main_Models”: ["1:1 Matched Reference"]

Let me know if that works!

2 Likes

That worked!
I was just missing the double quotes for a string in JSON. Apparently Bubble didn’t mind that I was missing this when uploaded directly, so I never noticed, but the JSON in Parabola did mind.

3 Likes

Hi @Nathan_Lively @sachi

Where can I find the documentation about 1:1 Matched Reference ? I understand that “Main_Models” should be a List of Models in your Bubble table Brand.

2 questions:

  1. what is “Main_Brand” referring to in Bubble (ids in table Brand) ?
  2. to be 100% sure, is “Main_Models” a list of Bubble Ids from Models table ?

Thanks for your help
Cheers