Skip to main content
This guide recovers the ID of a resource you created but didn’t save, for example after a timeout, a failed database write, or a retry that returned 409 error_duplicate_resource. It ends with the ID in hand, ready to use in your next call. Nuvion returns a resource’s ID in the create response. If you lost it, list the resource and match on a value you still know, such as a name, a reference or the account it belongs to.

Which call to use

Each list is paginated, newest first unless the endpoint says otherwise. When has_next is true, pass next_cursor as cursor to read the next page. See Pagination.

Recover an entity

Search by the name you sent when you created the entity. This is also how you recover from a 409 error_duplicate_resource on create.
The id of the match is the entity_id. To read the person, address and identification IDs, or the person’s email, retrieve the entity.
See List entities and Get an entity for the full responses.

Recover an account

Filter the entity’s accounts by the currency and display_name you used. Without entity_id, the list returns your own accounts. The display_name match is partial, so if more than one account comes back, pick the one whose display_name matches exactly.
The account id is data.data[].id. See List accounts for the filters.

Recover a transfer

Filter by the unique_reference you sent. The reference must match exactly, including letter case.
A reference that no transfer uses returns 200 OK with an empty data array. A transfer record exists even when the transfer ends in failed, so a missing match means no transfer was created with that reference.

Recover a card

The card list can’t filter by name, so list the cards on the funding account and match name. The card id is under data.cards.
If several cards look alike, use created and type to tell them apart. See List cards.

When a call fails or returns nothing

The request can also return the shared 403 and 429 errors. See Errors for the standard error object.
An empty result doesn’t prove the resource is missing. GET /cards, GET /funding-sessions, GET /account-details and GET /counterparties/{counterparty_id}/payment-details return 200 with an empty array for an account_id or counterparty_id that doesn’t exist. Check the ID you filter by before you conclude the resource was never created.

Don’t lose it again

  • Store the ID when the create succeeds, before you do anything else with the resource.
  • Send a stable reference such as unique_reference on transfers and funding sessions, and display_name on accounts. A retry with the same value returns 409 error_duplicate_resource instead of creating a second record, and the reference lets you find the first one.
  • Handle 409 error_duplicate_resource by recovering the existing ID, as above, not by showing the raw error. See Avoiding duplicate entities.