Skip to Content
Docs
Value lists

Update a value list item

PUT/value_lists/{list_id}/items/{item_id}

Updates a value list item. The new value must differ from the current one. metadata replaces the existing metadata, and an update without it clears the metadata.

Headers

AuthorizationstringRequired
HTTP Basic auth: your API key as the password, with an empty username. See Authentication.

Path parameters

list_idstringRequired

The identifier of the value list.

item_idstringRequired

The identifier of the value list item.

Parameters

valuestringRequired

The new value of the item. The same validation rules as on create apply.

It must differ from the item's current value: a request with the current value returns 400 "already exists".

metadataobject

Set of key-value pairs that replaces the item's metadata. An update without metadata clears it.

Returns

Returns the updated value list item object.

idstring

Unique identifier for the value list item.

resourcestring

String representing the object's type.

liststring

Unique identifier of the value list this item belongs to.

created_atstring

Time at which the value list item was created, in ISO 8601 format.

created_bystring or null

Identifier of the API key or user that created the value list item, if applicable.

updated_atstring or null

Time at which the value list item was last updated, in ISO 8601 format. Null if it was never updated.

updated_bystring or null

Identifier of the API key or user that last updated the value list item. Null if it was never updated.

test_modeboolean

Whether the value list item was created in the sandbox.

metadataobject

Set of key-value pairs attached to the object. Omitted when the item has no metadata.

For card lists, the card details (bin, last_four_digits, brand, issuer_country, card_type, and issuer_name) are added to the metadata. For bank_account lists, the bank account's last4, bank_name, country, and currency are added.

valuestring

Value of the value list item, as stored after normalization. Email values are stored in lowercase, and phone numbers as digits only.

For card lists, this is the card's unique identifier (fingerprint), not the pm_card_ or tok_card_ ID that was sent. For bank_account lists, it's the bank account's unique identifier, not the payment method ID that was sent.

Errors

400
Invalid request parameters.
401
The API key or access token is missing, unknown or no longer works (invalid_key, invalid_token, legacy_keys_ended, legacy_keys_off or permission_denied).
403
The request was refused: the API key may not make it (for example resource_not_allowed, key_disabled, network_not_allowed, pci_required or merchant_required), or this resource isn't enabled for your account (permission_denied). code says why.
404
Value list item not found.
500
Internal server error.
503
Service unavailable. Retry after the number of seconds in Retry-After, or after a few seconds when there's none.
Was this page helpful?