Archive customer
curl --request DELETE \
--url https://platform.swipelux.com/v3/customers/{customerId} \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-API-Key: <api-key>'import requests
url = "https://platform.swipelux.com/v3/customers/{customerId}"
headers = {
"Idempotency-Key": "<idempotency-key>",
"X-API-Key": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'Idempotency-Key': '<idempotency-key>', 'X-API-Key': '<api-key>'}
};
fetch('https://platform.swipelux.com/v3/customers/{customerId}', 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://platform.swipelux.com/v3/customers/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Idempotency-Key: <idempotency-key>",
"X-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://platform.swipelux.com/v3/customers/{customerId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-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://platform.swipelux.com/v3/customers/{customerId}")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.swipelux.com/v3/customers/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "validation_error",
"detail": "<string>",
"correlationId": "<string>",
"transferId": "<string>",
"retryable": true,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"statusReason": {
"code": "sanctions_screening_failed",
"message": "<string>",
"retryable": true
},
"reviewAnswer": "<string>",
"capabilities": [
"<string>"
],
"blockingResources": [
{
"id": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"correlationId": "<string>",
"transferId": "<string>",
"retryable": true,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"statusReason": {
"code": "sanctions_screening_failed",
"message": "<string>",
"retryable": true
},
"reviewAnswer": "<string>",
"capabilities": [
"<string>"
],
"blockingResources": [
{
"id": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"correlationId": "<string>",
"transferId": "<string>",
"retryable": true,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"statusReason": {
"code": "sanctions_screening_failed",
"message": "<string>",
"retryable": true
},
"reviewAnswer": "<string>",
"capabilities": [
"<string>"
],
"blockingResources": [
{
"id": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "customer_not_found",
"detail": "<string>",
"correlationId": "<string>",
"transferId": "<string>",
"retryable": true,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"statusReason": {
"code": "sanctions_screening_failed",
"message": "<string>",
"retryable": true
},
"reviewAnswer": "<string>",
"capabilities": [
"<string>"
],
"blockingResources": [
{
"id": "<string>"
}
]
}{
"type": "https://docs.swipelux.com/errors/customer-has-active-resources",
"title": "Customer Has Active Resources",
"status": 409,
"code": "customer_has_active_resources",
"detail": "Archive or resolve every blocking resource before retrying.",
"correlationId": "01JERRORCUSTOMERARCHIVE",
"retryable": false,
"blockingResources": [
{
"type": "account",
"id": "acc_01JACTIVE",
"requiredAction": "archive_account"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"correlationId": "<string>",
"transferId": "<string>",
"retryable": true,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"statusReason": {
"code": "sanctions_screening_failed",
"message": "<string>",
"retryable": true
},
"reviewAnswer": "<string>",
"capabilities": [
"<string>"
],
"blockingResources": [
{
"id": "<string>"
}
]
}customers
Archive customer
Archives the customer aggregate atomically. Active accounts and in-flight transfers must be resolved first; the externalId reservation and immutable history are retained.
Archive customer
curl --request DELETE \
--url https://platform.swipelux.com/v3/customers/{customerId} \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-API-Key: <api-key>'import requests
url = "https://platform.swipelux.com/v3/customers/{customerId}"
headers = {
"Idempotency-Key": "<idempotency-key>",
"X-API-Key": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'Idempotency-Key': '<idempotency-key>', 'X-API-Key': '<api-key>'}
};
fetch('https://platform.swipelux.com/v3/customers/{customerId}', 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://platform.swipelux.com/v3/customers/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Idempotency-Key: <idempotency-key>",
"X-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://platform.swipelux.com/v3/customers/{customerId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-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://platform.swipelux.com/v3/customers/{customerId}")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.swipelux.com/v3/customers/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "validation_error",
"detail": "<string>",
"correlationId": "<string>",
"transferId": "<string>",
"retryable": true,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"statusReason": {
"code": "sanctions_screening_failed",
"message": "<string>",
"retryable": true
},
"reviewAnswer": "<string>",
"capabilities": [
"<string>"
],
"blockingResources": [
{
"id": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"correlationId": "<string>",
"transferId": "<string>",
"retryable": true,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"statusReason": {
"code": "sanctions_screening_failed",
"message": "<string>",
"retryable": true
},
"reviewAnswer": "<string>",
"capabilities": [
"<string>"
],
"blockingResources": [
{
"id": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"correlationId": "<string>",
"transferId": "<string>",
"retryable": true,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"statusReason": {
"code": "sanctions_screening_failed",
"message": "<string>",
"retryable": true
},
"reviewAnswer": "<string>",
"capabilities": [
"<string>"
],
"blockingResources": [
{
"id": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "customer_not_found",
"detail": "<string>",
"correlationId": "<string>",
"transferId": "<string>",
"retryable": true,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"statusReason": {
"code": "sanctions_screening_failed",
"message": "<string>",
"retryable": true
},
"reviewAnswer": "<string>",
"capabilities": [
"<string>"
],
"blockingResources": [
{
"id": "<string>"
}
]
}{
"type": "https://docs.swipelux.com/errors/customer-has-active-resources",
"title": "Customer Has Active Resources",
"status": 409,
"code": "customer_has_active_resources",
"detail": "Archive or resolve every blocking resource before retrying.",
"correlationId": "01JERRORCUSTOMERARCHIVE",
"retryable": false,
"blockingResources": [
{
"type": "account",
"id": "acc_01JACTIVE",
"requiredAction": "archive_account"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"correlationId": "<string>",
"transferId": "<string>",
"retryable": true,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"statusReason": {
"code": "sanctions_screening_failed",
"message": "<string>",
"retryable": true
},
"reviewAnswer": "<string>",
"capabilities": [
"<string>"
],
"blockingResources": [
{
"id": "<string>"
}
]
}Authorizations
Your Swipelux API key. Obtain this from the Swipelux Dashboard.
Headers
Required for effectful v3 requests (POST, PATCH, PUT, DELETE). Reuse the same key with the same body to replay the cached response.
Required string length:
1 - 255Path Parameters
Response
Customer archived
Related topics
Archive customer documentArchive accountArchive recipientArchive ruleArchive related party⌘I