Lojas
Excluir Loja
Aprenda a excluir uma loja da sua conta usando o endpoint DELETE /stores/.
DELETE
/
stores
/
{storeId}
Delete store
curl --request DELETE \
--url https://api.cabrapi.com.br/v1/stores/{storeId} \
--header 'Authorization: <api-key>'import requests
url = "https://api.cabrapi.com.br/v1/stores/{storeId}"
headers = {"Authorization": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};
fetch('https://api.cabrapi.com.br/v1/stores/{storeId}', 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.cabrapi.com.br/v1/stores/{storeId}",
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: <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.cabrapi.com.br/v1/stores/{storeId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<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.cabrapi.com.br/v1/stores/{storeId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cabrapi.com.br/v1/stores/{storeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": "STORE_DELETED"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}🗑️ Excluir Loja
Este endpoint permite excluir uma loja da sua conta. Ele é ideal para:- Remover lojas desativadas
- Encerrar operações de uma loja específica
- Manter o ambiente da conta organizado
🔐 Autenticação
Esta rota exige autenticação via API Key, enviada no header da requisição:Authorization: SUA_API_KEY_AQUI
📥 Parâmetros de Rota
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
storeId | string | Sim | ID da loja que será excluída. |
📋 Exemplo de Requisição
curl --location --request DELETE "https://api.cabrapi.com.br/v1/stores/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
--header "Authorization: SUA_API_KEY_AQUI"
📊 Exemplo de Resposta (200)
{
"code": "STORE_DELETED"
}
❌ Possíveis Erros
| Status | Code | Quando acontece |
|---|---|---|
400 | INVALID_DATA | storeId não foi enviado corretamente. |
401 | API_KEY_NOT_PROVIDED | Header Authorization não enviado. |
401 | INVALID_API_KEY | API Key inválida ou não encontrada. |
401 | UNAUTHENTICATED | Sessão/usuário não autenticado no contexto da requisição. |
403 | USER_DISABLED | Conta do usuário desativada ou excluída. |
403 | NO_ACTIVE_SUBSCRIPTION | Conta sem plano ativo. |
404 | STORE_NOT_FOUND | Loja não existe, foi removida ou não pertence à sua conta. |
429 | RATE_LIMIT_EXCEEDED | Limite de requisições por minuto do plano excedido. |
500 | INTERNAL_SERVER_ERROR | Falha interna ao processar a requisição. |
503 | SERVICE_UNAVAILABLE | Serviço temporariamente indisponível. |
🔗 Links Úteis
Update: 28/02/2026 as 00:00Esta página foi útil?
⌘I
Delete store
curl --request DELETE \
--url https://api.cabrapi.com.br/v1/stores/{storeId} \
--header 'Authorization: <api-key>'import requests
url = "https://api.cabrapi.com.br/v1/stores/{storeId}"
headers = {"Authorization": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};
fetch('https://api.cabrapi.com.br/v1/stores/{storeId}', 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.cabrapi.com.br/v1/stores/{storeId}",
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: <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.cabrapi.com.br/v1/stores/{storeId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<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.cabrapi.com.br/v1/stores/{storeId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cabrapi.com.br/v1/stores/{storeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": "STORE_DELETED"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}