curl --request GET \
--url https://api.attachment.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/attachments/{attachmentId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.attachment.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/attachments/{attachmentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.attachment.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/attachments/{attachmentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.attachment.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/attachments/{attachmentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.attachment.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/attachments/{attachmentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.attachment.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/attachments/{attachmentId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attachment.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/attachments/{attachmentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"realmId": "<string>",
"organizationId": "<string>",
"status": "PENDING_UPLOAD",
"name": "<string>",
"contentType": "<string>",
"ai": {
"status": "PENDING",
"executedAt": "<string>",
"modelId": "<string>",
"error": "<string>"
},
"thumbnail": {
"status": "PENDING",
"data": "<string>",
"contentType": "<string>",
"width": 123,
"height": 123,
"sizeBytes": 123,
"generatedAt": "<string>",
"error": "<string>"
},
"fiscal": {
"status": "PENDING",
"executedAt": "<string>",
"modelId": "<string>",
"error": "<string>"
},
"createdBy": "<string>",
"sizeBytes": 123,
"image": {
"width": 123,
"height": 123,
"format": "<string>",
"pageCount": 123
},
"summary": "<string>",
"contents": [
"<string>"
],
"extractedReceipt": {
"type": "NFE",
"externalId": "<string>",
"accessKey": "<string>",
"model": "<string>",
"number": "<string>",
"series": "<string>",
"verificationCode": "<string>",
"environment": "LIVE",
"currency": "784",
"status": "AUTHORIZED",
"statusReason": "<string>",
"statusCode": "<string>",
"issuedAt": "<string>",
"authorizedAt": "<string>",
"canceledAt": "<string>",
"operationAt": "<string>",
"competenceDate": "<string>",
"authorizationProtocol": "<string>",
"issuer": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"recipient": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"recipientRole": "RECIPIENT",
"intermediary": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"technicalResponsible": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"amounts": {
"currency": "784",
"totalValue": 123,
"productsValue": 123,
"servicesValue": 123,
"discounts": 123,
"unconditionalDiscounts": 123,
"conditionalDiscounts": 123,
"freightValue": 123,
"insuranceValue": 123,
"otherCostsValue": 123,
"deductions": 123,
"netValue": 123,
"receivedValue": 123,
"approximateTax": 123,
"approximateTaxSource": "<string>"
},
"taxes": {
"icmsBase": 123,
"icmsAmount": 123,
"icmsStBase": 123,
"icmsStAmount": 123,
"icmsExemptAmount": 123,
"fcpAmount": 123,
"ipiAmount": 123,
"pisAmount": 123,
"cofinsAmount": 123,
"importDuty": 123,
"issBase": 123,
"issRate": 123,
"issAmount": 123,
"issWithheldAtSource": true,
"issWithheldAmount": 123,
"icmsOriginStateAmount": 123,
"icmsDestinationStateAmount": 123,
"approximateFederal": 123,
"approximateState": 123,
"approximateMunicipal": 123,
"approximateOther": 123,
"ibsAmount": 123,
"cbsAmount": 123,
"otherAmount": 123
},
"withholdings": {
"pisAmount": 123,
"cofinsAmount": 123,
"inssAmount": 123,
"irAmount": 123,
"csllAmount": 123,
"cpAmount": 123,
"otherAmount": 123,
"totalAmount": 123
},
"items": [
{
"sequence": 123,
"code": "<string>",
"description": "<string>",
"ean": "<string>",
"ncm": "<string>",
"cest": "<string>",
"cfop": "<string>",
"origin": "<string>",
"unit": "<string>",
"quantity": 123,
"unitPrice": "<string>",
"total": 123,
"discount": 123,
"freight": 123,
"insurance": 123,
"otherCosts": 123,
"approximateTax": 123,
"taxes": {
"icms": {
"cst": "<string>",
"origin": "<string>",
"base": 123,
"rate": 123,
"amount": 123,
"stBase": 123,
"stRate": 123,
"stAmount": 123,
"fcpBase": 123,
"fcpRate": 123,
"fcpAmount": 123,
"exemptAmount": 123,
"exemptionReasonCode": "<string>",
"destinationStateAmount": 123,
"originStateAmount": 123
},
"ipi": {
"cst": "<string>",
"legalFrameworkCode": "<string>",
"base": 123,
"rate": 123,
"amount": 123
},
"pis": {
"cst": "<string>",
"base": 123,
"rate": 123,
"amount": 123
},
"cofins": {
"cst": "<string>",
"base": 123,
"rate": 123,
"amount": 123
},
"importDuty": 123,
"issBase": 123,
"issRate": 123,
"issAmount": 123,
"ibsCbs": {
"cst": "<string>",
"classificationCode": "<string>",
"base": 123,
"ibsStateRate": 123,
"ibsStateAmount": 123,
"ibsMunicipalRate": 123,
"ibsMunicipalAmount": 123,
"ibsAmount": 123,
"cbsRate": 123,
"cbsAmount": 123
}
},
"currency": "784",
"additionalInfo": "<string>"
}
],
"itemCount": 123,
"service": {
"serviceListItemLC116": "<string>",
"serviceMunicipalCode": "<string>",
"serviceMunicipalDescription": "<string>",
"cnae": "<string>",
"description": "<string>",
"serviceProvisionState": "<string>",
"serviceProvisionCity": "<string>",
"serviceProvisionCityCode": 123
},
"rpsNumber": "<string>",
"rpsSeries": "<string>",
"rpsIssuedAt": "<string>",
"replacesDocumentNumber": "<string>",
"operationNature": "<string>",
"operationDirection": "INBOUND",
"purpose": "NORMAL",
"cfops": [
"<string>"
],
"isFinalConsumer": true,
"buyerPresence": {
"code": "<string>",
"description": "<string>"
},
"purchaseOrderNumber": "<string>",
"purchaseContractNumber": "<string>",
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"issRequirement": {
"code": "<string>",
"description": "<string>"
},
"simplesNacional": true,
"culturalIncentive": true,
"issuerSystem": "<string>",
"freightService": {
"modal": "ROAD",
"serviceType": "NORMAL",
"origin": {
"city": "<string>",
"cityCode": 123,
"state": "<string>"
},
"destination": {
"city": "<string>",
"cityCode": 123,
"state": "<string>"
},
"payer": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"sender": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"dispatcher": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"receiver": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"totalValue": 123,
"receivableValue": 123,
"components": [
{
"name": "<string>",
"value": 123
}
],
"cargoValue": 123,
"predominantProduct": "<string>",
"cargoQuantities": [
{
"unit": "<string>",
"quantity": 123,
"measure": "<string>"
}
],
"rntrc": "<string>",
"currency": "784"
},
"manifest": {
"modal": "ROAD",
"tractionVehicle": {
"plate": "<string>",
"state": "<string>",
"renavam": "<string>",
"tareKg": 123,
"capacityKg": 123,
"capacityM3": 123
},
"trailers": [
{
"plate": "<string>",
"state": "<string>",
"renavam": "<string>",
"tareKg": 123,
"capacityKg": 123,
"capacityM3": 123
}
],
"drivers": [
"<string>"
],
"origin": {
"city": "<string>",
"cityCode": 123,
"state": "<string>"
},
"destination": {
"city": "<string>",
"cityCode": 123,
"state": "<string>"
},
"loadingStops": [
{
"city": "<string>",
"cityCode": 123,
"state": "<string>"
}
],
"unloadingStops": [
{
"city": "<string>",
"cityCode": 123,
"state": "<string>"
}
],
"routeStates": [
"<string>"
],
"tripStartedAt": "<string>",
"closedAt": "<string>",
"closingLocation": {
"city": "<string>",
"cityCode": 123,
"state": "<string>"
},
"seals": [
"<string>"
],
"cteCount": 123,
"nfeCount": 123,
"mdfeCount": 123,
"cargoValue": 123,
"cargoWeight": 123,
"cargoWeightUnit": "<string>",
"currency": "784"
},
"transport": {
"freightModality": "SENDER",
"freightModalityRaw": {
"code": "<string>",
"description": "<string>"
},
"carrier": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
},
"anttCode": "<string>",
"vehiclePlate": "<string>",
"vehicleState": "<string>"
},
"volumes": [
{
"quantity": 123,
"kind": "<string>",
"brand": "<string>",
"numbering": "<string>",
"grossWeightKg": 123,
"netWeightKg": 123
}
]
},
"deliveryLocation": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"pickupLocation": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"payments": [
{
"method": "CASH",
"rawCode": "<string>",
"label": "<string>",
"amount": 123,
"change": 123,
"cardBrand": "<string>",
"cardBrandCode": "<string>",
"authorizationCode": "<string>",
"acquirerFederalDocument": "<string>",
"installmentCount": 123,
"currency": "784"
}
],
"billing": {
"number": "<string>",
"originalAmount": 123,
"discount": 123,
"netAmount": 123,
"installments": [
{
"number": "<string>",
"dueDate": "<string>",
"amount": 123,
"currency": "784"
}
],
"currency": "784"
},
"referencedDocuments": [
{
"type": "<string>",
"accessKey": "<string>",
"model": "<string>",
"series": "<string>",
"number": "<string>",
"issuerFederalDocument": "<string>",
"yearMonth": "<string>"
}
],
"events": [
{
"kind": "CANCELLATION",
"code": "<string>",
"description": "<string>",
"occurredAt": "<string>",
"registeredAt": "<string>",
"protocol": "<string>",
"authorFederalDocument": "<string>",
"sequence": 123,
"correctionText": "<string>",
"reason": "<string>"
}
],
"documents": {
"xmlAttachmentId": "<string>",
"pdfAttachmentId": "<string>",
"xmlProviderLink": "<string>",
"pdfProviderLink": "<string>",
"qrCodeUrl": "<string>",
"publicQueryUrl": "<string>",
"xmlVersion": "<string>"
},
"notes": {
"additionalInfo": "<string>",
"fiscalInfo": "<string>",
"observation": "<string>",
"otherInfo": [
"<string>"
]
},
"source": {
"provider": "AI_EXTRACTION",
"providerId": "<string>",
"retrievedAt": "<string>",
"completeness": "FULL",
"confidence": 123,
"modelId": "<string>",
"warnings": [
"<string>"
]
},
"raw": {}
},
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>",
"deletedBy": "<string>"
}/realms/{realmId}/organizations/{organizationId}/attachments/{attachmentId}
curl --request GET \
--url https://api.attachment.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/attachments/{attachmentId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.attachment.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/attachments/{attachmentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.attachment.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/attachments/{attachmentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.attachment.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/attachments/{attachmentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.attachment.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/attachments/{attachmentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.attachment.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/attachments/{attachmentId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attachment.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/attachments/{attachmentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"realmId": "<string>",
"organizationId": "<string>",
"status": "PENDING_UPLOAD",
"name": "<string>",
"contentType": "<string>",
"ai": {
"status": "PENDING",
"executedAt": "<string>",
"modelId": "<string>",
"error": "<string>"
},
"thumbnail": {
"status": "PENDING",
"data": "<string>",
"contentType": "<string>",
"width": 123,
"height": 123,
"sizeBytes": 123,
"generatedAt": "<string>",
"error": "<string>"
},
"fiscal": {
"status": "PENDING",
"executedAt": "<string>",
"modelId": "<string>",
"error": "<string>"
},
"createdBy": "<string>",
"sizeBytes": 123,
"image": {
"width": 123,
"height": 123,
"format": "<string>",
"pageCount": 123
},
"summary": "<string>",
"contents": [
"<string>"
],
"extractedReceipt": {
"type": "NFE",
"externalId": "<string>",
"accessKey": "<string>",
"model": "<string>",
"number": "<string>",
"series": "<string>",
"verificationCode": "<string>",
"environment": "LIVE",
"currency": "784",
"status": "AUTHORIZED",
"statusReason": "<string>",
"statusCode": "<string>",
"issuedAt": "<string>",
"authorizedAt": "<string>",
"canceledAt": "<string>",
"operationAt": "<string>",
"competenceDate": "<string>",
"authorizationProtocol": "<string>",
"issuer": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"recipient": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"recipientRole": "RECIPIENT",
"intermediary": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"technicalResponsible": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"amounts": {
"currency": "784",
"totalValue": 123,
"productsValue": 123,
"servicesValue": 123,
"discounts": 123,
"unconditionalDiscounts": 123,
"conditionalDiscounts": 123,
"freightValue": 123,
"insuranceValue": 123,
"otherCostsValue": 123,
"deductions": 123,
"netValue": 123,
"receivedValue": 123,
"approximateTax": 123,
"approximateTaxSource": "<string>"
},
"taxes": {
"icmsBase": 123,
"icmsAmount": 123,
"icmsStBase": 123,
"icmsStAmount": 123,
"icmsExemptAmount": 123,
"fcpAmount": 123,
"ipiAmount": 123,
"pisAmount": 123,
"cofinsAmount": 123,
"importDuty": 123,
"issBase": 123,
"issRate": 123,
"issAmount": 123,
"issWithheldAtSource": true,
"issWithheldAmount": 123,
"icmsOriginStateAmount": 123,
"icmsDestinationStateAmount": 123,
"approximateFederal": 123,
"approximateState": 123,
"approximateMunicipal": 123,
"approximateOther": 123,
"ibsAmount": 123,
"cbsAmount": 123,
"otherAmount": 123
},
"withholdings": {
"pisAmount": 123,
"cofinsAmount": 123,
"inssAmount": 123,
"irAmount": 123,
"csllAmount": 123,
"cpAmount": 123,
"otherAmount": 123,
"totalAmount": 123
},
"items": [
{
"sequence": 123,
"code": "<string>",
"description": "<string>",
"ean": "<string>",
"ncm": "<string>",
"cest": "<string>",
"cfop": "<string>",
"origin": "<string>",
"unit": "<string>",
"quantity": 123,
"unitPrice": "<string>",
"total": 123,
"discount": 123,
"freight": 123,
"insurance": 123,
"otherCosts": 123,
"approximateTax": 123,
"taxes": {
"icms": {
"cst": "<string>",
"origin": "<string>",
"base": 123,
"rate": 123,
"amount": 123,
"stBase": 123,
"stRate": 123,
"stAmount": 123,
"fcpBase": 123,
"fcpRate": 123,
"fcpAmount": 123,
"exemptAmount": 123,
"exemptionReasonCode": "<string>",
"destinationStateAmount": 123,
"originStateAmount": 123
},
"ipi": {
"cst": "<string>",
"legalFrameworkCode": "<string>",
"base": 123,
"rate": 123,
"amount": 123
},
"pis": {
"cst": "<string>",
"base": 123,
"rate": 123,
"amount": 123
},
"cofins": {
"cst": "<string>",
"base": 123,
"rate": 123,
"amount": 123
},
"importDuty": 123,
"issBase": 123,
"issRate": 123,
"issAmount": 123,
"ibsCbs": {
"cst": "<string>",
"classificationCode": "<string>",
"base": 123,
"ibsStateRate": 123,
"ibsStateAmount": 123,
"ibsMunicipalRate": 123,
"ibsMunicipalAmount": 123,
"ibsAmount": 123,
"cbsRate": 123,
"cbsAmount": 123
}
},
"currency": "784",
"additionalInfo": "<string>"
}
],
"itemCount": 123,
"service": {
"serviceListItemLC116": "<string>",
"serviceMunicipalCode": "<string>",
"serviceMunicipalDescription": "<string>",
"cnae": "<string>",
"description": "<string>",
"serviceProvisionState": "<string>",
"serviceProvisionCity": "<string>",
"serviceProvisionCityCode": 123
},
"rpsNumber": "<string>",
"rpsSeries": "<string>",
"rpsIssuedAt": "<string>",
"replacesDocumentNumber": "<string>",
"operationNature": "<string>",
"operationDirection": "INBOUND",
"purpose": "NORMAL",
"cfops": [
"<string>"
],
"isFinalConsumer": true,
"buyerPresence": {
"code": "<string>",
"description": "<string>"
},
"purchaseOrderNumber": "<string>",
"purchaseContractNumber": "<string>",
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"issRequirement": {
"code": "<string>",
"description": "<string>"
},
"simplesNacional": true,
"culturalIncentive": true,
"issuerSystem": "<string>",
"freightService": {
"modal": "ROAD",
"serviceType": "NORMAL",
"origin": {
"city": "<string>",
"cityCode": 123,
"state": "<string>"
},
"destination": {
"city": "<string>",
"cityCode": 123,
"state": "<string>"
},
"payer": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"sender": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"dispatcher": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"receiver": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"totalValue": 123,
"receivableValue": 123,
"components": [
{
"name": "<string>",
"value": 123
}
],
"cargoValue": 123,
"predominantProduct": "<string>",
"cargoQuantities": [
{
"unit": "<string>",
"quantity": 123,
"measure": "<string>"
}
],
"rntrc": "<string>",
"currency": "784"
},
"manifest": {
"modal": "ROAD",
"tractionVehicle": {
"plate": "<string>",
"state": "<string>",
"renavam": "<string>",
"tareKg": 123,
"capacityKg": 123,
"capacityM3": 123
},
"trailers": [
{
"plate": "<string>",
"state": "<string>",
"renavam": "<string>",
"tareKg": 123,
"capacityKg": 123,
"capacityM3": 123
}
],
"drivers": [
"<string>"
],
"origin": {
"city": "<string>",
"cityCode": 123,
"state": "<string>"
},
"destination": {
"city": "<string>",
"cityCode": 123,
"state": "<string>"
},
"loadingStops": [
{
"city": "<string>",
"cityCode": 123,
"state": "<string>"
}
],
"unloadingStops": [
{
"city": "<string>",
"cityCode": 123,
"state": "<string>"
}
],
"routeStates": [
"<string>"
],
"tripStartedAt": "<string>",
"closedAt": "<string>",
"closingLocation": {
"city": "<string>",
"cityCode": 123,
"state": "<string>"
},
"seals": [
"<string>"
],
"cteCount": 123,
"nfeCount": 123,
"mdfeCount": 123,
"cargoValue": 123,
"cargoWeight": 123,
"cargoWeightUnit": "<string>",
"currency": "784"
},
"transport": {
"freightModality": "SENDER",
"freightModalityRaw": {
"code": "<string>",
"description": "<string>"
},
"carrier": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
},
"anttCode": "<string>",
"vehiclePlate": "<string>",
"vehicleState": "<string>"
},
"volumes": [
{
"quantity": 123,
"kind": "<string>",
"brand": "<string>",
"numbering": "<string>",
"grossWeightKg": 123,
"netWeightKg": 123
}
]
},
"deliveryLocation": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"pickupLocation": {
"type": "PERSON",
"name": "<string>",
"tradeName": "<string>",
"federalDocument": "<string>",
"stateDocument": "<string>",
"municipalDocument": "<string>",
"suframaRegistration": "<string>",
"cnae": {
"code": "<string>",
"description": "<string>"
},
"taxRegime": {
"code": "<string>",
"description": "<string>"
},
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighbourhood": "<string>",
"city": "<string>",
"cityCode": 123,
"state": "<string>",
"stateCode": 123,
"postalCode": "<string>",
"country": "<string>",
"countryCode": "<string>"
}
},
"payments": [
{
"method": "CASH",
"rawCode": "<string>",
"label": "<string>",
"amount": 123,
"change": 123,
"cardBrand": "<string>",
"cardBrandCode": "<string>",
"authorizationCode": "<string>",
"acquirerFederalDocument": "<string>",
"installmentCount": 123,
"currency": "784"
}
],
"billing": {
"number": "<string>",
"originalAmount": 123,
"discount": 123,
"netAmount": 123,
"installments": [
{
"number": "<string>",
"dueDate": "<string>",
"amount": 123,
"currency": "784"
}
],
"currency": "784"
},
"referencedDocuments": [
{
"type": "<string>",
"accessKey": "<string>",
"model": "<string>",
"series": "<string>",
"number": "<string>",
"issuerFederalDocument": "<string>",
"yearMonth": "<string>"
}
],
"events": [
{
"kind": "CANCELLATION",
"code": "<string>",
"description": "<string>",
"occurredAt": "<string>",
"registeredAt": "<string>",
"protocol": "<string>",
"authorFederalDocument": "<string>",
"sequence": 123,
"correctionText": "<string>",
"reason": "<string>"
}
],
"documents": {
"xmlAttachmentId": "<string>",
"pdfAttachmentId": "<string>",
"xmlProviderLink": "<string>",
"pdfProviderLink": "<string>",
"qrCodeUrl": "<string>",
"publicQueryUrl": "<string>",
"xmlVersion": "<string>"
},
"notes": {
"additionalInfo": "<string>",
"fiscalInfo": "<string>",
"observation": "<string>",
"otherInfo": [
"<string>"
]
},
"source": {
"provider": "AI_EXTRACTION",
"providerId": "<string>",
"retrievedAt": "<string>",
"completeness": "FULL",
"confidence": 123,
"modelId": "<string>",
"warnings": [
"<string>"
]
},
"raw": {}
},
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>",
"deletedBy": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Successful response
Lifecycle of a stored file: PENDING_UPLOAD once created and an upload URL has been issued, AVAILABLE once the upload is confirmed, DELETED after removal. Deletion is permanent — an attachment cannot be restored.
PENDING_UPLOAD, AVAILABLE, DELETED The wire/event-payload shape — one mapper, shared by every HTTP response and event dispatch.
Show child attributes
Show child attributes
The attachment's preview image. Always present; check status before reading data.
Show child attributes
Show child attributes
Progress of the fiscal-data extraction that fills extractedReceipt. Always present; a PENDING/PROCESSING status means the file has not been read yet, which is why an extractedReceipt can be absent from a document that does have one.
Show child attributes
Show child attributes
Dimensions and format of the original file. Absent when the file's header could not be read.
⚠️ width and height are in PIXELS for an image and in POINTS (1/72 inch) for a PDF — check format to tell which. An A4 page reports 595 x 842 points, not pixels.
Show child attributes
Show child attributes
The fiscal document this file represents — a nota fiscal or an invoice. Absent unless the file is one and its details are known. Every field inside is optional: null-check your way in, and read status before rendering any amount.
Show child attributes
Show child attributes