1. Inicio
  2. Documentos
  3. NS CTe (English)
  4. CTe Events
  5. Inform GTV for CTe-OS

Inform GTV for CTe-OS

Event for the issuer of the CT-e OS of the Transport of Values to inform the GTVs related to the provision of the service.


Production: POST https://cte.ns.eti.br/cte/gtv

Input data
FieldDescriptionParentOccurrenceData TypeNotes
X-AUTH-TOKENUser access token0-1StringCan also be sent in the request header
chCTeCT-e access key1-1Int
tpAmbCT-e authorization environment type1-1Int1 - Production
2 - Homologation
dhEventoDate and time of the event1-1DateSefaz Standard: YYYY-MM-DDTHH:MM:SS+UTC
E.g.: 2016-06-13T15:04:10-02:00
nSeqEventoEvent sequential number1-1IntIn most cases it will be 1. However, when more than one event of the same type is generated for the same CT-e, this number must be sequentially incremented
infGTVObject or array of objects containing the data to be changed1-NObject or arrayThis field can contain an object ({...}) or several objects within an array ([{...}, {...}, ...]) making it possible to link several GTVs to the CT-e in the same event
nDocGTV numberinfGTV1-1StringMust contain 20 characters
idIdentifier to differentiate GTV from the same number (Use AIDF number or internal company identifier)infGTV1-1StringMust contain 20 characters
serieGTV seriesinfGTV0-1String
subserieGTV subseriesinfGTV0-1String
dEmiIssuance dateinfGTV0-1DateYYYY-MM-DD format
nDVVerifying digit number infGTV1-1Int
qCargaNumber of volumes/pouchesinfGTV1-1Int
placaVehicle plateinfGTV0-1String
UFFU of the plate where the vehicle is registeredinfGTV0-1StringExample: "RS"
RNTRCRNTRC of the carrierinfGTV0-1String
infEspecieInformation of the transported speciesinfGTV1-NObject or arrayThis field can contain an object ({...}) or several objects within an array ([{...}, {...}, ...]) making it possible to inform several different species
tpEspecieSpecies typeinfEspecie1-111 - Cash;
2 - Check;
3 - Currency;
4 - Others
vEspecieAmount carried in the indicated typeinfEspecie0-1Int
remGTV sender informationinfGTV1-1Object
CNPJCNPJ numberrem0-1IntInform CNPJ or CPF according to the sender's registration
CPFCPF numberrem0-1Int
IEState registrationrem0-1Int
UFFU acronymrem0-1StringExample: "RS"
xNomeGTV sender's business namerem1-1String
destGTV recipiet informationinfGTV1-1Object
CNPJCNPJ numberdest0-1IntInform CNPJ or CPF according to the recipient's registration
CPFCPF numberdest0-1Int
IEState registrationdest0-1Int
UFFU acronymdest1-1StringExample: "RS"
xNomeGTV recipient's business namedest1-1String
Request example

GTV Information Event Request

curl -X POST 
    \-H "Content-Type: application/json"
    \-d '{
          "X-AUTH-TOKEN": "YOUR_TOKEN", 
          "chCTe": "43171211111111111111670000000000051000000051", 
          "tpAmb": "2", 
          "dhEvento": "2017-12-19T18:43:00-02:00", 
          "nSeqEvento": "2", 
          "infGTV": {
               "nDoc": "11111111111111111111", 
               "id": "11111111111111111111", 
               "dEmi": "2017-12-19", 
               "nDV": "1", 
               "qCarga": "1.0000", 
               "infEspecie": [
                     "tpEspecie": "3", 
                     "vEspecie": "100.00"
                     "tpEspecie": "3", 
                     "vEspecie": "100.00"
               "rem": {
                    "CNPJ": "11111111111111", 
                    "UF": "RS", 
                    "xNome": "NS Tecnologia"
               "dest": {
                    "CNPJ": "11111111111111", 
                    "UF": "RS", 
                    "xNome": "EMITENTE DO CTE"
     }' \
Returned data
FieldDescriptionParentOccurrenceData TypeNotes
statusProcessing status codeInt
motivoProcessing status literal descriptionString
retEventoObject containing the CT-e processing data at Sefaz0-1Object
cStatCode of the processing situation at SefazretEvento1-1Int
xMotivoLiteral description of the processing situation at SefazretEvento1-1String
chCTeCT-e access keyretEvento1-1Int
dhRegEventoDate and time of event registration at SefazretEvento1-1DateSefaz Standard: YYYY-MM-DDTHH:MM:SS+UTC
E.g.: 2016-06-13T15:04:10-02:00
nProtDocument receipt number by SefazretEvento1-1Int
xmlDistribution XML of the GTV information eventretEvento1-1String
errosArray containing the list of errors during the information validation of the event according to the data type0-1ArrayOnly when status = -5
codigoError code returned by Sefaz0-1IntOnly when status = -4
descricaoError literal description returned by Sefaz0-1StringOnly when status = -4
Return example

Successful return

    "status": 200,
    "motivo": "GTV vinculada ao CT-e com sucesso",
    "retEvento": {
        "cStat": 135,
        "xMotivo": "Evento registrado e vinculado a CT-e",
        "chCTe": "43171211111111111111670000000000051000000051",
        "dhRegEvento": "2017-12-19T19:14:04-02:00",
        "nProt": "143170000994263",
        "xml": "<?xml version=\"1.0\" encoding=\"utf-8\"?><procEventoCTe versao=\"3.00\" xmlns=\"http://www.portalfiscal.inf.br/cte\">...</procEventoCTe>"
Return codes
200GTV linked to the CT-e successfully
-2Invalid access key
-3CT-e not found
-4Error when linking the event to the CT-e returned by Sefaz. Verify the "codigo" and "descricao" fields for more information
-5Information error according to the data type

Como podemos ajudar?