Create a value list
/value_listsCreates a new value list.
Headers
AuthorizationstringRequiredidempotency-keystringA unique key, such as a UUID, that makes a POST or DELETE request safe to retry. Pay.com keeps each key for 24 hours, separately for each workspace.
- A retry with the same key, endpoint and body gets the first request's stored status and body, without running the request again.
- If the first request is still being processed, a retry gets 409
idempotency_error(request_in_progress). - The same key on another endpoint, or with another body, gets 400
idempotency_error(invalid_parameters). - GET, PUT and PATCH requests ignore the key.
The response repeats the key in its Idempotency-Key header.
Parameters
namestringRequiredName of the value list.
aliasstringRequiredAlias of the value list. Must be unique among your value lists. The aliases pm_card_blacklist, pm_bank_account_blacklist, and pm_sources_sync are reserved.
typestringType of the values stored in the list. One of custom, card, email, ip_address, billing_address, email_domain, bin, issuer_country, phone_number, card_name, customer_id, or bank_account.
Returns
Returns the created value list object.
idstringUnique identifier for the value list.
resourcestringString representing the object's type.
namestringName of the value list.
aliasstringAlias of the value list, unique among your value lists.
typestringType of the values stored in the list. One of custom, card, email, ip_address, billing_address, email_domain, bin, issuer_country, phone_number, card_name, customer_id, or bank_account.
created_atstringTime at which the value list was created, in ISO 8601 format.
created_bystring or nullIdentifier of the API key or user that created the value list, if applicable.
updated_atstring or nullTime at which the value list was last updated, in ISO 8601 format. Null if it was never updated.
updated_bystring or nullIdentifier of the API key or user that last updated the value list. Null if it was never updated.
items_countintegerNumber of items in the value list.
test_modebooleanWhether the value list was created in the sandbox.
Errors
400401invalid_key, invalid_token, legacy_keys_ended, legacy_keys_off or permission_denied).403resource_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.409idempotency-key is still being processed (request_in_progress). Wait, then retry with the same key.500503Retry-After, or after a few seconds when there's none.