Creating Data Types and Fields via API

Hey folks!

I’ve got a silly question… is it possible to create new data types and fields via API?

I’m asking because I’m working with the Amazon Seller Partner API and will need a few hundred “fields” (minimum), and adding these manually is going to be insane. Using an Excel sheet isn’t scalable. So, my thought was to programmatically create a new field by parsing through a JSON payload.

Not sure if this is possible. If not, I’m open to any ideas you may have for mass field creation.

Thx folks!

This is not needed. When you initialize an API endpoint as data, Bubble will create a type for this API call and you can store the whole result of this call in a single field.

Thank you for the reply :slight_smile:

I know that this is possible but the issue is that the payload has hundreds of attributes that I’ll need to turn into fields so that I can use them later. My goal is avoid manually creating hundreds of fields hand by hand.

To my knowledge, one must manually create data types and fields. Set those fields as a specific variable type then you’re able to store data within said field OR manually create the fields and receive an API payload, parse this payload via a backend worfklow to save the data received. But my goal is to create the fields within bubble automatically. I hope that makes sense haha

You dont need to turn them in fields. They will be accessible like any other fields in Bubble types. The only difference is that you will first access to the thing and after, using the fields set to the API type, you will have all API fields.

But your specific question, no it’s not possible.

1 Like

Man, you need something like this Bubble Option Sets Helper - Chrome Web Store

But for datatypes :laughing:

@Jici I think the issue boils down to we can’t just use API datatypes as regular database datatypes sadly… Make changes after the fact, etc.

Hopefully one day API calls will create database things under their type

1 Like