Deletar Cliente
curl --request DELETE \
--url https://mcapi.knewcms.com:2087/lines/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://mcapi.knewcms.com:2087/lines/{id}"
headers = {"Authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<authorization>'}};
fetch('https://mcapi.knewcms.com:2087/lines/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "2087",
CURLOPT_URL => "https://mcapi.knewcms.com:2087/lines/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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://mcapi.knewcms.com:2087/lines/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://mcapi.knewcms.com:2087/lines/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mcapi.knewcms.com:2087/lines/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "Cliente deletado com sucesso."
}
Clientes
Deletar Cliente
Este endpoint permite deletar um cliente da plataforma .
DELETE
/
lines
/
{id}
Deletar Cliente
curl --request DELETE \
--url https://mcapi.knewcms.com:2087/lines/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://mcapi.knewcms.com:2087/lines/{id}"
headers = {"Authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<authorization>'}};
fetch('https://mcapi.knewcms.com:2087/lines/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "2087",
CURLOPT_URL => "https://mcapi.knewcms.com:2087/lines/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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://mcapi.knewcms.com:2087/lines/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://mcapi.knewcms.com:2087/lines/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mcapi.knewcms.com:2087/lines/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "Cliente deletado com sucesso."
}
Como utilizar este endpoint?
Esse endpoint remove um cliente da plataforma de forma definitiva.Headers obrigatórios
string
required
O token de autenticação no formato Bearer é obrigatório para acessar este endpoint.
Parâmetros da URL
string
required
ID do cliente a ser deletado. Esse parâmetro deve ser informado diretamente na URL.
Exemplo de Requisição
DELETE https://mcapi.knewcms.com:2087/lines/505
Headers:
{
"Authorization": "Bearer seu_token_aqui",
"Content-Type": "application/json"
}
Resposta
number
Indica o código HTTP da resposta. Esperado: 200 (OK) ou 204 (No Content).
string
Mensagem de confirmação da exclusão.
Exemplo de Resposta
{
"status": 200,
"message": "Cliente deletado com sucesso."
}
⌘I