> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mercurjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# updateSellerAddressWorkflow

> Upsert a seller's address.

Creates or updates the address record attached to a seller. Also run as a step by `createSellerAccountWorkflow` when an address is provided at registration.

## Usage

```ts theme={null}
import { updateSellerAddressWorkflow } from "@mercurjs/core/workflows"

const { result } = await updateSellerAddressWorkflow(container).run({
  input: {
    seller_id: "sel_123",
    data: { address_1: "1 Main St", city: "Berlin", country_code: "de" },
  },
})
```

## Input

<ParamField body="seller_id" type="string" required>Id of the seller whose address is updated.</ParamField>

<ParamField body="data" type="UpdateSellerAddressDTO" required>
  Address fields to set; all optional.

  <Expandable title="properties">
    <ParamField body="name" type="string">Address label.</ParamField>
    <ParamField body="company" type="string">Company name.</ParamField>
    <ParamField body="first_name" type="string">Contact first name.</ParamField>
    <ParamField body="last_name" type="string">Contact last name.</ParamField>
    <ParamField body="address_1" type="string">Street address, line 1.</ParamField>
    <ParamField body="address_2" type="string">Street address, line 2.</ParamField>
    <ParamField body="city" type="string">City.</ParamField>
    <ParamField body="country_code" type="string">ISO 2-letter country code.</ParamField>
    <ParamField body="province" type="string">Province or state.</ParamField>
    <ParamField body="postal_code" type="string">Postal code.</ParamField>
    <ParamField body="phone" type="string">Phone number.</ParamField>
    <ParamField body="metadata" type="object">Custom key-value data.</ParamField>
  </Expandable>
</ParamField>

<ParamField body="additional_data" type="object">Custom data passed through to the workflow hooks.</ParamField>

## Result

<ResponseField name="result" type="SellerAddressDTO">The updated address.</ResponseField>

## Hooks

* `addressUpdated` — runs after the update with `{ address, additional_data }`.

```ts theme={null}
updateSellerAddressWorkflow.hooks.addressUpdated(async ({ address }) => {
  // e.g. re-verify tax settings
})
```
