Variable number API response

I have a problem that I can’t deal with.
Well, I receive data about the product using an API POST request.
In short
Body-type: Form-data
key: method | Value: getProductData
Key: parameters | Value: { “inventory_id”: “8313”, “products”: [1069596587] }

Where inventory_id: “8313” and “products”: [1069596587] is a variable.

In response, I receive data as shown in the screenshot, e.g.:
body product 1069596587 ean
body product 1069596587 sku

Output date:

{
     "status": "SUCCESS",
     "products": {
         "1069596587": {
             "is_bundle": false,
             "ean": "983628103943",
             "sku": "EPL-432",
             "tax_rate": 23,
             "weight": 0.25,
             "height": 0.3,
             "width": 0.2,
             "length": 0.05,
             "star": 2,
             "category_id": "3",
             "manufacturer_id": "7",
             "prices": {
                 "105": 20.99,
                 "106": 23.99
             },
             "stock": {
                 "bl_206": 5,
                 "bl_207": 7
             },

The problem is that later, if I want to display this data, e.g. in a text field, and the ID changes, everything falls apart…

To sum up, I’m wondering how to force the text window to show data despite the variable product ID.

I don’t know if I described it well, but I hope you understand what I mean :slight_smile:

Shame on whoever designed that API :rofl: the ID should’ve just been one of the values alongside everything else

2 Likes

If you set the Data type to text that will make it not automatically interpret the response, then you can do a find & replace to replace the ID with something generic, then send that to your backend via API connector and have it interpret the JSON again :blush:

You could bundle this all in the backend so you just have your API connector send a POST request to your backend workflow with the same two parameters, then do everything in your backend workflow and return the full response with the replaced ID

Eh… unfortunately that’s what I expected, that I would have to pass the API response through an external program that would clear the damn ID in the response.

Yea but you can pass it through your backend so won’t be an external service or anything

How :slight_smile: ? - “send that to your backend via API connector and have it interpret the JSON again”