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" },
},
})
Id of the seller whose address is updated.
data
UpdateSellerAddressDTO
required
Address fields to set; all optional. ISO 2-letter country code.
Custom data passed through to the workflow hooks.
Result
Hooks
addressUpdated — runs after the update with { address, additional_data }.
updateSellerAddressWorkflow . hooks . addressUpdated ( async ({ address }) => {
// e.g. re-verify tax settings
})