Hanzo
OpenapiCommerce

Replace a wallet outright

A wallet is a container of custodial blockchain accounts, and its only field is that account list — each account carrying a name, an address, a chain…

PUT /v1/commerce/wallet/{walletid}

Addresshttps://api.hanzo.ai/v1/commerce/wallet/{walletid}
MethodPUT
Operationput_commerce_wallet_by_walletid
AuthAuthorization: Bearer $HANZO_API_KEY

A wallet is a container of custodial blockchain accounts, and its only field is that account list — each account carrying a name, an address, a chain type, and the ENCRYPTED private key with its salt. Creating a wallet through this table generates NO KEYS: key generation lives on the account routes, so a wallet made here is an empty shell and an account posted into one is stored exactly as sent, with no key generation and no validation behind it. Know what a read renders: the plaintext private key is never marshalled and never stored, but the encrypted blob and its salt ARE returned, so whoever can read a wallet can attack it offline down to the strength of the owner's passphrase. That is why this kind is admin-gated. This is a true REPLACEMENT, not a merge: the stored row's key is preserved, but the body is decoded onto a FRESH entity, so every field the body omits is written back as its ZERO value. Patch is the verb for changing part of a row. The id is resolved inside the caller org's own namespace and an absent one is 404 before anything is written; a body that fails to decode is 400. Answers the stored result. The token must carry the ADMIN permission; an ordinary access token is refused. The per-kind permission table has no entry for wallet, so the scaffold skips that second check with a warning and the gate above is the whole authorization story.

Request

1 field.

FieldInTypeRequiredDescription
walletidpathstringyes

Response

The document declares no response body for this operation. It answers 200 on success and the platform error shape on failure — see Errors.

Examples

hanzo commerce wallet set <walletid>

Commerce API · All Hanzo APIs · Interactive reference

How is this guide?

On this page