Tiendas
Obtener Tienda por ID
Aprenda a consultar una tienda específica de su cuenta usando el endpoint GET /stores/.
GET
/
stores
/
{storeId}
Get store by ID
curl --request GET \
--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.get(url, headers=headers)
print(response.text)const options = {method: 'GET', 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 => "GET",
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("GET", 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.get("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::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": "SUCCESS",
"store": {
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"position": 123,
"template": "PERSONALIZADO",
"updatedAt": "2023-11-07T05:31:56Z",
"categories": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"position": 123,
"storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"image": "<string>",
"metadata": {}
}
],
"products": [
{
"categories": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"delivery": "DIGITAL",
"disabled": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"position": 123,
"price": 123,
"sold": 123,
"stock": 123,
"storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"image": "<string>",
"metadata": {}
}
],
"coupons": [
{
"categories": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"code": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"discount": 123,
"expiredAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 123,
"products": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"rules": [
{
"type": "SINGLE_USE_PER_CUSTOMER",
"value": "<unknown>"
}
],
"storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"useLimit": 123
}
],
"payment": [
{
"coupon": true,
"createdAt": "2023-11-07T05:31:56Z",
"email": "jsmith@example.com",
"gateway": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"price": 123,
"products": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"price": 123,
"description": "<string>",
"image": "<string>"
}
],
"shipment": "PENDING",
"status": "PENDING",
"storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"affiliateCode": "<string>",
"affiliateCommission": {
"code": "<string>",
"name": "<string>",
"value": 123,
"email": "<string>"
},
"cpf": "<string>",
"metadata": {}
}
],
"description": "<string>",
"domain": "<string>",
"image": "<string>",
"metadata": {}
}
}{
"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"
}🏪 Obtener Tienda por ID
Este endpoint permite consultar una tienda específica de su cuenta por ID. Es ideal para:- Cargar detalles completos de una tienda
- Buscar datos relacionados (categorías, productos, cupones y pagos)
- Validar si una tienda existe antes de otras operaciones
🔐 Autenticación
Esta ruta exige autenticación vía API Key, enviada en el header de la petición:Authorization: TU_API_KEY_AQUI
📥 Parámetros de Ruta
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
storeId | string (UUID) | Sí | ID de la tienda que será consultada. |
📋 Ejemplo de Petición
curl --location "https://api.cabrapi.com.br/v1/stores/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
--header "Authorization: TU_API_KEY_AQUI"
📊 Ejemplo de Respuesta (200)
{
"code": "SUCCESS",
"store": {
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "Minha Loja",
"position": 1,
"description": "Loja de exemplo",
"image": "https://example.com/store.png",
"template": "PERSONALIZADO",
"domain": "minhaloja-web.cabrapi.com.br",
"metadata": null,
"createdAt": "2026-02-28T12:00:00.000Z",
"updatedAt": "2026-02-28T12:00:00.000Z",
"categories": [],
"products": [],
"coupons": [],
"payment": []
}
}
❌ Posibles Errores
| Estado | Code | Cuándo ocurre |
|---|---|---|
400 | INVALID_DATA | Cuando el storeId no es un UUID válido. |
401 | API_KEY_NOT_PROVIDED | Header Authorization no enviado. |
401 | INVALID_API_KEY | API Key inválida o no encontrada. |
401 | UNAUTHENTICATED | Sesión/usuario no autenticado en el contexto de la petición. |
403 | USER_DISABLED | Cuenta de usuario desactivada o eliminada. |
403 | NO_ACTIVE_SUBSCRIPTION | Cuenta sin plan activo. |
404 | STORE_NOT_FOUND | Cuando la tienda no existe, fue removida o no pertenece a su cuenta. |
429 | RATE_LIMIT_EXCEEDED | Límite de peticiones por minuto del plan excedido. |
500 | INTERNAL_SERVER_ERROR | Fallo interno al procesar la petición. |
503 | SERVICE_UNAVAILABLE | Servicio temporalmente no disponible. |
Observaciones
categories,productsycouponsse devuelven ordenados porposition.
🔗 Enlaces Útiles
Actualización: 28/02/2026 a las 00:00¿Esta página le ayudó?
⌘I
Get store by ID
curl --request GET \
--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.get(url, headers=headers)
print(response.text)const options = {method: 'GET', 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 => "GET",
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("GET", 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.get("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::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": "SUCCESS",
"store": {
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"position": 123,
"template": "PERSONALIZADO",
"updatedAt": "2023-11-07T05:31:56Z",
"categories": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"position": 123,
"storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"image": "<string>",
"metadata": {}
}
],
"products": [
{
"categories": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"delivery": "DIGITAL",
"disabled": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"position": 123,
"price": 123,
"sold": 123,
"stock": 123,
"storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"image": "<string>",
"metadata": {}
}
],
"coupons": [
{
"categories": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"code": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"discount": 123,
"expiredAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 123,
"products": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"rules": [
{
"type": "SINGLE_USE_PER_CUSTOMER",
"value": "<unknown>"
}
],
"storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"useLimit": 123
}
],
"payment": [
{
"coupon": true,
"createdAt": "2023-11-07T05:31:56Z",
"email": "jsmith@example.com",
"gateway": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"price": 123,
"products": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"price": 123,
"description": "<string>",
"image": "<string>"
}
],
"shipment": "PENDING",
"status": "PENDING",
"storeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"affiliateCode": "<string>",
"affiliateCommission": {
"code": "<string>",
"name": "<string>",
"value": 123,
"email": "<string>"
},
"cpf": "<string>",
"metadata": {}
}
],
"description": "<string>",
"domain": "<string>",
"image": "<string>",
"metadata": {}
}
}{
"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"
}