Value List Items

Value list items allow you to add specific values to a given Radar value list, which can then be used in rules.

Related guide: Managing list items

The Value List Item object

Attributes

  • idstring

    Unique identifier for the object.

  • valuestring

    The value of the item.

  • value_liststring

    The identifier of the value list this item belongs to.

More attributes

  • objectstring

  • createdtimestamp

  • created_bystring

  • livemodeboolean

The Value List Item object
{
"id": "rsli_1MxxosLkdIwHu7ixxvA1yKiZ",
"object": "radar.value_list_item",
"created": 1681760074,
"created_by": "API",
"livemode": false,
"value": "1.2.3.4",
"value_list": "rsl_1MxxosLkdIwHu7ixNiiD01Kj"
}

Create a value list item

Creates a new ValueListItem object, which is added to the specified parent value list.

Parameters

  • valuestringRequired

    The value of the item (whose type must match the type of the parent value list).

  • value_liststringRequired

    The identifier of the value list which the created item will be added to.

Returns

Returns a ValueListItem object if creation succeeds.

POST /v1/radar/value_list_items
import stripe
stripe.api_key = "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc"
stripe.radar.ValueListItem.create(
value_list="rsl_1MxxosLkdIwHu7ixNiiD01Kj",
value="1.2.3.4",
)
Response
{
"id": "rsli_1MxxosLkdIwHu7ixxvA1yKiZ",
"object": "radar.value_list_item",
"created": 1681760074,
"created_by": "API",
"livemode": false,
"value": "1.2.3.4",
"value_list": "rsl_1MxxosLkdIwHu7ixNiiD01Kj"
}

Retrieve a value list item

Retrieves a ValueListItem object.

Parameters

No parameters.

Returns

Returns a ValueListItem object if a valid identifier was provided.

GET /v1/radar/value_list_items/:id
import stripe
stripe.api_key = "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc"
stripe.radar.ValueListItem.retrieve("rsli_1MxxosLkdIwHu7ixxvA1yKiZ")
Response
{
"id": "rsli_1MxxosLkdIwHu7ixxvA1yKiZ",
"object": "radar.value_list_item",
"created": 1681760074,
"created_by": "API",
"livemode": false,
"value": "1.2.3.4",
"value_list": "rsl_1MxxosLkdIwHu7ixNiiD01Kj"
}

List all value list items

Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

Parameters

  • value_liststringRequired

    Identifier for the parent value list this item belongs to.

  • valuestring

    Return items belonging to the parent list whose value matches the specified value (using an “is like” match).

More parameters

  • createddictionary

  • ending_beforestring

  • limitinteger

  • starting_afterstring

Returns

A dictionary with a data property that contains an array of up to limit items, starting after item starting_after. Each entry in the array is a separate ValueListItem object. If no more items are available, the resulting array will be empty.

GET /v1/radar/value_list_items
import stripe
stripe.api_key = "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc"
stripe.radar.ValueListItem.list(value_list="rsl_1MxxosLkdIwHu7ixNiiD01Kj")
Response
{
"object": "list",
"url": "/v1/radar/value_list_items",
"has_more": false,
"data": [
{
"id": "rsl_1MxxosLkdIwHu7ixNiiD01Kj",
"object": "radar.value_list",
"alias": "custom_ip_blocklist",
"created": 1681760074,
"created_by": "API",
"item_type": "ip_address",
"list_items": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/radar/value_list_items?value_list=rsl_1MxxosLkdIwHu7ixNiiD01Kj"
},
"livemode": false,
"metadata": {},
"name": "Custom IP Blocklist"
}
{...}
{...}
],
}
Stripe Shell
Test mode
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Log in to your Stripe account and press Control + Backtick (`) on your keyboard to start managing your Stripe resources in test mode. - View supported Stripe commands: - Find webhook events: - Listen for webhook events: - Call Stripe APIs: stripe [api resource] [operation] (e.g., )
The Stripe Shell is best experienced on desktop.
$