白标服务提供商
清空服务提供商允许列表
移除所有允许列表条目,使组织恢复为 filtered: false。
DELETE
/
whitelabel
/
providers
清除服务提供商允许列表
curl --request DELETE \
--url https://api-sandbox.y.uno/v1/whitelabel/providers \
--header 'PRIVATE-SECRET-KEY: <api-key>' \
--header 'PUBLIC-API-KEY: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/whitelabel/providers"
headers = {
"PUBLIC-API-KEY": "<api-key>",
"PRIVATE-SECRET-KEY": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'PUBLIC-API-KEY': '<api-key>', 'PRIVATE-SECRET-KEY': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/whitelabel/providers', 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://api-sandbox.y.uno/v1/whitelabel/providers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"PRIVATE-SECRET-KEY: <api-key>",
"PUBLIC-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://api-sandbox.y.uno/v1/whitelabel/providers"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("PUBLIC-API-KEY", "<api-key>")
req.Header.Add("PRIVATE-SECRET-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://api-sandbox.y.uno/v1/whitelabel/providers")
.header("PUBLIC-API-KEY", "<api-key>")
.header("PRIVATE-SECRET-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/whitelabel/providers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["PUBLIC-API-KEY"] = '<api-key>'
request["PRIVATE-SECRET-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": "NOT_AUTHENTICATED",
"messages": [
"Not authenticated"
]
}移除所有允许列表条目,使您的组织恢复为
使用列出白标服务提供商叠加层读取结果:
filtered: false。
此操作是幂等的,并且会保留所有说明覆盖:之后重新启用某个服务提供商时,您的文字也会随之恢复。
这并不是“显示全部”的开关。在主动启用规则下,没有任何允许列表条目的组织等于什么都没有启用;清空列表的最终状态与使用空的
provider_ids 调用替换服务提供商允许列表相同。当您想扩大所提供的范围时,请使用 PUT 重新构建列表。响应
204 No Content。没有响应体。
curl -X DELETE 'https://api.y.uno/v1/whitelabel/providers' \
-H 'public-api-key: <YOUR_PUBLIC_KEY>' \
-H 'private-secret-key: <YOUR_SECRET_KEY>' \
-i
HTTP/1.1 204 No Content
{
"code": "NOT_AUTHENTICATED",
"messages": ["Not authenticated"]
}
filtered 现在为 false,并且 providers 仍会列出带有说明覆盖的所有服务提供商,每个都为 allowed: false。
错误
| HTTP | code | 触发时机 |
|---|---|---|
401 | NOT_AUTHENTICATED | API 密钥缺失或无效。 |
此页面对您有帮助吗?
⌘I
清除服务提供商允许列表
curl --request DELETE \
--url https://api-sandbox.y.uno/v1/whitelabel/providers \
--header 'PRIVATE-SECRET-KEY: <api-key>' \
--header 'PUBLIC-API-KEY: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/whitelabel/providers"
headers = {
"PUBLIC-API-KEY": "<api-key>",
"PRIVATE-SECRET-KEY": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'PUBLIC-API-KEY': '<api-key>', 'PRIVATE-SECRET-KEY': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/whitelabel/providers', 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://api-sandbox.y.uno/v1/whitelabel/providers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"PRIVATE-SECRET-KEY: <api-key>",
"PUBLIC-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://api-sandbox.y.uno/v1/whitelabel/providers"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("PUBLIC-API-KEY", "<api-key>")
req.Header.Add("PRIVATE-SECRET-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://api-sandbox.y.uno/v1/whitelabel/providers")
.header("PUBLIC-API-KEY", "<api-key>")
.header("PRIVATE-SECRET-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/whitelabel/providers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["PUBLIC-API-KEY"] = '<api-key>'
request["PRIVATE-SECRET-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": "NOT_AUTHENTICATED",
"messages": [
"Not authenticated"
]
}