Avalara Developer Network Developer avaTaxBr

AvaTax Brazil

The Avatax-Brazil API exposes the most commonly services available for interacting with the AvaTax-Brazil services, allowing calculation of taxes, issuing electronic invoice documents and modifying existing transactions when allowed by tax authorities. This API is exclusively for use by business with a physical presence in Brazil.


Transaction Method

This method has more then one operation model, (a) AS IS, the system only stores the transaction; (b) Full Calculation, the system calculates taxes, validates fields, stores with transaction state, but doesn't try get government authorization; (c) Full Sync, the system calculates the taxes, validates fileds, gets government authorization, stores with transaction state when authorized, used for NFCe.

Api Endpoint
POST http://avataxbr-sandbox.avalarabrasil.com.br/v2/transactions?goods-sales

Post Body Parameters

Header
messageType
string
accountId
Required

This string is a UUID issued by Avalara to identify the Avalara account that owns the company identified by the companyCode on the next line.

string
companyCode
Required

string is a code maintained by the client application to uniquely identify the company for which this transaction is being recorded. It is unique within the context of an Account. It will be limited to 60 characters when creating a Company

string
documentCode

This string is a code maintained by the client application to uniquely identify a document in the client's systems. It will typically be an invoice number, sales order, receipt number, returned merchandise authorization number, etc. When has this field, the transaction will be stored

string
Participants
Entity
name

Entity name, official name (Razão Social)

string
role
  • 'transporter'
  • 'sender' # REMETENTE
  • 'dispatcher' # EXPEDITOR
  • 'receiver' # RECEIVER
  • 'addressee' # DESTINATÁRIO
  • 'other' # OUTRO
string
type
Required

Entity Type (business, individual, federal government, state government, city government foreign)

string
federalTaxId
Required

CNPJ/CPF of Sales Buyer, if CPF pattern is '[0-9]{11}' if CNPJ pattern is '[0-9]{14}'

string
cityTaxId

City Tax ID

string
stateTaxId

State Tax ID

string
suframa

Suframa ID

string
phone

Entity Phone

string
taxRegime
string
email

Entity Email

string
subjectToSRF1234

Companies subject to follow same rules of Government entities (Instrução Normativa: SRF1234)

boolean
icmsTaxPayer

Inform if the entity is ICMS tax payer.

boolean
Transporter
name

Entity name, official name (Razão Social)

string
role
  • 'transporter'
  • 'sender' # REMETENTE
  • 'dispatcher' # EXPEDITOR
  • 'receiver' # RECEIVER
  • 'addressee' # DESTINATÁRIO
  • 'other' # OUTRO
string
type
Required

Entity Type (business, individual, federal government, state government, city government foreign)

string
federalTaxId
Required

CNPJ/CPF of Sales Buyer, if CPF pattern is '[0-9]{11}' if CNPJ pattern is '[0-9]{14}'

string
cityTaxId

City Tax ID

string
stateTaxId

State Tax ID

string
suframa

Suframa ID

string
phone

Entity Phone

string
taxRegime
string
email

Entity Email

string
subjectToSRF1234

Companies subject to follow same rules of Government entities (Instrução Normativa: SRF1234)

boolean
icmsTaxPayer

Inform if the entity is ICMS tax payer.

boolean
nfAccessKey

This is the public NF id. With this number is possible get invoice information directly from government.

string
nfceQrCode

qr code printed on DANFE;

string
transactionType
Required

This string indicates the type of transaction for which tax should be calculated.

string
transactionModel
  • '01' # Nota Fiscal 1/1A
  • '1B' # Nota Fiscal Avulsa
  • '02' # Nota Fiscal de Venda a-Consumidor
  • '2D' # Cupom Fiscal
  • '2E' # Cupom Fiscal-Bilhete de Passagem
  • '04' # Nota Fiscal de Produtor
  • '06' # Nota Fiscal/Conta de Energia Elétrica
  • '07' # Nota Fiscal de Serviço de Transporte
  • '08' # Conhecimento de Transporte Rodoviário de-Cargas
  • '8B' # Conhecimento de Transporte de-Cargas Avulso
  • '09' # Conhecimento de Transporte Aquaviário de-Cargas
  • '10' # Conhecimento Aéreo
  • '11' # Conhecimento de Transporte Ferroviário de-Cargas
  • '13' # Bilhete de Passagem Rodoviário
  • '14' # Bilhete de Passagem Aquaviário
  • '15' # Bilhete de Passagem e-Nota de-Bagagem
  • '16' # Bilhete de Passagem Ferroviário
  • '18' # Resumo de Movimento Diário
  • '21' # Nota Fiscal de Serviço de-Comunicação
  • '22' # Nota Fiscal de Serviço de Telecomunicação
  • '26' # Conhecimento de Transporte Multimodal de-Cargas
  • '27' # Nota Fiscal De Transporte Ferroviário De-Carga
  • '28' # Nota Fiscal/Conta de Fornecimento de Gás-Canalizado
  • '29' # Nota Fiscal/Conta de Fornecimento de Água-Canalizada
  • '55' # Nota Fiscal Eletrônica (NF-e)
  • '57' # Conhecimento de Transporte Eletrônico (CT-e)
  • '59' # Cupom Fiscal Eletrônico (CF-e-SAT)
  • '60' # Cupom Fiscal Eletrônico (CF-e-ECF)
  • '65' # Nota Fiscal Eletrônica ao-Consumidor Final (NFC-e)
string
transactionClass

Natureza da Opreração - 'Describe kind of this transaction, summary

string
eDocCreatorType
Required
string
eDocCreatorPerspective

This Flag is used only when eDocCreatorType is other and the return show Taxes using eDocCreator perspective or self perspective.

boolean
entityCode

This string is a code maintained by the client application and recorded in CUP to uniquely identify the party with whom the company (identified by companyCode) is transacting. It is unique within the context of a Company.

string
currency

currency code

string
companyLocation
Required

This string contains a previously configured company code which may also have codes needed for tax return purposes. These codes are maintained through the customer portal. Main company address identity

string
transactionDate

This string is the transaction date in ISO 8601 format, create transaction date

string
shippingDate

This string is the transaction date in ISO 8601 format, when products were shipped, can be empty or absent

string
AdditionalInfo
fiscalInfo

Additional information of fiscal interest

string
complementaryInfo

Additional information of user interest

string
Array[ProcRef]
nProc

Process Identifier

string
indProc

Process Origin

  • '0' # SEFAZ;
  • '1' # Justiça Federal;
  • '2' # Justiça Estadual;
  • '3' # Secex/RFB;
  • '9' # Outros
string
tpImp

how the document will be printed

  • '0' # without DANFE;
  • '1' # DANFe Letter;
  • '2' # DANFe Landscape;
  • '3' # DANFe Simplified;
  • '4' # DANFe NFC-e;
  • '5' # DANFe NFC-e e-mail
string
idDest

This indicator inform transaction target place, when is AUTOMATIC the company address and entity address are analyzed to identify type of transaction target place 1- same state; 2 - interstate; 3-with exterior. Exist some cases where is necessary force this situation like when buyer from another state buy something in loco, the address are from different states, but transaction no. Identificador de Local de destino da operação, na opção AUTOMATIC endereços da Companhia e da entidade destino são analisados para saber se é uma operação dentro do mesmo estado, interestadual ou com o exterior. Há situações onde é necessário forçar este indicador como por exemplo Quando uma pessoa com endereço em outro estado, compra uma mercadoria de forma presencial, é uma operação interna apesar dos endereços dos envolvidos estarem em estados distintos.

  • 0 # AUTOMATIC - DEFAULT
  • 1 # Interna;
  • 2 # Interestadual;
  • 3 # Exterior)
integer
indPres

Presence indicator

  • '0' # Not applicable
  • '1' # Presential;
  • '2' # Remote, internet;
  • '3' # Remote, phone;
  • '4' # NFC-e home delivery;
  • '9' # Remote, others
string
invoiceNumber

Invoice number, sequential unique by invoice serial (Número da nota fiscal)

integer
invoiceSerial

Invoice number, sequential unique by invoice serial (Número da nota fiscal)

integer
DefaultLocations
Transport
modFreight
Required

Freight model

  • 0 - CIF,
  • 1 - FOB,
  • 2 - Thrid party,
  • 9 - Free shipping when 9 - Free shipping, the fields below will be ignored if present
  • 'transporter'
  • 'withholdICMSTransport'
  • 'volumes'
  • 'vehicle'
string
withholdICMSTransport

Forces witholding of ICMS on transport amount (freight)

boolean
Array[Volumes]
qVol

Quantity of packages transported

string
specie

package type

string
brand

brand

string
volumeNumeration

packages numeration

string
netWeight

net weight using Kg

number
grossWeight

gross weight using Kg

number
seal
Array[string]
Vehicle
type
string
Automobile
licensePlate
Required
string
stateCode
Required

State Abreviation:

  • 'AC'
  • 'AL'
  • 'AP'
  • 'AM'
  • 'BA'
  • 'CE'
  • 'DF'
  • 'ES'
  • 'GO'
  • 'MA'
  • 'MT'
  • 'MS'
  • 'MG'
  • 'PA'
  • 'PB'
  • 'PR'
  • 'PE'
  • 'PI'
  • 'RJ'
  • 'RN'
  • 'RS'
  • 'RO'
  • 'RR'
  • 'SC'
  • 'SP'
  • 'SE'
  • 'TO'
string
rtnc

Cargo Transport National Register, Registro Nacional de Transportador de Carga (ANTT)

string
Array[Trailer]
licensePlate
Required
string
stateCode
Required

State Abreviation:

  • 'AC'
  • 'AL'
  • 'AP'
  • 'AM'
  • 'BA'
  • 'CE'
  • 'DF'
  • 'ES'
  • 'GO'
  • 'MA'
  • 'MT'
  • 'MS'
  • 'MG'
  • 'PA'
  • 'PB'
  • 'PR'
  • 'PE'
  • 'PI'
  • 'RJ'
  • 'RN'
  • 'RS'
  • 'RO'
  • 'RR'
  • 'SC'
  • 'SP'
  • 'SE'
  • 'TO'
string
rtnc

Cargo Transport National Register, Registro Nacional de Transportador de Carga (ANTT)

string
wagon
string
ferry

Ferry

string
Array[NfRef]
type
string
refNFe
string
refCTe
string
RefECF
nECF
Required

ECF Sequential number that generated Cupom attached to NFe informar o número de ordem seqüencial do ECF que emitiu o Cupom Fiscal vinculado à NF-e

string
nCOO
Required

Operational counter number attached to NFe Informar o Número do Contador de Ordem de Operação - COO vinculado à NF-e

string
modECF
Required

Fiscal document model

  • '2B' # coupon tax not ECF
  • '2C' # PDV coupon tax
  • '2D' # ECF coupon tax
string
RefNF
stateCd
Required

State code of fiscal Document creator

string
yymm
Required

year and month of fiscal document creation

string
federalTaxId
Required

fiscal document creator federalTaxId

string
serie
Required

fiscal document serie

string
number
Required

fiscal document number

string
RefFarmerNF
stateCd
Required

State code of fiscal Document creator, farmer

string
yymm
Required

year and month of fiscal document creation

string
federalTaxId
Required

fiscal document creator farmer federalTaxId

string
stateTaxId
Required

fiscal document creator, farmer stateTaxId

string
model
Required

Document Fiscal model

  • '04' # FARMER DOCUMENT
  • '01' # DETACHED DOCUMENT - AVULSO
string
serie
Required

fiscal document serie

string
number
Required

fiscal document number

string
Payment
installmentsTerms

Installment terms

  • 0 # cash
  • 1 # on terms
  • 2 # other
integer
Bill
nFat

Bill identifier

string
vOrig

Orignal value

number
vDiscount

Discount

number
vNet

Net value

number
Array[Installment]
documentNumber

Instalment number identifier

string
date

Installment expiration date

string
grossValue
Required

Installment value

number
Array[PaymentMode]
mode
Required

Payment mode

  • '01' # Dinheiro
  • '02' # Cheque
  • '03' # Cartão de Crédito
  • '04' # Cartão de Débito
  • '05' # Crédito Loja
  • '10' # Vale Alimentação
  • '11' # Vale Refeição
  • '12' # Vale Presente
  • '13' # Vale Combustível
  • '99' # Outros
string
value
Required

payment value

number
cardTpIntegration
  • '1' # Payment integrated with system,
  • '2' # Payment not integrated with system
string
cardCNPJ

Federal tax id of accrediting card (credenciadora do cartão)

string
cardBrand

card brand

  • '01' # Visa
  • '02' # Mastercard
  • '03' # American Express
  • '04' # Sorocred
  • '99' # Other
string
cardAuthorization

transaction authorization number

string
PurchaseInfo
governmentOrder

Invoice info for government purchase orders Informação da Nota de Empenho de compras públicas

string
orderNumber

Order info Informação do pedido

string
contractNumber

Agreement info Informação do contrato

string
Export
shippingState
Required

shipping state

string
place
Required

shipping place

string
placeDescription

description of shipping place

string
Array[Lines]
lineCode
Required

This string is a unique identifier for this line in the transaction

integer
itemCode
Required

This string is a code maintained by the client application to uniquely identify a product or service. It will likely be a SKU and is required for SST states.

string
avalaraGoodsAndServicesType

AGAST CODE for itemCode

string
numberOfItems
Required

This decimal 11 integers and 1 to 4 decimals captures the number of individual items or units represented by this line. Digits after the decimal point are optional. This should always be positive. Quantity, default 1

number
returnedPercentageAmount

when is return operation this field inform the percentage of returned itens. This decimal max 3 integers and 2 decimals, v >=0.00 and v <= 100.00

number
lineUnitPrice

This decimal 11 integers and 1 to 10 decimals captures the unit price of this line.

number
lineAmount
Required

In its simplest form lineAmount = (item price * numberOfItems). If taxIncluded is 'true', lineAmount = (item price * numberOfItems + tax).

number
itemDescription
Required

This string captures the description of the item represented by this line, will be used LC 116

string
lineTaxedDiscount

Discount conditional, This decimal 13 integers and 0 to 2 decimals

number
lineUntaxedDiscount

discount unconditional, This decimal 13 integers and 0 to 2 decimals

number
useType
Required

This is a enumeration folowing table

string
processScenario
Required

Reference to process configurantion of this transaction, See ProcessScenario definition

string
cfop

Fiscal Operation Code of transport service

integer
hasStockImpact

return if this transaction has stock impact for this process or CFOP

boolean
hasFinantialImpact

return if this transaction has finantial impact for this process or CFOP

boolean
freightAmount

This decimal 13 integers and 0 to 2 decimals

number
insuranceAmount

This decimal 13 integers and 0 to 2 decimals

number
otherCostAmount

This decimal 13 integers and 0 to 2 decimals

number
indTotType

The item value will compose the invoice total value.

boolean
orderNumber

order number, information used for B2B control process

string
orderItemNumber

number of the item from order number, information used for B2B control process

string
fciNumber

Gloal Unique identifier (Importation form)

string
recopiNumber

RECOPI number

string
infAdProd

additional information about product (referenced standard, complementary info, etc)

string
Vehicle
tpOp
Required
  • 1 # Sales by car dealership
  • 2 # Direct billing
  • 3 # Direct sales
  • 0 # Other
integer
chassisNumber
Required
string
colorCode
Required

color code used by factory

string
colorName
Required

color name

string
cvPower
Required

Power using CV unid

string
cylinderVolumCC
Required

engine size in cubic centimeters

string
netWeight
Required

net weight

string
grossWeight
Required

gross weight

string
serialNumber
Required

serie

string
fuelType
Required
  • '01' # Alcohol
  • '02' # Gas
  • '03' # Diesel
  • '16' # Alcohol/Gas
  • '17' # Gas/Alcohol/GNV
  • '18' # Gas/Electric
string
engineNumber
Required

engine number

string
cmt
Required

traction capacity, tonne

string
lengthBetweenAxis
Required

length between axis

string
modelYear
Required

model year

string
manufactoryYear
Required

year of factory

string
paintType
Required

paynt type

string
vehicleRENAVAMType
Required
string
specieRENAVAMType
Required
string
modelRENAVAMCode
Required
string
colorDENATRANCode
Required
  • '01' # YELLOW
  • '02' # BLUE
  • '03' # BEIGE
  • '04' # WHITE
  • '05' # GRAY
  • '06' # GOLDEN
  • '07' # GRENA
  • '08' # ORANGE
  • '09' # BROWN
  • '10' # SILVER
  • '11' # BLACK
  • '12' # PINK
  • '13' # PURPLE
  • '14' # GREEN
  • '15' # RED
  • '16' # FANTASY
string
vin
Required

chassis condition original or modified (remarcado)

string
vehicleManufactoryStatus
Required
  • '1' # Finished(Done)
  • '2' # Not finished
  • '3' # Semi-finished
string
maxOccupantsQuantity
Required

max number of sit occupants

string
restrictionType
Required

Lien/restriction type

  • '0' # No one;
  • '1' # Alienação Fiduciária;
  • '2' # Arrendamento Mercantil;
  • '3' # Reserva de Domínio;
  • '4' # Penhor de Veículos;
  • '9' # Other.
string
Medicine
loteNumber
Required
string
loteQuantity
Required

This is a decimal type with 11 digits including 3 decimal positions.

number
manufactotyDate
Required
string
expirationDate
Required
string
maxValueToEndUser
Required

This is a decimal type with 15 digits including 2 decimal positions. Max value to end user.

number
Weapon
weaponRestrictionType
Required
  • '0' # restrict use
  • '1' # public use
string
serieNumber
Required
string
gunBarrelSerieNumber
Required

Barrel's serial number. Número de série do cano

string
weaponDescription
Required

weapon description

string
Fuel
prodANPCode
Required
string
perMixGN

percentage of natural gas (GLP)

number
authorizationCodeCODIF
string
quantityOnRoomTemperature

This decimal 12 integers and 0 to 4 decimals Quantidade de combustível faturada à temperatura ambiente. Informar quando a quantidade faturada informada no campo qCom (I10) tiver sido ajustada para uma temperatura diferente da ambiente.

number
stateCodeOfUndUser
Required

state where fuel was used

string
Cide
baseCalcCIDE
Required

percentage of natural gas (GLP), this decimal 12 integers and 0 to 4 decimals

number
rateCIDE
Required

percentage of natural gas (GLP), this decimal 11 integers and 0 to 4 decimals - R$

number
valueCIDE
Required

percentage of natural gas (GLP), this decimal 13 integers and 2 decimals - R$

number
PumpNumber
nozzleNumberFuelSupply
Required

Identification number of nozzle used in the dispensing process.
Numero de identificação do Bico utilizado no abastecimento

string
fuelPumpNumber
Required

Identification number of the Pump connect to the used nozzle.
Numero de identificação da bomba ao qual o bico está interligado

string
fuelTankNumber
Required

Identification number of the Pump connect to the used nozzle.
Numero de identificação da bomba ao qual o bico está interligado

string
startValueOfPumpNumber
Required

Valor do Encerrante no ínicio do abastecimento. Reading of auto-counter (encerrante) at the start of the refueling/dispensing. This decimal 12 integers and 3 decimals - R$

number
endValueOfPumpNumber
Required

Valor do Encerrante no final do abastecimento. Reading of auto-counter (encerrante) at the end of the refueling/dispensing. This decimal 12 integers and 3 decimals - R$

number
entityIsIcmsSubstitute

Inform that for this item the Entity referenced is ICMS Substitute

boolean
isTransportIcmsWithheld

Inform that this item has ICMS withheld for transport value service.

boolean
IcmsTaxRelief
reasonCode
Required

When item transaction subject to desoneration, this is the reason code

  • '1' # Táxi;
  • '3' # Produtor Agropecuário;
  • '4' # Frotista/Locadora;
  • '5' # Diplomático/Consular;
  • '6' # Utilitários e Motocicletas da Amazônia Ocidental e Áreas de Livre Comércio (Resolução 714/88 e 790/94 – CONTRAN e suas alterações);
  • '7' # SUFRAMA;
  • '8' # Venda a órgão Público;
  • '9' # Outros
  • '10' # Deficiente Condutor
  • '11' # Deficiente não condutor
  • '12' # Fomento agropecuário
  • '16' # Olimpíadas Rio 2016
string
taxBaseDiscount

ICMS Tax base rate discount (desconto na base do ICMS referetne a desoneração)

number
taxAmount

Amount for Icms Relief (desoneração)

number
Array[Export]
drawbackNumber
string
IndExport
registerNumber
Required

Exportation register number

string
accessKey
Required

invoice access key received to export

string
quantity
Required

This decimal 11 integers and 0 to 4 decimals, quantity exported in real

number
Array[Di]
customsValue

customs value, valor aduaneiro (II Block of NFe)

number
diNumber
Required

Import declaration number, DI/DSI/DA/DRI-E (DI/DSI/DA/DRI-E)

string
registerDateDI
Required

Register date of import declaration number, DI/DSI/DA/DRI-E (DI/DSI/DA/DRI-E)

string
clearanceSite
Required

Clerance Site Local do desembaraço aduaneiro

string
clearanceState
Required

Clerance Site State Estado onde ocorrreu o desembaraço aduaneiro

string
clearanceDate

Clerance date

string
transportDIType
Required
  • '1' # Maritima
  • '2' # Fluvial
  • '3' # Lacustre
  • '4' # Aerea
  • '5' # Postal
  • '6' # Ferroviaria
  • '7' # Rodoviaria
  • '8' # Conduto
  • '9' # Meios Proprios
  • '10' # Entrada/Saida Ficta
string
afrmmValue

Aditional amount to freight to renew merchant marine, This decimal 13 integers and 2 decimals [Valor Adicional ao frete para renovação de marinha mercante]

number
intermediateType
Required
  • '1' # On One's Own [1-por conta propria]
  • '2' # On Behalf And Order [2-por conta e ordem]
  • '3' # Order [3-encomenda]
string
buyerFederalTaxID

Buyer federal tax id CNPJ do comprador ou encomendante

string
buyerState

Buyer sate Estado do comprador ou encomendante

string
exporterCode

Exporter code

string
Array[Adi]
addNumber
Required

aditional sequence number (1 to 100)

integer
sequentialNumber
Required

sequential item number for this adi, sequence number (1 to 999)

integer
manufacturerCode
Required

Manufatorer erp internal code

string
adiDiscount

This decimal 13 integers and 2 decimals, aditional adi discount

number
drawbackNumber

Drawback number

string
CalculatedTax
TaxByType
Icms
tax
Required

Tax value, negative value for withhold value

number
IcmsSt
tax
Required

Tax value, negative value for withhold value

number
IcmsStSd
tax
Required

Tax value, negative value for withhold value

number
IcmsPartOwn
tax
Required

Tax value, negative value for withhold value

number
IcmsPartDest
tax
Required

Tax value, negative value for withhold value

number
IcmsDifaFCP
tax
Required

Tax value, negative value for withhold value

number
IcmsDifaDest
tax
Required

Tax value, negative value for withhold value

number
IcmsDifaRemet
tax
Required

Tax value, negative value for withhold value

number
IcmsRf
tax
Required

Tax value, negative value for withhold value

number
IcmsDeson
tax
Required

Tax value, negative value for withhold value

number
IcmsCredsn
tax
Required

Tax value, negative value for withhold value

number
Pis
tax
Required

Tax value, negative value for withhold value

number
PisSt
tax
Required

Tax value, negative value for withhold value

number
Cofins
tax
Required

Tax value, negative value for withhold value

number
CofinsSt
tax
Required

Tax value, negative value for withhold value

number
Ipi
tax
Required

Tax value, negative value for withhold value

number
IpiReturned
tax
Required

Tax value, negative value for withhold value

number
Ii
tax
Required

Tax value, negative value for withhold value

number
Iof
tax
Required

Tax value, negative value for withhold value

number
AproxtribState
tax
Required

Tax value, negative value for withhold value

number
AproxtribFed
tax
Required

Tax value, negative value for withhold value

number
tax
number
Array[Details]
locationType

This string captures the applicable location type. Location used for calc. Buyer or Seller

string
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
taxType

Tax identificator

string
rateType

Name of configuration rate

string
scenario

This string captures the transaction scenario used to calculate the tax for this tax type. Scenarios are specific to the tax type. This field provides information about how the tax engine interpreted the transaction information that was passed in.

string
subtotalTaxable

This decimal captures how much of the lineAmount was taxable by this tax, calc base

number
rate

This decimal captures the tax rate for this tax.3.00 (3%)

number
tax

This decimal captures how much of the lineAmount was taxable by this tax

number
exemptionCode

This string is required if is exempt

string
significantLocations
Array[string]
taxRuleType

This string with type of rule

string
source

Source of product or merchandise,

  • '0' # National goods - 'except those treated in codes 3,4, 5 and 8
  • '1' # Imported directly by seller, except those in code 6
  • '2' # Foreign goods - 'Acquired in the internal market (inside Brazil), except those in code 7
  • '3' # Merchandise or goods with imported content above 40% and with less than or equal to 70%
  • '4' # National goods from production following 'standard basic processes' as stablished by legislation (standard basic processes are devised to separate simple assembly from manufaturing processes)
  • '5' # National goods - 'Merchandise or goods with imported content equal or below 40%
  • '6' # Foreign goods - 'Directly imported by Seller, without a National Equivalent as listed by Comex and natural gas
  • '7' # Foreign goods - 'Acquired inside Brazil, without a National Equivalent as listed by Comex and natural gas
  • '8' # Merchandise or goods with imported content above 70%
string
cstB

Use to determined how the tax is applicable and calculated. It may define and exemption, a tax base reduction, identify that a special rate is applicable (not the rate itself).

  • '00' # Taxed in its totality
  • '10' # Taxed and subject to tax substitution (ICMS ST)
  • '20' # Taxed with Tax Base Reduction
  • '30' # Exempt /Not Taxed and subject to tax Substitution (ICMS#ST)
  • '40' # Tax Exempt
  • '41' # Not Taxed
  • '50' # Taxes Suspended
  • '51' # Taxes Diferred
  • '60' # ICMS Tax already collected through Substituition (ICMS ST)
  • '70' # Taxed with Tax Base Reduction and subject to Tax Subsititution (ICMS ST)
  • '90' # Others
string
cst
string
modBC
string
pMVA

Percent of Value-added margin (%)

number
pRedBC

calc base percent of discount

number
pBCOp

percent of calc base of own icms

number
ufst

State Abreviation:

  • 'AC'
  • 'AL'
  • 'AP'
  • 'AM'
  • 'BA'
  • 'CE'
  • 'DF'
  • 'ES'
  • 'GO'
  • 'MA'
  • 'MT'
  • 'MS'
  • 'MG'
  • 'PA'
  • 'PB'
  • 'PR'
  • 'PE'
  • 'PI'
  • 'RJ'
  • 'RN'
  • 'RS'
  • 'RO'
  • 'RR'
  • 'SC'
  • 'SP'
  • 'SE'
  • 'TO'
string
calcMode
string
legalTaxClass

Legal tax classificação for IPI (enquadramento tributário)

integer
legalTaxClassDC

Legal tax classificação for IPI (enquadramento) for Drinks and Cigarettes

integer
cnpjProd

CNPJ/CPF of Sales Buyer, if CPF pattern is '[0-9]{11}' if CNPJ pattern is '[0-9]{14}' Federal tax ID of real manufacturer, nly for exportation

string
sealCode

Seal Code for ipi tax control (código do selo para controle de IPI)

string
sealQuantity

Seal Code for ipi tax control (código do selo para controle de IPI)

string
icmsInterPartRate

percent of icms apportionment between two states

number
icmsSesonReason
  • '0' # NO ICMS TAX RELIEF
  • '1' # TAXI
  • '3' # AGRICULTURAL PRODUCTION
  • '4' # FLEET OWNERS
  • '5' # DIPLOMATIC MISSIONS
  • '6' # VEHICLE AND MOTORCICLE OF FREE ZONE AREA AND OCIDENTAL AMAZON
  • '7' # SUFRAMA
  • '8' # SALES TO GOVERNMENT
  • '9' # OTHERS
  • '10' # DISABLED PERSON DRIVER
  • '11' # DISABLED PERSON NOT DRIVER
string
perQuantityReturned

percent of merchandise returned

number

Response

Header
messageType
string
accountId
Required

This string is a UUID issued by Avalara to identify the Avalara account that owns the company identified by the companyCode on the next line.

string
companyCode
Required

string is a code maintained by the client application to uniquely identify the company for which this transaction is being recorded. It is unique within the context of an Account. It will be limited to 60 characters when creating a Company

string
documentCode

This string is a code maintained by the client application to uniquely identify a document in the client's systems. It will typically be an invoice number, sales order, receipt number, returned merchandise authorization number, etc. When has this field, the transaction will be stored

string
Participants
Entity
name

Entity name, official name (Razão Social)

string
role
  • 'transporter'
  • 'sender' # REMETENTE
  • 'dispatcher' # EXPEDITOR
  • 'receiver' # RECEIVER
  • 'addressee' # DESTINATÁRIO
  • 'other' # OUTRO
string
type
Required

Entity Type (business, individual, federal government, state government, city government foreign)

string
federalTaxId
Required

CNPJ/CPF of Sales Buyer, if CPF pattern is '[0-9]{11}' if CNPJ pattern is '[0-9]{14}'

string
cityTaxId

City Tax ID

string
stateTaxId

State Tax ID

string
suframa

Suframa ID

string
phone

Entity Phone

string
taxRegime
string
email

Entity Email

string
subjectToSRF1234

Companies subject to follow same rules of Government entities (Instrução Normativa: SRF1234)

boolean
icmsTaxPayer

Inform if the entity is ICMS tax payer.

boolean
Transporter
name

Entity name, official name (Razão Social)

string
role
  • 'transporter'
  • 'sender' # REMETENTE
  • 'dispatcher' # EXPEDITOR
  • 'receiver' # RECEIVER
  • 'addressee' # DESTINATÁRIO
  • 'other' # OUTRO
string
type
Required

Entity Type (business, individual, federal government, state government, city government foreign)

string
federalTaxId
Required

CNPJ/CPF of Sales Buyer, if CPF pattern is '[0-9]{11}' if CNPJ pattern is '[0-9]{14}'

string
cityTaxId

City Tax ID

string
stateTaxId

State Tax ID

string
suframa

Suframa ID

string
phone

Entity Phone

string
taxRegime
string
email

Entity Email

string
subjectToSRF1234

Companies subject to follow same rules of Government entities (Instrução Normativa: SRF1234)

boolean
icmsTaxPayer

Inform if the entity is ICMS tax payer.

boolean
nfAccessKey

This is the public NF id. With this number is possible get invoice information directly from government.

string
nfceQrCode

qr code printed on DANFE;

string
transactionType
Required

This string indicates the type of transaction for which tax should be calculated.

string
transactionModel
  • '01' # Nota Fiscal 1/1A
  • '1B' # Nota Fiscal Avulsa
  • '02' # Nota Fiscal de Venda a-Consumidor
  • '2D' # Cupom Fiscal
  • '2E' # Cupom Fiscal-Bilhete de Passagem
  • '04' # Nota Fiscal de Produtor
  • '06' # Nota Fiscal/Conta de Energia Elétrica
  • '07' # Nota Fiscal de Serviço de Transporte
  • '08' # Conhecimento de Transporte Rodoviário de-Cargas
  • '8B' # Conhecimento de Transporte de-Cargas Avulso
  • '09' # Conhecimento de Transporte Aquaviário de-Cargas
  • '10' # Conhecimento Aéreo
  • '11' # Conhecimento de Transporte Ferroviário de-Cargas
  • '13' # Bilhete de Passagem Rodoviário
  • '14' # Bilhete de Passagem Aquaviário
  • '15' # Bilhete de Passagem e-Nota de-Bagagem
  • '16' # Bilhete de Passagem Ferroviário
  • '18' # Resumo de Movimento Diário
  • '21' # Nota Fiscal de Serviço de-Comunicação
  • '22' # Nota Fiscal de Serviço de Telecomunicação
  • '26' # Conhecimento de Transporte Multimodal de-Cargas
  • '27' # Nota Fiscal De Transporte Ferroviário De-Carga
  • '28' # Nota Fiscal/Conta de Fornecimento de Gás-Canalizado
  • '29' # Nota Fiscal/Conta de Fornecimento de Água-Canalizada
  • '55' # Nota Fiscal Eletrônica (NF-e)
  • '57' # Conhecimento de Transporte Eletrônico (CT-e)
  • '59' # Cupom Fiscal Eletrônico (CF-e-SAT)
  • '60' # Cupom Fiscal Eletrônico (CF-e-ECF)
  • '65' # Nota Fiscal Eletrônica ao-Consumidor Final (NFC-e)
string
transactionClass

Natureza da Opreração - 'Describe kind of this transaction, summary

string
eDocCreatorType
Required
string
eDocCreatorPerspective

This Flag is used only when eDocCreatorType is other and the return show Taxes using eDocCreator perspective or self perspective.

boolean
entityCode

This string is a code maintained by the client application and recorded in CUP to uniquely identify the party with whom the company (identified by companyCode) is transacting. It is unique within the context of a Company.

string
currency

currency code

string
companyLocation
Required

This string contains a previously configured company code which may also have codes needed for tax return purposes. These codes are maintained through the customer portal. Main company address identity

string
transactionDate

This string is the transaction date in ISO 8601 format, create transaction date

string
shippingDate

This string is the transaction date in ISO 8601 format, when products were shipped, can be empty or absent

string
AdditionalInfo
fiscalInfo

Additional information of fiscal interest

string
complementaryInfo

Additional information of user interest

string
Array[ProcRef]
nProc

Process Identifier

string
indProc

Process Origin

  • '0' # SEFAZ;
  • '1' # Justiça Federal;
  • '2' # Justiça Estadual;
  • '3' # Secex/RFB;
  • '9' # Outros
string
tpImp

how the document will be printed

  • '0' # without DANFE;
  • '1' # DANFe Letter;
  • '2' # DANFe Landscape;
  • '3' # DANFe Simplified;
  • '4' # DANFe NFC-e;
  • '5' # DANFe NFC-e e-mail
string
idDest

This indicator inform transaction target place, when is AUTOMATIC the company address and entity address are analyzed to identify type of transaction target place 1- same state; 2 - interstate; 3-with exterior. Exist some cases where is necessary force this situation like when buyer from another state buy something in loco, the address are from different states, but transaction no. Identificador de Local de destino da operação, na opção AUTOMATIC endereços da Companhia e da entidade destino são analisados para saber se é uma operação dentro do mesmo estado, interestadual ou com o exterior. Há situações onde é necessário forçar este indicador como por exemplo Quando uma pessoa com endereço em outro estado, compra uma mercadoria de forma presencial, é uma operação interna apesar dos endereços dos envolvidos estarem em estados distintos.

  • 0 # AUTOMATIC - DEFAULT
  • 1 # Interna;
  • 2 # Interestadual;
  • 3 # Exterior)
integer
indPres

Presence indicator

  • '0' # Not applicable
  • '1' # Presential;
  • '2' # Remote, internet;
  • '3' # Remote, phone;
  • '4' # NFC-e home delivery;
  • '9' # Remote, others
string
invoiceNumber

Invoice number, sequential unique by invoice serial (Número da nota fiscal)

integer
invoiceSerial

Invoice number, sequential unique by invoice serial (Número da nota fiscal)

integer
DefaultLocations
Transport
modFreight
Required

Freight model

  • 0 - CIF,
  • 1 - FOB,
  • 2 - Thrid party,
  • 9 - Free shipping when 9 - Free shipping, the fields below will be ignored if present
  • 'transporter'
  • 'withholdICMSTransport'
  • 'volumes'
  • 'vehicle'
string
withholdICMSTransport

Forces witholding of ICMS on transport amount (freight)

boolean
Array[Volumes]
qVol

Quantity of packages transported

string
specie

package type

string
brand

brand

string
volumeNumeration

packages numeration

string
netWeight

net weight using Kg

number
grossWeight

gross weight using Kg

number
seal
Array[string]
Vehicle
type
string
Automobile
licensePlate
Required
string
stateCode
Required

State Abreviation:

  • 'AC'
  • 'AL'
  • 'AP'
  • 'AM'
  • 'BA'
  • 'CE'
  • 'DF'
  • 'ES'
  • 'GO'
  • 'MA'
  • 'MT'
  • 'MS'
  • 'MG'
  • 'PA'
  • 'PB'
  • 'PR'
  • 'PE'
  • 'PI'
  • 'RJ'
  • 'RN'
  • 'RS'
  • 'RO'
  • 'RR'
  • 'SC'
  • 'SP'
  • 'SE'
  • 'TO'
string
rtnc

Cargo Transport National Register, Registro Nacional de Transportador de Carga (ANTT)

string
Array[Trailer]
licensePlate
Required
string
stateCode
Required

State Abreviation:

  • 'AC'
  • 'AL'
  • 'AP'
  • 'AM'
  • 'BA'
  • 'CE'
  • 'DF'
  • 'ES'
  • 'GO'
  • 'MA'
  • 'MT'
  • 'MS'
  • 'MG'
  • 'PA'
  • 'PB'
  • 'PR'
  • 'PE'
  • 'PI'
  • 'RJ'
  • 'RN'
  • 'RS'
  • 'RO'
  • 'RR'
  • 'SC'
  • 'SP'
  • 'SE'
  • 'TO'
string
rtnc

Cargo Transport National Register, Registro Nacional de Transportador de Carga (ANTT)

string
wagon
string
ferry

Ferry

string
Array[NfRef]
type
string
refNFe
string
refCTe
string
RefECF
nECF
Required

ECF Sequential number that generated Cupom attached to NFe informar o número de ordem seqüencial do ECF que emitiu o Cupom Fiscal vinculado à NF-e

string
nCOO
Required

Operational counter number attached to NFe Informar o Número do Contador de Ordem de Operação - COO vinculado à NF-e

string
modECF
Required

Fiscal document model

  • '2B' # coupon tax not ECF
  • '2C' # PDV coupon tax
  • '2D' # ECF coupon tax
string
RefNF
stateCd
Required

State code of fiscal Document creator

string
yymm
Required

year and month of fiscal document creation

string
federalTaxId
Required

fiscal document creator federalTaxId

string
serie
Required

fiscal document serie

string
number
Required

fiscal document number

string
RefFarmerNF
stateCd
Required

State code of fiscal Document creator, farmer

string
yymm
Required

year and month of fiscal document creation

string
federalTaxId
Required

fiscal document creator farmer federalTaxId

string
stateTaxId
Required

fiscal document creator, farmer stateTaxId

string
model
Required

Document Fiscal model

  • '04' # FARMER DOCUMENT
  • '01' # DETACHED DOCUMENT - AVULSO
string
serie
Required

fiscal document serie

string
number
Required

fiscal document number

string
Payment
installmentsTerms

Installment terms

  • 0 # cash
  • 1 # on terms
  • 2 # other
integer
Bill
nFat

Bill identifier

string
vOrig

Orignal value

number
vDiscount

Discount

number
vNet

Net value

number
Array[Installment]
documentNumber

Instalment number identifier

string
date

Installment expiration date

string
grossValue
Required

Installment value

number
Array[PaymentMode]
mode
Required

Payment mode

  • '01' # Dinheiro
  • '02' # Cheque
  • '03' # Cartão de Crédito
  • '04' # Cartão de Débito
  • '05' # Crédito Loja
  • '10' # Vale Alimentação
  • '11' # Vale Refeição
  • '12' # Vale Presente
  • '13' # Vale Combustível
  • '99' # Outros
string
value
Required

payment value

number
cardTpIntegration
  • '1' # Payment integrated with system,
  • '2' # Payment not integrated with system
string
cardCNPJ

Federal tax id of accrediting card (credenciadora do cartão)

string
cardBrand

card brand

  • '01' # Visa
  • '02' # Mastercard
  • '03' # American Express
  • '04' # Sorocred
  • '99' # Other
string
cardAuthorization

transaction authorization number

string
PurchaseInfo
governmentOrder

Invoice info for government purchase orders Informação da Nota de Empenho de compras públicas

string
orderNumber

Order info Informação do pedido

string
contractNumber

Agreement info Informação do contrato

string
Export
shippingState
Required

shipping state

string
place
Required

shipping place

string
placeDescription

description of shipping place

string
Array[Lines]
lineCode
Required

This string is a unique identifier for this line in the transaction

integer
itemCode
Required

This string is a code maintained by the client application to uniquely identify a product or service. It will likely be a SKU and is required for SST states.

string
avalaraGoodsAndServicesType

AGAST CODE for itemCode

string
numberOfItems
Required

This decimal 11 integers and 1 to 4 decimals captures the number of individual items or units represented by this line. Digits after the decimal point are optional. This should always be positive. Quantity, default 1

number
returnedPercentageAmount

when is return operation this field inform the percentage of returned itens. This decimal max 3 integers and 2 decimals, v >=0.00 and v <= 100.00

number
lineUnitPrice

This decimal 11 integers and 1 to 10 decimals captures the unit price of this line.

number
lineAmount
Required

In its simplest form lineAmount = (item price * numberOfItems). If taxIncluded is 'true', lineAmount = (item price * numberOfItems + tax).

number
itemDescription
Required

This string captures the description of the item represented by this line, will be used LC 116

string
lineTaxedDiscount

Discount conditional, This decimal 13 integers and 0 to 2 decimals

number
lineUntaxedDiscount

discount unconditional, This decimal 13 integers and 0 to 2 decimals

number
useType
Required

This is a enumeration folowing table

string
processScenario
Required

Reference to process configurantion of this transaction, See ProcessScenario definition

string
cfop

Fiscal Operation Code of transport service

integer
hasStockImpact

return if this transaction has stock impact for this process or CFOP

boolean
hasFinantialImpact

return if this transaction has finantial impact for this process or CFOP

boolean
freightAmount

This decimal 13 integers and 0 to 2 decimals

number
insuranceAmount

This decimal 13 integers and 0 to 2 decimals

number
otherCostAmount

This decimal 13 integers and 0 to 2 decimals

number
indTotType

The item value will compose the invoice total value.

boolean
orderNumber

order number, information used for B2B control process

string
orderItemNumber

number of the item from order number, information used for B2B control process

string
fciNumber

Gloal Unique identifier (Importation form)

string
recopiNumber

RECOPI number

string
infAdProd

additional information about product (referenced standard, complementary info, etc)

string
Vehicle
tpOp
Required
  • 1 # Sales by car dealership
  • 2 # Direct billing
  • 3 # Direct sales
  • 0 # Other
integer
chassisNumber
Required
string
colorCode
Required

color code used by factory

string
colorName
Required

color name

string
cvPower
Required

Power using CV unid

string
cylinderVolumCC
Required

engine size in cubic centimeters

string
netWeight
Required

net weight

string
grossWeight
Required

gross weight

string
serialNumber
Required

serie

string
fuelType
Required
  • '01' # Alcohol
  • '02' # Gas
  • '03' # Diesel
  • '16' # Alcohol/Gas
  • '17' # Gas/Alcohol/GNV
  • '18' # Gas/Electric
string
engineNumber
Required

engine number

string
cmt
Required

traction capacity, tonne

string
lengthBetweenAxis
Required

length between axis

string
modelYear
Required

model year

string
manufactoryYear
Required

year of factory

string
paintType
Required

paynt type

string
vehicleRENAVAMType
Required
string
specieRENAVAMType
Required
string
modelRENAVAMCode
Required
string
colorDENATRANCode
Required
  • '01' # YELLOW
  • '02' # BLUE
  • '03' # BEIGE
  • '04' # WHITE
  • '05' # GRAY
  • '06' # GOLDEN
  • '07' # GRENA
  • '08' # ORANGE
  • '09' # BROWN
  • '10' # SILVER
  • '11' # BLACK
  • '12' # PINK
  • '13' # PURPLE
  • '14' # GREEN
  • '15' # RED
  • '16' # FANTASY
string
vin
Required

chassis condition original or modified (remarcado)

string
vehicleManufactoryStatus
Required
  • '1' # Finished(Done)
  • '2' # Not finished
  • '3' # Semi-finished
string
maxOccupantsQuantity
Required

max number of sit occupants

string
restrictionType
Required

Lien/restriction type

  • '0' # No one;
  • '1' # Alienação Fiduciária;
  • '2' # Arrendamento Mercantil;
  • '3' # Reserva de Domínio;
  • '4' # Penhor de Veículos;
  • '9' # Other.
string
Medicine
loteNumber
Required
string
loteQuantity
Required

This is a decimal type with 11 digits including 3 decimal positions.

number
manufactotyDate
Required
string
expirationDate
Required
string
maxValueToEndUser
Required

This is a decimal type with 15 digits including 2 decimal positions. Max value to end user.

number
Weapon
weaponRestrictionType
Required
  • '0' # restrict use
  • '1' # public use
string
serieNumber
Required
string
gunBarrelSerieNumber
Required

Barrel's serial number. Número de série do cano

string
weaponDescription
Required

weapon description

string
Fuel
prodANPCode
Required
string
perMixGN

percentage of natural gas (GLP)

number
authorizationCodeCODIF
string
quantityOnRoomTemperature

This decimal 12 integers and 0 to 4 decimals Quantidade de combustível faturada à temperatura ambiente. Informar quando a quantidade faturada informada no campo qCom (I10) tiver sido ajustada para uma temperatura diferente da ambiente.

number
stateCodeOfUndUser
Required

state where fuel was used

string
Cide
baseCalcCIDE
Required

percentage of natural gas (GLP), this decimal 12 integers and 0 to 4 decimals

number
rateCIDE
Required

percentage of natural gas (GLP), this decimal 11 integers and 0 to 4 decimals - R$

number
valueCIDE
Required

percentage of natural gas (GLP), this decimal 13 integers and 2 decimals - R$

number
PumpNumber
nozzleNumberFuelSupply
Required

Identification number of nozzle used in the dispensing process.
Numero de identificação do Bico utilizado no abastecimento

string
fuelPumpNumber
Required

Identification number of the Pump connect to the used nozzle.
Numero de identificação da bomba ao qual o bico está interligado

string
fuelTankNumber
Required

Identification number of the Pump connect to the used nozzle.
Numero de identificação da bomba ao qual o bico está interligado

string
startValueOfPumpNumber
Required

Valor do Encerrante no ínicio do abastecimento. Reading of auto-counter (encerrante) at the start of the refueling/dispensing. This decimal 12 integers and 3 decimals - R$

number
endValueOfPumpNumber
Required

Valor do Encerrante no final do abastecimento. Reading of auto-counter (encerrante) at the end of the refueling/dispensing. This decimal 12 integers and 3 decimals - R$

number
entityIsIcmsSubstitute

Inform that for this item the Entity referenced is ICMS Substitute

boolean
isTransportIcmsWithheld

Inform that this item has ICMS withheld for transport value service.

boolean
IcmsTaxRelief
reasonCode
Required

When item transaction subject to desoneration, this is the reason code

  • '1' # Táxi;
  • '3' # Produtor Agropecuário;
  • '4' # Frotista/Locadora;
  • '5' # Diplomático/Consular;
  • '6' # Utilitários e Motocicletas da Amazônia Ocidental e Áreas de Livre Comércio (Resolução 714/88 e 790/94 – CONTRAN e suas alterações);
  • '7' # SUFRAMA;
  • '8' # Venda a órgão Público;
  • '9' # Outros
  • '10' # Deficiente Condutor
  • '11' # Deficiente não condutor
  • '12' # Fomento agropecuário
  • '16' # Olimpíadas Rio 2016
string
taxBaseDiscount

ICMS Tax base rate discount (desconto na base do ICMS referetne a desoneração)

number
taxAmount

Amount for Icms Relief (desoneração)

number
Array[Export]
drawbackNumber
string
IndExport
registerNumber
Required

Exportation register number

string
accessKey
Required

invoice access key received to export

string
quantity
Required

This decimal 11 integers and 0 to 4 decimals, quantity exported in real

number
Array[Di]
customsValue

customs value, valor aduaneiro (II Block of NFe)

number
diNumber
Required

Import declaration number, DI/DSI/DA/DRI-E (DI/DSI/DA/DRI-E)

string
registerDateDI
Required

Register date of import declaration number, DI/DSI/DA/DRI-E (DI/DSI/DA/DRI-E)

string
clearanceSite
Required

Clerance Site Local do desembaraço aduaneiro

string
clearanceState
Required

Clerance Site State Estado onde ocorrreu o desembaraço aduaneiro

string
clearanceDate

Clerance date

string
transportDIType
Required
  • '1' # Maritima
  • '2' # Fluvial
  • '3' # Lacustre
  • '4' # Aerea
  • '5' # Postal
  • '6' # Ferroviaria
  • '7' # Rodoviaria
  • '8' # Conduto
  • '9' # Meios Proprios
  • '10' # Entrada/Saida Ficta
string
afrmmValue

Aditional amount to freight to renew merchant marine, This decimal 13 integers and 2 decimals [Valor Adicional ao frete para renovação de marinha mercante]

number
intermediateType
Required
  • '1' # On One's Own [1-por conta propria]
  • '2' # On Behalf And Order [2-por conta e ordem]
  • '3' # Order [3-encomenda]
string
buyerFederalTaxID

Buyer federal tax id CNPJ do comprador ou encomendante

string
buyerState

Buyer sate Estado do comprador ou encomendante

string
exporterCode

Exporter code

string
Array[Adi]
addNumber
Required

aditional sequence number (1 to 100)

integer
sequentialNumber
Required

sequential item number for this adi, sequence number (1 to 999)

integer
manufacturerCode
Required

Manufatorer erp internal code

string
adiDiscount

This decimal 13 integers and 2 decimals, aditional adi discount

number
drawbackNumber

Drawback number

string
CalculatedTax
TaxByType
Icms
tax
Required

Tax value, negative value for withhold value

number
IcmsSt
tax
Required

Tax value, negative value for withhold value

number
IcmsStSd
tax
Required

Tax value, negative value for withhold value

number
IcmsPartOwn
tax
Required

Tax value, negative value for withhold value

number
IcmsPartDest
tax
Required

Tax value, negative value for withhold value

number
IcmsDifaFCP
tax
Required

Tax value, negative value for withhold value

number
IcmsDifaDest
tax
Required

Tax value, negative value for withhold value

number
IcmsDifaRemet
tax
Required

Tax value, negative value for withhold value

number
IcmsRf
tax
Required

Tax value, negative value for withhold value

number
IcmsDeson
tax
Required

Tax value, negative value for withhold value

number
IcmsCredsn
tax
Required

Tax value, negative value for withhold value

number
Pis
tax
Required

Tax value, negative value for withhold value

number
PisSt
tax
Required

Tax value, negative value for withhold value

number
Cofins
tax
Required

Tax value, negative value for withhold value

number
CofinsSt
tax
Required

Tax value, negative value for withhold value

number
Ipi
tax
Required

Tax value, negative value for withhold value

number
IpiReturned
tax
Required

Tax value, negative value for withhold value

number
Ii
tax
Required

Tax value, negative value for withhold value

number
Iof
tax
Required

Tax value, negative value for withhold value

number
AproxtribState
tax
Required

Tax value, negative value for withhold value

number
AproxtribFed
tax
Required

Tax value, negative value for withhold value

number
tax
number
Array[Details]
locationType

This string captures the applicable location type. Location used for calc. Buyer or Seller

string
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
taxType

Tax identificator

string
rateType

Name of configuration rate

string
scenario

This string captures the transaction scenario used to calculate the tax for this tax type. Scenarios are specific to the tax type. This field provides information about how the tax engine interpreted the transaction information that was passed in.

string
subtotalTaxable

This decimal captures how much of the lineAmount was taxable by this tax, calc base

number
rate

This decimal captures the tax rate for this tax.3.00 (3%)

number
tax

This decimal captures how much of the lineAmount was taxable by this tax

number
exemptionCode

This string is required if is exempt

string
significantLocations
Array[string]
taxRuleType

This string with type of rule

string
source

Source of product or merchandise,

  • '0' # National goods - 'except those treated in codes 3,4, 5 and 8
  • '1' # Imported directly by seller, except those in code 6
  • '2' # Foreign goods - 'Acquired in the internal market (inside Brazil), except those in code 7
  • '3' # Merchandise or goods with imported content above 40% and with less than or equal to 70%
  • '4' # National goods from production following 'standard basic processes' as stablished by legislation (standard basic processes are devised to separate simple assembly from manufaturing processes)
  • '5' # National goods - 'Merchandise or goods with imported content equal or below 40%
  • '6' # Foreign goods - 'Directly imported by Seller, without a National Equivalent as listed by Comex and natural gas
  • '7' # Foreign goods - 'Acquired inside Brazil, without a National Equivalent as listed by Comex and natural gas
  • '8' # Merchandise or goods with imported content above 70%
string
cstB

Use to determined how the tax is applicable and calculated. It may define and exemption, a tax base reduction, identify that a special rate is applicable (not the rate itself).

  • '00' # Taxed in its totality
  • '10' # Taxed and subject to tax substitution (ICMS ST)
  • '20' # Taxed with Tax Base Reduction
  • '30' # Exempt /Not Taxed and subject to tax Substitution (ICMS#ST)
  • '40' # Tax Exempt
  • '41' # Not Taxed
  • '50' # Taxes Suspended
  • '51' # Taxes Diferred
  • '60' # ICMS Tax already collected through Substituition (ICMS ST)
  • '70' # Taxed with Tax Base Reduction and subject to Tax Subsititution (ICMS ST)
  • '90' # Others
string
cst
string
modBC
string
pMVA

Percent of Value-added margin (%)

number
pRedBC

calc base percent of discount

number
pBCOp

percent of calc base of own icms

number
ufst

State Abreviation:

  • 'AC'
  • 'AL'
  • 'AP'
  • 'AM'
  • 'BA'
  • 'CE'
  • 'DF'
  • 'ES'
  • 'GO'
  • 'MA'
  • 'MT'
  • 'MS'
  • 'MG'
  • 'PA'
  • 'PB'
  • 'PR'
  • 'PE'
  • 'PI'
  • 'RJ'
  • 'RN'
  • 'RS'
  • 'RO'
  • 'RR'
  • 'SC'
  • 'SP'
  • 'SE'
  • 'TO'
string
calcMode
string
legalTaxClass

Legal tax classificação for IPI (enquadramento tributário)

integer
legalTaxClassDC

Legal tax classificação for IPI (enquadramento) for Drinks and Cigarettes

integer
cnpjProd

CNPJ/CPF of Sales Buyer, if CPF pattern is '[0-9]{11}' if CNPJ pattern is '[0-9]{14}' Federal tax ID of real manufacturer, nly for exportation

string
sealCode

Seal Code for ipi tax control (código do selo para controle de IPI)

string
sealQuantity

Seal Code for ipi tax control (código do selo para controle de IPI)

string
icmsInterPartRate

percent of icms apportionment between two states

number
icmsSesonReason
  • '0' # NO ICMS TAX RELIEF
  • '1' # TAXI
  • '3' # AGRICULTURAL PRODUCTION
  • '4' # FLEET OWNERS
  • '5' # DIPLOMATIC MISSIONS
  • '6' # VEHICLE AND MOTORCICLE OF FREE ZONE AREA AND OCIDENTAL AMAZON
  • '7' # SUFRAMA
  • '8' # SALES TO GOVERNMENT
  • '9' # OTHERS
  • '10' # DISABLED PERSON DRIVER
  • '11' # DISABLED PERSON NOT DRIVER
string
perQuantityReturned

percent of merchandise returned

number
CalculatedTaxSummary
numberOfLines

Count of lines

integer
taxedDiscount

sum of all line taxed discounts

number
untaxedDiscount

sum of all line untaxed discounts

number
subtotal

sum of all line lineAmount attribute

number
totalTax

sum of all line tax attribute

number
grandTotal

sum of all line lineAmount attribute + sum of all line tax attribute not VAT - sum of all line lineTaxedDiscount attribute

number
TaxByType
Icms
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
IcmsSt
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
IcmsStSd
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
IcmsPartOwn
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
IcmsPartDest
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
IcmsDifaFCP
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
IcmsDifaDest
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
IcmsDifaRemet
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
IcmsRf
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
IcmsDeson
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
IcmsCredsn
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
Pis
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
PisSt
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
Cofins
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
CofinsSt
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
Ipi
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
IpiReturned
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
Ii
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
Iof
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
AproxtribState
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
AproxtribFed
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
ProcessingInfo
versionId
string
duration
number

Transaction Method

This method has more then one operation model, (a) AS IS, the system only stores the transaction; (b) Full Calculation, the system calculates taxes, validates fileds, stores with transaction state, but doesn't try get government authorization; (c) Full Sync, the system calculates taxes, validates fileds, gets government authorization, stores with transaction state when authorized, used for NFCe.

Api Endpoint
POST http://avataxbr-sandbox.avalarabrasil.com.br/v2/transactions?goods-purchase

Post Body Parameters

Header
messageType
string
accountId
Required

This string is a UUID issued by Avalara to identify the Avalara account that owns the company identified by the companyCode on the next line.

string
companyCode
Required

string is a code maintained by the client application to uniquely identify the company for which this transaction is being recorded. It is unique within the context of an Account. It will be limited to 60 characters when creating a Company

string
documentCode

This string is a code maintained by the client application to uniquely identify a document in the client's systems. It will typically be an invoice number, sales order, receipt number, returned merchandise authorization number, etc. When has this field, the transaction will be stored

string
Participants
Entity
name

Entity name, official name (Razão Social)

string
role
  • 'transporter'
  • 'sender' # REMETENTE
  • 'dispatcher' # EXPEDITOR
  • 'receiver' # RECEIVER
  • 'addressee' # DESTINATÁRIO
  • 'other' # OUTRO
string
type
Required

Entity Type (business, individual, federal government, state government, city government foreign)

string
federalTaxId
Required

CNPJ/CPF of Sales Buyer, if CPF pattern is '[0-9]{11}' if CNPJ pattern is '[0-9]{14}'

string
cityTaxId

City Tax ID

string
stateTaxId

State Tax ID

string
suframa

Suframa ID

string
phone

Entity Phone

string
taxRegime
string
email

Entity Email

string
subjectToSRF1234

Companies subject to follow same rules of Government entities (Instrução Normativa: SRF1234)

boolean
icmsTaxPayer

Inform if the entity is ICMS tax payer.

boolean
Transporter
name

Entity name, official name (Razão Social)

string
role
  • 'transporter'
  • 'sender' # REMETENTE
  • 'dispatcher' # EXPEDITOR
  • 'receiver' # RECEIVER
  • 'addressee' # DESTINATÁRIO
  • 'other' # OUTRO
string
type
Required

Entity Type (business, individual, federal government, state government, city government foreign)

string
federalTaxId
Required

CNPJ/CPF of Sales Buyer, if CPF pattern is '[0-9]{11}' if CNPJ pattern is '[0-9]{14}'

string
cityTaxId

City Tax ID

string
stateTaxId

State Tax ID

string
suframa

Suframa ID

string
phone

Entity Phone

string
taxRegime
string
email

Entity Email

string
subjectToSRF1234

Companies subject to follow same rules of Government entities (Instrução Normativa: SRF1234)

boolean
icmsTaxPayer

Inform if the entity is ICMS tax payer.

boolean
nfAccessKey

This is the public NF id. With this number is possible get invoice information directly from government.

string
nfceQrCode

qr code printed on DANFE;

string
transactionType
Required

This string indicates the type of transaction for which tax should be calculated.

string
transactionModel
  • '01' # Nota Fiscal 1/1A
  • '1B' # Nota Fiscal Avulsa
  • '02' # Nota Fiscal de Venda a-Consumidor
  • '2D' # Cupom Fiscal
  • '2E' # Cupom Fiscal-Bilhete de Passagem
  • '04' # Nota Fiscal de Produtor
  • '06' # Nota Fiscal/Conta de Energia Elétrica
  • '07' # Nota Fiscal de Serviço de Transporte
  • '08' # Conhecimento de Transporte Rodoviário de-Cargas
  • '8B' # Conhecimento de Transporte de-Cargas Avulso
  • '09' # Conhecimento de Transporte Aquaviário de-Cargas
  • '10' # Conhecimento Aéreo
  • '11' # Conhecimento de Transporte Ferroviário de-Cargas
  • '13' # Bilhete de Passagem Rodoviário
  • '14' # Bilhete de Passagem Aquaviário
  • '15' # Bilhete de Passagem e-Nota de-Bagagem
  • '16' # Bilhete de Passagem Ferroviário
  • '18' # Resumo de Movimento Diário
  • '21' # Nota Fiscal de Serviço de-Comunicação
  • '22' # Nota Fiscal de Serviço de Telecomunicação
  • '26' # Conhecimento de Transporte Multimodal de-Cargas
  • '27' # Nota Fiscal De Transporte Ferroviário De-Carga
  • '28' # Nota Fiscal/Conta de Fornecimento de Gás-Canalizado
  • '29' # Nota Fiscal/Conta de Fornecimento de Água-Canalizada
  • '55' # Nota Fiscal Eletrônica (NF-e)
  • '57' # Conhecimento de Transporte Eletrônico (CT-e)
  • '59' # Cupom Fiscal Eletrônico (CF-e-SAT)
  • '60' # Cupom Fiscal Eletrônico (CF-e-ECF)
  • '65' # Nota Fiscal Eletrônica ao-Consumidor Final (NFC-e)
string
transactionClass

Natureza da Opreração - 'Describe kind of this transaction, summary

string
eDocCreatorType
Required
string
eDocCreatorPerspective

This Flag is used only when eDocCreatorType is other and the return show Taxes using eDocCreator perspective or self perspective.

boolean
entityCode

This string is a code maintained by the client application and recorded in CUP to uniquely identify the party with whom the company (identified by companyCode) is transacting. It is unique within the context of a Company.

string
currency

currency code

string
companyLocation
Required

This string contains a previously configured company code which may also have codes needed for tax return purposes. These codes are maintained through the customer portal. Main company address identity

string
transactionDate

This string is the transaction date in ISO 8601 format, create transaction date

string
shippingDate

This string is the transaction date in ISO 8601 format, when products were shipped, can be empty or absent

string
AdditionalInfo
fiscalInfo

Additional information of fiscal interest

string
complementaryInfo

Additional information of user interest

string
Array[ProcRef]
nProc

Process Identifier

string
indProc

Process Origin

  • '0' # SEFAZ;
  • '1' # Justiça Federal;
  • '2' # Justiça Estadual;
  • '3' # Secex/RFB;
  • '9' # Outros
string
tpImp

how the document will be printed

  • '0' # without DANFE;
  • '1' # DANFe Letter;
  • '2' # DANFe Landscape;
  • '3' # DANFe Simplified;
  • '4' # DANFe NFC-e;
  • '5' # DANFe NFC-e e-mail
string
idDest

This indicator inform transaction target place, when is AUTOMATIC the company address and entity address are analyzed to identify type of transaction target place 1- same state; 2 - interstate; 3-with exterior. Exist some cases where is necessary force this situation like when buyer from another state buy something in loco, the address are from different states, but transaction no. Identificador de Local de destino da operação, na opção AUTOMATIC endereços da Companhia e da entidade destino são analisados para saber se é uma operação dentro do mesmo estado, interestadual ou com o exterior. Há situações onde é necessário forçar este indicador como por exemplo Quando uma pessoa com endereço em outro estado, compra uma mercadoria de forma presencial, é uma operação interna apesar dos endereços dos envolvidos estarem em estados distintos.

  • 0 # AUTOMATIC - DEFAULT
  • 1 # Interna;
  • 2 # Interestadual;
  • 3 # Exterior)
integer
indPres

Presence indicator

  • '0' # Not applicable
  • '1' # Presential;
  • '2' # Remote, internet;
  • '3' # Remote, phone;
  • '4' # NFC-e home delivery;
  • '9' # Remote, others
string
invoiceNumber

Invoice number, sequential unique by invoice serial (Número da nota fiscal)

integer
invoiceSerial

Invoice number, sequential unique by invoice serial (Número da nota fiscal)

integer
DefaultLocations
Transport
modFreight
Required

Freight model

  • 0 - CIF,
  • 1 - FOB,
  • 2 - Thrid party,
  • 9 - Free shipping when 9 - Free shipping, the fields below will be ignored if present
  • 'transporter'
  • 'withholdICMSTransport'
  • 'volumes'
  • 'vehicle'
string
withholdICMSTransport

Forces witholding of ICMS on transport amount (freight)

boolean
Array[Volumes]
qVol

Quantity of packages transported

string
specie

package type

string
brand

brand

string
volumeNumeration

packages numeration

string
netWeight

net weight using Kg

number
grossWeight

gross weight using Kg

number
seal
Array[string]
Vehicle
type
string
Automobile
licensePlate
Required
string
stateCode
Required

State Abreviation:

  • 'AC'
  • 'AL'
  • 'AP'
  • 'AM'
  • 'BA'
  • 'CE'
  • 'DF'
  • 'ES'
  • 'GO'
  • 'MA'
  • 'MT'
  • 'MS'
  • 'MG'
  • 'PA'
  • 'PB'
  • 'PR'
  • 'PE'
  • 'PI'
  • 'RJ'
  • 'RN'
  • 'RS'
  • 'RO'
  • 'RR'
  • 'SC'
  • 'SP'
  • 'SE'
  • 'TO'
string
rtnc

Cargo Transport National Register, Registro Nacional de Transportador de Carga (ANTT)

string
Array[Trailer]
licensePlate
Required
string
stateCode
Required

State Abreviation:

  • 'AC'
  • 'AL'
  • 'AP'
  • 'AM'
  • 'BA'
  • 'CE'
  • 'DF'
  • 'ES'
  • 'GO'
  • 'MA'
  • 'MT'
  • 'MS'
  • 'MG'
  • 'PA'
  • 'PB'
  • 'PR'
  • 'PE'
  • 'PI'
  • 'RJ'
  • 'RN'
  • 'RS'
  • 'RO'
  • 'RR'
  • 'SC'
  • 'SP'
  • 'SE'
  • 'TO'
string
rtnc

Cargo Transport National Register, Registro Nacional de Transportador de Carga (ANTT)

string
wagon
string
ferry

Ferry

string
Array[NfRef]
type
string
refNFe
string
refCTe
string
RefECF
nECF
Required

ECF Sequential number that generated Cupom attached to NFe informar o número de ordem seqüencial do ECF que emitiu o Cupom Fiscal vinculado à NF-e

string
nCOO
Required

Operational counter number attached to NFe Informar o Número do Contador de Ordem de Operação - COO vinculado à NF-e

string
modECF
Required

Fiscal document model

  • '2B' # coupon tax not ECF
  • '2C' # PDV coupon tax
  • '2D' # ECF coupon tax
string
RefNF
stateCd
Required

State code of fiscal Document creator

string
yymm
Required

year and month of fiscal document creation

string
federalTaxId
Required

fiscal document creator federalTaxId

string
serie
Required

fiscal document serie

string
number
Required

fiscal document number

string
RefFarmerNF
stateCd
Required

State code of fiscal Document creator, farmer

string
yymm
Required

year and month of fiscal document creation

string
federalTaxId
Required

fiscal document creator farmer federalTaxId

string
stateTaxId
Required

fiscal document creator, farmer stateTaxId

string
model
Required

Document Fiscal model

  • '04' # FARMER DOCUMENT
  • '01' # DETACHED DOCUMENT - AVULSO
string
serie
Required

fiscal document serie

string
number
Required

fiscal document number

string
Payment
installmentsTerms

Installment terms

  • 0 # cash
  • 1 # on terms
  • 2 # other
integer
Bill
nFat

Bill identifier

string
vOrig

Orignal value

number
vDiscount

Discount

number
vNet

Net value

number
Array[Installment]
documentNumber

Instalment number identifier

string
date

Installment expiration date

string
grossValue
Required

Installment value

number
Array[PaymentMode]
mode
Required

Payment mode

  • '01' # Dinheiro
  • '02' # Cheque
  • '03' # Cartão de Crédito
  • '04' # Cartão de Débito
  • '05' # Crédito Loja
  • '10' # Vale Alimentação
  • '11' # Vale Refeição
  • '12' # Vale Presente
  • '13' # Vale Combustível
  • '99' # Outros
string
value
Required

payment value

number
cardTpIntegration
  • '1' # Payment integrated with system,
  • '2' # Payment not integrated with system
string
cardCNPJ

Federal tax id of accrediting card (credenciadora do cartão)

string
cardBrand

card brand

  • '01' # Visa
  • '02' # Mastercard
  • '03' # American Express
  • '04' # Sorocred
  • '99' # Other
string
cardAuthorization

transaction authorization number

string
PurchaseInfo
governmentOrder

Invoice info for government purchase orders Informação da Nota de Empenho de compras públicas

string
orderNumber

Order info Informação do pedido

string
contractNumber

Agreement info Informação do contrato

string
Export
shippingState
Required

shipping state

string
place
Required

shipping place

string
placeDescription

description of shipping place

string
Array[Lines]
lineCode
Required

This string is a unique identifier for this line in the transaction

integer
itemCode
Required

This string is a code maintained by the client application to uniquely identify a product or service. It will likely be a SKU and is required for SST states.

string
avalaraGoodsAndServicesType

AGAST CODE for itemCode

string
numberOfItems
Required

This decimal 11 integers and 1 to 4 decimals captures the number of individual items or units represented by this line. Digits after the decimal point are optional. This should always be positive. Quantity, default 1

number
returnedPercentageAmount

when is return operation this field inform the percentage of returned itens. This decimal max 3 integers and 2 decimals, v >=0.00 and v <= 100.00

number
lineUnitPrice

This decimal 11 integers and 1 to 10 decimals captures the unit price of this line.

number
lineAmount
Required

In its simplest form lineAmount = (item price * numberOfItems). If taxIncluded is 'true', lineAmount = (item price * numberOfItems + tax).

number
itemDescription
Required

This string captures the description of the item represented by this line, will be used LC 116

string
lineTaxedDiscount

Discount conditional, This decimal 13 integers and 0 to 2 decimals

number
lineUntaxedDiscount

discount unconditional, This decimal 13 integers and 0 to 2 decimals

number
useType
Required

This is a enumeration folowing table

string
processScenario
Required

Reference to process configurantion of this transaction, See ProcessScenario definition

string
cfop

Fiscal Operation Code of transport service

integer
hasStockImpact

return if this transaction has stock impact for this process or CFOP

boolean
hasFinantialImpact

return if this transaction has finantial impact for this process or CFOP

boolean
freightAmount

This decimal 13 integers and 0 to 2 decimals

number
insuranceAmount

This decimal 13 integers and 0 to 2 decimals

number
otherCostAmount

This decimal 13 integers and 0 to 2 decimals

number
indTotType

The item value will compose the invoice total value.

boolean
orderNumber

order number, information used for B2B control process

string
orderItemNumber

number of the item from order number, information used for B2B control process

string
fciNumber

Gloal Unique identifier (Importation form)

string
recopiNumber

RECOPI number

string
infAdProd

additional information about product (referenced standard, complementary info, etc)

string
Vehicle
tpOp
Required
  • 1 # Sales by car dealership
  • 2 # Direct billing
  • 3 # Direct sales
  • 0 # Other
integer
chassisNumber
Required
string
colorCode
Required

color code used by factory

string
colorName
Required

color name

string
cvPower
Required

Power using CV unid

string
cylinderVolumCC
Required

engine size in cubic centimeters

string
netWeight
Required

net weight

string
grossWeight
Required

gross weight

string
serialNumber
Required

serie

string
fuelType
Required
  • '01' # Alcohol
  • '02' # Gas
  • '03' # Diesel
  • '16' # Alcohol/Gas
  • '17' # Gas/Alcohol/GNV
  • '18' # Gas/Electric
string
engineNumber
Required

engine number

string
cmt
Required

traction capacity, tonne

string
lengthBetweenAxis
Required

length between axis

string
modelYear
Required

model year

string
manufactoryYear
Required

year of factory

string
paintType
Required

paynt type

string
vehicleRENAVAMType
Required
string
specieRENAVAMType
Required
string
modelRENAVAMCode
Required
string
colorDENATRANCode
Required
  • '01' # YELLOW
  • '02' # BLUE
  • '03' # BEIGE
  • '04' # WHITE
  • '05' # GRAY
  • '06' # GOLDEN
  • '07' # GRENA
  • '08' # ORANGE
  • '09' # BROWN
  • '10' # SILVER
  • '11' # BLACK
  • '12' # PINK
  • '13' # PURPLE
  • '14' # GREEN
  • '15' # RED
  • '16' # FANTASY
string
vin
Required

chassis condition original or modified (remarcado)

string
vehicleManufactoryStatus
Required
  • '1' # Finished(Done)
  • '2' # Not finished
  • '3' # Semi-finished
string
maxOccupantsQuantity
Required

max number of sit occupants

string
restrictionType
Required

Lien/restriction type

  • '0' # No one;
  • '1' # Alienação Fiduciária;
  • '2' # Arrendamento Mercantil;
  • '3' # Reserva de Domínio;
  • '4' # Penhor de Veículos;
  • '9' # Other.
string
Medicine
loteNumber
Required
string
loteQuantity
Required

This is a decimal type with 11 digits including 3 decimal positions.

number
manufactotyDate
Required
string
expirationDate
Required
string
maxValueToEndUser
Required

This is a decimal type with 15 digits including 2 decimal positions. Max value to end user.

number
Weapon
weaponRestrictionType
Required
  • '0' # restrict use
  • '1' # public use
string
serieNumber
Required
string
gunBarrelSerieNumber
Required

Barrel's serial number. Número de série do cano

string
weaponDescription
Required

weapon description

string
Fuel
prodANPCode
Required
string
perMixGN

percentage of natural gas (GLP)

number
authorizationCodeCODIF
string
quantityOnRoomTemperature

This decimal 12 integers and 0 to 4 decimals Quantidade de combustível faturada à temperatura ambiente. Informar quando a quantidade faturada informada no campo qCom (I10) tiver sido ajustada para uma temperatura diferente da ambiente.

number
stateCodeOfUndUser
Required

state where fuel was used

string
Cide
baseCalcCIDE
Required

percentage of natural gas (GLP), this decimal 12 integers and 0 to 4 decimals

number
rateCIDE
Required

percentage of natural gas (GLP), this decimal 11 integers and 0 to 4 decimals - R$

number
valueCIDE
Required

percentage of natural gas (GLP), this decimal 13 integers and 2 decimals - R$

number
PumpNumber
nozzleNumberFuelSupply
Required

Identification number of nozzle used in the dispensing process.
Numero de identificação do Bico utilizado no abastecimento

string
fuelPumpNumber
Required

Identification number of the Pump connect to the used nozzle.
Numero de identificação da bomba ao qual o bico está interligado

string
fuelTankNumber
Required

Identification number of the Pump connect to the used nozzle.
Numero de identificação da bomba ao qual o bico está interligado

string
startValueOfPumpNumber
Required

Valor do Encerrante no ínicio do abastecimento. Reading of auto-counter (encerrante) at the start of the refueling/dispensing. This decimal 12 integers and 3 decimals - R$

number
endValueOfPumpNumber
Required

Valor do Encerrante no final do abastecimento. Reading of auto-counter (encerrante) at the end of the refueling/dispensing. This decimal 12 integers and 3 decimals - R$

number
entityIsIcmsSubstitute

Inform that for this item the Entity referenced is ICMS Substitute

boolean
isTransportIcmsWithheld

Inform that this item has ICMS withheld for transport value service.

boolean
IcmsTaxRelief
reasonCode
Required

When item transaction subject to desoneration, this is the reason code

  • '1' # Táxi;
  • '3' # Produtor Agropecuário;
  • '4' # Frotista/Locadora;
  • '5' # Diplomático/Consular;
  • '6' # Utilitários e Motocicletas da Amazônia Ocidental e Áreas de Livre Comércio (Resolução 714/88 e 790/94 – CONTRAN e suas alterações);
  • '7' # SUFRAMA;
  • '8' # Venda a órgão Público;
  • '9' # Outros
  • '10' # Deficiente Condutor
  • '11' # Deficiente não condutor
  • '12' # Fomento agropecuário
  • '16' # Olimpíadas Rio 2016
string
taxBaseDiscount

ICMS Tax base rate discount (desconto na base do ICMS referetne a desoneração)

number
taxAmount

Amount for Icms Relief (desoneração)

number
Array[Export]
drawbackNumber
string
IndExport
registerNumber
Required

Exportation register number

string
accessKey
Required

invoice access key received to export

string
quantity
Required

This decimal 11 integers and 0 to 4 decimals, quantity exported in real

number
Array[Di]
customsValue

customs value, valor aduaneiro (II Block of NFe)

number
diNumber
Required

Import declaration number, DI/DSI/DA/DRI-E (DI/DSI/DA/DRI-E)

string
registerDateDI
Required

Register date of import declaration number, DI/DSI/DA/DRI-E (DI/DSI/DA/DRI-E)

string
clearanceSite
Required

Clerance Site Local do desembaraço aduaneiro

string
clearanceState
Required

Clerance Site State Estado onde ocorrreu o desembaraço aduaneiro

string
clearanceDate

Clerance date

string
transportDIType
Required
  • '1' # Maritima
  • '2' # Fluvial
  • '3' # Lacustre
  • '4' # Aerea
  • '5' # Postal
  • '6' # Ferroviaria
  • '7' # Rodoviaria
  • '8' # Conduto
  • '9' # Meios Proprios
  • '10' # Entrada/Saida Ficta
string
afrmmValue

Aditional amount to freight to renew merchant marine, This decimal 13 integers and 2 decimals [Valor Adicional ao frete para renovação de marinha mercante]

number
intermediateType
Required
  • '1' # On One's Own [1-por conta propria]
  • '2' # On Behalf And Order [2-por conta e ordem]
  • '3' # Order [3-encomenda]
string
buyerFederalTaxID

Buyer federal tax id CNPJ do comprador ou encomendante

string
buyerState

Buyer sate Estado do comprador ou encomendante

string
exporterCode

Exporter code

string
Array[Adi]
addNumber
Required

aditional sequence number (1 to 100)

integer
sequentialNumber
Required

sequential item number for this adi, sequence number (1 to 999)

integer
manufacturerCode
Required

Manufatorer erp internal code

string
adiDiscount

This decimal 13 integers and 2 decimals, aditional adi discount

number
drawbackNumber

Drawback number

string
CalculatedTax
TaxByType
Icms
tax
Required

Tax value, negative value for withhold value

number
IcmsSt
tax
Required

Tax value, negative value for withhold value

number
IcmsStSd
tax
Required

Tax value, negative value for withhold value

number
IcmsPartOwn
tax
Required

Tax value, negative value for withhold value

number
IcmsPartDest
tax
Required

Tax value, negative value for withhold value

number
IcmsDifaFCP
tax
Required

Tax value, negative value for withhold value

number
IcmsDifaDest
tax
Required

Tax value, negative value for withhold value

number
IcmsDifaRemet
tax
Required

Tax value, negative value for withhold value

number
IcmsRf
tax
Required

Tax value, negative value for withhold value

number
IcmsDeson
tax
Required

Tax value, negative value for withhold value

number
IcmsCredsn
tax
Required

Tax value, negative value for withhold value

number
Pis
tax
Required

Tax value, negative value for withhold value

number
PisSt
tax
Required

Tax value, negative value for withhold value

number
Cofins
tax
Required

Tax value, negative value for withhold value

number
CofinsSt
tax
Required

Tax value, negative value for withhold value

number
Ipi
tax
Required

Tax value, negative value for withhold value

number
IpiReturned
tax
Required

Tax value, negative value for withhold value

number
Ii
tax
Required

Tax value, negative value for withhold value

number
Iof
tax
Required

Tax value, negative value for withhold value

number
AproxtribState
tax
Required

Tax value, negative value for withhold value

number
AproxtribFed
tax
Required

Tax value, negative value for withhold value

number
tax
number
Array[Details]
locationType

This string captures the applicable location type. Location used for calc. Buyer or Seller

string
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
taxType

Tax identificator

string
rateType

Name of configuration rate

string
scenario

This string captures the transaction scenario used to calculate the tax for this tax type. Scenarios are specific to the tax type. This field provides information about how the tax engine interpreted the transaction information that was passed in.

string
subtotalTaxable

This decimal captures how much of the lineAmount was taxable by this tax, calc base

number
rate

This decimal captures the tax rate for this tax.3.00 (3%)

number
tax

This decimal captures how much of the lineAmount was taxable by this tax

number
exemptionCode

This string is required if is exempt

string
significantLocations
Array[string]
taxRuleType

This string with type of rule

string
source

Source of product or merchandise,

  • '0' # National goods - 'except those treated in codes 3,4, 5 and 8
  • '1' # Imported directly by seller, except those in code 6
  • '2' # Foreign goods - 'Acquired in the internal market (inside Brazil), except those in code 7
  • '3' # Merchandise or goods with imported content above 40% and with less than or equal to 70%
  • '4' # National goods from production following 'standard basic processes' as stablished by legislation (standard basic processes are devised to separate simple assembly from manufaturing processes)
  • '5' # National goods - 'Merchandise or goods with imported content equal or below 40%
  • '6' # Foreign goods - 'Directly imported by Seller, without a National Equivalent as listed by Comex and natural gas
  • '7' # Foreign goods - 'Acquired inside Brazil, without a National Equivalent as listed by Comex and natural gas
  • '8' # Merchandise or goods with imported content above 70%
string
cstB

Use to determined how the tax is applicable and calculated. It may define and exemption, a tax base reduction, identify that a special rate is applicable (not the rate itself).

  • '00' # Taxed in its totality
  • '10' # Taxed and subject to tax substitution (ICMS ST)
  • '20' # Taxed with Tax Base Reduction
  • '30' # Exempt /Not Taxed and subject to tax Substitution (ICMS#ST)
  • '40' # Tax Exempt
  • '41' # Not Taxed
  • '50' # Taxes Suspended
  • '51' # Taxes Diferred
  • '60' # ICMS Tax already collected through Substituition (ICMS ST)
  • '70' # Taxed with Tax Base Reduction and subject to Tax Subsititution (ICMS ST)
  • '90' # Others
string
cst
string
modBC
string
pMVA

Percent of Value-added margin (%)

number
pRedBC

calc base percent of discount

number
pBCOp

percent of calc base of own icms

number
ufst

State Abreviation:

  • 'AC'
  • 'AL'
  • 'AP'
  • 'AM'
  • 'BA'
  • 'CE'
  • 'DF'
  • 'ES'
  • 'GO'
  • 'MA'
  • 'MT'
  • 'MS'
  • 'MG'
  • 'PA'
  • 'PB'
  • 'PR'
  • 'PE'
  • 'PI'
  • 'RJ'
  • 'RN'
  • 'RS'
  • 'RO'
  • 'RR'
  • 'SC'
  • 'SP'
  • 'SE'
  • 'TO'
string
calcMode
string
legalTaxClass

Legal tax classificação for IPI (enquadramento tributário)

integer
legalTaxClassDC

Legal tax classificação for IPI (enquadramento) for Drinks and Cigarettes

integer
cnpjProd

CNPJ/CPF of Sales Buyer, if CPF pattern is '[0-9]{11}' if CNPJ pattern is '[0-9]{14}' Federal tax ID of real manufacturer, nly for exportation

string
sealCode

Seal Code for ipi tax control (código do selo para controle de IPI)

string
sealQuantity

Seal Code for ipi tax control (código do selo para controle de IPI)

string
icmsInterPartRate

percent of icms apportionment between two states

number
icmsSesonReason
  • '0' # NO ICMS TAX RELIEF
  • '1' # TAXI
  • '3' # AGRICULTURAL PRODUCTION
  • '4' # FLEET OWNERS
  • '5' # DIPLOMATIC MISSIONS
  • '6' # VEHICLE AND MOTORCICLE OF FREE ZONE AREA AND OCIDENTAL AMAZON
  • '7' # SUFRAMA
  • '8' # SALES TO GOVERNMENT
  • '9' # OTHERS
  • '10' # DISABLED PERSON DRIVER
  • '11' # DISABLED PERSON NOT DRIVER
string
perQuantityReturned

percent of merchandise returned

number

Response

Header
messageType
string
accountId
Required

This string is a UUID issued by Avalara to identify the Avalara account that owns the company identified by the companyCode on the next line.

string
companyCode
Required

string is a code maintained by the client application to uniquely identify the company for which this transaction is being recorded. It is unique within the context of an Account. It will be limited to 60 characters when creating a Company

string
documentCode

This string is a code maintained by the client application to uniquely identify a document in the client's systems. It will typically be an invoice number, sales order, receipt number, returned merchandise authorization number, etc. When has this field, the transaction will be stored

string
Participants
Entity
name

Entity name, official name (Razão Social)

string
role
  • 'transporter'
  • 'sender' # REMETENTE
  • 'dispatcher' # EXPEDITOR
  • 'receiver' # RECEIVER
  • 'addressee' # DESTINATÁRIO
  • 'other' # OUTRO
string
type
Required

Entity Type (business, individual, federal government, state government, city government foreign)

string
federalTaxId
Required

CNPJ/CPF of Sales Buyer, if CPF pattern is '[0-9]{11}' if CNPJ pattern is '[0-9]{14}'

string
cityTaxId

City Tax ID

string
stateTaxId

State Tax ID

string
suframa

Suframa ID

string
phone

Entity Phone

string
taxRegime
string
email

Entity Email

string
subjectToSRF1234

Companies subject to follow same rules of Government entities (Instrução Normativa: SRF1234)

boolean
icmsTaxPayer

Inform if the entity is ICMS tax payer.

boolean
Transporter
name

Entity name, official name (Razão Social)

string
role
  • 'transporter'
  • 'sender' # REMETENTE
  • 'dispatcher' # EXPEDITOR
  • 'receiver' # RECEIVER
  • 'addressee' # DESTINATÁRIO
  • 'other' # OUTRO
string
type
Required

Entity Type (business, individual, federal government, state government, city government foreign)

string
federalTaxId
Required

CNPJ/CPF of Sales Buyer, if CPF pattern is '[0-9]{11}' if CNPJ pattern is '[0-9]{14}'

string
cityTaxId

City Tax ID

string
stateTaxId

State Tax ID

string
suframa

Suframa ID

string
phone

Entity Phone

string
taxRegime
string
email

Entity Email

string
subjectToSRF1234

Companies subject to follow same rules of Government entities (Instrução Normativa: SRF1234)

boolean
icmsTaxPayer

Inform if the entity is ICMS tax payer.

boolean
nfAccessKey

This is the public NF id. With this number is possible get invoice information directly from government.

string
nfceQrCode

qr code printed on DANFE;

string
transactionType
Required

This string indicates the type of transaction for which tax should be calculated.

string
transactionModel
  • '01' # Nota Fiscal 1/1A
  • '1B' # Nota Fiscal Avulsa
  • '02' # Nota Fiscal de Venda a-Consumidor
  • '2D' # Cupom Fiscal
  • '2E' # Cupom Fiscal-Bilhete de Passagem
  • '04' # Nota Fiscal de Produtor
  • '06' # Nota Fiscal/Conta de Energia Elétrica
  • '07' # Nota Fiscal de Serviço de Transporte
  • '08' # Conhecimento de Transporte Rodoviário de-Cargas
  • '8B' # Conhecimento de Transporte de-Cargas Avulso
  • '09' # Conhecimento de Transporte Aquaviário de-Cargas
  • '10' # Conhecimento Aéreo
  • '11' # Conhecimento de Transporte Ferroviário de-Cargas
  • '13' # Bilhete de Passagem Rodoviário
  • '14' # Bilhete de Passagem Aquaviário
  • '15' # Bilhete de Passagem e-Nota de-Bagagem
  • '16' # Bilhete de Passagem Ferroviário
  • '18' # Resumo de Movimento Diário
  • '21' # Nota Fiscal de Serviço de-Comunicação
  • '22' # Nota Fiscal de Serviço de Telecomunicação
  • '26' # Conhecimento de Transporte Multimodal de-Cargas
  • '27' # Nota Fiscal De Transporte Ferroviário De-Carga
  • '28' # Nota Fiscal/Conta de Fornecimento de Gás-Canalizado
  • '29' # Nota Fiscal/Conta de Fornecimento de Água-Canalizada
  • '55' # Nota Fiscal Eletrônica (NF-e)
  • '57' # Conhecimento de Transporte Eletrônico (CT-e)
  • '59' # Cupom Fiscal Eletrônico (CF-e-SAT)
  • '60' # Cupom Fiscal Eletrônico (CF-e-ECF)
  • '65' # Nota Fiscal Eletrônica ao-Consumidor Final (NFC-e)
string
transactionClass

Natureza da Opreração - 'Describe kind of this transaction, summary

string
eDocCreatorType
Required
string
eDocCreatorPerspective

This Flag is used only when eDocCreatorType is other and the return show Taxes using eDocCreator perspective or self perspective.

boolean
entityCode

This string is a code maintained by the client application and recorded in CUP to uniquely identify the party with whom the company (identified by companyCode) is transacting. It is unique within the context of a Company.

string
currency

currency code

string
companyLocation
Required

This string contains a previously configured company code which may also have codes needed for tax return purposes. These codes are maintained through the customer portal. Main company address identity

string
transactionDate

This string is the transaction date in ISO 8601 format, create transaction date

string
shippingDate

This string is the transaction date in ISO 8601 format, when products were shipped, can be empty or absent

string
AdditionalInfo
fiscalInfo

Additional information of fiscal interest

string
complementaryInfo

Additional information of user interest

string
Array[ProcRef]
nProc

Process Identifier

string
indProc

Process Origin

  • '0' # SEFAZ;
  • '1' # Justiça Federal;
  • '2' # Justiça Estadual;
  • '3' # Secex/RFB;
  • '9' # Outros
string
tpImp

how the document will be printed

  • '0' # without DANFE;
  • '1' # DANFe Letter;
  • '2' # DANFe Landscape;
  • '3' # DANFe Simplified;
  • '4' # DANFe NFC-e;
  • '5' # DANFe NFC-e e-mail
string
idDest

This indicator inform transaction target place, when is AUTOMATIC the company address and entity address are analyzed to identify type of transaction target place 1- same state; 2 - interstate; 3-with exterior. Exist some cases where is necessary force this situation like when buyer from another state buy something in loco, the address are from different states, but transaction no. Identificador de Local de destino da operação, na opção AUTOMATIC endereços da Companhia e da entidade destino são analisados para saber se é uma operação dentro do mesmo estado, interestadual ou com o exterior. Há situações onde é necessário forçar este indicador como por exemplo Quando uma pessoa com endereço em outro estado, compra uma mercadoria de forma presencial, é uma operação interna apesar dos endereços dos envolvidos estarem em estados distintos.

  • 0 # AUTOMATIC - DEFAULT
  • 1 # Interna;
  • 2 # Interestadual;
  • 3 # Exterior)
integer
indPres

Presence indicator

  • '0' # Not applicable
  • '1' # Presential;
  • '2' # Remote, internet;
  • '3' # Remote, phone;
  • '4' # NFC-e home delivery;
  • '9' # Remote, others
string
invoiceNumber

Invoice number, sequential unique by invoice serial (Número da nota fiscal)

integer
invoiceSerial

Invoice number, sequential unique by invoice serial (Número da nota fiscal)

integer
DefaultLocations
Transport
modFreight
Required

Freight model

  • 0 - CIF,
  • 1 - FOB,
  • 2 - Thrid party,
  • 9 - Free shipping when 9 - Free shipping, the fields below will be ignored if present
  • 'transporter'
  • 'withholdICMSTransport'
  • 'volumes'
  • 'vehicle'
string
withholdICMSTransport

Forces witholding of ICMS on transport amount (freight)

boolean
Array[Volumes]
qVol

Quantity of packages transported

string
specie

package type

string
brand

brand

string
volumeNumeration

packages numeration

string
netWeight

net weight using Kg

number
grossWeight

gross weight using Kg

number
seal
Array[string]
Vehicle
type
string
Automobile
licensePlate
Required
string
stateCode
Required

State Abreviation:

  • 'AC'
  • 'AL'
  • 'AP'
  • 'AM'
  • 'BA'
  • 'CE'
  • 'DF'
  • 'ES'
  • 'GO'
  • 'MA'
  • 'MT'
  • 'MS'
  • 'MG'
  • 'PA'
  • 'PB'
  • 'PR'
  • 'PE'
  • 'PI'
  • 'RJ'
  • 'RN'
  • 'RS'
  • 'RO'
  • 'RR'
  • 'SC'
  • 'SP'
  • 'SE'
  • 'TO'
string
rtnc

Cargo Transport National Register, Registro Nacional de Transportador de Carga (ANTT)

string
Array[Trailer]
licensePlate
Required
string
stateCode
Required

State Abreviation:

  • 'AC'
  • 'AL'
  • 'AP'
  • 'AM'
  • 'BA'
  • 'CE'
  • 'DF'
  • 'ES'
  • 'GO'
  • 'MA'
  • 'MT'
  • 'MS'
  • 'MG'
  • 'PA'
  • 'PB'
  • 'PR'
  • 'PE'
  • 'PI'
  • 'RJ'
  • 'RN'
  • 'RS'
  • 'RO'
  • 'RR'
  • 'SC'
  • 'SP'
  • 'SE'
  • 'TO'
string
rtnc

Cargo Transport National Register, Registro Nacional de Transportador de Carga (ANTT)

string
wagon
string
ferry

Ferry

string
Array[NfRef]
type
string
refNFe
string
refCTe
string
RefECF
nECF
Required

ECF Sequential number that generated Cupom attached to NFe informar o número de ordem seqüencial do ECF que emitiu o Cupom Fiscal vinculado à NF-e

string
nCOO
Required

Operational counter number attached to NFe Informar o Número do Contador de Ordem de Operação - COO vinculado à NF-e

string
modECF
Required

Fiscal document model

  • '2B' # coupon tax not ECF
  • '2C' # PDV coupon tax
  • '2D' # ECF coupon tax
string
RefNF
stateCd
Required

State code of fiscal Document creator

string
yymm
Required

year and month of fiscal document creation

string
federalTaxId
Required

fiscal document creator federalTaxId

string
serie
Required

fiscal document serie

string
number
Required

fiscal document number

string
RefFarmerNF
stateCd
Required

State code of fiscal Document creator, farmer

string
yymm
Required

year and month of fiscal document creation

string
federalTaxId
Required

fiscal document creator farmer federalTaxId

string
stateTaxId
Required

fiscal document creator, farmer stateTaxId

string
model
Required

Document Fiscal model

  • '04' # FARMER DOCUMENT
  • '01' # DETACHED DOCUMENT - AVULSO
string
serie
Required

fiscal document serie

string
number
Required

fiscal document number

string
Payment
installmentsTerms

Installment terms

  • 0 # cash
  • 1 # on terms
  • 2 # other
integer
Bill
nFat

Bill identifier

string
vOrig

Orignal value

number
vDiscount

Discount

number
vNet

Net value

number
Array[Installment]
documentNumber

Instalment number identifier

string
date

Installment expiration date

string
grossValue
Required

Installment value

number
Array[PaymentMode]
mode
Required

Payment mode

  • '01' # Dinheiro
  • '02' # Cheque
  • '03' # Cartão de Crédito
  • '04' # Cartão de Débito
  • '05' # Crédito Loja
  • '10' # Vale Alimentação
  • '11' # Vale Refeição
  • '12' # Vale Presente
  • '13' # Vale Combustível
  • '99' # Outros
string
value
Required

payment value

number
cardTpIntegration
  • '1' # Payment integrated with system,
  • '2' # Payment not integrated with system
string
cardCNPJ

Federal tax id of accrediting card (credenciadora do cartão)

string
cardBrand

card brand

  • '01' # Visa
  • '02' # Mastercard
  • '03' # American Express
  • '04' # Sorocred
  • '99' # Other
string
cardAuthorization

transaction authorization number

string
PurchaseInfo
governmentOrder

Invoice info for government purchase orders Informação da Nota de Empenho de compras públicas

string
orderNumber

Order info Informação do pedido

string
contractNumber

Agreement info Informação do contrato

string
Export
shippingState
Required

shipping state

string
place
Required

shipping place

string
placeDescription

description of shipping place

string
Array[Lines]
lineCode
Required

This string is a unique identifier for this line in the transaction

integer
itemCode
Required

This string is a code maintained by the client application to uniquely identify a product or service. It will likely be a SKU and is required for SST states.

string
avalaraGoodsAndServicesType

AGAST CODE for itemCode

string
numberOfItems
Required

This decimal 11 integers and 1 to 4 decimals captures the number of individual items or units represented by this line. Digits after the decimal point are optional. This should always be positive. Quantity, default 1

number
returnedPercentageAmount

when is return operation this field inform the percentage of returned itens. This decimal max 3 integers and 2 decimals, v >=0.00 and v <= 100.00

number
lineUnitPrice

This decimal 11 integers and 1 to 10 decimals captures the unit price of this line.

number
lineAmount
Required

In its simplest form lineAmount = (item price * numberOfItems). If taxIncluded is 'true', lineAmount = (item price * numberOfItems + tax).

number
itemDescription
Required

This string captures the description of the item represented by this line, will be used LC 116

string
lineTaxedDiscount

Discount conditional, This decimal 13 integers and 0 to 2 decimals

number
lineUntaxedDiscount

discount unconditional, This decimal 13 integers and 0 to 2 decimals

number
useType
Required

This is a enumeration folowing table

string
processScenario
Required

Reference to process configurantion of this transaction, See ProcessScenario definition

string
cfop

Fiscal Operation Code of transport service

integer
hasStockImpact

return if this transaction has stock impact for this process or CFOP

boolean
hasFinantialImpact

return if this transaction has finantial impact for this process or CFOP

boolean
freightAmount

This decimal 13 integers and 0 to 2 decimals

number
insuranceAmount

This decimal 13 integers and 0 to 2 decimals

number
otherCostAmount

This decimal 13 integers and 0 to 2 decimals

number
indTotType

The item value will compose the invoice total value.

boolean
orderNumber

order number, information used for B2B control process

string
orderItemNumber

number of the item from order number, information used for B2B control process

string
fciNumber

Gloal Unique identifier (Importation form)

string
recopiNumber

RECOPI number

string
infAdProd

additional information about product (referenced standard, complementary info, etc)

string
Vehicle
tpOp
Required
  • 1 # Sales by car dealership
  • 2 # Direct billing
  • 3 # Direct sales
  • 0 # Other
integer
chassisNumber
Required
string
colorCode
Required

color code used by factory

string
colorName
Required

color name

string
cvPower
Required

Power using CV unid

string
cylinderVolumCC
Required

engine size in cubic centimeters

string
netWeight
Required

net weight

string
grossWeight
Required

gross weight

string
serialNumber
Required

serie

string
fuelType
Required
  • '01' # Alcohol
  • '02' # Gas
  • '03' # Diesel
  • '16' # Alcohol/Gas
  • '17' # Gas/Alcohol/GNV
  • '18' # Gas/Electric
string
engineNumber
Required

engine number

string
cmt
Required

traction capacity, tonne

string
lengthBetweenAxis
Required

length between axis

string
modelYear
Required

model year

string
manufactoryYear
Required

year of factory

string
paintType
Required

paynt type

string
vehicleRENAVAMType
Required
string
specieRENAVAMType
Required
string
modelRENAVAMCode
Required
string
colorDENATRANCode
Required
  • '01' # YELLOW
  • '02' # BLUE
  • '03' # BEIGE
  • '04' # WHITE
  • '05' # GRAY
  • '06' # GOLDEN
  • '07' # GRENA
  • '08' # ORANGE
  • '09' # BROWN
  • '10' # SILVER
  • '11' # BLACK
  • '12' # PINK
  • '13' # PURPLE
  • '14' # GREEN
  • '15' # RED
  • '16' # FANTASY
string
vin
Required

chassis condition original or modified (remarcado)

string
vehicleManufactoryStatus
Required
  • '1' # Finished(Done)
  • '2' # Not finished
  • '3' # Semi-finished
string
maxOccupantsQuantity
Required

max number of sit occupants

string
restrictionType
Required

Lien/restriction type

  • '0' # No one;
  • '1' # Alienação Fiduciária;
  • '2' # Arrendamento Mercantil;
  • '3' # Reserva de Domínio;
  • '4' # Penhor de Veículos;
  • '9' # Other.
string
Medicine
loteNumber
Required
string
loteQuantity
Required

This is a decimal type with 11 digits including 3 decimal positions.

number
manufactotyDate
Required
string
expirationDate
Required
string
maxValueToEndUser
Required

This is a decimal type with 15 digits including 2 decimal positions. Max value to end user.

number
Weapon
weaponRestrictionType
Required
  • '0' # restrict use
  • '1' # public use
string
serieNumber
Required
string
gunBarrelSerieNumber
Required

Barrel's serial number. Número de série do cano

string
weaponDescription
Required

weapon description

string
Fuel
prodANPCode
Required
string
perMixGN

percentage of natural gas (GLP)

number
authorizationCodeCODIF
string
quantityOnRoomTemperature

This decimal 12 integers and 0 to 4 decimals Quantidade de combustível faturada à temperatura ambiente. Informar quando a quantidade faturada informada no campo qCom (I10) tiver sido ajustada para uma temperatura diferente da ambiente.

number
stateCodeOfUndUser
Required

state where fuel was used

string
Cide
baseCalcCIDE
Required

percentage of natural gas (GLP), this decimal 12 integers and 0 to 4 decimals

number
rateCIDE
Required

percentage of natural gas (GLP), this decimal 11 integers and 0 to 4 decimals - R$

number
valueCIDE
Required

percentage of natural gas (GLP), this decimal 13 integers and 2 decimals - R$

number
PumpNumber
nozzleNumberFuelSupply
Required

Identification number of nozzle used in the dispensing process.
Numero de identificação do Bico utilizado no abastecimento

string
fuelPumpNumber
Required

Identification number of the Pump connect to the used nozzle.
Numero de identificação da bomba ao qual o bico está interligado

string
fuelTankNumber
Required

Identification number of the Pump connect to the used nozzle.
Numero de identificação da bomba ao qual o bico está interligado

string
startValueOfPumpNumber
Required

Valor do Encerrante no ínicio do abastecimento. Reading of auto-counter (encerrante) at the start of the refueling/dispensing. This decimal 12 integers and 3 decimals - R$

number
endValueOfPumpNumber
Required

Valor do Encerrante no final do abastecimento. Reading of auto-counter (encerrante) at the end of the refueling/dispensing. This decimal 12 integers and 3 decimals - R$

number
entityIsIcmsSubstitute

Inform that for this item the Entity referenced is ICMS Substitute

boolean
isTransportIcmsWithheld

Inform that this item has ICMS withheld for transport value service.

boolean
IcmsTaxRelief
reasonCode
Required

When item transaction subject to desoneration, this is the reason code

  • '1' # Táxi;
  • '3' # Produtor Agropecuário;
  • '4' # Frotista/Locadora;
  • '5' # Diplomático/Consular;
  • '6' # Utilitários e Motocicletas da Amazônia Ocidental e Áreas de Livre Comércio (Resolução 714/88 e 790/94 – CONTRAN e suas alterações);
  • '7' # SUFRAMA;
  • '8' # Venda a órgão Público;
  • '9' # Outros
  • '10' # Deficiente Condutor
  • '11' # Deficiente não condutor
  • '12' # Fomento agropecuário
  • '16' # Olimpíadas Rio 2016
string
taxBaseDiscount

ICMS Tax base rate discount (desconto na base do ICMS referetne a desoneração)

number
taxAmount

Amount for Icms Relief (desoneração)

number
Array[Export]
drawbackNumber
string
IndExport
registerNumber
Required

Exportation register number

string
accessKey
Required

invoice access key received to export

string
quantity
Required

This decimal 11 integers and 0 to 4 decimals, quantity exported in real

number
Array[Di]
customsValue

customs value, valor aduaneiro (II Block of NFe)

number
diNumber
Required

Import declaration number, DI/DSI/DA/DRI-E (DI/DSI/DA/DRI-E)

string
registerDateDI
Required

Register date of import declaration number, DI/DSI/DA/DRI-E (DI/DSI/DA/DRI-E)

string
clearanceSite
Required

Clerance Site Local do desembaraço aduaneiro

string
clearanceState
Required

Clerance Site State Estado onde ocorrreu o desembaraço aduaneiro

string
clearanceDate

Clerance date

string
transportDIType
Required
  • '1' # Maritima
  • '2' # Fluvial
  • '3' # Lacustre
  • '4' # Aerea
  • '5' # Postal
  • '6' # Ferroviaria
  • '7' # Rodoviaria
  • '8' # Conduto
  • '9' # Meios Proprios
  • '10' # Entrada/Saida Ficta
string
afrmmValue

Aditional amount to freight to renew merchant marine, This decimal 13 integers and 2 decimals [Valor Adicional ao frete para renovação de marinha mercante]

number
intermediateType
Required
  • '1' # On One's Own [1-por conta propria]
  • '2' # On Behalf And Order [2-por conta e ordem]
  • '3' # Order [3-encomenda]
string
buyerFederalTaxID

Buyer federal tax id CNPJ do comprador ou encomendante

string
buyerState

Buyer sate Estado do comprador ou encomendante

string
exporterCode

Exporter code

string
Array[Adi]
addNumber
Required

aditional sequence number (1 to 100)

integer
sequentialNumber
Required

sequential item number for this adi, sequence number (1 to 999)

integer
manufacturerCode
Required

Manufatorer erp internal code

string
adiDiscount

This decimal 13 integers and 2 decimals, aditional adi discount

number
drawbackNumber

Drawback number

string
CalculatedTax
TaxByType
Icms
tax
Required

Tax value, negative value for withhold value

number
IcmsSt
tax
Required

Tax value, negative value for withhold value

number
IcmsStSd
tax
Required

Tax value, negative value for withhold value

number
IcmsPartOwn
tax
Required

Tax value, negative value for withhold value

number
IcmsPartDest
tax
Required

Tax value, negative value for withhold value

number
IcmsDifaFCP
tax
Required

Tax value, negative value for withhold value

number
IcmsDifaDest
tax
Required

Tax value, negative value for withhold value

number
IcmsDifaRemet
tax
Required

Tax value, negative value for withhold value

number
IcmsRf
tax
Required

Tax value, negative value for withhold value

number
IcmsDeson
tax
Required

Tax value, negative value for withhold value

number
IcmsCredsn
tax
Required

Tax value, negative value for withhold value

number
Pis
tax
Required

Tax value, negative value for withhold value

number
PisSt
tax
Required

Tax value, negative value for withhold value

number
Cofins
tax
Required

Tax value, negative value for withhold value

number
CofinsSt
tax
Required

Tax value, negative value for withhold value

number
Ipi
tax
Required

Tax value, negative value for withhold value

number
IpiReturned
tax
Required

Tax value, negative value for withhold value

number
Ii
tax
Required

Tax value, negative value for withhold value

number
Iof
tax
Required

Tax value, negative value for withhold value

number
AproxtribState
tax
Required

Tax value, negative value for withhold value

number
AproxtribFed
tax
Required

Tax value, negative value for withhold value

number
tax
number
Array[Details]
locationType

This string captures the applicable location type. Location used for calc. Buyer or Seller

string
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
taxType

Tax identificator

string
rateType

Name of configuration rate

string
scenario

This string captures the transaction scenario used to calculate the tax for this tax type. Scenarios are specific to the tax type. This field provides information about how the tax engine interpreted the transaction information that was passed in.

string
subtotalTaxable

This decimal captures how much of the lineAmount was taxable by this tax, calc base

number
rate

This decimal captures the tax rate for this tax.3.00 (3%)

number
tax

This decimal captures how much of the lineAmount was taxable by this tax

number
exemptionCode

This string is required if is exempt

string
significantLocations
Array[string]
taxRuleType

This string with type of rule

string
source

Source of product or merchandise,

  • '0' # National goods - 'except those treated in codes 3,4, 5 and 8
  • '1' # Imported directly by seller, except those in code 6
  • '2' # Foreign goods - 'Acquired in the internal market (inside Brazil), except those in code 7
  • '3' # Merchandise or goods with imported content above 40% and with less than or equal to 70%
  • '4' # National goods from production following 'standard basic processes' as stablished by legislation (standard basic processes are devised to separate simple assembly from manufaturing processes)
  • '5' # National goods - 'Merchandise or goods with imported content equal or below 40%
  • '6' # Foreign goods - 'Directly imported by Seller, without a National Equivalent as listed by Comex and natural gas
  • '7' # Foreign goods - 'Acquired inside Brazil, without a National Equivalent as listed by Comex and natural gas
  • '8' # Merchandise or goods with imported content above 70%
string
cstB

Use to determined how the tax is applicable and calculated. It may define and exemption, a tax base reduction, identify that a special rate is applicable (not the rate itself).

  • '00' # Taxed in its totality
  • '10' # Taxed and subject to tax substitution (ICMS ST)
  • '20' # Taxed with Tax Base Reduction
  • '30' # Exempt /Not Taxed and subject to tax Substitution (ICMS#ST)
  • '40' # Tax Exempt
  • '41' # Not Taxed
  • '50' # Taxes Suspended
  • '51' # Taxes Diferred
  • '60' # ICMS Tax already collected through Substituition (ICMS ST)
  • '70' # Taxed with Tax Base Reduction and subject to Tax Subsititution (ICMS ST)
  • '90' # Others
string
cst
string
modBC
string
pMVA

Percent of Value-added margin (%)

number
pRedBC

calc base percent of discount

number
pBCOp

percent of calc base of own icms

number
ufst

State Abreviation:

  • 'AC'
  • 'AL'
  • 'AP'
  • 'AM'
  • 'BA'
  • 'CE'
  • 'DF'
  • 'ES'
  • 'GO'
  • 'MA'
  • 'MT'
  • 'MS'
  • 'MG'
  • 'PA'
  • 'PB'
  • 'PR'
  • 'PE'
  • 'PI'
  • 'RJ'
  • 'RN'
  • 'RS'
  • 'RO'
  • 'RR'
  • 'SC'
  • 'SP'
  • 'SE'
  • 'TO'
string
calcMode
string
legalTaxClass

Legal tax classificação for IPI (enquadramento tributário)

integer
legalTaxClassDC

Legal tax classificação for IPI (enquadramento) for Drinks and Cigarettes

integer
cnpjProd

CNPJ/CPF of Sales Buyer, if CPF pattern is '[0-9]{11}' if CNPJ pattern is '[0-9]{14}' Federal tax ID of real manufacturer, nly for exportation

string
sealCode

Seal Code for ipi tax control (código do selo para controle de IPI)

string
sealQuantity

Seal Code for ipi tax control (código do selo para controle de IPI)

string
icmsInterPartRate

percent of icms apportionment between two states

number
icmsSesonReason
  • '0' # NO ICMS TAX RELIEF
  • '1' # TAXI
  • '3' # AGRICULTURAL PRODUCTION
  • '4' # FLEET OWNERS
  • '5' # DIPLOMATIC MISSIONS
  • '6' # VEHICLE AND MOTORCICLE OF FREE ZONE AREA AND OCIDENTAL AMAZON
  • '7' # SUFRAMA
  • '8' # SALES TO GOVERNMENT
  • '9' # OTHERS
  • '10' # DISABLED PERSON DRIVER
  • '11' # DISABLED PERSON NOT DRIVER
string
perQuantityReturned

percent of merchandise returned

number
CalculatedTaxSummary
numberOfLines

Count of lines

integer
taxedDiscount

sum of all line taxed discounts

number
untaxedDiscount

sum of all line untaxed discounts

number
subtotal

sum of all line lineAmount attribute

number
totalTax

sum of all line tax attribute

number
grandTotal

sum of all line lineAmount attribute + sum of all line tax attribute not VAT - sum of all line lineTaxedDiscount attribute

number
TaxByType
Icms
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
IcmsSt
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
IcmsStSd
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
IcmsPartOwn
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'
string
tax

sum of referenced tax value by jurisdiction

number
IcmsPartDest
calcbase

sum of all lines calcbase

number
tax

sum of referenced tax value

number
Array[Jurisdictions]
jurisdictionName

Jurisdiction used for calctax amount

string
jurisdictionType

Type of jurisdiction

  • 'City'
  • 'State'
  • 'Country'