Skip to main content
POST
/
admin
/
fiscal-groups
Crear 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
    }
  }
}
'
{
  "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"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
externalId
string
required
name
string
required
uf
string
required
taxRegime
string
required
stores
object[]
required

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.

taxMatrix
object
required

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.

Response

Creado

Propiedades en camelCase según respuesta Drizzle/JSON.

id
string<uuid>
externalId
string
name
string
uf
string
taxRegime
string
stores
object[]

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.

taxMatrix
object

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.

createdAt
string<date-time>
updatedAt
string<date-time>