Delete Wallet Contact
Delete a personal contact from a company wallet or client wallet.
contact
ID of the contact. String starting with the prefix cont_.
wallet
ID of the Rapyd Wallet that this contact is associated with. String starting with ewallet_.
Code Samples
.NET
using System; namespace RapydApiRequestSample { class Program { static void Main(string[] args) { try { string wallet = "ewallet_5d228399661dac92968ace74f7aa00c6"; string contact = "cont_78cb81b4ef7e079d0a95445e15e820fd"; string result = RapydApiRequestSample.Utilities.MakeRequest("DELETE", $"/v1/ewallets/{wallet}/contacts/{contact}"); Console.WriteLine(result); } catch (Exception e) { Console.WriteLine("Error completing request: " + e.Message); } } } }
JavaScript
const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest; async function main() { try { const result = await makeRequest( 'DELETE', '/v1/ewallets/ewallets/ewallet_5d228399661dac92968ace74f7aa00c6/contacts/cont_78cb81b4ef7e079d0a95445e15e820fd' ); console.log(result); } catch (error) { console.error('Error completing request', error); } }
PHP
<?php $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/<path-to-your-utility-file>/utilities.php"; include($path); try { $object = make_request('delete', '/v1/ewallets/ewallet_5d228399661dac92968ace74f7aa00c6/contacts/cont_78cb81b4ef7e079d0a95445e15e820fd'); var_dump($object); } catch(Exception $e) { echo "Error: $e"; } ?>
Python
from pprint import pprint from utilities import make_request wallet = 'ewallet_5d228399661dac92968ace74f7aa00c6' contact = 'cont_78cb81b4ef7e079d0a95445e15e820fd' results = make_request(method='delete', path=f'/v1/ewallets/{wallet}/contacts/{contact}') pprint(results)
/v1/ewallets/:wallet/contacts/:contact
Delete Wallet Contact
curl -X delete 'https://sandboxapi.rapyd.net/v1/ewallets/ewallet_b5320c566cc4aa01fe77440ad08693f7/contacts/cont_614c5bc028d59709202f09e601642352' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here'
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "121a8c9a-bf63-484a-a2ab-42d231da9297" }, "data": { "id": "cont_614c5bc028d59709202f09e601642352", "delete": true } }
Bad Request - Cannot Delete the Only Contact (Personal Wallet)
curl -X delete 'https://sandboxapi.rapyd.net/v1/ewallets/ewallet_26a33b99ebba47f673dcbdf18889ac46/contacts/cont_539d2d5976d11011a7fc4b7969b55264' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here'
{ "status": { "error_code": "ERROR_DELETE_CONTACT_FROM_PERSONAL_EWALLET", "status": "ERROR", "message": "The request tried to delete a contact, but the wallet was a personal wallet. A personal wallet can have only one contact and it cannot be deleted. The request was rejected. Corrective action: None. Determine why an attempt was made to delete the contact.", "response_code": "ERROR_DELETE_CONTACT_FROM_PERSONAL_EWALLET", "operation_id": "79eb406d-cdc0-4388-838e-c617d25227c6" } }
Bad Request - Wallet Contact Not Found
curl -X delete 'https://sandboxapi.rapyd.net/v1/ewallets/ewallet_82dd0417a86aebb564da2f96936ce2d2/contacts/cont_91a70854acf4b78ddbbf767d2e4c0cf3' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here'
{ "status": { "error_code": "ERROR_GET_EWALLET_CONTACT", "status": "ERROR", "message": "The request attempted an operation that requires a wallet contact, but the contact was not found. The request was rejected. Corrective action: In the path, specify the ID of a valid wallet, a string starting with 'ewallet_', and the ID of a valid contact belonging to that wallet, a string starting with 'cont_'.", "response_code": "ERROR_GET_EWALLET_CONTACT", "operation_id": "b5ca7c06-e330-4a14-9b5b-6781936b669c" } }
Unauthorized
curl -X delete 'https://sandboxapi.rapyd.net/v1/ewallets/ewallet_62f756c384f52bb2aaf7f6a05da36b9f/contacts/cont_91a70854acf4b78ddbbf767d2e4c0cf3' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here'
{ "status": { "error_code": "UNAUTHENTICATED_API_CALL", "status": "ERROR", "message": "The request was rejected due to an authentication issue. Corrective action: Check the status of your account in the 'Account Details' page of the Client Portal.", "response_code": "UNAUTHENTICATED_API_CALL", "operation_id": "b877da07-5b89-4574-aa7c-90d0c2fca0ea" } }