Skip to main content
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

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

seller_id
string
required
Id of the seller whose address is updated.
data
UpdateSellerAddressDTO
required
Address fields to set; all optional.
additional_data
object
Custom data passed through to the workflow hooks.

Result

result
SellerAddressDTO
The updated address.

Hooks

  • addressUpdated — runs after the update with { address, additional_data }.
updateSellerAddressWorkflow.hooks.addressUpdated(async ({ address }) => {
  // e.g. re-verify tax settings
})