curl --request POST \
--url https://api.artisn.desarrollo-redbrand.com/api/admin/fiscal-groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalId": "3s-group-8891",
"name": "KFC ABC MARUM (SP)",
"uf": "SP",
"taxRegime": "Simples",
"stores": [
{
"store_id": "store_101",
"store_name": "KFC Paulista"
},
{
"store_id": "store_102",
"store_name": "KFC Campinas"
}
],
"taxMatrix": {
"21069090": {
"NCM": "21069090",
"CEST": "17.047.00",
"CST_ICMS": "00",
"ICMS_rate": 18,
"CST_PIS": "01",
"PIS_rate": 1.65,
"CST_COFINS": "01",
"COFINS_rate": 7.6,
"CFOP": "5102"
},
"22021000": {
"NCM": "22021000",
"CEST": "03.007.00",
"CST_ICMS": "00",
"ICMS_rate": 18,
"CST_PIS": "01",
"PIS_rate": 1.65,
"CST_COFINS": "01",
"COFINS_rate": 7.6
}
}
}
'import requests
url = "https://api.artisn.desarrollo-redbrand.com/api/admin/fiscal-groups"
payload = {
"externalId": "3s-group-8891",
"name": "KFC ABC MARUM (SP)",
"uf": "SP",
"taxRegime": "Simples",
"stores": [
{
"store_id": "store_101",
"store_name": "KFC Paulista"
},
{
"store_id": "store_102",
"store_name": "KFC Campinas"
}
],
"taxMatrix": {
"21069090": {
"NCM": "21069090",
"CEST": "17.047.00",
"CST_ICMS": "00",
"ICMS_rate": 18,
"CST_PIS": "01",
"PIS_rate": 1.65,
"CST_COFINS": "01",
"COFINS_rate": 7.6,
"CFOP": "5102"
},
"22021000": {
"NCM": "22021000",
"CEST": "03.007.00",
"CST_ICMS": "00",
"ICMS_rate": 18,
"CST_PIS": "01",
"PIS_rate": 1.65,
"CST_COFINS": "01",
"COFINS_rate": 7.6
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
externalId: '3s-group-8891',
name: 'KFC ABC MARUM (SP)',
uf: 'SP',
taxRegime: 'Simples',
stores: [
{store_id: 'store_101', store_name: 'KFC Paulista'},
{store_id: 'store_102', store_name: 'KFC Campinas'}
],
taxMatrix: {
'21069090': {
NCM: '21069090',
CEST: '17.047.00',
CST_ICMS: '00',
ICMS_rate: 18,
CST_PIS: '01',
PIS_rate: 1.65,
CST_COFINS: '01',
COFINS_rate: 7.6,
CFOP: '5102'
},
'22021000': {
NCM: '22021000',
CEST: '03.007.00',
CST_ICMS: '00',
ICMS_rate: 18,
CST_PIS: '01',
PIS_rate: 1.65,
CST_COFINS: '01',
COFINS_rate: 7.6
}
}
})
};
fetch('https://api.artisn.desarrollo-redbrand.com/api/admin/fiscal-groups', 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.artisn.desarrollo-redbrand.com/api/admin/fiscal-groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'externalId' => '3s-group-8891',
'name' => 'KFC ABC MARUM (SP)',
'uf' => 'SP',
'taxRegime' => 'Simples',
'stores' => [
[
'store_id' => 'store_101',
'store_name' => 'KFC Paulista'
],
[
'store_id' => 'store_102',
'store_name' => 'KFC Campinas'
]
],
'taxMatrix' => [
'21069090' => [
'NCM' => '21069090',
'CEST' => '17.047.00',
'CST_ICMS' => '00',
'ICMS_rate' => 18,
'CST_PIS' => '01',
'PIS_rate' => 1.65,
'CST_COFINS' => '01',
'COFINS_rate' => 7.6,
'CFOP' => '5102'
],
'22021000' => [
'NCM' => '22021000',
'CEST' => '03.007.00',
'CST_ICMS' => '00',
'ICMS_rate' => 18,
'CST_PIS' => '01',
'PIS_rate' => 1.65,
'CST_COFINS' => '01',
'COFINS_rate' => 7.6
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.artisn.desarrollo-redbrand.com/api/admin/fiscal-groups"
payload := strings.NewReader("{\n \"externalId\": \"3s-group-8891\",\n \"name\": \"KFC ABC MARUM (SP)\",\n \"uf\": \"SP\",\n \"taxRegime\": \"Simples\",\n \"stores\": [\n {\n \"store_id\": \"store_101\",\n \"store_name\": \"KFC Paulista\"\n },\n {\n \"store_id\": \"store_102\",\n \"store_name\": \"KFC Campinas\"\n }\n ],\n \"taxMatrix\": {\n \"21069090\": {\n \"NCM\": \"21069090\",\n \"CEST\": \"17.047.00\",\n \"CST_ICMS\": \"00\",\n \"ICMS_rate\": 18,\n \"CST_PIS\": \"01\",\n \"PIS_rate\": 1.65,\n \"CST_COFINS\": \"01\",\n \"COFINS_rate\": 7.6,\n \"CFOP\": \"5102\"\n },\n \"22021000\": {\n \"NCM\": \"22021000\",\n \"CEST\": \"03.007.00\",\n \"CST_ICMS\": \"00\",\n \"ICMS_rate\": 18,\n \"CST_PIS\": \"01\",\n \"PIS_rate\": 1.65,\n \"CST_COFINS\": \"01\",\n \"COFINS_rate\": 7.6\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.artisn.desarrollo-redbrand.com/api/admin/fiscal-groups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"externalId\": \"3s-group-8891\",\n \"name\": \"KFC ABC MARUM (SP)\",\n \"uf\": \"SP\",\n \"taxRegime\": \"Simples\",\n \"stores\": [\n {\n \"store_id\": \"store_101\",\n \"store_name\": \"KFC Paulista\"\n },\n {\n \"store_id\": \"store_102\",\n \"store_name\": \"KFC Campinas\"\n }\n ],\n \"taxMatrix\": {\n \"21069090\": {\n \"NCM\": \"21069090\",\n \"CEST\": \"17.047.00\",\n \"CST_ICMS\": \"00\",\n \"ICMS_rate\": 18,\n \"CST_PIS\": \"01\",\n \"PIS_rate\": 1.65,\n \"CST_COFINS\": \"01\",\n \"COFINS_rate\": 7.6,\n \"CFOP\": \"5102\"\n },\n \"22021000\": {\n \"NCM\": \"22021000\",\n \"CEST\": \"03.007.00\",\n \"CST_ICMS\": \"00\",\n \"ICMS_rate\": 18,\n \"CST_PIS\": \"01\",\n \"PIS_rate\": 1.65,\n \"CST_COFINS\": \"01\",\n \"COFINS_rate\": 7.6\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.artisn.desarrollo-redbrand.com/api/admin/fiscal-groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalId\": \"3s-group-8891\",\n \"name\": \"KFC ABC MARUM (SP)\",\n \"uf\": \"SP\",\n \"taxRegime\": \"Simples\",\n \"stores\": [\n {\n \"store_id\": \"store_101\",\n \"store_name\": \"KFC Paulista\"\n },\n {\n \"store_id\": \"store_102\",\n \"store_name\": \"KFC Campinas\"\n }\n ],\n \"taxMatrix\": {\n \"21069090\": {\n \"NCM\": \"21069090\",\n \"CEST\": \"17.047.00\",\n \"CST_ICMS\": \"00\",\n \"ICMS_rate\": 18,\n \"CST_PIS\": \"01\",\n \"PIS_rate\": 1.65,\n \"CST_COFINS\": \"01\",\n \"COFINS_rate\": 7.6,\n \"CFOP\": \"5102\"\n },\n \"22021000\": {\n \"NCM\": \"22021000\",\n \"CEST\": \"03.007.00\",\n \"CST_ICMS\": \"00\",\n \"ICMS_rate\": 18,\n \"CST_PIS\": \"01\",\n \"PIS_rate\": 1.65,\n \"CST_COFINS\": \"01\",\n \"COFINS_rate\": 7.6\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalId": "<string>",
"name": "<string>",
"uf": "<string>",
"taxRegime": "<string>",
"stores": [
{
"store_id": "<string>",
"store_name": "<string>"
}
],
"taxMatrix": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"error": "<string>"
}{
"message": "<string>",
"error": "<string>"
}{
"message": "<string>",
"error": "<string>"
}Create fiscal_group
curl --request POST \
--url https://api.artisn.desarrollo-redbrand.com/api/admin/fiscal-groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalId": "3s-group-8891",
"name": "KFC ABC MARUM (SP)",
"uf": "SP",
"taxRegime": "Simples",
"stores": [
{
"store_id": "store_101",
"store_name": "KFC Paulista"
},
{
"store_id": "store_102",
"store_name": "KFC Campinas"
}
],
"taxMatrix": {
"21069090": {
"NCM": "21069090",
"CEST": "17.047.00",
"CST_ICMS": "00",
"ICMS_rate": 18,
"CST_PIS": "01",
"PIS_rate": 1.65,
"CST_COFINS": "01",
"COFINS_rate": 7.6,
"CFOP": "5102"
},
"22021000": {
"NCM": "22021000",
"CEST": "03.007.00",
"CST_ICMS": "00",
"ICMS_rate": 18,
"CST_PIS": "01",
"PIS_rate": 1.65,
"CST_COFINS": "01",
"COFINS_rate": 7.6
}
}
}
'import requests
url = "https://api.artisn.desarrollo-redbrand.com/api/admin/fiscal-groups"
payload = {
"externalId": "3s-group-8891",
"name": "KFC ABC MARUM (SP)",
"uf": "SP",
"taxRegime": "Simples",
"stores": [
{
"store_id": "store_101",
"store_name": "KFC Paulista"
},
{
"store_id": "store_102",
"store_name": "KFC Campinas"
}
],
"taxMatrix": {
"21069090": {
"NCM": "21069090",
"CEST": "17.047.00",
"CST_ICMS": "00",
"ICMS_rate": 18,
"CST_PIS": "01",
"PIS_rate": 1.65,
"CST_COFINS": "01",
"COFINS_rate": 7.6,
"CFOP": "5102"
},
"22021000": {
"NCM": "22021000",
"CEST": "03.007.00",
"CST_ICMS": "00",
"ICMS_rate": 18,
"CST_PIS": "01",
"PIS_rate": 1.65,
"CST_COFINS": "01",
"COFINS_rate": 7.6
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
externalId: '3s-group-8891',
name: 'KFC ABC MARUM (SP)',
uf: 'SP',
taxRegime: 'Simples',
stores: [
{store_id: 'store_101', store_name: 'KFC Paulista'},
{store_id: 'store_102', store_name: 'KFC Campinas'}
],
taxMatrix: {
'21069090': {
NCM: '21069090',
CEST: '17.047.00',
CST_ICMS: '00',
ICMS_rate: 18,
CST_PIS: '01',
PIS_rate: 1.65,
CST_COFINS: '01',
COFINS_rate: 7.6,
CFOP: '5102'
},
'22021000': {
NCM: '22021000',
CEST: '03.007.00',
CST_ICMS: '00',
ICMS_rate: 18,
CST_PIS: '01',
PIS_rate: 1.65,
CST_COFINS: '01',
COFINS_rate: 7.6
}
}
})
};
fetch('https://api.artisn.desarrollo-redbrand.com/api/admin/fiscal-groups', 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.artisn.desarrollo-redbrand.com/api/admin/fiscal-groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'externalId' => '3s-group-8891',
'name' => 'KFC ABC MARUM (SP)',
'uf' => 'SP',
'taxRegime' => 'Simples',
'stores' => [
[
'store_id' => 'store_101',
'store_name' => 'KFC Paulista'
],
[
'store_id' => 'store_102',
'store_name' => 'KFC Campinas'
]
],
'taxMatrix' => [
'21069090' => [
'NCM' => '21069090',
'CEST' => '17.047.00',
'CST_ICMS' => '00',
'ICMS_rate' => 18,
'CST_PIS' => '01',
'PIS_rate' => 1.65,
'CST_COFINS' => '01',
'COFINS_rate' => 7.6,
'CFOP' => '5102'
],
'22021000' => [
'NCM' => '22021000',
'CEST' => '03.007.00',
'CST_ICMS' => '00',
'ICMS_rate' => 18,
'CST_PIS' => '01',
'PIS_rate' => 1.65,
'CST_COFINS' => '01',
'COFINS_rate' => 7.6
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.artisn.desarrollo-redbrand.com/api/admin/fiscal-groups"
payload := strings.NewReader("{\n \"externalId\": \"3s-group-8891\",\n \"name\": \"KFC ABC MARUM (SP)\",\n \"uf\": \"SP\",\n \"taxRegime\": \"Simples\",\n \"stores\": [\n {\n \"store_id\": \"store_101\",\n \"store_name\": \"KFC Paulista\"\n },\n {\n \"store_id\": \"store_102\",\n \"store_name\": \"KFC Campinas\"\n }\n ],\n \"taxMatrix\": {\n \"21069090\": {\n \"NCM\": \"21069090\",\n \"CEST\": \"17.047.00\",\n \"CST_ICMS\": \"00\",\n \"ICMS_rate\": 18,\n \"CST_PIS\": \"01\",\n \"PIS_rate\": 1.65,\n \"CST_COFINS\": \"01\",\n \"COFINS_rate\": 7.6,\n \"CFOP\": \"5102\"\n },\n \"22021000\": {\n \"NCM\": \"22021000\",\n \"CEST\": \"03.007.00\",\n \"CST_ICMS\": \"00\",\n \"ICMS_rate\": 18,\n \"CST_PIS\": \"01\",\n \"PIS_rate\": 1.65,\n \"CST_COFINS\": \"01\",\n \"COFINS_rate\": 7.6\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.artisn.desarrollo-redbrand.com/api/admin/fiscal-groups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"externalId\": \"3s-group-8891\",\n \"name\": \"KFC ABC MARUM (SP)\",\n \"uf\": \"SP\",\n \"taxRegime\": \"Simples\",\n \"stores\": [\n {\n \"store_id\": \"store_101\",\n \"store_name\": \"KFC Paulista\"\n },\n {\n \"store_id\": \"store_102\",\n \"store_name\": \"KFC Campinas\"\n }\n ],\n \"taxMatrix\": {\n \"21069090\": {\n \"NCM\": \"21069090\",\n \"CEST\": \"17.047.00\",\n \"CST_ICMS\": \"00\",\n \"ICMS_rate\": 18,\n \"CST_PIS\": \"01\",\n \"PIS_rate\": 1.65,\n \"CST_COFINS\": \"01\",\n \"COFINS_rate\": 7.6,\n \"CFOP\": \"5102\"\n },\n \"22021000\": {\n \"NCM\": \"22021000\",\n \"CEST\": \"03.007.00\",\n \"CST_ICMS\": \"00\",\n \"ICMS_rate\": 18,\n \"CST_PIS\": \"01\",\n \"PIS_rate\": 1.65,\n \"CST_COFINS\": \"01\",\n \"COFINS_rate\": 7.6\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.artisn.desarrollo-redbrand.com/api/admin/fiscal-groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalId\": \"3s-group-8891\",\n \"name\": \"KFC ABC MARUM (SP)\",\n \"uf\": \"SP\",\n \"taxRegime\": \"Simples\",\n \"stores\": [\n {\n \"store_id\": \"store_101\",\n \"store_name\": \"KFC Paulista\"\n },\n {\n \"store_id\": \"store_102\",\n \"store_name\": \"KFC Campinas\"\n }\n ],\n \"taxMatrix\": {\n \"21069090\": {\n \"NCM\": \"21069090\",\n \"CEST\": \"17.047.00\",\n \"CST_ICMS\": \"00\",\n \"ICMS_rate\": 18,\n \"CST_PIS\": \"01\",\n \"PIS_rate\": 1.65,\n \"CST_COFINS\": \"01\",\n \"COFINS_rate\": 7.6,\n \"CFOP\": \"5102\"\n },\n \"22021000\": {\n \"NCM\": \"22021000\",\n \"CEST\": \"03.007.00\",\n \"CST_ICMS\": \"00\",\n \"ICMS_rate\": 18,\n \"CST_PIS\": \"01\",\n \"PIS_rate\": 1.65,\n \"CST_COFINS\": \"01\",\n \"COFINS_rate\": 7.6\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalId": "<string>",
"name": "<string>",
"uf": "<string>",
"taxRegime": "<string>",
"stores": [
{
"store_id": "<string>",
"store_name": "<string>"
}
],
"taxMatrix": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"error": "<string>"
}{
"message": "<string>",
"error": "<string>"
}{
"message": "<string>",
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Arreglo JSON persistido en fiscal_groups.stores. Debe incluir al menos un objeto con store_id
para que findFiscalGroupByStoreId pueda resolver la tienda desde payload.store.id.
Show child attributes
Show child attributes
Mapa código NCM → reglas (tax_matrix en BD). Claves típicamente numéricas de 8 dígitos (string).
El motor usa taxMatrix[ncm] tras resolver el NCM del catálogo de producto.
Show child attributes
Show child attributes
Response
Creado
Propiedades en camelCase según respuesta Drizzle/JSON.
Arreglo JSON persistido en fiscal_groups.stores. Debe incluir al menos un objeto con store_id
para que findFiscalGroupByStoreId pueda resolver la tienda desde payload.store.id.
Show child attributes
Show child attributes
Mapa código NCM → reglas (tax_matrix en BD). Claves típicamente numéricas de 8 dígitos (string).
El motor usa taxMatrix[ncm] tras resolver el NCM del catálogo de producto.
Show child attributes
Show child attributes

