API Export 422 error

I am trying to connect some products of our Shopify e-commerce to another e-commerce using Parabola API Export. This is the simplest configuration:

However, when I run the process, it shows this error:

I am new using this tool and my knowledge about JSON and API is limited. Any idea about where is the fault? I was testing the system against a MOck server and it was working with no errors.

Hi @Manuel! I see you’re getting a 422 - Unprocessable Entitle Error. This means that the request was correct, but there was a problem with what you asked the API to do.

From your screenshot, I’m seeing the API’s error message says, "The 0.currency field is required" and so on. From what I can tell in your screenshot, it looks like you’re mapping all the required fields.

Is it possible that the field names for your API is actually something like, 0.currency, 0.manufacturer, 0.manufacturer_sku, 0.price, 0.sku, 0.title?

If you’re able to link us to the API docs you’re referencing, we can take a closer look!

1 Like

Hi @sachi, I have changed the destination fields, but it was not successful.

You can find the information about APi in this link:

Hi @Manuel - Thanks for giving that a try and sending the documentation over.

I learned that the 0. means that its parsing our request as an element of an array and it’s indicating that it failed in the 0th position, when trying to export the first row of data. Sorry for misdirecting you!

Took a look at the docs and your Body section looks mostly correct. Can you try wrapping your entire Body section with square brackets [ ]?

Let me know how that goes!

Hi @sachi,

Thanks for your support, now it works! Sincerely, I wrapped it initially but I should make another mistake and though it was due to the square brackets.

Regards.

Hi @sachi,

It looks the file arrives, however the endpoint reports there is only on row of data in the file and that is the last one. Any suggestion?

only one row of data…

Hey @Manuel - Interesting, it seems like the API isn’t allowing us to export row-by-row and instead needs all the data in a single request.

To workaround this problem, please add an Insert Column step and a Merge Values step right before your Send to API step.

In the Insert Column step, we’re going to create a new column that replicates the body you’re sending in your API step minus the square brackets [ ], like so:

In the Merge Values step, we’re going to create a comma-separated blob of the new API Body column you created with the Insert Column step.

  • Select API Body under “Merge all the values in the following columns”
  • And separate each value by , (with no space).
  • Keep create a new row for each unique value in the following columns blank.

Once you do have a single cell that contains all the data you’re trying to export, update the body of your API Export step to just be:

[{new_merge_value_column}]

That should do the trick, and export all the data to the API in a single request. Let me know how that goes!

1 Like

Thanks @sachi,

That works!!

Regards.

Manuel

4 Likes

Awesome! Glad to hear it :slight_smile: