Archive customer
curl --request DELETE \
--url https://platform.swipelux.com/v3/customers/{customerId} \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-API-Key: <api-key>'const url = 'https://platform.swipelux.com/v3/customers/{customerId}';
const options = {
method: 'DELETE',
headers: {'Idempotency-Key': '<idempotency-key>', 'X-API-Key': '<api-key>'}
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));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)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();<?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;
}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": "https://docs.swipelux.com/errors/validation-error",
"title": "<string>",
"status": 400,
"code": "validation_error",
"detail": "<string>",
"correlationId": "<string>",
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "https://docs.swipelux.com/errors/unauthorized",
"title": "<string>",
"status": 401,
"code": "unauthorized",
"detail": "<string>",
"correlationId": "<string>",
"retryable": false,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "https://docs.swipelux.com/errors/forbidden",
"title": "<string>",
"status": 403,
"code": "forbidden",
"detail": "<string>",
"correlationId": "<string>",
"retryable": false,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "https://docs.swipelux.com/errors/customer-not-found",
"title": "<string>",
"status": 404,
"code": "customer_not_found",
"detail": "<string>",
"correlationId": "<string>",
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<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": "https://docs.swipelux.com/errors/internal-error",
"title": "<string>",
"status": 500,
"code": "internal_error",
"detail": "<string>",
"correlationId": "<string>",
"retryable": true,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}Customers
Archive customer
Archives the customer in a single operation. Resolve active accounts and in-flight transfers first. The externalId stays reserved and the customer’s history is retained.
DELETE
/
v3
/
customers
/
{customerId}
Archive customer
curl --request DELETE \
--url https://platform.swipelux.com/v3/customers/{customerId} \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-API-Key: <api-key>'const url = 'https://platform.swipelux.com/v3/customers/{customerId}';
const options = {
method: 'DELETE',
headers: {'Idempotency-Key': '<idempotency-key>', 'X-API-Key': '<api-key>'}
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));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)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();<?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;
}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": "https://docs.swipelux.com/errors/validation-error",
"title": "<string>",
"status": 400,
"code": "validation_error",
"detail": "<string>",
"correlationId": "<string>",
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "https://docs.swipelux.com/errors/unauthorized",
"title": "<string>",
"status": 401,
"code": "unauthorized",
"detail": "<string>",
"correlationId": "<string>",
"retryable": false,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "https://docs.swipelux.com/errors/forbidden",
"title": "<string>",
"status": 403,
"code": "forbidden",
"detail": "<string>",
"correlationId": "<string>",
"retryable": false,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "https://docs.swipelux.com/errors/customer-not-found",
"title": "<string>",
"status": 404,
"code": "customer_not_found",
"detail": "<string>",
"correlationId": "<string>",
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<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": "https://docs.swipelux.com/errors/internal-error",
"title": "<string>",
"status": 500,
"code": "internal_error",
"detail": "<string>",
"correlationId": "<string>",
"retryable": true,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"message": "<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