> For the complete documentation index, see [llms.txt](https://vu-custom.gitbook.io/vu-custom/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vu-custom.gitbook.io/vu-custom/admin-api/account-management/batch-update-sold_to_account.md).

# Batch update sold\_to\_account

Method : <mark style="color:green;">**POST**</mark>

{% code fullWidth="false" %}

```url
https://os.vucustom.com/api/v1/sold_to_accounts/bulk
```

{% endcode %}

<details>

<summary>Example Request Body</summary>

```json
{
    "sold_to_accounts": [
        {
            "account_number": "123",
            "address_1": "448 Test Street",
            "address_2": "",
            "alternate_name": "ATTN",
            "city": "Lawrence",
            "company_name": "",
            "country": "US",
            "first_name": "John",
            "last_name": "Doe",
            "phone": "(770) 210-4897",
            "postal_code": "66049",
            "ship_to_accounts": [
                {
                    "account_number": "123_sh",
                    "address_1": "448 Test Street",
                    "address_2": "",
                    "alternate_name": "ATTN",
                    "city": "s",
                    "company_name": "",
                    "country": "US",
                    "email": "test@test.com",
                    "first_name": "John",
                    "last_name": "Doe",
                    "phone": "(770) 210-4897",
                    "postal_code": "66049",
                    "state_region": "KS"
                }
            ],
            "state_region": "KS"
        }
    ]
}
```

</details>

Request Body Schema

<table><thead><tr><th width="183">Field Name</th><th width="85">Type</th><th width="88">Required</th><th>Description</th></tr></thead><tbody><tr><td>sold_to_accounts</td><td>array</td><td>Yes</td><td><p>This is an array of sold_to_account objects. please refer to <a href="/pages/41zkmRnbIVWSc1mzqOsS">schema</a> for these objects. <br></p><p>if an object which is <strong>present in this array and not present in the DB</strong> it will get added.</p><p></p><p>if an object which is <strong>present in this array and also present in the DB</strong> it will get updated with the information provided.</p><p><br>An array of ship_to_account objects should be present for each sold_to account.</p></td></tr><tr><td>ship_to_accounts</td><td>array</td><td>Yes</td><td>This is an array of ship_to_account objects. please refer to<a href="/pages/tABLInhl3uG2zhNyeLkt"> schema</a> for these objects. <br><br>if an object which is present in this array and not present in the DB it will get added. <br><br>if an object which is present in this array and also present in this array it will get updated with the information provided.</td></tr></tbody></table>

{% tabs %}
{% tab title="200" %}
**`200 Successful response example`**

```json
{
    "sold_to_accounts": [
        {
            "account_number": "123",
            "address_1": "448 Test Street",
            "address_2": "",
            "alternate_name": "ATTN",
            "city": "Lawrence",
            "company_name": "",
            "country": "US",
            "first_name": "John",
            "last_name": "Doe",
            "phone": "(770) 210-4897",
            "postal_code": "66049",
            "ship_to_accounts": [
                {
                    "account_number": "123_sh",
                    "address_1": "448 Test Street",
                    "address_2": "",
                    "alternate_name": "ATTN",
                    "city": "s",
                    "company_name": "",
                    "country": "US",
                    "email": "test@test.com",
                    "first_name": "John",
                    "last_name": "Doe",
                    "phone": "(770) 210-4897",
                    "postal_code": "66049",
                    "state_region": "KS"
                }
            ],
            "state_region": "KS"
        }
    ]
}
```

{% endtab %}

{% tab title="401 " %}
**`401 Unauthorized`**

`The client doesn’t have correct authentication credentials.`

```
{
"errors": "[API] Invalid API key or secret (unrecognized login or wrong password)"
}
```

{% endtab %}

{% tab title="403" %}
**`403 Forbidden`**

`The server is refusing to respond. This is typically caused by incorrect access.`
{% endtab %}

{% tab title="404" %}
**`404 Not Found`**

`The requested resource was not found but could be available again in the future.`
{% endtab %}

{% tab title="422" %}
**`422 Unprocessable Entity`**
{% endtab %}

{% tab title="5xx" %}
**`5xx Errors`**

`An internal error occurred in VU Admin.`
{% endtab %}
{% endtabs %}
