Delete customer
curl --request DELETE \
--url https://qa-api.endl.xyz/api/v0/customer/{userId} \
--header 'API-KEY: <api-key>'import requests
url = "https://qa-api.endl.xyz/api/v0/customer/{userId}"
headers = {"API-KEY": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'API-KEY': '<api-key>'}};
fetch('https://qa-api.endl.xyz/api/v0/customer/{userId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qa-api.endl.xyz/api/v0/customer/{userId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://qa-api.endl.xyz/api/v0/customer/{userId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://qa-api.endl.xyz/api/v0/customer/{userId}")
.header("API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-api.endl.xyz/api/v0/customer/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"userId": "6c4ba9af-978a-45ff-953f-729c593f14af",
"active": false,
"deleted": true
}{
"code": "401",
"message": "Authentication Failed!",
"name": "PartnerOnboarding failed to process"
}{
"code": "403",
"message": "Onboarding is not permitted for this country",
"name": "PartnerOnboardingCreate failed to process"
}{
"code": "404",
"message": "Not found",
"name": "PartnerOnboardingGet failed to process"
}{
"code": "409",
"message": "Cannot delete a customer that holds a balance",
"name": "PartnerOnboardingDelete failed to process"
}Delete customer
Soft-deletes the customer. It stops appearing in the list and a later GET returns 404. The email is released, so it can be onboarded again.
A customer holding a balance cannot be deleted.
DELETE
/
api
/
v0
/
customer
/
{userId}
Delete customer
curl --request DELETE \
--url https://qa-api.endl.xyz/api/v0/customer/{userId} \
--header 'API-KEY: <api-key>'import requests
url = "https://qa-api.endl.xyz/api/v0/customer/{userId}"
headers = {"API-KEY": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'API-KEY': '<api-key>'}};
fetch('https://qa-api.endl.xyz/api/v0/customer/{userId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qa-api.endl.xyz/api/v0/customer/{userId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://qa-api.endl.xyz/api/v0/customer/{userId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://qa-api.endl.xyz/api/v0/customer/{userId}")
.header("API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-api.endl.xyz/api/v0/customer/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"userId": "6c4ba9af-978a-45ff-953f-729c593f14af",
"active": false,
"deleted": true
}{
"code": "401",
"message": "Authentication Failed!",
"name": "PartnerOnboarding failed to process"
}{
"code": "403",
"message": "Onboarding is not permitted for this country",
"name": "PartnerOnboardingCreate failed to process"
}{
"code": "404",
"message": "Not found",
"name": "PartnerOnboardingGet failed to process"
}{
"code": "409",
"message": "Cannot delete a customer that holds a balance",
"name": "PartnerOnboardingDelete failed to process"
}