# API Export 422 error

**URL:** https://community.parabola.io/t/api-export-422-error/919
**Category:** Ask a question
**Tags:** Building-Flows, Using-APIs
**Created:** [August 12, 2020, 7:37pm UTC](https://community.parabola.io/t/api-export-422-error/919 "2020-08-12T19:37:19Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Manuel](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Manuel](https://community.parabola.io/u/Manuel)
#### Post date: [August 12, 2020, 7:37pm UTC](https://community.parabola.io/t/api-export-422-error/919/1 "2020-08-12T19:37:19Z")

</div>

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:

 ![Captura de pantalla 2020-08-12 a las 21.26.00 (2)](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/1X/48d569392a91e4dd9d32c6d00a50b11fb157ab17.png)

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

 ![Captura de pantalla 2020-08-12 a las 21.27.12 (2)](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/1X/4a4e9be50272ba6515408a63f86923ff8cb19384.png)

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.

---

<div class="post-metadata">

### Author: ![sachi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/sachi/32/10_2.png) [@sachi](https://community.parabola.io/u/sachi)
#### Post date: [August 12, 2020, 8:09pm UTC](https://community.parabola.io/t/api-export-422-error/919/2 "2020-08-12T20:09:32Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![Manuel](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Manuel](https://community.parabola.io/u/Manuel)
#### Post date: [August 12, 2020, 9:01pm UTC](https://community.parabola.io/t/api-export-422-error/919/3 "2020-08-12T21:01:27Z")

</div>

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

 ![Captura de pantalla 2020-08-12 a las 22.58.16 (2)](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/1X/871d4454e89bf75e3996b34e32d11ac15fbe2719.png)

You can find the information about APi in this link:

> **[Cyberpuerta Provider API - Light](https://documenter.getpostman.com/view/11388161/SzzobFta?version=latest)**
>
> This guide outlines different forms of interaction via API between Cyberpuerta and our Providers. Our goal is to automate the information exchange regarding the available product catalog and the transaction execution as much as reasonably...

---

<div class="post-metadata">

### Author: ![sachi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/sachi/32/10_2.png) [@sachi](https://community.parabola.io/u/sachi)
#### Post date: [August 13, 2020, 10:07pm UTC](https://community.parabola.io/t/api-export-422-error/919/4 "2020-08-13T22:07:32Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![Manuel](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Manuel](https://community.parabola.io/u/Manuel)
#### Post date: [August 14, 2020, 4:40am UTC](https://community.parabola.io/t/api-export-422-error/919/5 "2020-08-14T04:40:46Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Manuel](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Manuel](https://community.parabola.io/u/Manuel)
#### Post date: [August 14, 2020, 3:57pm UTC](https://community.parabola.io/t/api-export-422-error/919/6 "2020-08-14T15:57:20Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Manuel](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Manuel](https://community.parabola.io/u/Manuel)
#### Post date: [August 14, 2020, 3:58pm UTC](https://community.parabola.io/t/api-export-422-error/919/7 "2020-08-14T15:58:01Z")

</div>

only one row of data…

---

<div class="post-metadata">

### Author: ![sachi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/sachi/32/10_2.png) [@sachi](https://community.parabola.io/u/sachi)
#### Post date: [August 15, 2020, 12:34am UTC](https://community.parabola.io/t/api-export-422-error/919/8 "2020-08-15T00:34:11Z")

</div>

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:

 ![Screen Shot 2020-08-14 at 5.11.03 PM](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/1X/118022ccbf1a4d5ee1643f4aaaa97e66e76aef7b.png)

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!

---

<div class="post-metadata">

### Author: ![Manuel](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Manuel](https://community.parabola.io/u/Manuel)
#### Post date: [August 20, 2020, 9:17am UTC](https://community.parabola.io/t/api-export-422-error/919/9 "2020-08-20T09:17:29Z")

</div>

Thanks @sachi,

That works!!

Regards.

Manuel

---

<div class="post-metadata">

### Author: ![sachi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/sachi/32/10_2.png) [@sachi](https://community.parabola.io/u/sachi)
#### Post date: [August 20, 2020, 2:44pm UTC](https://community.parabola.io/t/api-export-422-error/919/10 "2020-08-20T14:44:12Z")

</div>

Awesome! Glad to hear it 🙂

---

<div class="post-metadata">

### Author: ![Gregory\_Parsons](https://avatars.discourse-cdn.com/v4/letter/g/5e9695/32.png) [@Gregory\_Parsons](https://community.parabola.io/u/Gregory_Parsons)
#### Post date: [December 16, 2020, 10:43am UTC](https://community.parabola.io/t/api-export-422-error/919/11 "2020-12-16T10:43:26Z")

</div>

Hey, has the **Merge Values** step been renamed or removed? I cannot find a way to combine the newly created `API Body` column into a single cell as described. Thank you.

---

<div class="post-metadata">

### Author: ![anon36387498](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@anon36387498](https://community.parabola.io/u/anon36387498)
#### Post date: [December 16, 2020, 5:20pm UTC](https://community.parabola.io/t/api-export-422-error/919/12 "2020-12-16T17:20:24Z")

</div>

Hi @Gregory_Parsons 👋 yes, it has been renamed to [Merge duplicate rows](https://parabola.io/transform/merge-duplicate-rows).  
(The **Insert column** step was also renamed to [Insert text column](https://parabola.io/transform/insert-text-column).)

---

<div class="post-metadata">

### Author: ![Gregory\_Parsons](https://avatars.discourse-cdn.com/v4/letter/g/5e9695/32.png) [@Gregory\_Parsons](https://community.parabola.io/u/Gregory_Parsons)
#### Post date: [December 16, 2020, 6:25pm UTC](https://community.parabola.io/t/api-export-422-error/919/13 "2020-12-16T18:25:54Z")

</div>

Thanks, can you assist in configuring the Merge Duplicate Rows Step to achieve the result claimed in the discussion - i.e. achieving all data in one ‘cell’ resulting in a “Send to API” Step with a single API Request output?  
I have only been able to achieve all rows being sent separately.  
Thank you

---

<div class="post-metadata">

### Author: ![anon36387498](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@anon36387498](https://community.parabola.io/u/anon36387498)
#### Post date: [December 17, 2020, 1:51am UTC](https://community.parabola.io/t/api-export-422-error/919/14 "2020-12-17T01:51:18Z")

</div>

@Gregory_Parsons sure thing! Here’s how to configure this:

2 Steps: [Insert text column](https://parabola.io/transform/insert-text-column) - \> [Merge duplicate rows](https://parabola.io/transform/merge-duplicate-rows)

 ![updated](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/c/c0cdc58118fe4d022d448cf5329bb908bbb65d91.jpeg)

(Double-click on screenshot to enlarge/zoom in. Note: in `Insert Text Column` Common value section, the underlined red _{" }_ is auto-formatting that will be skipped during the step’s function.)

The `Insert text column` step adds two columns: (1) an `API Body` column that replicates the Body Request you’d send in a `Send to an API` step and (2) a `Merge column` with the value of `1` (to help the following step merge values). Then in the connected `Merge duplicate rows` step, merge `API body` per unique value in `Merge column` by the dimeter of `,` comma.
