How to create an API call

Hello everyone. Can someone help me?
how to make the “products” parameter dynamic, it must consist of a list in which the “products” and “quantity” parameters must also be dynamic? :triumph:
http://joxi.ru/E2pJRwPHGgq1Pr

You can use <variable_name> to set a dynamic variable. Using lists isn’t supported out of the box unfortunately, but here’s what I’ve been able to do to get around this in the past:

products: [<variable_name>],

and then pass in your list of products as variable name, formatted as the following:

{“goods”: 1, “quantity”: 1},{“goods”:2, “quantity”:2}

If you have a list of product data items, you can do the following:

List of products:formatted as text:

{“goods”: This Product’s ID, “quantity”: This Product’s Quantity}

Delimiter:
,

Hope this helps!


Need help with your bubble app? Reach out to us at https://protomakr.bubbleapps.io

Perhaps the following post will help…

-Steve

1 Like

Thank you @austin3 . I understand the logic.
But I don’t know how in the parameter
products: [<variable_name>]

transfer list

{“Goods”: 1, “quantity”: 1}, {“goods”: 2, “quantity”: 2}.

How to do it?

@sudsy 's link shows how to do what I suggested with pictures, I’d recommend taking a look. You’d replace the “Content to show per list item” with what I suggested above.