Enable/Disable Customer
curl --request PATCH \
--url https://devapi.withedge.co/gateway/api/v1/customer/profile/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'requestId: <requestid>' \
--data '
{
"status": true,
"reason": "<string>"
}
'import requests
url = "https://devapi.withedge.co/gateway/api/v1/customer/profile/{customerId}"
payload = {
"status": True,
"reason": "<string>"
}
headers = {
"requestId": "<requestid>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
requestId: '<requestid>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({status: true, reason: '<string>'})
};
fetch('https://devapi.withedge.co/gateway/api/v1/customer/profile/{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://devapi.withedge.co/gateway/api/v1/customer/profile/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => true,
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"requestId: <requestid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://devapi.withedge.co/gateway/api/v1/customer/profile/{customerId}"
payload := strings.NewReader("{\n \"status\": true,\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("requestId", "<requestid>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://devapi.withedge.co/gateway/api/v1/customer/profile/{customerId}")
.header("requestId", "<requestid>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": true,\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devapi.withedge.co/gateway/api/v1/customer/profile/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["requestId"] = '<requestid>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": true,\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": "00",
"message": "Customer Profile Successfully Deactivated",
"data": {},
"errors": []
}
Customer
Enable/Disable Customer
This endpoint enables you to disable or enable any of your existing customer’s profile.
PATCH
/
customer
/
profile
/
{customerId}
Enable/Disable Customer
curl --request PATCH \
--url https://devapi.withedge.co/gateway/api/v1/customer/profile/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'requestId: <requestid>' \
--data '
{
"status": true,
"reason": "<string>"
}
'import requests
url = "https://devapi.withedge.co/gateway/api/v1/customer/profile/{customerId}"
payload = {
"status": True,
"reason": "<string>"
}
headers = {
"requestId": "<requestid>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
requestId: '<requestid>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({status: true, reason: '<string>'})
};
fetch('https://devapi.withedge.co/gateway/api/v1/customer/profile/{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://devapi.withedge.co/gateway/api/v1/customer/profile/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => true,
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"requestId: <requestid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://devapi.withedge.co/gateway/api/v1/customer/profile/{customerId}"
payload := strings.NewReader("{\n \"status\": true,\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("requestId", "<requestid>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://devapi.withedge.co/gateway/api/v1/customer/profile/{customerId}")
.header("requestId", "<requestid>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": true,\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devapi.withedge.co/gateway/api/v1/customer/profile/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["requestId"] = '<requestid>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": true,\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": "00",
"message": "Customer Profile Successfully Deactivated",
"data": {},
"errors": []
}
Enable/Disable Customer
Use this endpoint to enable or disable the profile of an existing customer on the Edge platform.Request Parameters
A unique identifier for the request, used for idempotency.
Example:
Example:
e0b9f8d0-7a57-4a67-a8b2-4d7c7b5a37c9The unique identifier of the customer whose profile is to be enabled or disabled.
Example:
Example:
7100987614Specifies the action to be performed:
true: Enables the customer’s profile.false: Disables the customer’s profile.
The reason for enabling or disabling the customer’s profile.
Example:
Example:
Fraudulent activity detected{
"statusCode": "00",
"message": "Customer Profile Successfully Deactivated",
"data": {},
"errors": []
}
Was this page helpful?
⌘I