cURL
curl --request DELETE \
--url https://api.cakto.com.br/public_api/products/{product_pk}/checkouts/{id}/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cakto.com.br/public_api/products/{product_pk}/checkouts/{id}/"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cakto.com.br/public_api/products/{product_pk}/checkouts/{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_URL => "https://api.cakto.com.br/public_api/products/{product_pk}/checkouts/{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: Bearer <token>"
],
]);
$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://api.cakto.com.br/public_api/products/{product_pk}/checkouts/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.delete("https://api.cakto.com.br/public_api/products/{product_pk}/checkouts/{id}/")
.header("Authorization", "Bearer <token>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.cakto.com.br/public_api/products/{product_pk}/checkouts/{id}/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
{
"detail": "As credenciais de autenticação não foram fornecidas."
}Checkouts
Deletar Checkout
Deleta um checkout de um produto
DELETE
/
public_api
/
products
/
{product_pk}
/
checkouts
/
{id}
/
cURL
curl --request DELETE \
--url https://api.cakto.com.br/public_api/products/{product_pk}/checkouts/{id}/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cakto.com.br/public_api/products/{product_pk}/checkouts/{id}/"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cakto.com.br/public_api/products/{product_pk}/checkouts/{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_URL => "https://api.cakto.com.br/public_api/products/{product_pk}/checkouts/{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: Bearer <token>"
],
]);
$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://api.cakto.com.br/public_api/products/{product_pk}/checkouts/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.delete("https://api.cakto.com.br/public_api/products/{product_pk}/checkouts/{id}/")
.header("Authorization", "Bearer <token>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.cakto.com.br/public_api/products/{product_pk}/checkouts/{id}/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
{
"detail": "As credenciais de autenticação não foram fornecidas."
}Escopo
write products
Esta operação não pode ser desfeita.
Certifique-se de que você realmente deseja deletar o checkout antes de prosseguir.
Não é possível deletar o checkout padrão do produto.
Authorizations
Token de autenticação do tipo Bearer {access_token}, onde {access_token} é o token obtido no fluxo de autenticação.
Response
No response body
Was this page helpful?