Documentação do Mercado Livre
Confira todas as informações necessárias sobre as APIs Mercado Livre.Documentação do
Envio das regras tributárias
Configurar as regras tributárias
Modelo do json
{
"description":"nome do grupo da regra",
"user_id":000000000,
"transactions":[...]
}
Campos
description
Nome do grupo das regras tributárias.
Tipo: Texto
Tamanho máximo: 40 caracteres
Obrigatório: Sim
user_id
Identificação do vendedor no Mercado Livre. É o id do usuário.
Tipo: Inteiro
Obrigatório: Sim
transactions
Listas das transações que compõem o grupo das regras.
Tipo: Lista de transações.
Obrigatório: Sim
Transações obrigatórias para a configuração de um grupo de regras tributárias:
- Para um grupo de regras tributárias ser válido, é necessário que ele possua devidamente configuradas, duas transações, sendo uma de venda e uma de transferência.
Transações obrigatórias para a configuração de um grupo de regras tributárias:
- Para um grupo de regras tributárias ser válido, é necessário que ele possua devidamente configuradas, duas transações, sendo uma de venda e uma de transferência (obrigatório apenas para Mercado Envios Full).
Transações
Modelo do json
{
"transaction_type":"sale",
"operations":[...]
}
Campos
transaction_type
Identifica o tipo da transação a que as regras se referem.
Tipo: Texto
Obrigatório: Sim
Valores aceitos:
- SALE: Para identificar as regras de venda;
- INBOUND: Para identificar as regras para as operações de transferências para o CD do Mercado Envios Full.
operations
Lista de operações que compõe a transação.
Tipo: Lista de operações
Obrigatório: Sim
Operações obrigatórias para a configuração de uma transação:
- Para uma transação de venda ("transaction_type" igual a "sale") é necessário que existam duas operações configuradas do tipo "B2C", sendo uma para contribuinte ("customer_type" igual a "taxpayer") e uma para não contribuinte ("customer_type" igual a "non_taxpayer"). Desta forma, haverá regra fiscal para atender aos dois tipos de venda.
- Para uma transação de transferência ("transaction_type" igual a "inbound") é necessário que exista uma operação do tipo "B2B" configurada para contribuinte ("customer_type" igual a "taxpayer"). Assim, a operação de entrada de mercadorias no CD do Mercado Envios Full estará devidamente amparado com uma regra fiscal.
Operações
Modelo do json
{
"operation_type":"b2c",
"customer_type":"taxpayer",
"fiscal_model_id":"OLSS",
"origin":"SP",
"messages":[...],
"attributes":[...],
"rules":[...]
}
Campos
operation_type
Tipo da operação
Tipo: Texto
Obrigatório: Sim
Valores aceitos:
- b2c: Identifica uma operação para consumidor (Business to Customer). Deve ser usada na configuração de uma transação do tipo "SALE";
- b2b: Identifica uma operação para outra empresa (Business to Business). Deve ser usada na configuração de uma transação do tipo "INBOUND".
customer_type
Identifica o tipo do comprador.
Tipo: Texto
Obrigatório: Sim
Valores aceitos:
- taxpayer: Identifica um destinatário como contribuinte;
- non_taxpayer: Identifica um destinatário como não contribuinte.
fiscal_model_id
Identifica o modelo fiscal em que o vendedor irá operar no Mercado Envios Full.
Tipo: Texto
Obrigatório: Sim
Valores aceitos:
- OLSS: Modelo self storage amparado pela Portaria CAT Nº 59 DE 06/07/2018;
- MFL: Modelo filial.
origin
Estado de origem da operação e consideração de multiplas origens.
Tipo: Texto
Tamanho máximo: 2 caracteres
Obrigatório: Sim
Valores aceitos:
- Sigla dos estado brasileiros mais distrito federal (DF).
messages
Lista dos códigos das mensagens relacionada à operação.
Tipo: Lista de códigos de mensagens.
Obrigatório: Não
Importante: As mensagens devem ser cadastradas previamente utilizando o endpoint próprio para se obter os códigos para serem relacionados às operações.
rules
Lista das regras tributárias que configuram a operação.
Tipo: Lista de regras tributárias.
Obrigatório: Sim
Regras obrigatórias para a configuração de uma operação:
- Uma operação para ser válida, deve possuir ao menos cinco regras, sendo elas: ICMS, IPI, PIS, COFINS e a de composição de base de ICMS.
Mensagens da operação
Diferente dos demais objetos as mensagens são apenas relacionadas às operações, assim podem ser reutilizadas em outros grupos de regras. Para isso, é necessário que sejam previamente cadastradas e no objeto "operações", apenas os códigos das mensagens cadastradas serão informados.
Modelo de json:
{
"id": 49
}
Campos
id
Código da mensagem que será relacionada a operação.
Tipo: Inteiro
Obrigatório: Sim
Atributos da operação
Modelo de json
{
"id":1,
"attribute":"CFOP",
"product_origin_type":"RESELLER",
"value":{
"override":[
{
"cst":"00",
"same_state":"5405",
"other_state":"6108"
},
{
"cst":"10",
"same_state":"5205",
"other_state":"6308"
}
],
"same_state":"5949",
"other_state":"6949"
}
}
Campos
attribute
Identifica qual atributo será configurado para a operação.
Tipo: Texto
Obrigatório: Sim
Valores aceitos:
- CFOP: Configuração dos CFOPs que podem se utilizados pelo grupo de regras.
Atualmente, apenas o CFOP pode ser configurado como atributo da operação.
product_origin_type
Identifica a origem do produto para o seller.
Tipo: Texto
Obrigatório: Sim
Valores aceitos:
- reseller: O seller é apenas revendedor do produto;
- manufacturer: O seller é fabricante do produto.
value
Este campo deve conter um json com a configuração do atributo. Cada atributo possui suas características, que serão descritos abaixo:
Configurações de CFOP
Configuração do atributo CFOP da operação.
Este template é utilizado quando o tipo for CFOP.
Chave | Tipo | Req | Descrição | Valores permitidos |
---|---|---|---|---|
override | array | não | Regras específicas de CFOP por CST | Ver o modelo de override para o cfop |
same_state | string | simn | CFOP default para operações no mesmo estado | - |
other_state | string | sim | CFOP default para operações entre estados | - |
Modelo de override para o CFOP
Chave | Tipo | Req | Descrição | Valores permitidos |
---|---|---|---|---|
cst | string | sim | RCST relacionado ao CFOP | - |
same_state | string | sim | CFOP para operações no mesmo estado | - |
other_state | string | sim | CFOP para operações entre estados | - |
Modelo de json
"value":{
"same_state":"5949",
"other_state":"6949",
"override":[
{
"cst":"00",
"same_state":"5405",
"other_state":"6108"
},
{
"cst":"10",
"same_state":"5205",
"other_state":"6308"
}
]
}
Campos
same_state
Campo que deve conter o CFOP padrão para operações cujo estado de origem e estado de destino são os mesmos.
Tipo: Texto
Obrigatório: Sim
other_state
Campo que deve conter o CFOP padrão para operações cujo estado de origem e estado de destino são diferentes.
Tipo: Texto.
Obrigatório: Sim
override
É uma lista de configurações específicas de CFOP por CST. Os itens desta lista tem prioridade de uso sobre os valores padrões.
Tipo: Lista de configuração de CFOP por CST.
Obrigatório: Sim
Importante 1: O campo override deve ser informado, mesmo que vazio.
Importante 2: Os valores padrões sempre serão usados se não houver uma configuração específica por CST no campo override.
Importante 3: Para o envio de regras cujo o operation_type é inbound e o fiscal_model_id é OLSS utilizamos os CFOP específicos (5949/6949) conforme Portaria CAT Nº 59 DE 06/07/2018.
Modelo de json
{
"cst":"10",
"same_state":"5205",
"other_state":"6308"
}
Campo
cst
Valor do CST que configura a regra específica do CFOP.
Tipo: Texto
Obrigatório: Sim
Valores aceitos: CSTs válidos
same_state
Campo que deve conter o CFOP específico para operações com o CST configurado cujo estado de origem e estado de destino são os mesmos.
Tipo: Texto
Obrigatório: Sim
other_state
Campo que deve conter o CFOP específico para operações com o CST configurado cujo estado de origem e estado de destino são diferentes.
Tipo: Texto
Obrigatório: Sim
Regras
Modelo de json
{
"rule": "pis",
"value": {
"cst": "01",
"ppis": 2
}
}
Campos
rule
Identifica a regra que será configurada.
Tipo: Texto
Tamanho máximo: 20 caracteres
Obrigatório: Sim
Valores aceitos:
- icms: Identifica a regra de ICMS;
- icms_composition: Identifica a regra para composição da base de cálculo do ICMS;
- ipi: Identifica a regra de IPI;
- pis_composition: Identifica a regra para composição da base de cálculo do PIS;
- pis: Identifica a regra para PIS;
- cofins_composition: Identifica a regra para composição da base de cálculo do COFINS;
- cofins: Identifica a regra para COFINS.
value
Campo que deve conter um json com as configurações da regra fiscal. Este objeto não é único, porém é específico para cada tipo de composição.
Existem casos que são os de dependência de valores. Nestes casos, a existência do valor em um campo, torna obrigatória a presença de um ou mais campos. O termo "grupo requerido" agrupa os campos com interdependência nos templates.
Tipo: json
Atualização das regras tributárias
curl -H 'Authorization: Bearer $ACCESS_TOKEN' -X PUT -H"content-type:application/json" https://api.mercadolibre.com/users/$USER_ID/invoices/tax_rules/$ID_REGRA
Atualizar um grupo de regras pelo seu código identificador.
Exemplo de resposta:
{
"id":6,
"description":"teste de PUT alterando fiscal model para olss",
"user_id":278173958,
"transactions":[
{
"transaction_type":"sale",
"operations":[
{
"operation_type":"b2c",
"customer_type":"taxpayer",
"fiscal_model_id":"olss",
"origin":"SP",
"rules":[
{
"rule":"icms",
"value":{
"destinations":[
{
"uf": "AC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AC000001"
},
{
"uf": "AL",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AL000001"
},
{
"uf": "AM",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AM009999"
},
{
"uf": "AP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AP000001"
},
{
"uf": "BA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "BA000001"
},
{
"uf": "CE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "CE000001"
},
{
"uf": "DF",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "DF009999"
},
{
"uf": "ES",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "ES009999"
},
{
"uf": "GO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "GO000001"
},
{
"uf": "MA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MA000001"
},
{
"uf": "MT",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MT001000"
},
{
"uf": "MS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MS000001"
},
{
"uf": "MG",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MG000001"
},
{
"uf": "PA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PA109999"
},
{
"uf": "PB",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PB000001"
},
{
"uf": "PR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PR020021"
},
{
"uf": "PE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PE009999"
},
{
"uf": "PI",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PI000001"
},
{
"uf": "RJ",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RJ000000"
},
{
"uf": "RN",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RN000015"
},
{
"uf": "RO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RO000001"
},
{
"uf": "RS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RS020002"
},
{
"uf": "RR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18
},
{
"uf": "SC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SC000001"
},
{
"uf": "SE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SE000001"
},
{
"uf": "SP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SP000202"
},
{
"uf": "TO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "TO000001"
}
]
}
},
{
"rule":"icms_composition",
"value":{
"composition":[
"item_amount",
"freight",
"discount",
"ipi"
]
}
},
{
"rule":"ipi",
"value":{
"cst":"01",
"cenq":"999"
}
},
{
"rule":"pis",
"value":{
"cst":"01",
"ppis":2
}
},
{
"rule":"cofins",
"value":{
"cst":"01",
"pcofins":2
}
}
],
"messages":[
{
"id":49
}
],
"attributes":[
{
"attribute":"cfop",
"product_origin_type":"reseller",
"value":{
"override":[
{
"cst":"00",
"same_state":"5405",
"other_state":"6108"
},
{
"cst":"10",
"same_state":"5205",
"other_state":"6108"
}
],
"same_state":"5949",
"other_state":"6949"
}
}
]
},
{
"operation_type":"b2c",
"customer_type":"non_taxpayer",
"fiscal_model_id":"mfl",
"origin":"SP",
"rules":[
{
"rule":"icms",
"value":{
"destinations":[
{
"uf": "AC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AC000001"
},
{
"uf": "AL",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AL000001"
},
{
"uf": "AM",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AM009999"
},
{
"uf": "AP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AP000001"
},
{
"uf": "BA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "BA000001"
},
{
"uf": "CE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "CE000001"
},
{
"uf": "DF",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "DF009999"
},
{
"uf": "ES",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "ES009999"
},
{
"uf": "GO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "GO000001"
},
{
"uf": "MA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MA000001"
},
{
"uf": "MT",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MT001000"
},
{
"uf": "MS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MS000001"
},
{
"uf": "MG",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MG000001"
},
{
"uf": "PA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PA109999"
},
{
"uf": "PB",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PB000001"
},
{
"uf": "PR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PR020021"
},
{
"uf": "PE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PE009999"
},
{
"uf": "PI",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PI000001"
},
{
"uf": "RJ",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RJ000000"
},
{
"uf": "RN",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RN000015"
},
{
"uf": "RO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RO000001"
},
{
"uf": "RS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RS020002"
},
{
"uf": "RR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18
},
{
"uf": "SC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SC000001"
},
{
"uf": "SE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SE000001"
},
{
"uf": "SP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SP000202"
},
{
"uf": "TO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "TO000001"
}
]
}
},
{
"rule":"icms_composition",
"value":{
"composition":[
"item_amount",
"freight",
"discount",
"ipi"
]
}
},
{
"rule":"ipi",
"value":{
"cst":"01",
"cenq":"999"
}
},
{
"rule":"pis",
"value":{
"cst":"01",
"ppis":2
}
},
{
"rule":"cofins",
"value":{
"cst":"01",
"pcofins":2
}
}
],
"messages":[
{
"id":49
}
],
"attributes":[
{
"attribute":"cfop",
"product_origin_type":"reseller",
"value":{
"override":[
{
"cst":"00",
"same_state":"5405",
"other_state":"6108"
},
{
"cst":"10",
"same_state":"5205",
"other_state":"6108"
}
],
"same_state":"5949",
"other_state":"6949"
}
}
]
}
]
},
{
"transaction_type":"inbound",
"operations":[
{
"operation_type":"b2b",
"customer_type":"taxpayer",
"fiscal_model_id":"mfl",
"origin":"SP",
"rules":[
{
"rule":"icms",
"value":{
"destinations":[
{
"uf": "AC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AC000001"
},
{
"uf": "AL",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AL000001"
},
{
"uf": "AM",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AM009999"
},
{
"uf": "AP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AP000001"
},
{
"uf": "BA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "BA000001"
},
{
"uf": "CE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "CE000001"
},
{
"uf": "DF",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "DF009999"
},
{
"uf": "ES",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "ES009999"
},
{
"uf": "GO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "GO000001"
},
{
"uf": "MA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MA000001"
},
{
"uf": "MT",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MT001000"
},
{
"uf": "MS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MS000001"
},
{
"uf": "MG",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MG000001"
},
{
"uf": "PA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PA109999"
},
{
"uf": "PB",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PB000001"
},
{
"uf": "PR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PR020021"
},
{
"uf": "PE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PE009999"
},
{
"uf": "PI",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PI000001"
},
{
"uf": "RJ",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RJ000000"
},
{
"uf": "RN",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RN000015"
},
{
"uf": "RO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RO000001"
},
{
"uf": "RS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RS020002"
},
{
"uf": "RR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18
},
{
"uf": "SC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SC000001"
},
{
"uf": "SE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SE000001"
},
{
"uf": "SP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SP000202"
},
{
"uf": "TO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "TO000001"
}
]
}
},
{
"rule":"icms_composition",
"value":{
"composition":[
"item_amount",
"freight",
"discount",
"ipi"
]
}
},
{
"rule":"ipi",
"value":{
"cst":"01",
"cenq":"999"
}
},
{
"rule":"pis",
"value":{
"cst":"01",
"ppis":2
}
},
{
"rule":"cofins",
"value":{
"cst":"01",
"pcofins":2
}
}
],
"messages":[
{
"id":49
}
],
"attributes":[
{
"attribute":"cfop",
"product_origin_type":"reseller",
"value":{
"same_state":"5105",
"other_state":"6105"
}
}
]
}
]
}
]
}
Exemplo de resposta:
200 OK
{
"id": 6,
"description": "teste de PUT alterando fiscal model para olss",
"user_id": 359450559,
"transactions": [
{
"transaction_type": "sale",
"operations": [
{
"operation_type": "b2c",
"customer_type": "taxpayer",
"fiscal_model_id": "olss",
"origin": "SP",
"rules": [
{
"value": {
"destinations": [
{
"uf": "AC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AC000001"
},
{
"uf": "AL",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AL000001"
},
{
"uf": "AM",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AM009999"
},
{
"uf": "AP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AP000001"
},
{
"uf": "BA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "BA000001"
},
{
"uf": "CE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "CE000001"
},
{
"uf": "DF",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "DF009999"
},
{
"uf": "ES",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "ES009999"
},
{
"uf": "GO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "GO000001"
},
{
"uf": "MA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MA000001"
},
{
"uf": "MT",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MT001000"
},
{
"uf": "MS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MS000001"
},
{
"uf": "MG",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MG000001"
},
{
"uf": "PA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PA109999"
},
{
"uf": "PB",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PB000001"
},
{
"uf": "PR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PR020021"
},
{
"uf": "PE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PE009999"
},
{
"uf": "PI",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PI000001"
},
{
"uf": "RJ",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RJ000000"
},
{
"uf": "RN",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RN000015"
},
{
"uf": "RO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RO000001"
},
{
"uf": "RS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RS020002"
},
{
"uf": "RR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18
},
{
"uf": "SC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SC000001"
},
{
"uf": "SE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SE000001"
},
{
"uf": "SP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SP000202"
},
{
"uf": "TO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "TO000001"
}
]
},
"rule": "icms"
},
{
"value": {
"composition": [
"item_amount",
"freight",
"discount",
"ipi"
]
},
"rule": "icms_composition"
},
{
"value": {
"cst": "01",
"cenq": "999"
},
"rule": "ipi"
},
{
"value": {
"cst": "01",
"ppis": 2
},
"rule": "pis"
},
{
"value": {
"cst": "01",
"pcofins": 2
},
"rule": "cofins"
}
],
"messages": [
{
"id": 49
}
],
"attributes": [
{
"value": {
"override": [
{
"cst": "00",
"same_state": "5405",
"other_state": "6108"
},
{
"cst": "10",
"same_state": "5205",
"other_state": "6108"
}
],
"same_state": "5949",
"other_state": "6949"
},
"attribute": "cfop",
"product_origin_type": "reseller"
}
]
},
{
"operation_type": "b2c",
"customer_type": "non_taxpayer",
"fiscal_model_id": "mfl",
"origin": "SP",
"rules": [
{
"value": {
"destinations": [
{
"uf": "AC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AC000001"
},
{
"uf": "AL",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AL000001"
},
{
"uf": "AM",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AM009999"
},
{
"uf": "AP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AP000001"
},
{
"uf": "BA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "BA000001"
},
{
"uf": "CE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "CE000001"
},
{
"uf": "DF",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "DF009999"
},
{
"uf": "ES",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "ES009999"
},
{
"uf": "GO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "GO000001"
},
{
"uf": "MA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MA000001"
},
{
"uf": "MT",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MT001000"
},
{
"uf": "MS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MS000001"
},
{
"uf": "MG",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MG000001"
},
{
"uf": "PA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PA109999"
},
{
"uf": "PB",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PB000001"
},
{
"uf": "PR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PR020021"
},
{
"uf": "PE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PE009999"
},
{
"uf": "PI",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PI000001"
},
{
"uf": "RJ",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RJ000000"
},
{
"uf": "RN",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RN000015"
},
{
"uf": "RO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RO000001"
},
{
"uf": "RS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RS020002"
},
{
"uf": "RR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18
},
{
"uf": "SC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SC000001"
},
{
"uf": "SE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SE000001"
},
{
"uf": "SP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SP000202"
},
{
"uf": "TO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "TO000001"
}
]
},
"rule": "icms"
},
{
"value": {
"composition": [
"item_amount",
"freight",
"discount",
"ipi"
]
},
"rule": "icms_composition"
},
{
"value": {
"cst": "01",
"cenq": "999"
},
"rule": "ipi"
},
{
"value": {
"cst": "01",
"ppis": 2
},
"rule": "pis"
},
{
"value": {
"cst": "01",
"pcofins": 2
},
"rule": "cofins"
}
],
"messages": [
{
"id": 49
}
],
"attributes": [
{
"value": {
"override": [
{
"cst": "00",
"same_state": "5405",
"other_state": "6108"
},
{
"cst": "10",
"same_state": "5205",
"other_state": "6108"
}
],
"same_state": "5949",
"other_state": "6949"
},
"attribute": "cfop",
"product_origin_type": "reseller"
}
]
}
]
},
{
"transaction_type": "inbound",
"operations": [
{
"operation_type": "b2b",
"customer_type": "taxpayer",
"fiscal_model_id": "mfl",
"origin": "SP",
"rules": [
{
"value": {
"destinations": [
{
"uf": "AC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AC000001"
},
{
"uf": "AL",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AL000001"
},
{
"uf": "AM",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AM009999"
},
{
"uf": "AP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AP000001"
},
{
"uf": "BA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "BA000001"
},
{
"uf": "CE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "CE000001"
},
{
"uf": "DF",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "DF009999"
},
{
"uf": "ES",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "ES009999"
},
{
"uf": "GO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "GO000001"
},
{
"uf": "MA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MA000001"
},
{
"uf": "MT",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MT001000"
},
{
"uf": "MS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MS000001"
},
{
"uf": "MG",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MG000001"
},
{
"uf": "PA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PA109999"
},
{
"uf": "PB",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PB000001"
},
{
"uf": "PR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PR020021"
},
{
"uf": "PE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PE009999"
},
{
"uf": "PI",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PI000001"
},
{
"uf": "RJ",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RJ000000"
},
{
"uf": "RN",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RN000015"
},
{
"uf": "RO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RO000001"
},
{
"uf": "RS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RS020002"
},
{
"uf": "RR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18
},
{
"uf": "SC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SC000001"
},
{
"uf": "SE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SE000001"
},
{
"uf": "SP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SP000202"
},
{
"uf": "TO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "TO000001"
}
]
},
"rule": "icms"
},
{
"value": {
"composition": [
"item_amount",
"freight",
"discount",
"ipi"
]
},
"rule": "icms_composition"
},
{
"value": {
"cst": "01",
"cenq": "999"
},
"rule": "ipi"
},
{
"value": {
"cst": "01",
"ppis": 2
},
"rule": "pis"
},
{
"value": {
"cst": "01",
"pcofins": 2
},
"rule": "cofins"
}
],
"messages": [
{
"id": 49
}
],
"attributes": [
{
"value": {
"same_state": "5105",
"other_state": "6105"
},
"attribute": "cfop",
"product_origin_type": "reseller"
}
]
}
]
}
]
}
Consulta das regras tributárias
curl -H 'Authorization: Bearer $ACCESS_TOKEN' -X GET https://api.mercadolibre.com/users/$USER_ID/invoices/tax_rules
Lista os grupos de regras tributárias cadastradas.
Exemplo de resposta:
200 OK
{
"paging": {
"total": 2,
"offset": 0,
"limit": 50
},
"results": [
{
"id": 6,
"description": "regras nacionais - fabricante",
"user_id": 359450559
},
{
"id": 7,
"description": "regras nacionais - revendedor",
"user_id": 359450559
}
],
"sort": [
{
"id": "id",
"name": "ID, ASC"
}
],
"filters": [],
"available_filters": [],
"available_sorts": []
}
Consultas das regras tributárias por ID
curl -H 'Authorization: Bearer $ACCESS_TOKEN' -X GET https://api.mercadolibre.com/users/$USER_ID/invoices/tax_rules/$ID_REGRA
Busca um grupo de regras pelo seu código identificador.
Exemplo de resposta:
{
"id": 7,
"description": "regras nacionais - revendedor",
"user_id": 359450559,
"transactions": [
{
"transaction_type": "sale",
"operations": [
{
"operation_type": "b2c",
"customer_type": "taxpayer",
"fiscal_model_id": "mfl",
"origin": "SP",
"rules": [
{
"value": {
"destinations": [
{
"uf": "AC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AC000001"
},
{
"uf": "AL",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AL000001"
},
{
"uf": "AM",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AM009999"
},
{
"uf": "AP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AP000001"
},
{
"uf": "BA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "BA000001"
},
{
"uf": "CE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "CE000001"
},
{
"uf": "DF",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "DF009999"
},
{
"uf": "ES",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "ES009999"
},
{
"uf": "GO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "GO000001"
},
{
"uf": "MA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MA000001"
},
{
"uf": "MT",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MT001000"
},
{
"uf": "MS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MS000001"
},
{
"uf": "MG",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MG000001"
},
{
"uf": "PA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PA109999"
},
{
"uf": "PB",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PB000001"
},
{
"uf": "PR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PR020021"
},
{
"uf": "PE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PE009999"
},
{
"uf": "PI",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PI000001"
},
{
"uf": "RJ",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RJ000000"
},
{
"uf": "RN",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RN000015"
},
{
"uf": "RO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RO000001"
},
{
"uf": "RS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RS020002"
},
{
"uf": "RR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18
},
{
"uf": "SC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SC000001"
},
{
"uf": "SE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SE000001"
},
{
"uf": "SP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SP000202"
},
{
"uf": "TO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "TO000001"
}
]
},
"rule": "icms"
},
{
"value": {
"composition": [
"item_amount",
"freight",
"discount",
"ipi"
]
},
"rule": "icms_composition"
},
{
"value": {
"cst": "01",
"cenq": "999"
},
"rule": "ipi"
},
{
"value": {
"cst": "01",
"ppis": 2
},
"rule": "pis"
},
{
"value": {
"cst": "01",
"pcofins": 2
},
"rule": "cofins"
}
],
"messages": [
{
"id": 49
}
],
"attributes": [
{
"value": {
"override": [
{
"cst": "00",
"same_state": "5405",
"other_state": "6108"
},
{
"cst": "10",
"same_state": "5205",
"other_state": "6108"
}
],
"same_state": "5949",
"other_state": "6949"
},
"attribute": "cfop",
"product_origin_type": "reseller"
}
]
},
{
"operation_type": "b2c",
"customer_type": "non_taxpayer",
"fiscal_model_id": "mfl",
"origin": "SP",
"rules": [
{
"value": {
"destinations": [
{
"uf": "AC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AC000001"
},
{
"uf": "AL",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AL000001"
},
{
"uf": "AM",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AM009999"
},
{
"uf": "AP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AP000001"
},
{
"uf": "BA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "BA000001"
},
{
"uf": "CE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "CE000001"
},
{
"uf": "DF",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "DF009999"
},
{
"uf": "ES",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "ES009999"
},
{
"uf": "GO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "GO000001"
},
{
"uf": "MA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MA000001"
},
{
"uf": "MT",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MT001000"
},
{
"uf": "MS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MS000001"
},
{
"uf": "MG",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MG000001"
},
{
"uf": "PA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PA109999"
},
{
"uf": "PB",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PB000001"
},
{
"uf": "PR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PR020021"
},
{
"uf": "PE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PE009999"
},
{
"uf": "PI",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PI000001"
},
{
"uf": "RJ",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RJ000000"
},
{
"uf": "RN",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RN000015"
},
{
"uf": "RO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RO000001"
},
{
"uf": "RS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RS020002"
},
{
"uf": "RR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18
},
{
"uf": "SC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SC000001"
},
{
"uf": "SE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SE000001"
},
{
"uf": "SP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SP000202"
},
{
"uf": "TO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "TO000001"
}
]
},
"rule": "icms"
},
{
"value": {
"composition": [
"item_amount",
"freight",
"discount",
"ipi"
]
},
"rule": "icms_composition"
},
{
"value": {
"cst": "01",
"cenq": "999"
},
"rule": "ipi"
},
{
"value": {
"cst": "01",
"ppis": 2
},
"rule": "pis"
},
{
"value": {
"cst": "01",
"pcofins": 2
},
"rule": "cofins"
}
],
"messages": [
{
"id": 49
}
],
"attributes": [
{
"value": {
"override": [
{
"cst": "00",
"same_state": "5405",
"other_state": "6108"
},
{
"cst": "10",
"same_state": "5205",
"other_state": "6108"
}
],
"same_state": "5949",
"other_state": "6949"
},
"attribute": "cfop",
"product_origin_type": "reseller"
}
]
}
]
},
{
"transaction_type": "inbound",
"operations": [
{
"operation_type": "b2b",
"customer_type": "taxpayer",
"fiscal_model_id": "mfl",
"origin": "SP",
"rules": [
{
"value": {
"destinations": [
{
"uf": "AC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AC000001"
},
{
"uf": "AL",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AL000001"
},
{
"uf": "AM",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AM009999"
},
{
"uf": "AP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "AP000001"
},
{
"uf": "BA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "BA000001"
},
{
"uf": "CE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "CE000001"
},
{
"uf": "DF",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "DF009999"
},
{
"uf": "ES",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "ES009999"
},
{
"uf": "GO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "GO000001"
},
{
"uf": "MA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MA000001"
},
{
"uf": "MT",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MT001000"
},
{
"uf": "MS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MS000001"
},
{
"uf": "MG",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "MG000001"
},
{
"uf": "PA",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PA109999"
},
{
"uf": "PB",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PB000001"
},
{
"uf": "PR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PR020021"
},
{
"uf": "PE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PE009999"
},
{
"uf": "PI",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "PI000001"
},
{
"uf": "RJ",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RJ000000"
},
{
"uf": "RN",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RN000015"
},
{
"uf": "RO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RO000001"
},
{
"uf": "RS",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "RS020002"
},
{
"uf": "RR",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18
},
{
"uf": "SC",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SC000001"
},
{
"uf": "SE",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SE000001"
},
{
"uf": "SP",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "SP000202"
},
{
"uf": "TO",
"cst": "20",
"pfcpufdest": 0,
"picmsufdest": 20,
"modbc": 3,
"predbc": 18,
"motdesicms": 9,
"cbenef": "TO000001"
}
]
},
"rule": "icms"
},
{
"value": {
"composition": [
"item_amount",
"freight",
"discount",
"ipi"
]
},
"rule": "icms_composition"
},
{
"value": {
"cst": "01",
"cenq": "999"
},
"rule": "ipi"
},
{
"value": {
"cst": "01",
"ppis": 2
},
"rule": "pis"
},
{
"value": {
"cst": "01",
"pcofins": 2
},
"rule": "cofins"
}
],
"messages": [
{
"id": 49
}
],
"attributes": [
{
"value": {
"same_state": "5105",
"other_state": "6105"
},
"attribute": "cfop",
"product_origin_type": "reseller"
}
]
}
]
}
]
}
Seguinte: Configurações de Composição de Base de Cálculo do ICMS e IPI