Skip to main content

Update Address Metafield

API operation: Open the endpoint in the API reference

Use PUT /users/{user_id}/addresses/{address_id}/metafields/{metafield_id} to update a metafield on a user's address. The current public operation is AddressMetafield.update.

If available, the operation requires authentication. A non-administrator can act only when user_id identifies the authenticated user, and the operation verifies that address_id and metafield_id belong to that user-address chain.

The older operation identifier says “create,” but the method and path describe an update. Metafield keys are validated dynamically for each address. See Extra attributes (Metafields) for shared value concepts.

OpenAPI reference​

Operation: PUT /users/{user_id}/addresses/{address_id}/metafields/{metafield_id}

Path parameters

NameTypeRequiredDescription
user_idintegerYes—
address_idintegerYes—
metafield_idintegerYes—

Request body fields

NameTypeRequired
keystringNo
modelanyYes
object_idintegerNo
valueanyNo
value_typestringNo

Responses

CodeDescription
200OK (Envelope)
400Bad Request (ErrorResponse)
401Unauthorized
404Not Found
429Too Many Requests (ErrorResponse)
500Internal Server Error (ErrorResponse)
503Service Unavailable (ErrorResponse)
Open this operation in the API reference