Stores
Update Store
Learn how to update an existing store using the PUT /stores/ endpoint.
PUT
/
stores
/
{storeId}
Update store
curl --request PUT \
--url https://api.cabrapi.com.br/v1/stores/{storeId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"image": "<string>",
"metadata": {},
"name": "<string>",
"position": 2
}
'import requests
url = "https://api.cabrapi.com.br/v1/stores/{storeId}"
payload = {
"description": "<string>",
"image": "<string>",
"metadata": {},
"name": "<string>",
"position": 2
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
image: '<string>',
metadata: {},
name: '<string>',
position: 2
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'image' => '<string>',
'metadata' => [
],
'name' => '<string>',
'position' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cabrapi.com.br/v1/stores/{storeId}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"position\": 2\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.cabrapi.com.br/v1/stores/{storeId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"position\": 2\n}")
.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::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"position\": 2\n}"
response = http.request(request)
puts response.read_body{
"code": "STORE_UPDATED",
"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",
"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"
}✏️ Update Store
This endpoint allows updating data of an existing store in your account. It is ideal for:- Changing the store name, description, and image
- Switching template and domain
- Updating metadata for internal integrations
🔐 Authentication
This route requires authentication via API Key, sent in the request header:Authorization: YOUR_API_KEY_HERE
📥 Route Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
storeId | string | Yes | ID of the store to be updated (no strict UUID format validation; a non-existent ID returns 404 STORE_NOT_FOUND). |
📥 Request Body
At least 1 field must be sent in the body.
| Field | Type | Required | Description |
|---|---|---|---|
template | string | No | Accepted values: PERSONALIZADO or N/A. |
position | number | No | Integer greater than or equal to 1 to reorder manually. |
name | string | No | Store name (min. 4, max. 32). |
description | string | No | Store description (min. 12, max. 256). |
image | string | No | Store image URL (min. 12, max. 512). |
metadata | object | No | Custom store metadata. |
domain | object | Conditional | Required when template = PERSONALIZADO. |
domain structure
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Accepted values: CUSTOM or DEFAULT. |
value | string | Yes | Domain or subdomain (min. 8, max. 75). |
📋 Request Example
curl --location --request PUT "https://api.cabrapi.com.br/v1/stores/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
--header "Authorization: YOUR_API_KEY_HERE" \
--header "Content-Type: application/json" \
--data '{
"name": "Minha Loja Atualizada",
"template": "PERSONALIZADO",
"domain": {
"type": "DEFAULT",
"value": "minha-loja-v2"
}
}'
📊 Response Example (200)
{
"code": "STORE_UPDATED",
"store": {
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "Minha Loja Atualizada",
"position": 2,
"description": "Loja oficial da minha marca",
"image": "https://example.com/store.png",
"domain": "minha-loja-v2-web.cabrapi.com.br",
"template": "PERSONALIZADO",
"metadata": null,
"createdAt": "2026-02-28T12:00:00.000Z",
"updatedAt": "2026-02-28T12:10:00.000Z"
}
}
❌ Possible Errors
| Status | Code | When it happens |
|---|---|---|
400 | INVALID_DATA | Invalid JSON body or no fields sent. |
400 | INVALID_DATA_POSITION | position is less than 1. |
400 | INVALID_DATA_NAME_MIN | name is shorter than 4 characters. |
400 | INVALID_DATA_NAME_MAX | name is longer than 32 characters. |
400 | INVALID_DATA_DESCRIPTION_MIN | description is shorter than 12 characters. |
400 | INVALID_DATA_DESCRIPTION_MAX | description is longer than 256 characters. |
400 | INVALID_DATA_IMAGE | image is outside the allowed length (12 to 512 characters). |
400 | INVALID_DATA_TEMPLATE | template is not PERSONALIZADO or N/A. |
400 | INVALID_DATA_DOMAIN | domain.type is not CUSTOM/DEFAULT or domain.value is invalid (8 to 75 characters). |
400 | DOMAIN_REQUIRED | template is PERSONALIZADO and domain was not sent. |
400 | DOMAIN_ALREADY_EXISTS | Domain is already being used by another store. |
400 | NAME_ALREADY_EXISTS | A store with this name already exists for the same user. |
401 | API_KEY_NOT_PROVIDED | Authorization header not sent. |
401 | INVALID_API_KEY | Invalid or not found API Key. |
401 | UNAUTHENTICATED | Session/user not authenticated in the request context. |
403 | USER_DISABLED | User account disabled or deleted. |
403 | NO_ACTIVE_SUBSCRIPTION | Account has no active plan. |
404 | STORE_NOT_FOUND | Store does not exist, was removed, or does not belong to your account. |
429 | RATE_LIMIT_EXCEEDED | Plan per-minute request limit exceeded. |
500 | INTERNAL_SERVER_ERROR | Internal failure while processing the request. |
503 | SERVICE_UNAVAILABLE | Service temporarily unavailable. |
🔗 Useful Links
Update: 28/02/2026 at 00:00Body
application/json
Was this page helpful?
⌘I
Update store
curl --request PUT \
--url https://api.cabrapi.com.br/v1/stores/{storeId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"image": "<string>",
"metadata": {},
"name": "<string>",
"position": 2
}
'import requests
url = "https://api.cabrapi.com.br/v1/stores/{storeId}"
payload = {
"description": "<string>",
"image": "<string>",
"metadata": {},
"name": "<string>",
"position": 2
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
image: '<string>',
metadata: {},
name: '<string>',
position: 2
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'image' => '<string>',
'metadata' => [
],
'name' => '<string>',
'position' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cabrapi.com.br/v1/stores/{storeId}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"position\": 2\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.cabrapi.com.br/v1/stores/{storeId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"position\": 2\n}")
.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::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"position\": 2\n}"
response = http.request(request)
puts response.read_body{
"code": "STORE_UPDATED",
"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",
"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"
}