curl --request POST \
--url https://api.spedy.com.br/v1/consumer-invoices \
--header 'Content-Type: application/json-patch+json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"isFinalCustomer": true,
"integrationId": "<string>",
"issuedOn": "2023-11-07T05:31:56Z",
"effectiveDate": "2023-11-07T05:31:56Z",
"number": 123,
"additionalInformation": "<string>",
"sendEmailToCustomer": true,
"series": "<string>",
"operationNature": "<string>",
"operationDate": "2023-11-07T05:31:56Z",
"receiver": {
"name": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"suframaTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"transport": {
"carrier": {
"stateTaxNumber": "<string>",
"transportRetention": "<string>",
"name": "<string>",
"federalTaxNumber": "<string>",
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"trailer": {
"plate": "<string>",
"rntc": "<string>"
},
"volume": {
"quantity": 123,
"species": "<string>",
"brand": "<string>",
"volumeNumeration": "<string>",
"netWeight": 123,
"grossWeight": 123
},
"vehicle": {
"plate": "<string>",
"state": "<string>",
"rntc": "<string>"
},
"icmsRetention": {
"serviceAmount": 123,
"baseTax": 123,
"rate": 123,
"amount": 123,
"cfop": "<string>",
"cityGeneratorFactCode": 123
},
"wagon": "<string>",
"ferry": "<string>"
},
"intermediary": {
"sellerRegistrationId": "<string>",
"name": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"billing": {
"number": "<string>",
"originalAmount": 123,
"discountAmount": 123,
"netAmount": 123
},
"duplicates": [
{
"number": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"amount": 123
}
],
"payments": [
{
"amount": 123,
"card": {
"federalTaxNumber": "<string>",
"authorizationCode": "<string>",
"isIntegratedPayment": true
}
}
],
"items": [
{
"code": "<string>",
"gtinCode": "<string>",
"description": "<string>",
"ncm": "<string>",
"cest": "<string>",
"cfop": 123,
"unit": "<string>",
"quantity": 123,
"unitAmount": 123,
"totalAmount": 123,
"unitTax": "<string>",
"quantityTax": 123,
"unitTaxAmount": 123,
"freightAmount": 123,
"insuranceAmount": 123,
"discountAmount": 123,
"othersAmount": 123,
"makeupTotal": true,
"numberOrderBuy": "<string>",
"itemNumberOrderBuy": 123,
"taxBenefitCode": "<string>",
"taxes": {
"totalTax": 123,
"icms": {
"origin": 123,
"cst": 123,
"csosn": 123,
"baseTaxModality": 123,
"baseTax": 123,
"baseTaxSt": 123,
"baseTaxStModality": 123,
"baseTaxStReduction": 123,
"baseTaxStAmount": 123,
"baseTaxReduction": 123,
"stRate": 123,
"stAmount": 123,
"stMarginAmount": 123,
"rate": 123,
"amount": 123,
"reductionRate": 123,
"snCreditRate": 123,
"snCreditAmount": 123,
"stRetentionAmount": 123,
"baseStRetentionAmount": 123,
"taxOperationBaseRate": 123,
"stReason": "<string>",
"amountOperation": 123,
"defermentRate": 123,
"baseDeferred": 123,
"exemptAmount": 123,
"exemptReason": 123,
"exemptDeduction": 123,
"fcpRate": 123,
"fcpAmount": 123,
"baseTaxFcpAmount": 123,
"fcpStRate": 123,
"fcpStAmount": 123,
"fcpStRetRate": 123,
"fcpStRetAmount": 123,
"baseTaxFcpStAmount": 123,
"baseFcpRetentionAmount": 123,
"stpRate": 123,
"baseTaxEffectiveReduction": 123,
"baseTaxEffective": 123,
"effectiveRate": 123,
"effectiveAmount": 123,
"substituteAmount": 123
},
"ipi": {
"classification": "<string>",
"producerFederalTaxNumber": "<string>",
"stampCode": "<string>",
"stampQuantity": 123,
"classificationCode": "<string>",
"cst": 123,
"baseTax": 123,
"rate": 123,
"unitQuantity": 123,
"unitAmount": 123,
"amount": 123
},
"ii": {
"baseTax": 123,
"customsExpenditureAmount": 123,
"amount": 123,
"iofAmount": 123
},
"pis": {
"cst": 123,
"baseTax": 123,
"rate": 123,
"amount": 123,
"productQuantity": 123
},
"cofins": {
"cst": 123,
"baseTax": 123,
"rate": 123,
"amount": 123,
"productQuantity": 123
},
"icmsDestination": {
"destBaseTax": 123,
"fcpAdicRate": 123,
"internalOperationRate": 123,
"destinationRate": 123,
"fcpDestinationAmount": 123,
"destinationAmount": 123,
"issuerStateAmount": 123,
"fcpBaseTax": 123
},
"is": {
"cst": 123,
"classification": 123,
"baseTax": 123,
"rate": 123,
"specificRate": 123,
"unitTax": "<string>",
"quantityTax": 123,
"amount": 123
},
"ibsCbs": {
"cst": 123,
"classification": 123,
"ibsAmount": 123,
"baseTax": 123,
"ibsStateRate": 123,
"ibsStateDef": {
"rate": 123,
"amount": 123
},
"ibsStateDevTax": {
"amount": 123
},
"ibsStateRed": {
"rate": 123,
"effectiveRate": 123
},
"ibsStateAmount": 123,
"ibsCityRate": 123,
"ibsCityDef": {
"rate": 123,
"amount": 123
},
"ibsCityDevTax": {
"amount": 123
},
"ibsCityRed": {
"rate": 123,
"effectiveRate": 123
},
"ibsCityAmount": 123,
"cbsRate": 123,
"cbsDef": {
"rate": 123,
"amount": 123
},
"cbsDevTax": {
"amount": 123
},
"cbsRed": {
"rate": 123,
"effectiveRate": 123
},
"cbsAmount": 123,
"regCst": 123,
"regClassification": 123,
"regStateIbsRate": 123,
"regStateIbsAmount": 123,
"regCityIbsRate": 123,
"regCityIbsAmount": 123,
"regCbsRate": 123,
"regCbsAmount": 123,
"ibsPresCred": {
"code": 123,
"rate": 123,
"amount": 123,
"suspensiveAmount": 123
},
"cbsPresCred": {
"code": 123,
"rate": 123,
"amount": 123,
"suspensiveAmount": 123
},
"govPurchaseStateIbsRate": 123,
"govPurchaseStateIbsAmount": 123,
"govPurchaseCityIbsRate": 123,
"govPurchaseCityIbsAmount": 123,
"govPurchaseCbsRate": 123,
"govPurchaseCbsAmount": 123,
"singleStageIbsAmount": 123,
"singleStageCbsAmount": 123,
"singleStageStandard": {
"quantityTax": 123,
"ibsAdRemRate": 123,
"cbsAdRemRate": 123,
"ibsAmount": 123,
"cbsAmount": 123
},
"singleStageReten": {
"quantityTax": 123,
"ibsAdRemRate": 123,
"cbsAdRemRate": 123,
"ibsAmount": 123,
"cbsAmount": 123
},
"singleStageRet": {
"quantityTax": 123,
"ibsAdRemRate": 123,
"cbsAdRemRate": 123,
"ibsAmount": 123,
"cbsAmount": 123
},
"singleStageDefIbsRate": 123,
"singleStageDefIbsAmount": 123,
"singleStageDefCbsRate": 123,
"singleStageDefCbsAmount": 123,
"credTransferIbsAmount": 123,
"credTransferCbsAmount": 123,
"presCredIbsZfmAmount": 123
}
},
"specificProduct": {
"fuel": {
"anpCode": "<string>",
"description": "<string>"
},
"vehicle": {
"chassis": "<string>",
"colorCode": "<string>",
"colorDescription": "<string>",
"power": "<string>",
"cylinderCapacity": "<string>",
"netWeight": "<string>",
"grossWeight": "<string>",
"serialNumber": "<string>",
"fuelType": "<string>",
"engineNumber": "<string>",
"maxTractionCapacity": "<string>",
"distanceType": "<string>",
"modelYear": 123,
"manufactureYear": 123,
"paintType": "<string>",
"vehicleType": "<string>",
"vehicleSpecies": 123,
"modelCode": "<string>",
"denatranColorCode": "<string>",
"seats": 123
},
"medication": {
"anvisaCode": "<string>",
"exemptionReason": "<string>",
"maxConsumerPrice": 123
}
},
"trackings": [
{
"batchNumber": "<string>",
"batchQuantity": 123,
"manufacturingDate": "2023-11-07T05:31:56Z",
"expirationDate": "2023-11-07T05:31:56Z",
"aggregationCode": "<string>"
}
]
}
],
"referencedDocuments": [
{
"accessKey": "<string>"
}
],
"authorizedPersons": [
"<string>"
],
"total": {
"invoiceAmount": 123,
"pisAmount": 123,
"cofinsAmount": 123,
"discountAmount": 123,
"othersAmount": 123,
"totalTax": 123,
"ipiAmount": 123,
"importTaxAmount": 123,
"productAmount": 123,
"freightAmount": 123,
"insuranceAmount": 123,
"icmsBaseTax": 123,
"icmsAmount": 123,
"icmsStBaseTax": 123,
"icmsStAmount": 123,
"icmsExemptAmount": 123,
"fcpStRetAmount": 123,
"fcpStAmount": 123,
"fcpAmount": 123,
"ipiReturnedAmount": 123,
"icmsSenderAmount": 123,
"icmsDestinationAmount": 123,
"fcpDestinationAmount": 123,
"isAmount": 123,
"ibsCbsBaseTax": 123,
"ibsStateDefAmount": 123,
"ibsStateDevTaxAmount": 123,
"ibsStateAmount": 123,
"ibsCityDefAmount": 123,
"ibsCityDevTaxAmount": 123,
"ibsCityAmount": 123,
"ibsAmount": 123,
"ibsPresCredAmount": 123,
"ibsPresCredSuspensiveAmount": 123,
"cbsDefAmount": 123,
"cbsDevTaxAmount": 123,
"cbsAmount": 123,
"cbsPresCredAmount": 123,
"cbsPresCredSuspensiveAmount": 123,
"ibsSingleStageStandardAmount": 123,
"cbsSingleStageStandardAmount": 123,
"ibsSingleStageRetenAmount": 123,
"cbsSingleStageRetenAmount": 123,
"ibsSingleStageRetAmount": 123,
"cbsSingleStageRetAmount": 123,
"ibsCbsIsAmount": 123
},
"accessKey": "<string>",
"code": "<string>",
"govPurchase": {
"rate": 123
}
}
'import requests
url = "https://api.spedy.com.br/v1/consumer-invoices"
payload = {
"isFinalCustomer": True,
"integrationId": "<string>",
"issuedOn": "2023-11-07T05:31:56Z",
"effectiveDate": "2023-11-07T05:31:56Z",
"number": 123,
"additionalInformation": "<string>",
"sendEmailToCustomer": True,
"series": "<string>",
"operationNature": "<string>",
"operationDate": "2023-11-07T05:31:56Z",
"receiver": {
"name": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"suframaTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"transport": {
"carrier": {
"stateTaxNumber": "<string>",
"transportRetention": "<string>",
"name": "<string>",
"federalTaxNumber": "<string>",
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"trailer": {
"plate": "<string>",
"rntc": "<string>"
},
"volume": {
"quantity": 123,
"species": "<string>",
"brand": "<string>",
"volumeNumeration": "<string>",
"netWeight": 123,
"grossWeight": 123
},
"vehicle": {
"plate": "<string>",
"state": "<string>",
"rntc": "<string>"
},
"icmsRetention": {
"serviceAmount": 123,
"baseTax": 123,
"rate": 123,
"amount": 123,
"cfop": "<string>",
"cityGeneratorFactCode": 123
},
"wagon": "<string>",
"ferry": "<string>"
},
"intermediary": {
"sellerRegistrationId": "<string>",
"name": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"billing": {
"number": "<string>",
"originalAmount": 123,
"discountAmount": 123,
"netAmount": 123
},
"duplicates": [
{
"number": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"amount": 123
}
],
"payments": [
{
"amount": 123,
"card": {
"federalTaxNumber": "<string>",
"authorizationCode": "<string>",
"isIntegratedPayment": True
}
}
],
"items": [
{
"code": "<string>",
"gtinCode": "<string>",
"description": "<string>",
"ncm": "<string>",
"cest": "<string>",
"cfop": 123,
"unit": "<string>",
"quantity": 123,
"unitAmount": 123,
"totalAmount": 123,
"unitTax": "<string>",
"quantityTax": 123,
"unitTaxAmount": 123,
"freightAmount": 123,
"insuranceAmount": 123,
"discountAmount": 123,
"othersAmount": 123,
"makeupTotal": True,
"numberOrderBuy": "<string>",
"itemNumberOrderBuy": 123,
"taxBenefitCode": "<string>",
"taxes": {
"totalTax": 123,
"icms": {
"origin": 123,
"cst": 123,
"csosn": 123,
"baseTaxModality": 123,
"baseTax": 123,
"baseTaxSt": 123,
"baseTaxStModality": 123,
"baseTaxStReduction": 123,
"baseTaxStAmount": 123,
"baseTaxReduction": 123,
"stRate": 123,
"stAmount": 123,
"stMarginAmount": 123,
"rate": 123,
"amount": 123,
"reductionRate": 123,
"snCreditRate": 123,
"snCreditAmount": 123,
"stRetentionAmount": 123,
"baseStRetentionAmount": 123,
"taxOperationBaseRate": 123,
"stReason": "<string>",
"amountOperation": 123,
"defermentRate": 123,
"baseDeferred": 123,
"exemptAmount": 123,
"exemptReason": 123,
"exemptDeduction": 123,
"fcpRate": 123,
"fcpAmount": 123,
"baseTaxFcpAmount": 123,
"fcpStRate": 123,
"fcpStAmount": 123,
"fcpStRetRate": 123,
"fcpStRetAmount": 123,
"baseTaxFcpStAmount": 123,
"baseFcpRetentionAmount": 123,
"stpRate": 123,
"baseTaxEffectiveReduction": 123,
"baseTaxEffective": 123,
"effectiveRate": 123,
"effectiveAmount": 123,
"substituteAmount": 123
},
"ipi": {
"classification": "<string>",
"producerFederalTaxNumber": "<string>",
"stampCode": "<string>",
"stampQuantity": 123,
"classificationCode": "<string>",
"cst": 123,
"baseTax": 123,
"rate": 123,
"unitQuantity": 123,
"unitAmount": 123,
"amount": 123
},
"ii": {
"baseTax": 123,
"customsExpenditureAmount": 123,
"amount": 123,
"iofAmount": 123
},
"pis": {
"cst": 123,
"baseTax": 123,
"rate": 123,
"amount": 123,
"productQuantity": 123
},
"cofins": {
"cst": 123,
"baseTax": 123,
"rate": 123,
"amount": 123,
"productQuantity": 123
},
"icmsDestination": {
"destBaseTax": 123,
"fcpAdicRate": 123,
"internalOperationRate": 123,
"destinationRate": 123,
"fcpDestinationAmount": 123,
"destinationAmount": 123,
"issuerStateAmount": 123,
"fcpBaseTax": 123
},
"is": {
"cst": 123,
"classification": 123,
"baseTax": 123,
"rate": 123,
"specificRate": 123,
"unitTax": "<string>",
"quantityTax": 123,
"amount": 123
},
"ibsCbs": {
"cst": 123,
"classification": 123,
"ibsAmount": 123,
"baseTax": 123,
"ibsStateRate": 123,
"ibsStateDef": {
"rate": 123,
"amount": 123
},
"ibsStateDevTax": { "amount": 123 },
"ibsStateRed": {
"rate": 123,
"effectiveRate": 123
},
"ibsStateAmount": 123,
"ibsCityRate": 123,
"ibsCityDef": {
"rate": 123,
"amount": 123
},
"ibsCityDevTax": { "amount": 123 },
"ibsCityRed": {
"rate": 123,
"effectiveRate": 123
},
"ibsCityAmount": 123,
"cbsRate": 123,
"cbsDef": {
"rate": 123,
"amount": 123
},
"cbsDevTax": { "amount": 123 },
"cbsRed": {
"rate": 123,
"effectiveRate": 123
},
"cbsAmount": 123,
"regCst": 123,
"regClassification": 123,
"regStateIbsRate": 123,
"regStateIbsAmount": 123,
"regCityIbsRate": 123,
"regCityIbsAmount": 123,
"regCbsRate": 123,
"regCbsAmount": 123,
"ibsPresCred": {
"code": 123,
"rate": 123,
"amount": 123,
"suspensiveAmount": 123
},
"cbsPresCred": {
"code": 123,
"rate": 123,
"amount": 123,
"suspensiveAmount": 123
},
"govPurchaseStateIbsRate": 123,
"govPurchaseStateIbsAmount": 123,
"govPurchaseCityIbsRate": 123,
"govPurchaseCityIbsAmount": 123,
"govPurchaseCbsRate": 123,
"govPurchaseCbsAmount": 123,
"singleStageIbsAmount": 123,
"singleStageCbsAmount": 123,
"singleStageStandard": {
"quantityTax": 123,
"ibsAdRemRate": 123,
"cbsAdRemRate": 123,
"ibsAmount": 123,
"cbsAmount": 123
},
"singleStageReten": {
"quantityTax": 123,
"ibsAdRemRate": 123,
"cbsAdRemRate": 123,
"ibsAmount": 123,
"cbsAmount": 123
},
"singleStageRet": {
"quantityTax": 123,
"ibsAdRemRate": 123,
"cbsAdRemRate": 123,
"ibsAmount": 123,
"cbsAmount": 123
},
"singleStageDefIbsRate": 123,
"singleStageDefIbsAmount": 123,
"singleStageDefCbsRate": 123,
"singleStageDefCbsAmount": 123,
"credTransferIbsAmount": 123,
"credTransferCbsAmount": 123,
"presCredIbsZfmAmount": 123
}
},
"specificProduct": {
"fuel": {
"anpCode": "<string>",
"description": "<string>"
},
"vehicle": {
"chassis": "<string>",
"colorCode": "<string>",
"colorDescription": "<string>",
"power": "<string>",
"cylinderCapacity": "<string>",
"netWeight": "<string>",
"grossWeight": "<string>",
"serialNumber": "<string>",
"fuelType": "<string>",
"engineNumber": "<string>",
"maxTractionCapacity": "<string>",
"distanceType": "<string>",
"modelYear": 123,
"manufactureYear": 123,
"paintType": "<string>",
"vehicleType": "<string>",
"vehicleSpecies": 123,
"modelCode": "<string>",
"denatranColorCode": "<string>",
"seats": 123
},
"medication": {
"anvisaCode": "<string>",
"exemptionReason": "<string>",
"maxConsumerPrice": 123
}
},
"trackings": [
{
"batchNumber": "<string>",
"batchQuantity": 123,
"manufacturingDate": "2023-11-07T05:31:56Z",
"expirationDate": "2023-11-07T05:31:56Z",
"aggregationCode": "<string>"
}
]
}
],
"referencedDocuments": [{ "accessKey": "<string>" }],
"authorizedPersons": ["<string>"],
"total": {
"invoiceAmount": 123,
"pisAmount": 123,
"cofinsAmount": 123,
"discountAmount": 123,
"othersAmount": 123,
"totalTax": 123,
"ipiAmount": 123,
"importTaxAmount": 123,
"productAmount": 123,
"freightAmount": 123,
"insuranceAmount": 123,
"icmsBaseTax": 123,
"icmsAmount": 123,
"icmsStBaseTax": 123,
"icmsStAmount": 123,
"icmsExemptAmount": 123,
"fcpStRetAmount": 123,
"fcpStAmount": 123,
"fcpAmount": 123,
"ipiReturnedAmount": 123,
"icmsSenderAmount": 123,
"icmsDestinationAmount": 123,
"fcpDestinationAmount": 123,
"isAmount": 123,
"ibsCbsBaseTax": 123,
"ibsStateDefAmount": 123,
"ibsStateDevTaxAmount": 123,
"ibsStateAmount": 123,
"ibsCityDefAmount": 123,
"ibsCityDevTaxAmount": 123,
"ibsCityAmount": 123,
"ibsAmount": 123,
"ibsPresCredAmount": 123,
"ibsPresCredSuspensiveAmount": 123,
"cbsDefAmount": 123,
"cbsDevTaxAmount": 123,
"cbsAmount": 123,
"cbsPresCredAmount": 123,
"cbsPresCredSuspensiveAmount": 123,
"ibsSingleStageStandardAmount": 123,
"cbsSingleStageStandardAmount": 123,
"ibsSingleStageRetenAmount": 123,
"cbsSingleStageRetenAmount": 123,
"ibsSingleStageRetAmount": 123,
"cbsSingleStageRetAmount": 123,
"ibsCbsIsAmount": 123
},
"accessKey": "<string>",
"code": "<string>",
"govPurchase": { "rate": 123 }
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
isFinalCustomer: true,
integrationId: '<string>',
issuedOn: '2023-11-07T05:31:56Z',
effectiveDate: '2023-11-07T05:31:56Z',
number: 123,
additionalInformation: '<string>',
sendEmailToCustomer: true,
series: '<string>',
operationNature: '<string>',
operationDate: '2023-11-07T05:31:56Z',
receiver: {
name: '<string>',
federalTaxNumber: '<string>',
stateTaxNumber: '<string>',
suframaTaxNumber: '<string>',
cityTaxNumber: '<string>',
email: '<string>',
phoneNumber: '<string>',
address: {
street: '<string>',
district: '<string>',
postalCode: '<string>',
number: '<string>',
additionalInformation: '<string>',
city: {name: '<string>', state: '<string>', code: 123},
country: '<string>'
}
},
transport: {
carrier: {
stateTaxNumber: '<string>',
transportRetention: '<string>',
name: '<string>',
federalTaxNumber: '<string>',
email: '<string>',
phone: '<string>',
address: {
street: '<string>',
district: '<string>',
postalCode: '<string>',
number: '<string>',
additionalInformation: '<string>',
city: {name: '<string>', state: '<string>', code: 123},
country: '<string>'
}
},
trailer: {plate: '<string>', rntc: '<string>'},
volume: {
quantity: 123,
species: '<string>',
brand: '<string>',
volumeNumeration: '<string>',
netWeight: 123,
grossWeight: 123
},
vehicle: {plate: '<string>', state: '<string>', rntc: '<string>'},
icmsRetention: {
serviceAmount: 123,
baseTax: 123,
rate: 123,
amount: 123,
cfop: '<string>',
cityGeneratorFactCode: 123
},
wagon: '<string>',
ferry: '<string>'
},
intermediary: {
sellerRegistrationId: '<string>',
name: '<string>',
federalTaxNumber: '<string>',
stateTaxNumber: '<string>',
cityTaxNumber: '<string>',
email: '<string>',
phoneNumber: '<string>',
address: {
street: '<string>',
district: '<string>',
postalCode: '<string>',
number: '<string>',
additionalInformation: '<string>',
city: {name: '<string>', state: '<string>', code: 123},
country: '<string>'
}
},
billing: {number: '<string>', originalAmount: 123, discountAmount: 123, netAmount: 123},
duplicates: [{number: '<string>', dueDate: '2023-11-07T05:31:56Z', amount: 123}],
payments: [
{
amount: 123,
card: {
federalTaxNumber: '<string>',
authorizationCode: '<string>',
isIntegratedPayment: true
}
}
],
items: [
{
code: '<string>',
gtinCode: '<string>',
description: '<string>',
ncm: '<string>',
cest: '<string>',
cfop: 123,
unit: '<string>',
quantity: 123,
unitAmount: 123,
totalAmount: 123,
unitTax: '<string>',
quantityTax: 123,
unitTaxAmount: 123,
freightAmount: 123,
insuranceAmount: 123,
discountAmount: 123,
othersAmount: 123,
makeupTotal: true,
numberOrderBuy: '<string>',
itemNumberOrderBuy: 123,
taxBenefitCode: '<string>',
taxes: {
totalTax: 123,
icms: {
origin: 123,
cst: 123,
csosn: 123,
baseTaxModality: 123,
baseTax: 123,
baseTaxSt: 123,
baseTaxStModality: 123,
baseTaxStReduction: 123,
baseTaxStAmount: 123,
baseTaxReduction: 123,
stRate: 123,
stAmount: 123,
stMarginAmount: 123,
rate: 123,
amount: 123,
reductionRate: 123,
snCreditRate: 123,
snCreditAmount: 123,
stRetentionAmount: 123,
baseStRetentionAmount: 123,
taxOperationBaseRate: 123,
stReason: '<string>',
amountOperation: 123,
defermentRate: 123,
baseDeferred: 123,
exemptAmount: 123,
exemptReason: 123,
exemptDeduction: 123,
fcpRate: 123,
fcpAmount: 123,
baseTaxFcpAmount: 123,
fcpStRate: 123,
fcpStAmount: 123,
fcpStRetRate: 123,
fcpStRetAmount: 123,
baseTaxFcpStAmount: 123,
baseFcpRetentionAmount: 123,
stpRate: 123,
baseTaxEffectiveReduction: 123,
baseTaxEffective: 123,
effectiveRate: 123,
effectiveAmount: 123,
substituteAmount: 123
},
ipi: {
classification: '<string>',
producerFederalTaxNumber: '<string>',
stampCode: '<string>',
stampQuantity: 123,
classificationCode: '<string>',
cst: 123,
baseTax: 123,
rate: 123,
unitQuantity: 123,
unitAmount: 123,
amount: 123
},
ii: {baseTax: 123, customsExpenditureAmount: 123, amount: 123, iofAmount: 123},
pis: {cst: 123, baseTax: 123, rate: 123, amount: 123, productQuantity: 123},
cofins: {cst: 123, baseTax: 123, rate: 123, amount: 123, productQuantity: 123},
icmsDestination: {
destBaseTax: 123,
fcpAdicRate: 123,
internalOperationRate: 123,
destinationRate: 123,
fcpDestinationAmount: 123,
destinationAmount: 123,
issuerStateAmount: 123,
fcpBaseTax: 123
},
is: {
cst: 123,
classification: 123,
baseTax: 123,
rate: 123,
specificRate: 123,
unitTax: '<string>',
quantityTax: 123,
amount: 123
},
ibsCbs: {
cst: 123,
classification: 123,
ibsAmount: 123,
baseTax: 123,
ibsStateRate: 123,
ibsStateDef: {rate: 123, amount: 123},
ibsStateDevTax: {amount: 123},
ibsStateRed: {rate: 123, effectiveRate: 123},
ibsStateAmount: 123,
ibsCityRate: 123,
ibsCityDef: {rate: 123, amount: 123},
ibsCityDevTax: {amount: 123},
ibsCityRed: {rate: 123, effectiveRate: 123},
ibsCityAmount: 123,
cbsRate: 123,
cbsDef: {rate: 123, amount: 123},
cbsDevTax: {amount: 123},
cbsRed: {rate: 123, effectiveRate: 123},
cbsAmount: 123,
regCst: 123,
regClassification: 123,
regStateIbsRate: 123,
regStateIbsAmount: 123,
regCityIbsRate: 123,
regCityIbsAmount: 123,
regCbsRate: 123,
regCbsAmount: 123,
ibsPresCred: {code: 123, rate: 123, amount: 123, suspensiveAmount: 123},
cbsPresCred: {code: 123, rate: 123, amount: 123, suspensiveAmount: 123},
govPurchaseStateIbsRate: 123,
govPurchaseStateIbsAmount: 123,
govPurchaseCityIbsRate: 123,
govPurchaseCityIbsAmount: 123,
govPurchaseCbsRate: 123,
govPurchaseCbsAmount: 123,
singleStageIbsAmount: 123,
singleStageCbsAmount: 123,
singleStageStandard: {
quantityTax: 123,
ibsAdRemRate: 123,
cbsAdRemRate: 123,
ibsAmount: 123,
cbsAmount: 123
},
singleStageReten: {
quantityTax: 123,
ibsAdRemRate: 123,
cbsAdRemRate: 123,
ibsAmount: 123,
cbsAmount: 123
},
singleStageRet: {
quantityTax: 123,
ibsAdRemRate: 123,
cbsAdRemRate: 123,
ibsAmount: 123,
cbsAmount: 123
},
singleStageDefIbsRate: 123,
singleStageDefIbsAmount: 123,
singleStageDefCbsRate: 123,
singleStageDefCbsAmount: 123,
credTransferIbsAmount: 123,
credTransferCbsAmount: 123,
presCredIbsZfmAmount: 123
}
},
specificProduct: {
fuel: {anpCode: '<string>', description: '<string>'},
vehicle: {
chassis: '<string>',
colorCode: '<string>',
colorDescription: '<string>',
power: '<string>',
cylinderCapacity: '<string>',
netWeight: '<string>',
grossWeight: '<string>',
serialNumber: '<string>',
fuelType: '<string>',
engineNumber: '<string>',
maxTractionCapacity: '<string>',
distanceType: '<string>',
modelYear: 123,
manufactureYear: 123,
paintType: '<string>',
vehicleType: '<string>',
vehicleSpecies: 123,
modelCode: '<string>',
denatranColorCode: '<string>',
seats: 123
},
medication: {anvisaCode: '<string>', exemptionReason: '<string>', maxConsumerPrice: 123}
},
trackings: [
{
batchNumber: '<string>',
batchQuantity: 123,
manufacturingDate: '2023-11-07T05:31:56Z',
expirationDate: '2023-11-07T05:31:56Z',
aggregationCode: '<string>'
}
]
}
],
referencedDocuments: [{accessKey: '<string>'}],
authorizedPersons: ['<string>'],
total: {
invoiceAmount: 123,
pisAmount: 123,
cofinsAmount: 123,
discountAmount: 123,
othersAmount: 123,
totalTax: 123,
ipiAmount: 123,
importTaxAmount: 123,
productAmount: 123,
freightAmount: 123,
insuranceAmount: 123,
icmsBaseTax: 123,
icmsAmount: 123,
icmsStBaseTax: 123,
icmsStAmount: 123,
icmsExemptAmount: 123,
fcpStRetAmount: 123,
fcpStAmount: 123,
fcpAmount: 123,
ipiReturnedAmount: 123,
icmsSenderAmount: 123,
icmsDestinationAmount: 123,
fcpDestinationAmount: 123,
isAmount: 123,
ibsCbsBaseTax: 123,
ibsStateDefAmount: 123,
ibsStateDevTaxAmount: 123,
ibsStateAmount: 123,
ibsCityDefAmount: 123,
ibsCityDevTaxAmount: 123,
ibsCityAmount: 123,
ibsAmount: 123,
ibsPresCredAmount: 123,
ibsPresCredSuspensiveAmount: 123,
cbsDefAmount: 123,
cbsDevTaxAmount: 123,
cbsAmount: 123,
cbsPresCredAmount: 123,
cbsPresCredSuspensiveAmount: 123,
ibsSingleStageStandardAmount: 123,
cbsSingleStageStandardAmount: 123,
ibsSingleStageRetenAmount: 123,
cbsSingleStageRetenAmount: 123,
ibsSingleStageRetAmount: 123,
cbsSingleStageRetAmount: 123,
ibsCbsIsAmount: 123
},
accessKey: '<string>',
code: '<string>',
govPurchase: {rate: 123}
})
};
fetch('https://api.spedy.com.br/v1/consumer-invoices', 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.spedy.com.br/v1/consumer-invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'isFinalCustomer' => true,
'integrationId' => '<string>',
'issuedOn' => '2023-11-07T05:31:56Z',
'effectiveDate' => '2023-11-07T05:31:56Z',
'number' => 123,
'additionalInformation' => '<string>',
'sendEmailToCustomer' => true,
'series' => '<string>',
'operationNature' => '<string>',
'operationDate' => '2023-11-07T05:31:56Z',
'receiver' => [
'name' => '<string>',
'federalTaxNumber' => '<string>',
'stateTaxNumber' => '<string>',
'suframaTaxNumber' => '<string>',
'cityTaxNumber' => '<string>',
'email' => '<string>',
'phoneNumber' => '<string>',
'address' => [
'street' => '<string>',
'district' => '<string>',
'postalCode' => '<string>',
'number' => '<string>',
'additionalInformation' => '<string>',
'city' => [
'name' => '<string>',
'state' => '<string>',
'code' => 123
],
'country' => '<string>'
]
],
'transport' => [
'carrier' => [
'stateTaxNumber' => '<string>',
'transportRetention' => '<string>',
'name' => '<string>',
'federalTaxNumber' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'address' => [
'street' => '<string>',
'district' => '<string>',
'postalCode' => '<string>',
'number' => '<string>',
'additionalInformation' => '<string>',
'city' => [
'name' => '<string>',
'state' => '<string>',
'code' => 123
],
'country' => '<string>'
]
],
'trailer' => [
'plate' => '<string>',
'rntc' => '<string>'
],
'volume' => [
'quantity' => 123,
'species' => '<string>',
'brand' => '<string>',
'volumeNumeration' => '<string>',
'netWeight' => 123,
'grossWeight' => 123
],
'vehicle' => [
'plate' => '<string>',
'state' => '<string>',
'rntc' => '<string>'
],
'icmsRetention' => [
'serviceAmount' => 123,
'baseTax' => 123,
'rate' => 123,
'amount' => 123,
'cfop' => '<string>',
'cityGeneratorFactCode' => 123
],
'wagon' => '<string>',
'ferry' => '<string>'
],
'intermediary' => [
'sellerRegistrationId' => '<string>',
'name' => '<string>',
'federalTaxNumber' => '<string>',
'stateTaxNumber' => '<string>',
'cityTaxNumber' => '<string>',
'email' => '<string>',
'phoneNumber' => '<string>',
'address' => [
'street' => '<string>',
'district' => '<string>',
'postalCode' => '<string>',
'number' => '<string>',
'additionalInformation' => '<string>',
'city' => [
'name' => '<string>',
'state' => '<string>',
'code' => 123
],
'country' => '<string>'
]
],
'billing' => [
'number' => '<string>',
'originalAmount' => 123,
'discountAmount' => 123,
'netAmount' => 123
],
'duplicates' => [
[
'number' => '<string>',
'dueDate' => '2023-11-07T05:31:56Z',
'amount' => 123
]
],
'payments' => [
[
'amount' => 123,
'card' => [
'federalTaxNumber' => '<string>',
'authorizationCode' => '<string>',
'isIntegratedPayment' => true
]
]
],
'items' => [
[
'code' => '<string>',
'gtinCode' => '<string>',
'description' => '<string>',
'ncm' => '<string>',
'cest' => '<string>',
'cfop' => 123,
'unit' => '<string>',
'quantity' => 123,
'unitAmount' => 123,
'totalAmount' => 123,
'unitTax' => '<string>',
'quantityTax' => 123,
'unitTaxAmount' => 123,
'freightAmount' => 123,
'insuranceAmount' => 123,
'discountAmount' => 123,
'othersAmount' => 123,
'makeupTotal' => true,
'numberOrderBuy' => '<string>',
'itemNumberOrderBuy' => 123,
'taxBenefitCode' => '<string>',
'taxes' => [
'totalTax' => 123,
'icms' => [
'origin' => 123,
'cst' => 123,
'csosn' => 123,
'baseTaxModality' => 123,
'baseTax' => 123,
'baseTaxSt' => 123,
'baseTaxStModality' => 123,
'baseTaxStReduction' => 123,
'baseTaxStAmount' => 123,
'baseTaxReduction' => 123,
'stRate' => 123,
'stAmount' => 123,
'stMarginAmount' => 123,
'rate' => 123,
'amount' => 123,
'reductionRate' => 123,
'snCreditRate' => 123,
'snCreditAmount' => 123,
'stRetentionAmount' => 123,
'baseStRetentionAmount' => 123,
'taxOperationBaseRate' => 123,
'stReason' => '<string>',
'amountOperation' => 123,
'defermentRate' => 123,
'baseDeferred' => 123,
'exemptAmount' => 123,
'exemptReason' => 123,
'exemptDeduction' => 123,
'fcpRate' => 123,
'fcpAmount' => 123,
'baseTaxFcpAmount' => 123,
'fcpStRate' => 123,
'fcpStAmount' => 123,
'fcpStRetRate' => 123,
'fcpStRetAmount' => 123,
'baseTaxFcpStAmount' => 123,
'baseFcpRetentionAmount' => 123,
'stpRate' => 123,
'baseTaxEffectiveReduction' => 123,
'baseTaxEffective' => 123,
'effectiveRate' => 123,
'effectiveAmount' => 123,
'substituteAmount' => 123
],
'ipi' => [
'classification' => '<string>',
'producerFederalTaxNumber' => '<string>',
'stampCode' => '<string>',
'stampQuantity' => 123,
'classificationCode' => '<string>',
'cst' => 123,
'baseTax' => 123,
'rate' => 123,
'unitQuantity' => 123,
'unitAmount' => 123,
'amount' => 123
],
'ii' => [
'baseTax' => 123,
'customsExpenditureAmount' => 123,
'amount' => 123,
'iofAmount' => 123
],
'pis' => [
'cst' => 123,
'baseTax' => 123,
'rate' => 123,
'amount' => 123,
'productQuantity' => 123
],
'cofins' => [
'cst' => 123,
'baseTax' => 123,
'rate' => 123,
'amount' => 123,
'productQuantity' => 123
],
'icmsDestination' => [
'destBaseTax' => 123,
'fcpAdicRate' => 123,
'internalOperationRate' => 123,
'destinationRate' => 123,
'fcpDestinationAmount' => 123,
'destinationAmount' => 123,
'issuerStateAmount' => 123,
'fcpBaseTax' => 123
],
'is' => [
'cst' => 123,
'classification' => 123,
'baseTax' => 123,
'rate' => 123,
'specificRate' => 123,
'unitTax' => '<string>',
'quantityTax' => 123,
'amount' => 123
],
'ibsCbs' => [
'cst' => 123,
'classification' => 123,
'ibsAmount' => 123,
'baseTax' => 123,
'ibsStateRate' => 123,
'ibsStateDef' => [
'rate' => 123,
'amount' => 123
],
'ibsStateDevTax' => [
'amount' => 123
],
'ibsStateRed' => [
'rate' => 123,
'effectiveRate' => 123
],
'ibsStateAmount' => 123,
'ibsCityRate' => 123,
'ibsCityDef' => [
'rate' => 123,
'amount' => 123
],
'ibsCityDevTax' => [
'amount' => 123
],
'ibsCityRed' => [
'rate' => 123,
'effectiveRate' => 123
],
'ibsCityAmount' => 123,
'cbsRate' => 123,
'cbsDef' => [
'rate' => 123,
'amount' => 123
],
'cbsDevTax' => [
'amount' => 123
],
'cbsRed' => [
'rate' => 123,
'effectiveRate' => 123
],
'cbsAmount' => 123,
'regCst' => 123,
'regClassification' => 123,
'regStateIbsRate' => 123,
'regStateIbsAmount' => 123,
'regCityIbsRate' => 123,
'regCityIbsAmount' => 123,
'regCbsRate' => 123,
'regCbsAmount' => 123,
'ibsPresCred' => [
'code' => 123,
'rate' => 123,
'amount' => 123,
'suspensiveAmount' => 123
],
'cbsPresCred' => [
'code' => 123,
'rate' => 123,
'amount' => 123,
'suspensiveAmount' => 123
],
'govPurchaseStateIbsRate' => 123,
'govPurchaseStateIbsAmount' => 123,
'govPurchaseCityIbsRate' => 123,
'govPurchaseCityIbsAmount' => 123,
'govPurchaseCbsRate' => 123,
'govPurchaseCbsAmount' => 123,
'singleStageIbsAmount' => 123,
'singleStageCbsAmount' => 123,
'singleStageStandard' => [
'quantityTax' => 123,
'ibsAdRemRate' => 123,
'cbsAdRemRate' => 123,
'ibsAmount' => 123,
'cbsAmount' => 123
],
'singleStageReten' => [
'quantityTax' => 123,
'ibsAdRemRate' => 123,
'cbsAdRemRate' => 123,
'ibsAmount' => 123,
'cbsAmount' => 123
],
'singleStageRet' => [
'quantityTax' => 123,
'ibsAdRemRate' => 123,
'cbsAdRemRate' => 123,
'ibsAmount' => 123,
'cbsAmount' => 123
],
'singleStageDefIbsRate' => 123,
'singleStageDefIbsAmount' => 123,
'singleStageDefCbsRate' => 123,
'singleStageDefCbsAmount' => 123,
'credTransferIbsAmount' => 123,
'credTransferCbsAmount' => 123,
'presCredIbsZfmAmount' => 123
]
],
'specificProduct' => [
'fuel' => [
'anpCode' => '<string>',
'description' => '<string>'
],
'vehicle' => [
'chassis' => '<string>',
'colorCode' => '<string>',
'colorDescription' => '<string>',
'power' => '<string>',
'cylinderCapacity' => '<string>',
'netWeight' => '<string>',
'grossWeight' => '<string>',
'serialNumber' => '<string>',
'fuelType' => '<string>',
'engineNumber' => '<string>',
'maxTractionCapacity' => '<string>',
'distanceType' => '<string>',
'modelYear' => 123,
'manufactureYear' => 123,
'paintType' => '<string>',
'vehicleType' => '<string>',
'vehicleSpecies' => 123,
'modelCode' => '<string>',
'denatranColorCode' => '<string>',
'seats' => 123
],
'medication' => [
'anvisaCode' => '<string>',
'exemptionReason' => '<string>',
'maxConsumerPrice' => 123
]
],
'trackings' => [
[
'batchNumber' => '<string>',
'batchQuantity' => 123,
'manufacturingDate' => '2023-11-07T05:31:56Z',
'expirationDate' => '2023-11-07T05:31:56Z',
'aggregationCode' => '<string>'
]
]
]
],
'referencedDocuments' => [
[
'accessKey' => '<string>'
]
],
'authorizedPersons' => [
'<string>'
],
'total' => [
'invoiceAmount' => 123,
'pisAmount' => 123,
'cofinsAmount' => 123,
'discountAmount' => 123,
'othersAmount' => 123,
'totalTax' => 123,
'ipiAmount' => 123,
'importTaxAmount' => 123,
'productAmount' => 123,
'freightAmount' => 123,
'insuranceAmount' => 123,
'icmsBaseTax' => 123,
'icmsAmount' => 123,
'icmsStBaseTax' => 123,
'icmsStAmount' => 123,
'icmsExemptAmount' => 123,
'fcpStRetAmount' => 123,
'fcpStAmount' => 123,
'fcpAmount' => 123,
'ipiReturnedAmount' => 123,
'icmsSenderAmount' => 123,
'icmsDestinationAmount' => 123,
'fcpDestinationAmount' => 123,
'isAmount' => 123,
'ibsCbsBaseTax' => 123,
'ibsStateDefAmount' => 123,
'ibsStateDevTaxAmount' => 123,
'ibsStateAmount' => 123,
'ibsCityDefAmount' => 123,
'ibsCityDevTaxAmount' => 123,
'ibsCityAmount' => 123,
'ibsAmount' => 123,
'ibsPresCredAmount' => 123,
'ibsPresCredSuspensiveAmount' => 123,
'cbsDefAmount' => 123,
'cbsDevTaxAmount' => 123,
'cbsAmount' => 123,
'cbsPresCredAmount' => 123,
'cbsPresCredSuspensiveAmount' => 123,
'ibsSingleStageStandardAmount' => 123,
'cbsSingleStageStandardAmount' => 123,
'ibsSingleStageRetenAmount' => 123,
'cbsSingleStageRetenAmount' => 123,
'ibsSingleStageRetAmount' => 123,
'cbsSingleStageRetAmount' => 123,
'ibsCbsIsAmount' => 123
],
'accessKey' => '<string>',
'code' => '<string>',
'govPurchase' => [
'rate' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+json",
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.spedy.com.br/v1/consumer-invoices"
payload := strings.NewReader("{\n \"isFinalCustomer\": true,\n \"integrationId\": \"<string>\",\n \"issuedOn\": \"2023-11-07T05:31:56Z\",\n \"effectiveDate\": \"2023-11-07T05:31:56Z\",\n \"number\": 123,\n \"additionalInformation\": \"<string>\",\n \"sendEmailToCustomer\": true,\n \"series\": \"<string>\",\n \"operationNature\": \"<string>\",\n \"operationDate\": \"2023-11-07T05:31:56Z\",\n \"receiver\": {\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"stateTaxNumber\": \"<string>\",\n \"suframaTaxNumber\": \"<string>\",\n \"cityTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"transport\": {\n \"carrier\": {\n \"stateTaxNumber\": \"<string>\",\n \"transportRetention\": \"<string>\",\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"trailer\": {\n \"plate\": \"<string>\",\n \"rntc\": \"<string>\"\n },\n \"volume\": {\n \"quantity\": 123,\n \"species\": \"<string>\",\n \"brand\": \"<string>\",\n \"volumeNumeration\": \"<string>\",\n \"netWeight\": 123,\n \"grossWeight\": 123\n },\n \"vehicle\": {\n \"plate\": \"<string>\",\n \"state\": \"<string>\",\n \"rntc\": \"<string>\"\n },\n \"icmsRetention\": {\n \"serviceAmount\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"cfop\": \"<string>\",\n \"cityGeneratorFactCode\": 123\n },\n \"wagon\": \"<string>\",\n \"ferry\": \"<string>\"\n },\n \"intermediary\": {\n \"sellerRegistrationId\": \"<string>\",\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"stateTaxNumber\": \"<string>\",\n \"cityTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"billing\": {\n \"number\": \"<string>\",\n \"originalAmount\": 123,\n \"discountAmount\": 123,\n \"netAmount\": 123\n },\n \"duplicates\": [\n {\n \"number\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"amount\": 123\n }\n ],\n \"payments\": [\n {\n \"amount\": 123,\n \"card\": {\n \"federalTaxNumber\": \"<string>\",\n \"authorizationCode\": \"<string>\",\n \"isIntegratedPayment\": true\n }\n }\n ],\n \"items\": [\n {\n \"code\": \"<string>\",\n \"gtinCode\": \"<string>\",\n \"description\": \"<string>\",\n \"ncm\": \"<string>\",\n \"cest\": \"<string>\",\n \"cfop\": 123,\n \"unit\": \"<string>\",\n \"quantity\": 123,\n \"unitAmount\": 123,\n \"totalAmount\": 123,\n \"unitTax\": \"<string>\",\n \"quantityTax\": 123,\n \"unitTaxAmount\": 123,\n \"freightAmount\": 123,\n \"insuranceAmount\": 123,\n \"discountAmount\": 123,\n \"othersAmount\": 123,\n \"makeupTotal\": true,\n \"numberOrderBuy\": \"<string>\",\n \"itemNumberOrderBuy\": 123,\n \"taxBenefitCode\": \"<string>\",\n \"taxes\": {\n \"totalTax\": 123,\n \"icms\": {\n \"origin\": 123,\n \"cst\": 123,\n \"csosn\": 123,\n \"baseTaxModality\": 123,\n \"baseTax\": 123,\n \"baseTaxSt\": 123,\n \"baseTaxStModality\": 123,\n \"baseTaxStReduction\": 123,\n \"baseTaxStAmount\": 123,\n \"baseTaxReduction\": 123,\n \"stRate\": 123,\n \"stAmount\": 123,\n \"stMarginAmount\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"reductionRate\": 123,\n \"snCreditRate\": 123,\n \"snCreditAmount\": 123,\n \"stRetentionAmount\": 123,\n \"baseStRetentionAmount\": 123,\n \"taxOperationBaseRate\": 123,\n \"stReason\": \"<string>\",\n \"amountOperation\": 123,\n \"defermentRate\": 123,\n \"baseDeferred\": 123,\n \"exemptAmount\": 123,\n \"exemptReason\": 123,\n \"exemptDeduction\": 123,\n \"fcpRate\": 123,\n \"fcpAmount\": 123,\n \"baseTaxFcpAmount\": 123,\n \"fcpStRate\": 123,\n \"fcpStAmount\": 123,\n \"fcpStRetRate\": 123,\n \"fcpStRetAmount\": 123,\n \"baseTaxFcpStAmount\": 123,\n \"baseFcpRetentionAmount\": 123,\n \"stpRate\": 123,\n \"baseTaxEffectiveReduction\": 123,\n \"baseTaxEffective\": 123,\n \"effectiveRate\": 123,\n \"effectiveAmount\": 123,\n \"substituteAmount\": 123\n },\n \"ipi\": {\n \"classification\": \"<string>\",\n \"producerFederalTaxNumber\": \"<string>\",\n \"stampCode\": \"<string>\",\n \"stampQuantity\": 123,\n \"classificationCode\": \"<string>\",\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"unitQuantity\": 123,\n \"unitAmount\": 123,\n \"amount\": 123\n },\n \"ii\": {\n \"baseTax\": 123,\n \"customsExpenditureAmount\": 123,\n \"amount\": 123,\n \"iofAmount\": 123\n },\n \"pis\": {\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"productQuantity\": 123\n },\n \"cofins\": {\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"productQuantity\": 123\n },\n \"icmsDestination\": {\n \"destBaseTax\": 123,\n \"fcpAdicRate\": 123,\n \"internalOperationRate\": 123,\n \"destinationRate\": 123,\n \"fcpDestinationAmount\": 123,\n \"destinationAmount\": 123,\n \"issuerStateAmount\": 123,\n \"fcpBaseTax\": 123\n },\n \"is\": {\n \"cst\": 123,\n \"classification\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"specificRate\": 123,\n \"unitTax\": \"<string>\",\n \"quantityTax\": 123,\n \"amount\": 123\n },\n \"ibsCbs\": {\n \"cst\": 123,\n \"classification\": 123,\n \"ibsAmount\": 123,\n \"baseTax\": 123,\n \"ibsStateRate\": 123,\n \"ibsStateDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"ibsStateDevTax\": {\n \"amount\": 123\n },\n \"ibsStateRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"ibsStateAmount\": 123,\n \"ibsCityRate\": 123,\n \"ibsCityDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"ibsCityDevTax\": {\n \"amount\": 123\n },\n \"ibsCityRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"ibsCityAmount\": 123,\n \"cbsRate\": 123,\n \"cbsDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"cbsDevTax\": {\n \"amount\": 123\n },\n \"cbsRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"cbsAmount\": 123,\n \"regCst\": 123,\n \"regClassification\": 123,\n \"regStateIbsRate\": 123,\n \"regStateIbsAmount\": 123,\n \"regCityIbsRate\": 123,\n \"regCityIbsAmount\": 123,\n \"regCbsRate\": 123,\n \"regCbsAmount\": 123,\n \"ibsPresCred\": {\n \"code\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"suspensiveAmount\": 123\n },\n \"cbsPresCred\": {\n \"code\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"suspensiveAmount\": 123\n },\n \"govPurchaseStateIbsRate\": 123,\n \"govPurchaseStateIbsAmount\": 123,\n \"govPurchaseCityIbsRate\": 123,\n \"govPurchaseCityIbsAmount\": 123,\n \"govPurchaseCbsRate\": 123,\n \"govPurchaseCbsAmount\": 123,\n \"singleStageIbsAmount\": 123,\n \"singleStageCbsAmount\": 123,\n \"singleStageStandard\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageReten\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageRet\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageDefIbsRate\": 123,\n \"singleStageDefIbsAmount\": 123,\n \"singleStageDefCbsRate\": 123,\n \"singleStageDefCbsAmount\": 123,\n \"credTransferIbsAmount\": 123,\n \"credTransferCbsAmount\": 123,\n \"presCredIbsZfmAmount\": 123\n }\n },\n \"specificProduct\": {\n \"fuel\": {\n \"anpCode\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"vehicle\": {\n \"chassis\": \"<string>\",\n \"colorCode\": \"<string>\",\n \"colorDescription\": \"<string>\",\n \"power\": \"<string>\",\n \"cylinderCapacity\": \"<string>\",\n \"netWeight\": \"<string>\",\n \"grossWeight\": \"<string>\",\n \"serialNumber\": \"<string>\",\n \"fuelType\": \"<string>\",\n \"engineNumber\": \"<string>\",\n \"maxTractionCapacity\": \"<string>\",\n \"distanceType\": \"<string>\",\n \"modelYear\": 123,\n \"manufactureYear\": 123,\n \"paintType\": \"<string>\",\n \"vehicleType\": \"<string>\",\n \"vehicleSpecies\": 123,\n \"modelCode\": \"<string>\",\n \"denatranColorCode\": \"<string>\",\n \"seats\": 123\n },\n \"medication\": {\n \"anvisaCode\": \"<string>\",\n \"exemptionReason\": \"<string>\",\n \"maxConsumerPrice\": 123\n }\n },\n \"trackings\": [\n {\n \"batchNumber\": \"<string>\",\n \"batchQuantity\": 123,\n \"manufacturingDate\": \"2023-11-07T05:31:56Z\",\n \"expirationDate\": \"2023-11-07T05:31:56Z\",\n \"aggregationCode\": \"<string>\"\n }\n ]\n }\n ],\n \"referencedDocuments\": [\n {\n \"accessKey\": \"<string>\"\n }\n ],\n \"authorizedPersons\": [\n \"<string>\"\n ],\n \"total\": {\n \"invoiceAmount\": 123,\n \"pisAmount\": 123,\n \"cofinsAmount\": 123,\n \"discountAmount\": 123,\n \"othersAmount\": 123,\n \"totalTax\": 123,\n \"ipiAmount\": 123,\n \"importTaxAmount\": 123,\n \"productAmount\": 123,\n \"freightAmount\": 123,\n \"insuranceAmount\": 123,\n \"icmsBaseTax\": 123,\n \"icmsAmount\": 123,\n \"icmsStBaseTax\": 123,\n \"icmsStAmount\": 123,\n \"icmsExemptAmount\": 123,\n \"fcpStRetAmount\": 123,\n \"fcpStAmount\": 123,\n \"fcpAmount\": 123,\n \"ipiReturnedAmount\": 123,\n \"icmsSenderAmount\": 123,\n \"icmsDestinationAmount\": 123,\n \"fcpDestinationAmount\": 123,\n \"isAmount\": 123,\n \"ibsCbsBaseTax\": 123,\n \"ibsStateDefAmount\": 123,\n \"ibsStateDevTaxAmount\": 123,\n \"ibsStateAmount\": 123,\n \"ibsCityDefAmount\": 123,\n \"ibsCityDevTaxAmount\": 123,\n \"ibsCityAmount\": 123,\n \"ibsAmount\": 123,\n \"ibsPresCredAmount\": 123,\n \"ibsPresCredSuspensiveAmount\": 123,\n \"cbsDefAmount\": 123,\n \"cbsDevTaxAmount\": 123,\n \"cbsAmount\": 123,\n \"cbsPresCredAmount\": 123,\n \"cbsPresCredSuspensiveAmount\": 123,\n \"ibsSingleStageStandardAmount\": 123,\n \"cbsSingleStageStandardAmount\": 123,\n \"ibsSingleStageRetenAmount\": 123,\n \"cbsSingleStageRetenAmount\": 123,\n \"ibsSingleStageRetAmount\": 123,\n \"cbsSingleStageRetAmount\": 123,\n \"ibsCbsIsAmount\": 123\n },\n \"accessKey\": \"<string>\",\n \"code\": \"<string>\",\n \"govPurchase\": {\n \"rate\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.spedy.com.br/v1/consumer-invoices")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"isFinalCustomer\": true,\n \"integrationId\": \"<string>\",\n \"issuedOn\": \"2023-11-07T05:31:56Z\",\n \"effectiveDate\": \"2023-11-07T05:31:56Z\",\n \"number\": 123,\n \"additionalInformation\": \"<string>\",\n \"sendEmailToCustomer\": true,\n \"series\": \"<string>\",\n \"operationNature\": \"<string>\",\n \"operationDate\": \"2023-11-07T05:31:56Z\",\n \"receiver\": {\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"stateTaxNumber\": \"<string>\",\n \"suframaTaxNumber\": \"<string>\",\n \"cityTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"transport\": {\n \"carrier\": {\n \"stateTaxNumber\": \"<string>\",\n \"transportRetention\": \"<string>\",\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"trailer\": {\n \"plate\": \"<string>\",\n \"rntc\": \"<string>\"\n },\n \"volume\": {\n \"quantity\": 123,\n \"species\": \"<string>\",\n \"brand\": \"<string>\",\n \"volumeNumeration\": \"<string>\",\n \"netWeight\": 123,\n \"grossWeight\": 123\n },\n \"vehicle\": {\n \"plate\": \"<string>\",\n \"state\": \"<string>\",\n \"rntc\": \"<string>\"\n },\n \"icmsRetention\": {\n \"serviceAmount\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"cfop\": \"<string>\",\n \"cityGeneratorFactCode\": 123\n },\n \"wagon\": \"<string>\",\n \"ferry\": \"<string>\"\n },\n \"intermediary\": {\n \"sellerRegistrationId\": \"<string>\",\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"stateTaxNumber\": \"<string>\",\n \"cityTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"billing\": {\n \"number\": \"<string>\",\n \"originalAmount\": 123,\n \"discountAmount\": 123,\n \"netAmount\": 123\n },\n \"duplicates\": [\n {\n \"number\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"amount\": 123\n }\n ],\n \"payments\": [\n {\n \"amount\": 123,\n \"card\": {\n \"federalTaxNumber\": \"<string>\",\n \"authorizationCode\": \"<string>\",\n \"isIntegratedPayment\": true\n }\n }\n ],\n \"items\": [\n {\n \"code\": \"<string>\",\n \"gtinCode\": \"<string>\",\n \"description\": \"<string>\",\n \"ncm\": \"<string>\",\n \"cest\": \"<string>\",\n \"cfop\": 123,\n \"unit\": \"<string>\",\n \"quantity\": 123,\n \"unitAmount\": 123,\n \"totalAmount\": 123,\n \"unitTax\": \"<string>\",\n \"quantityTax\": 123,\n \"unitTaxAmount\": 123,\n \"freightAmount\": 123,\n \"insuranceAmount\": 123,\n \"discountAmount\": 123,\n \"othersAmount\": 123,\n \"makeupTotal\": true,\n \"numberOrderBuy\": \"<string>\",\n \"itemNumberOrderBuy\": 123,\n \"taxBenefitCode\": \"<string>\",\n \"taxes\": {\n \"totalTax\": 123,\n \"icms\": {\n \"origin\": 123,\n \"cst\": 123,\n \"csosn\": 123,\n \"baseTaxModality\": 123,\n \"baseTax\": 123,\n \"baseTaxSt\": 123,\n \"baseTaxStModality\": 123,\n \"baseTaxStReduction\": 123,\n \"baseTaxStAmount\": 123,\n \"baseTaxReduction\": 123,\n \"stRate\": 123,\n \"stAmount\": 123,\n \"stMarginAmount\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"reductionRate\": 123,\n \"snCreditRate\": 123,\n \"snCreditAmount\": 123,\n \"stRetentionAmount\": 123,\n \"baseStRetentionAmount\": 123,\n \"taxOperationBaseRate\": 123,\n \"stReason\": \"<string>\",\n \"amountOperation\": 123,\n \"defermentRate\": 123,\n \"baseDeferred\": 123,\n \"exemptAmount\": 123,\n \"exemptReason\": 123,\n \"exemptDeduction\": 123,\n \"fcpRate\": 123,\n \"fcpAmount\": 123,\n \"baseTaxFcpAmount\": 123,\n \"fcpStRate\": 123,\n \"fcpStAmount\": 123,\n \"fcpStRetRate\": 123,\n \"fcpStRetAmount\": 123,\n \"baseTaxFcpStAmount\": 123,\n \"baseFcpRetentionAmount\": 123,\n \"stpRate\": 123,\n \"baseTaxEffectiveReduction\": 123,\n \"baseTaxEffective\": 123,\n \"effectiveRate\": 123,\n \"effectiveAmount\": 123,\n \"substituteAmount\": 123\n },\n \"ipi\": {\n \"classification\": \"<string>\",\n \"producerFederalTaxNumber\": \"<string>\",\n \"stampCode\": \"<string>\",\n \"stampQuantity\": 123,\n \"classificationCode\": \"<string>\",\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"unitQuantity\": 123,\n \"unitAmount\": 123,\n \"amount\": 123\n },\n \"ii\": {\n \"baseTax\": 123,\n \"customsExpenditureAmount\": 123,\n \"amount\": 123,\n \"iofAmount\": 123\n },\n \"pis\": {\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"productQuantity\": 123\n },\n \"cofins\": {\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"productQuantity\": 123\n },\n \"icmsDestination\": {\n \"destBaseTax\": 123,\n \"fcpAdicRate\": 123,\n \"internalOperationRate\": 123,\n \"destinationRate\": 123,\n \"fcpDestinationAmount\": 123,\n \"destinationAmount\": 123,\n \"issuerStateAmount\": 123,\n \"fcpBaseTax\": 123\n },\n \"is\": {\n \"cst\": 123,\n \"classification\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"specificRate\": 123,\n \"unitTax\": \"<string>\",\n \"quantityTax\": 123,\n \"amount\": 123\n },\n \"ibsCbs\": {\n \"cst\": 123,\n \"classification\": 123,\n \"ibsAmount\": 123,\n \"baseTax\": 123,\n \"ibsStateRate\": 123,\n \"ibsStateDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"ibsStateDevTax\": {\n \"amount\": 123\n },\n \"ibsStateRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"ibsStateAmount\": 123,\n \"ibsCityRate\": 123,\n \"ibsCityDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"ibsCityDevTax\": {\n \"amount\": 123\n },\n \"ibsCityRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"ibsCityAmount\": 123,\n \"cbsRate\": 123,\n \"cbsDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"cbsDevTax\": {\n \"amount\": 123\n },\n \"cbsRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"cbsAmount\": 123,\n \"regCst\": 123,\n \"regClassification\": 123,\n \"regStateIbsRate\": 123,\n \"regStateIbsAmount\": 123,\n \"regCityIbsRate\": 123,\n \"regCityIbsAmount\": 123,\n \"regCbsRate\": 123,\n \"regCbsAmount\": 123,\n \"ibsPresCred\": {\n \"code\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"suspensiveAmount\": 123\n },\n \"cbsPresCred\": {\n \"code\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"suspensiveAmount\": 123\n },\n \"govPurchaseStateIbsRate\": 123,\n \"govPurchaseStateIbsAmount\": 123,\n \"govPurchaseCityIbsRate\": 123,\n \"govPurchaseCityIbsAmount\": 123,\n \"govPurchaseCbsRate\": 123,\n \"govPurchaseCbsAmount\": 123,\n \"singleStageIbsAmount\": 123,\n \"singleStageCbsAmount\": 123,\n \"singleStageStandard\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageReten\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageRet\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageDefIbsRate\": 123,\n \"singleStageDefIbsAmount\": 123,\n \"singleStageDefCbsRate\": 123,\n \"singleStageDefCbsAmount\": 123,\n \"credTransferIbsAmount\": 123,\n \"credTransferCbsAmount\": 123,\n \"presCredIbsZfmAmount\": 123\n }\n },\n \"specificProduct\": {\n \"fuel\": {\n \"anpCode\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"vehicle\": {\n \"chassis\": \"<string>\",\n \"colorCode\": \"<string>\",\n \"colorDescription\": \"<string>\",\n \"power\": \"<string>\",\n \"cylinderCapacity\": \"<string>\",\n \"netWeight\": \"<string>\",\n \"grossWeight\": \"<string>\",\n \"serialNumber\": \"<string>\",\n \"fuelType\": \"<string>\",\n \"engineNumber\": \"<string>\",\n \"maxTractionCapacity\": \"<string>\",\n \"distanceType\": \"<string>\",\n \"modelYear\": 123,\n \"manufactureYear\": 123,\n \"paintType\": \"<string>\",\n \"vehicleType\": \"<string>\",\n \"vehicleSpecies\": 123,\n \"modelCode\": \"<string>\",\n \"denatranColorCode\": \"<string>\",\n \"seats\": 123\n },\n \"medication\": {\n \"anvisaCode\": \"<string>\",\n \"exemptionReason\": \"<string>\",\n \"maxConsumerPrice\": 123\n }\n },\n \"trackings\": [\n {\n \"batchNumber\": \"<string>\",\n \"batchQuantity\": 123,\n \"manufacturingDate\": \"2023-11-07T05:31:56Z\",\n \"expirationDate\": \"2023-11-07T05:31:56Z\",\n \"aggregationCode\": \"<string>\"\n }\n ]\n }\n ],\n \"referencedDocuments\": [\n {\n \"accessKey\": \"<string>\"\n }\n ],\n \"authorizedPersons\": [\n \"<string>\"\n ],\n \"total\": {\n \"invoiceAmount\": 123,\n \"pisAmount\": 123,\n \"cofinsAmount\": 123,\n \"discountAmount\": 123,\n \"othersAmount\": 123,\n \"totalTax\": 123,\n \"ipiAmount\": 123,\n \"importTaxAmount\": 123,\n \"productAmount\": 123,\n \"freightAmount\": 123,\n \"insuranceAmount\": 123,\n \"icmsBaseTax\": 123,\n \"icmsAmount\": 123,\n \"icmsStBaseTax\": 123,\n \"icmsStAmount\": 123,\n \"icmsExemptAmount\": 123,\n \"fcpStRetAmount\": 123,\n \"fcpStAmount\": 123,\n \"fcpAmount\": 123,\n \"ipiReturnedAmount\": 123,\n \"icmsSenderAmount\": 123,\n \"icmsDestinationAmount\": 123,\n \"fcpDestinationAmount\": 123,\n \"isAmount\": 123,\n \"ibsCbsBaseTax\": 123,\n \"ibsStateDefAmount\": 123,\n \"ibsStateDevTaxAmount\": 123,\n \"ibsStateAmount\": 123,\n \"ibsCityDefAmount\": 123,\n \"ibsCityDevTaxAmount\": 123,\n \"ibsCityAmount\": 123,\n \"ibsAmount\": 123,\n \"ibsPresCredAmount\": 123,\n \"ibsPresCredSuspensiveAmount\": 123,\n \"cbsDefAmount\": 123,\n \"cbsDevTaxAmount\": 123,\n \"cbsAmount\": 123,\n \"cbsPresCredAmount\": 123,\n \"cbsPresCredSuspensiveAmount\": 123,\n \"ibsSingleStageStandardAmount\": 123,\n \"cbsSingleStageStandardAmount\": 123,\n \"ibsSingleStageRetenAmount\": 123,\n \"cbsSingleStageRetenAmount\": 123,\n \"ibsSingleStageRetAmount\": 123,\n \"cbsSingleStageRetAmount\": 123,\n \"ibsCbsIsAmount\": 123\n },\n \"accessKey\": \"<string>\",\n \"code\": \"<string>\",\n \"govPurchase\": {\n \"rate\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/consumer-invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"isFinalCustomer\": true,\n \"integrationId\": \"<string>\",\n \"issuedOn\": \"2023-11-07T05:31:56Z\",\n \"effectiveDate\": \"2023-11-07T05:31:56Z\",\n \"number\": 123,\n \"additionalInformation\": \"<string>\",\n \"sendEmailToCustomer\": true,\n \"series\": \"<string>\",\n \"operationNature\": \"<string>\",\n \"operationDate\": \"2023-11-07T05:31:56Z\",\n \"receiver\": {\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"stateTaxNumber\": \"<string>\",\n \"suframaTaxNumber\": \"<string>\",\n \"cityTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"transport\": {\n \"carrier\": {\n \"stateTaxNumber\": \"<string>\",\n \"transportRetention\": \"<string>\",\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"trailer\": {\n \"plate\": \"<string>\",\n \"rntc\": \"<string>\"\n },\n \"volume\": {\n \"quantity\": 123,\n \"species\": \"<string>\",\n \"brand\": \"<string>\",\n \"volumeNumeration\": \"<string>\",\n \"netWeight\": 123,\n \"grossWeight\": 123\n },\n \"vehicle\": {\n \"plate\": \"<string>\",\n \"state\": \"<string>\",\n \"rntc\": \"<string>\"\n },\n \"icmsRetention\": {\n \"serviceAmount\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"cfop\": \"<string>\",\n \"cityGeneratorFactCode\": 123\n },\n \"wagon\": \"<string>\",\n \"ferry\": \"<string>\"\n },\n \"intermediary\": {\n \"sellerRegistrationId\": \"<string>\",\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"stateTaxNumber\": \"<string>\",\n \"cityTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"billing\": {\n \"number\": \"<string>\",\n \"originalAmount\": 123,\n \"discountAmount\": 123,\n \"netAmount\": 123\n },\n \"duplicates\": [\n {\n \"number\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"amount\": 123\n }\n ],\n \"payments\": [\n {\n \"amount\": 123,\n \"card\": {\n \"federalTaxNumber\": \"<string>\",\n \"authorizationCode\": \"<string>\",\n \"isIntegratedPayment\": true\n }\n }\n ],\n \"items\": [\n {\n \"code\": \"<string>\",\n \"gtinCode\": \"<string>\",\n \"description\": \"<string>\",\n \"ncm\": \"<string>\",\n \"cest\": \"<string>\",\n \"cfop\": 123,\n \"unit\": \"<string>\",\n \"quantity\": 123,\n \"unitAmount\": 123,\n \"totalAmount\": 123,\n \"unitTax\": \"<string>\",\n \"quantityTax\": 123,\n \"unitTaxAmount\": 123,\n \"freightAmount\": 123,\n \"insuranceAmount\": 123,\n \"discountAmount\": 123,\n \"othersAmount\": 123,\n \"makeupTotal\": true,\n \"numberOrderBuy\": \"<string>\",\n \"itemNumberOrderBuy\": 123,\n \"taxBenefitCode\": \"<string>\",\n \"taxes\": {\n \"totalTax\": 123,\n \"icms\": {\n \"origin\": 123,\n \"cst\": 123,\n \"csosn\": 123,\n \"baseTaxModality\": 123,\n \"baseTax\": 123,\n \"baseTaxSt\": 123,\n \"baseTaxStModality\": 123,\n \"baseTaxStReduction\": 123,\n \"baseTaxStAmount\": 123,\n \"baseTaxReduction\": 123,\n \"stRate\": 123,\n \"stAmount\": 123,\n \"stMarginAmount\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"reductionRate\": 123,\n \"snCreditRate\": 123,\n \"snCreditAmount\": 123,\n \"stRetentionAmount\": 123,\n \"baseStRetentionAmount\": 123,\n \"taxOperationBaseRate\": 123,\n \"stReason\": \"<string>\",\n \"amountOperation\": 123,\n \"defermentRate\": 123,\n \"baseDeferred\": 123,\n \"exemptAmount\": 123,\n \"exemptReason\": 123,\n \"exemptDeduction\": 123,\n \"fcpRate\": 123,\n \"fcpAmount\": 123,\n \"baseTaxFcpAmount\": 123,\n \"fcpStRate\": 123,\n \"fcpStAmount\": 123,\n \"fcpStRetRate\": 123,\n \"fcpStRetAmount\": 123,\n \"baseTaxFcpStAmount\": 123,\n \"baseFcpRetentionAmount\": 123,\n \"stpRate\": 123,\n \"baseTaxEffectiveReduction\": 123,\n \"baseTaxEffective\": 123,\n \"effectiveRate\": 123,\n \"effectiveAmount\": 123,\n \"substituteAmount\": 123\n },\n \"ipi\": {\n \"classification\": \"<string>\",\n \"producerFederalTaxNumber\": \"<string>\",\n \"stampCode\": \"<string>\",\n \"stampQuantity\": 123,\n \"classificationCode\": \"<string>\",\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"unitQuantity\": 123,\n \"unitAmount\": 123,\n \"amount\": 123\n },\n \"ii\": {\n \"baseTax\": 123,\n \"customsExpenditureAmount\": 123,\n \"amount\": 123,\n \"iofAmount\": 123\n },\n \"pis\": {\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"productQuantity\": 123\n },\n \"cofins\": {\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"productQuantity\": 123\n },\n \"icmsDestination\": {\n \"destBaseTax\": 123,\n \"fcpAdicRate\": 123,\n \"internalOperationRate\": 123,\n \"destinationRate\": 123,\n \"fcpDestinationAmount\": 123,\n \"destinationAmount\": 123,\n \"issuerStateAmount\": 123,\n \"fcpBaseTax\": 123\n },\n \"is\": {\n \"cst\": 123,\n \"classification\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"specificRate\": 123,\n \"unitTax\": \"<string>\",\n \"quantityTax\": 123,\n \"amount\": 123\n },\n \"ibsCbs\": {\n \"cst\": 123,\n \"classification\": 123,\n \"ibsAmount\": 123,\n \"baseTax\": 123,\n \"ibsStateRate\": 123,\n \"ibsStateDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"ibsStateDevTax\": {\n \"amount\": 123\n },\n \"ibsStateRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"ibsStateAmount\": 123,\n \"ibsCityRate\": 123,\n \"ibsCityDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"ibsCityDevTax\": {\n \"amount\": 123\n },\n \"ibsCityRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"ibsCityAmount\": 123,\n \"cbsRate\": 123,\n \"cbsDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"cbsDevTax\": {\n \"amount\": 123\n },\n \"cbsRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"cbsAmount\": 123,\n \"regCst\": 123,\n \"regClassification\": 123,\n \"regStateIbsRate\": 123,\n \"regStateIbsAmount\": 123,\n \"regCityIbsRate\": 123,\n \"regCityIbsAmount\": 123,\n \"regCbsRate\": 123,\n \"regCbsAmount\": 123,\n \"ibsPresCred\": {\n \"code\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"suspensiveAmount\": 123\n },\n \"cbsPresCred\": {\n \"code\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"suspensiveAmount\": 123\n },\n \"govPurchaseStateIbsRate\": 123,\n \"govPurchaseStateIbsAmount\": 123,\n \"govPurchaseCityIbsRate\": 123,\n \"govPurchaseCityIbsAmount\": 123,\n \"govPurchaseCbsRate\": 123,\n \"govPurchaseCbsAmount\": 123,\n \"singleStageIbsAmount\": 123,\n \"singleStageCbsAmount\": 123,\n \"singleStageStandard\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageReten\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageRet\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageDefIbsRate\": 123,\n \"singleStageDefIbsAmount\": 123,\n \"singleStageDefCbsRate\": 123,\n \"singleStageDefCbsAmount\": 123,\n \"credTransferIbsAmount\": 123,\n \"credTransferCbsAmount\": 123,\n \"presCredIbsZfmAmount\": 123\n }\n },\n \"specificProduct\": {\n \"fuel\": {\n \"anpCode\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"vehicle\": {\n \"chassis\": \"<string>\",\n \"colorCode\": \"<string>\",\n \"colorDescription\": \"<string>\",\n \"power\": \"<string>\",\n \"cylinderCapacity\": \"<string>\",\n \"netWeight\": \"<string>\",\n \"grossWeight\": \"<string>\",\n \"serialNumber\": \"<string>\",\n \"fuelType\": \"<string>\",\n \"engineNumber\": \"<string>\",\n \"maxTractionCapacity\": \"<string>\",\n \"distanceType\": \"<string>\",\n \"modelYear\": 123,\n \"manufactureYear\": 123,\n \"paintType\": \"<string>\",\n \"vehicleType\": \"<string>\",\n \"vehicleSpecies\": 123,\n \"modelCode\": \"<string>\",\n \"denatranColorCode\": \"<string>\",\n \"seats\": 123\n },\n \"medication\": {\n \"anvisaCode\": \"<string>\",\n \"exemptionReason\": \"<string>\",\n \"maxConsumerPrice\": 123\n }\n },\n \"trackings\": [\n {\n \"batchNumber\": \"<string>\",\n \"batchQuantity\": 123,\n \"manufacturingDate\": \"2023-11-07T05:31:56Z\",\n \"expirationDate\": \"2023-11-07T05:31:56Z\",\n \"aggregationCode\": \"<string>\"\n }\n ]\n }\n ],\n \"referencedDocuments\": [\n {\n \"accessKey\": \"<string>\"\n }\n ],\n \"authorizedPersons\": [\n \"<string>\"\n ],\n \"total\": {\n \"invoiceAmount\": 123,\n \"pisAmount\": 123,\n \"cofinsAmount\": 123,\n \"discountAmount\": 123,\n \"othersAmount\": 123,\n \"totalTax\": 123,\n \"ipiAmount\": 123,\n \"importTaxAmount\": 123,\n \"productAmount\": 123,\n \"freightAmount\": 123,\n \"insuranceAmount\": 123,\n \"icmsBaseTax\": 123,\n \"icmsAmount\": 123,\n \"icmsStBaseTax\": 123,\n \"icmsStAmount\": 123,\n \"icmsExemptAmount\": 123,\n \"fcpStRetAmount\": 123,\n \"fcpStAmount\": 123,\n \"fcpAmount\": 123,\n \"ipiReturnedAmount\": 123,\n \"icmsSenderAmount\": 123,\n \"icmsDestinationAmount\": 123,\n \"fcpDestinationAmount\": 123,\n \"isAmount\": 123,\n \"ibsCbsBaseTax\": 123,\n \"ibsStateDefAmount\": 123,\n \"ibsStateDevTaxAmount\": 123,\n \"ibsStateAmount\": 123,\n \"ibsCityDefAmount\": 123,\n \"ibsCityDevTaxAmount\": 123,\n \"ibsCityAmount\": 123,\n \"ibsAmount\": 123,\n \"ibsPresCredAmount\": 123,\n \"ibsPresCredSuspensiveAmount\": 123,\n \"cbsDefAmount\": 123,\n \"cbsDevTaxAmount\": 123,\n \"cbsAmount\": 123,\n \"cbsPresCredAmount\": 123,\n \"cbsPresCredSuspensiveAmount\": 123,\n \"ibsSingleStageStandardAmount\": 123,\n \"cbsSingleStageStandardAmount\": 123,\n \"ibsSingleStageRetenAmount\": 123,\n \"cbsSingleStageRetenAmount\": 123,\n \"ibsSingleStageRetAmount\": 123,\n \"cbsSingleStageRetAmount\": 123,\n \"ibsCbsIsAmount\": 123\n },\n \"accessKey\": \"<string>\",\n \"code\": \"<string>\",\n \"govPurchase\": {\n \"rate\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"integrationId": "<string>",
"issuedOn": "2023-11-07T05:31:56Z",
"effectiveDate": "2023-11-07T05:31:56Z",
"receiver": {
"name": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"suframaTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"company": {
"name": "<string>",
"legalName": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"cityTaxNumber": "<string>"
},
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"date": "2023-11-07T05:31:56Z",
"transactionId": "<string>"
},
"authorization": {
"date": "2023-11-07T05:31:56Z",
"protocol": "<string>",
"digestValue": "<string>"
},
"amount": 123,
"number": 123,
"processingDetail": {
"message": "<string>",
"code": "<string>",
"on": "2023-11-07T05:31:56Z"
},
"accessKey": "<string>",
"series": "<string>",
"govPurchase": {
"rate": 123
},
"contingency": {
"date": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"authorizedPersons": [
"<string>"
]
}Criar NFC-e
Cria uma NFC-e (nota ao consumidor, modelo 65) e a enfileira para emissão junto à SEFAZ. A
emissão é assíncrona: a resposta 2xx confirma que a solicitação foi aceita, não que a nota foi
autorizada — acompanhe o resultado por webhook ou consulta.
integrationId — Identificador da nota no seu sistema (máx. 36 caracteres). Recomendado em todas as integrações:
- Associação: vincula a NFC-e gerada pela Spedy a um ID do seu sistema (ex: ID do pedido)
- Idempotência: um segundo POST com o mesmo
integrationIdatualiza a nota existente em vez de criar uma nova — protege contra duplicidade em retries e timeouts - Correção de rejeitada: para corrigir uma NFC-e rejeitada, reenvie o POST com os dados corrigidos e o mesmo
integrationId— sem necessidade de deletar a nota anterior
curl --request POST \
--url https://api.spedy.com.br/v1/consumer-invoices \
--header 'Content-Type: application/json-patch+json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"isFinalCustomer": true,
"integrationId": "<string>",
"issuedOn": "2023-11-07T05:31:56Z",
"effectiveDate": "2023-11-07T05:31:56Z",
"number": 123,
"additionalInformation": "<string>",
"sendEmailToCustomer": true,
"series": "<string>",
"operationNature": "<string>",
"operationDate": "2023-11-07T05:31:56Z",
"receiver": {
"name": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"suframaTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"transport": {
"carrier": {
"stateTaxNumber": "<string>",
"transportRetention": "<string>",
"name": "<string>",
"federalTaxNumber": "<string>",
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"trailer": {
"plate": "<string>",
"rntc": "<string>"
},
"volume": {
"quantity": 123,
"species": "<string>",
"brand": "<string>",
"volumeNumeration": "<string>",
"netWeight": 123,
"grossWeight": 123
},
"vehicle": {
"plate": "<string>",
"state": "<string>",
"rntc": "<string>"
},
"icmsRetention": {
"serviceAmount": 123,
"baseTax": 123,
"rate": 123,
"amount": 123,
"cfop": "<string>",
"cityGeneratorFactCode": 123
},
"wagon": "<string>",
"ferry": "<string>"
},
"intermediary": {
"sellerRegistrationId": "<string>",
"name": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"billing": {
"number": "<string>",
"originalAmount": 123,
"discountAmount": 123,
"netAmount": 123
},
"duplicates": [
{
"number": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"amount": 123
}
],
"payments": [
{
"amount": 123,
"card": {
"federalTaxNumber": "<string>",
"authorizationCode": "<string>",
"isIntegratedPayment": true
}
}
],
"items": [
{
"code": "<string>",
"gtinCode": "<string>",
"description": "<string>",
"ncm": "<string>",
"cest": "<string>",
"cfop": 123,
"unit": "<string>",
"quantity": 123,
"unitAmount": 123,
"totalAmount": 123,
"unitTax": "<string>",
"quantityTax": 123,
"unitTaxAmount": 123,
"freightAmount": 123,
"insuranceAmount": 123,
"discountAmount": 123,
"othersAmount": 123,
"makeupTotal": true,
"numberOrderBuy": "<string>",
"itemNumberOrderBuy": 123,
"taxBenefitCode": "<string>",
"taxes": {
"totalTax": 123,
"icms": {
"origin": 123,
"cst": 123,
"csosn": 123,
"baseTaxModality": 123,
"baseTax": 123,
"baseTaxSt": 123,
"baseTaxStModality": 123,
"baseTaxStReduction": 123,
"baseTaxStAmount": 123,
"baseTaxReduction": 123,
"stRate": 123,
"stAmount": 123,
"stMarginAmount": 123,
"rate": 123,
"amount": 123,
"reductionRate": 123,
"snCreditRate": 123,
"snCreditAmount": 123,
"stRetentionAmount": 123,
"baseStRetentionAmount": 123,
"taxOperationBaseRate": 123,
"stReason": "<string>",
"amountOperation": 123,
"defermentRate": 123,
"baseDeferred": 123,
"exemptAmount": 123,
"exemptReason": 123,
"exemptDeduction": 123,
"fcpRate": 123,
"fcpAmount": 123,
"baseTaxFcpAmount": 123,
"fcpStRate": 123,
"fcpStAmount": 123,
"fcpStRetRate": 123,
"fcpStRetAmount": 123,
"baseTaxFcpStAmount": 123,
"baseFcpRetentionAmount": 123,
"stpRate": 123,
"baseTaxEffectiveReduction": 123,
"baseTaxEffective": 123,
"effectiveRate": 123,
"effectiveAmount": 123,
"substituteAmount": 123
},
"ipi": {
"classification": "<string>",
"producerFederalTaxNumber": "<string>",
"stampCode": "<string>",
"stampQuantity": 123,
"classificationCode": "<string>",
"cst": 123,
"baseTax": 123,
"rate": 123,
"unitQuantity": 123,
"unitAmount": 123,
"amount": 123
},
"ii": {
"baseTax": 123,
"customsExpenditureAmount": 123,
"amount": 123,
"iofAmount": 123
},
"pis": {
"cst": 123,
"baseTax": 123,
"rate": 123,
"amount": 123,
"productQuantity": 123
},
"cofins": {
"cst": 123,
"baseTax": 123,
"rate": 123,
"amount": 123,
"productQuantity": 123
},
"icmsDestination": {
"destBaseTax": 123,
"fcpAdicRate": 123,
"internalOperationRate": 123,
"destinationRate": 123,
"fcpDestinationAmount": 123,
"destinationAmount": 123,
"issuerStateAmount": 123,
"fcpBaseTax": 123
},
"is": {
"cst": 123,
"classification": 123,
"baseTax": 123,
"rate": 123,
"specificRate": 123,
"unitTax": "<string>",
"quantityTax": 123,
"amount": 123
},
"ibsCbs": {
"cst": 123,
"classification": 123,
"ibsAmount": 123,
"baseTax": 123,
"ibsStateRate": 123,
"ibsStateDef": {
"rate": 123,
"amount": 123
},
"ibsStateDevTax": {
"amount": 123
},
"ibsStateRed": {
"rate": 123,
"effectiveRate": 123
},
"ibsStateAmount": 123,
"ibsCityRate": 123,
"ibsCityDef": {
"rate": 123,
"amount": 123
},
"ibsCityDevTax": {
"amount": 123
},
"ibsCityRed": {
"rate": 123,
"effectiveRate": 123
},
"ibsCityAmount": 123,
"cbsRate": 123,
"cbsDef": {
"rate": 123,
"amount": 123
},
"cbsDevTax": {
"amount": 123
},
"cbsRed": {
"rate": 123,
"effectiveRate": 123
},
"cbsAmount": 123,
"regCst": 123,
"regClassification": 123,
"regStateIbsRate": 123,
"regStateIbsAmount": 123,
"regCityIbsRate": 123,
"regCityIbsAmount": 123,
"regCbsRate": 123,
"regCbsAmount": 123,
"ibsPresCred": {
"code": 123,
"rate": 123,
"amount": 123,
"suspensiveAmount": 123
},
"cbsPresCred": {
"code": 123,
"rate": 123,
"amount": 123,
"suspensiveAmount": 123
},
"govPurchaseStateIbsRate": 123,
"govPurchaseStateIbsAmount": 123,
"govPurchaseCityIbsRate": 123,
"govPurchaseCityIbsAmount": 123,
"govPurchaseCbsRate": 123,
"govPurchaseCbsAmount": 123,
"singleStageIbsAmount": 123,
"singleStageCbsAmount": 123,
"singleStageStandard": {
"quantityTax": 123,
"ibsAdRemRate": 123,
"cbsAdRemRate": 123,
"ibsAmount": 123,
"cbsAmount": 123
},
"singleStageReten": {
"quantityTax": 123,
"ibsAdRemRate": 123,
"cbsAdRemRate": 123,
"ibsAmount": 123,
"cbsAmount": 123
},
"singleStageRet": {
"quantityTax": 123,
"ibsAdRemRate": 123,
"cbsAdRemRate": 123,
"ibsAmount": 123,
"cbsAmount": 123
},
"singleStageDefIbsRate": 123,
"singleStageDefIbsAmount": 123,
"singleStageDefCbsRate": 123,
"singleStageDefCbsAmount": 123,
"credTransferIbsAmount": 123,
"credTransferCbsAmount": 123,
"presCredIbsZfmAmount": 123
}
},
"specificProduct": {
"fuel": {
"anpCode": "<string>",
"description": "<string>"
},
"vehicle": {
"chassis": "<string>",
"colorCode": "<string>",
"colorDescription": "<string>",
"power": "<string>",
"cylinderCapacity": "<string>",
"netWeight": "<string>",
"grossWeight": "<string>",
"serialNumber": "<string>",
"fuelType": "<string>",
"engineNumber": "<string>",
"maxTractionCapacity": "<string>",
"distanceType": "<string>",
"modelYear": 123,
"manufactureYear": 123,
"paintType": "<string>",
"vehicleType": "<string>",
"vehicleSpecies": 123,
"modelCode": "<string>",
"denatranColorCode": "<string>",
"seats": 123
},
"medication": {
"anvisaCode": "<string>",
"exemptionReason": "<string>",
"maxConsumerPrice": 123
}
},
"trackings": [
{
"batchNumber": "<string>",
"batchQuantity": 123,
"manufacturingDate": "2023-11-07T05:31:56Z",
"expirationDate": "2023-11-07T05:31:56Z",
"aggregationCode": "<string>"
}
]
}
],
"referencedDocuments": [
{
"accessKey": "<string>"
}
],
"authorizedPersons": [
"<string>"
],
"total": {
"invoiceAmount": 123,
"pisAmount": 123,
"cofinsAmount": 123,
"discountAmount": 123,
"othersAmount": 123,
"totalTax": 123,
"ipiAmount": 123,
"importTaxAmount": 123,
"productAmount": 123,
"freightAmount": 123,
"insuranceAmount": 123,
"icmsBaseTax": 123,
"icmsAmount": 123,
"icmsStBaseTax": 123,
"icmsStAmount": 123,
"icmsExemptAmount": 123,
"fcpStRetAmount": 123,
"fcpStAmount": 123,
"fcpAmount": 123,
"ipiReturnedAmount": 123,
"icmsSenderAmount": 123,
"icmsDestinationAmount": 123,
"fcpDestinationAmount": 123,
"isAmount": 123,
"ibsCbsBaseTax": 123,
"ibsStateDefAmount": 123,
"ibsStateDevTaxAmount": 123,
"ibsStateAmount": 123,
"ibsCityDefAmount": 123,
"ibsCityDevTaxAmount": 123,
"ibsCityAmount": 123,
"ibsAmount": 123,
"ibsPresCredAmount": 123,
"ibsPresCredSuspensiveAmount": 123,
"cbsDefAmount": 123,
"cbsDevTaxAmount": 123,
"cbsAmount": 123,
"cbsPresCredAmount": 123,
"cbsPresCredSuspensiveAmount": 123,
"ibsSingleStageStandardAmount": 123,
"cbsSingleStageStandardAmount": 123,
"ibsSingleStageRetenAmount": 123,
"cbsSingleStageRetenAmount": 123,
"ibsSingleStageRetAmount": 123,
"cbsSingleStageRetAmount": 123,
"ibsCbsIsAmount": 123
},
"accessKey": "<string>",
"code": "<string>",
"govPurchase": {
"rate": 123
}
}
'import requests
url = "https://api.spedy.com.br/v1/consumer-invoices"
payload = {
"isFinalCustomer": True,
"integrationId": "<string>",
"issuedOn": "2023-11-07T05:31:56Z",
"effectiveDate": "2023-11-07T05:31:56Z",
"number": 123,
"additionalInformation": "<string>",
"sendEmailToCustomer": True,
"series": "<string>",
"operationNature": "<string>",
"operationDate": "2023-11-07T05:31:56Z",
"receiver": {
"name": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"suframaTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"transport": {
"carrier": {
"stateTaxNumber": "<string>",
"transportRetention": "<string>",
"name": "<string>",
"federalTaxNumber": "<string>",
"email": "<string>",
"phone": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"trailer": {
"plate": "<string>",
"rntc": "<string>"
},
"volume": {
"quantity": 123,
"species": "<string>",
"brand": "<string>",
"volumeNumeration": "<string>",
"netWeight": 123,
"grossWeight": 123
},
"vehicle": {
"plate": "<string>",
"state": "<string>",
"rntc": "<string>"
},
"icmsRetention": {
"serviceAmount": 123,
"baseTax": 123,
"rate": 123,
"amount": 123,
"cfop": "<string>",
"cityGeneratorFactCode": 123
},
"wagon": "<string>",
"ferry": "<string>"
},
"intermediary": {
"sellerRegistrationId": "<string>",
"name": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"billing": {
"number": "<string>",
"originalAmount": 123,
"discountAmount": 123,
"netAmount": 123
},
"duplicates": [
{
"number": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"amount": 123
}
],
"payments": [
{
"amount": 123,
"card": {
"federalTaxNumber": "<string>",
"authorizationCode": "<string>",
"isIntegratedPayment": True
}
}
],
"items": [
{
"code": "<string>",
"gtinCode": "<string>",
"description": "<string>",
"ncm": "<string>",
"cest": "<string>",
"cfop": 123,
"unit": "<string>",
"quantity": 123,
"unitAmount": 123,
"totalAmount": 123,
"unitTax": "<string>",
"quantityTax": 123,
"unitTaxAmount": 123,
"freightAmount": 123,
"insuranceAmount": 123,
"discountAmount": 123,
"othersAmount": 123,
"makeupTotal": True,
"numberOrderBuy": "<string>",
"itemNumberOrderBuy": 123,
"taxBenefitCode": "<string>",
"taxes": {
"totalTax": 123,
"icms": {
"origin": 123,
"cst": 123,
"csosn": 123,
"baseTaxModality": 123,
"baseTax": 123,
"baseTaxSt": 123,
"baseTaxStModality": 123,
"baseTaxStReduction": 123,
"baseTaxStAmount": 123,
"baseTaxReduction": 123,
"stRate": 123,
"stAmount": 123,
"stMarginAmount": 123,
"rate": 123,
"amount": 123,
"reductionRate": 123,
"snCreditRate": 123,
"snCreditAmount": 123,
"stRetentionAmount": 123,
"baseStRetentionAmount": 123,
"taxOperationBaseRate": 123,
"stReason": "<string>",
"amountOperation": 123,
"defermentRate": 123,
"baseDeferred": 123,
"exemptAmount": 123,
"exemptReason": 123,
"exemptDeduction": 123,
"fcpRate": 123,
"fcpAmount": 123,
"baseTaxFcpAmount": 123,
"fcpStRate": 123,
"fcpStAmount": 123,
"fcpStRetRate": 123,
"fcpStRetAmount": 123,
"baseTaxFcpStAmount": 123,
"baseFcpRetentionAmount": 123,
"stpRate": 123,
"baseTaxEffectiveReduction": 123,
"baseTaxEffective": 123,
"effectiveRate": 123,
"effectiveAmount": 123,
"substituteAmount": 123
},
"ipi": {
"classification": "<string>",
"producerFederalTaxNumber": "<string>",
"stampCode": "<string>",
"stampQuantity": 123,
"classificationCode": "<string>",
"cst": 123,
"baseTax": 123,
"rate": 123,
"unitQuantity": 123,
"unitAmount": 123,
"amount": 123
},
"ii": {
"baseTax": 123,
"customsExpenditureAmount": 123,
"amount": 123,
"iofAmount": 123
},
"pis": {
"cst": 123,
"baseTax": 123,
"rate": 123,
"amount": 123,
"productQuantity": 123
},
"cofins": {
"cst": 123,
"baseTax": 123,
"rate": 123,
"amount": 123,
"productQuantity": 123
},
"icmsDestination": {
"destBaseTax": 123,
"fcpAdicRate": 123,
"internalOperationRate": 123,
"destinationRate": 123,
"fcpDestinationAmount": 123,
"destinationAmount": 123,
"issuerStateAmount": 123,
"fcpBaseTax": 123
},
"is": {
"cst": 123,
"classification": 123,
"baseTax": 123,
"rate": 123,
"specificRate": 123,
"unitTax": "<string>",
"quantityTax": 123,
"amount": 123
},
"ibsCbs": {
"cst": 123,
"classification": 123,
"ibsAmount": 123,
"baseTax": 123,
"ibsStateRate": 123,
"ibsStateDef": {
"rate": 123,
"amount": 123
},
"ibsStateDevTax": { "amount": 123 },
"ibsStateRed": {
"rate": 123,
"effectiveRate": 123
},
"ibsStateAmount": 123,
"ibsCityRate": 123,
"ibsCityDef": {
"rate": 123,
"amount": 123
},
"ibsCityDevTax": { "amount": 123 },
"ibsCityRed": {
"rate": 123,
"effectiveRate": 123
},
"ibsCityAmount": 123,
"cbsRate": 123,
"cbsDef": {
"rate": 123,
"amount": 123
},
"cbsDevTax": { "amount": 123 },
"cbsRed": {
"rate": 123,
"effectiveRate": 123
},
"cbsAmount": 123,
"regCst": 123,
"regClassification": 123,
"regStateIbsRate": 123,
"regStateIbsAmount": 123,
"regCityIbsRate": 123,
"regCityIbsAmount": 123,
"regCbsRate": 123,
"regCbsAmount": 123,
"ibsPresCred": {
"code": 123,
"rate": 123,
"amount": 123,
"suspensiveAmount": 123
},
"cbsPresCred": {
"code": 123,
"rate": 123,
"amount": 123,
"suspensiveAmount": 123
},
"govPurchaseStateIbsRate": 123,
"govPurchaseStateIbsAmount": 123,
"govPurchaseCityIbsRate": 123,
"govPurchaseCityIbsAmount": 123,
"govPurchaseCbsRate": 123,
"govPurchaseCbsAmount": 123,
"singleStageIbsAmount": 123,
"singleStageCbsAmount": 123,
"singleStageStandard": {
"quantityTax": 123,
"ibsAdRemRate": 123,
"cbsAdRemRate": 123,
"ibsAmount": 123,
"cbsAmount": 123
},
"singleStageReten": {
"quantityTax": 123,
"ibsAdRemRate": 123,
"cbsAdRemRate": 123,
"ibsAmount": 123,
"cbsAmount": 123
},
"singleStageRet": {
"quantityTax": 123,
"ibsAdRemRate": 123,
"cbsAdRemRate": 123,
"ibsAmount": 123,
"cbsAmount": 123
},
"singleStageDefIbsRate": 123,
"singleStageDefIbsAmount": 123,
"singleStageDefCbsRate": 123,
"singleStageDefCbsAmount": 123,
"credTransferIbsAmount": 123,
"credTransferCbsAmount": 123,
"presCredIbsZfmAmount": 123
}
},
"specificProduct": {
"fuel": {
"anpCode": "<string>",
"description": "<string>"
},
"vehicle": {
"chassis": "<string>",
"colorCode": "<string>",
"colorDescription": "<string>",
"power": "<string>",
"cylinderCapacity": "<string>",
"netWeight": "<string>",
"grossWeight": "<string>",
"serialNumber": "<string>",
"fuelType": "<string>",
"engineNumber": "<string>",
"maxTractionCapacity": "<string>",
"distanceType": "<string>",
"modelYear": 123,
"manufactureYear": 123,
"paintType": "<string>",
"vehicleType": "<string>",
"vehicleSpecies": 123,
"modelCode": "<string>",
"denatranColorCode": "<string>",
"seats": 123
},
"medication": {
"anvisaCode": "<string>",
"exemptionReason": "<string>",
"maxConsumerPrice": 123
}
},
"trackings": [
{
"batchNumber": "<string>",
"batchQuantity": 123,
"manufacturingDate": "2023-11-07T05:31:56Z",
"expirationDate": "2023-11-07T05:31:56Z",
"aggregationCode": "<string>"
}
]
}
],
"referencedDocuments": [{ "accessKey": "<string>" }],
"authorizedPersons": ["<string>"],
"total": {
"invoiceAmount": 123,
"pisAmount": 123,
"cofinsAmount": 123,
"discountAmount": 123,
"othersAmount": 123,
"totalTax": 123,
"ipiAmount": 123,
"importTaxAmount": 123,
"productAmount": 123,
"freightAmount": 123,
"insuranceAmount": 123,
"icmsBaseTax": 123,
"icmsAmount": 123,
"icmsStBaseTax": 123,
"icmsStAmount": 123,
"icmsExemptAmount": 123,
"fcpStRetAmount": 123,
"fcpStAmount": 123,
"fcpAmount": 123,
"ipiReturnedAmount": 123,
"icmsSenderAmount": 123,
"icmsDestinationAmount": 123,
"fcpDestinationAmount": 123,
"isAmount": 123,
"ibsCbsBaseTax": 123,
"ibsStateDefAmount": 123,
"ibsStateDevTaxAmount": 123,
"ibsStateAmount": 123,
"ibsCityDefAmount": 123,
"ibsCityDevTaxAmount": 123,
"ibsCityAmount": 123,
"ibsAmount": 123,
"ibsPresCredAmount": 123,
"ibsPresCredSuspensiveAmount": 123,
"cbsDefAmount": 123,
"cbsDevTaxAmount": 123,
"cbsAmount": 123,
"cbsPresCredAmount": 123,
"cbsPresCredSuspensiveAmount": 123,
"ibsSingleStageStandardAmount": 123,
"cbsSingleStageStandardAmount": 123,
"ibsSingleStageRetenAmount": 123,
"cbsSingleStageRetenAmount": 123,
"ibsSingleStageRetAmount": 123,
"cbsSingleStageRetAmount": 123,
"ibsCbsIsAmount": 123
},
"accessKey": "<string>",
"code": "<string>",
"govPurchase": { "rate": 123 }
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
isFinalCustomer: true,
integrationId: '<string>',
issuedOn: '2023-11-07T05:31:56Z',
effectiveDate: '2023-11-07T05:31:56Z',
number: 123,
additionalInformation: '<string>',
sendEmailToCustomer: true,
series: '<string>',
operationNature: '<string>',
operationDate: '2023-11-07T05:31:56Z',
receiver: {
name: '<string>',
federalTaxNumber: '<string>',
stateTaxNumber: '<string>',
suframaTaxNumber: '<string>',
cityTaxNumber: '<string>',
email: '<string>',
phoneNumber: '<string>',
address: {
street: '<string>',
district: '<string>',
postalCode: '<string>',
number: '<string>',
additionalInformation: '<string>',
city: {name: '<string>', state: '<string>', code: 123},
country: '<string>'
}
},
transport: {
carrier: {
stateTaxNumber: '<string>',
transportRetention: '<string>',
name: '<string>',
federalTaxNumber: '<string>',
email: '<string>',
phone: '<string>',
address: {
street: '<string>',
district: '<string>',
postalCode: '<string>',
number: '<string>',
additionalInformation: '<string>',
city: {name: '<string>', state: '<string>', code: 123},
country: '<string>'
}
},
trailer: {plate: '<string>', rntc: '<string>'},
volume: {
quantity: 123,
species: '<string>',
brand: '<string>',
volumeNumeration: '<string>',
netWeight: 123,
grossWeight: 123
},
vehicle: {plate: '<string>', state: '<string>', rntc: '<string>'},
icmsRetention: {
serviceAmount: 123,
baseTax: 123,
rate: 123,
amount: 123,
cfop: '<string>',
cityGeneratorFactCode: 123
},
wagon: '<string>',
ferry: '<string>'
},
intermediary: {
sellerRegistrationId: '<string>',
name: '<string>',
federalTaxNumber: '<string>',
stateTaxNumber: '<string>',
cityTaxNumber: '<string>',
email: '<string>',
phoneNumber: '<string>',
address: {
street: '<string>',
district: '<string>',
postalCode: '<string>',
number: '<string>',
additionalInformation: '<string>',
city: {name: '<string>', state: '<string>', code: 123},
country: '<string>'
}
},
billing: {number: '<string>', originalAmount: 123, discountAmount: 123, netAmount: 123},
duplicates: [{number: '<string>', dueDate: '2023-11-07T05:31:56Z', amount: 123}],
payments: [
{
amount: 123,
card: {
federalTaxNumber: '<string>',
authorizationCode: '<string>',
isIntegratedPayment: true
}
}
],
items: [
{
code: '<string>',
gtinCode: '<string>',
description: '<string>',
ncm: '<string>',
cest: '<string>',
cfop: 123,
unit: '<string>',
quantity: 123,
unitAmount: 123,
totalAmount: 123,
unitTax: '<string>',
quantityTax: 123,
unitTaxAmount: 123,
freightAmount: 123,
insuranceAmount: 123,
discountAmount: 123,
othersAmount: 123,
makeupTotal: true,
numberOrderBuy: '<string>',
itemNumberOrderBuy: 123,
taxBenefitCode: '<string>',
taxes: {
totalTax: 123,
icms: {
origin: 123,
cst: 123,
csosn: 123,
baseTaxModality: 123,
baseTax: 123,
baseTaxSt: 123,
baseTaxStModality: 123,
baseTaxStReduction: 123,
baseTaxStAmount: 123,
baseTaxReduction: 123,
stRate: 123,
stAmount: 123,
stMarginAmount: 123,
rate: 123,
amount: 123,
reductionRate: 123,
snCreditRate: 123,
snCreditAmount: 123,
stRetentionAmount: 123,
baseStRetentionAmount: 123,
taxOperationBaseRate: 123,
stReason: '<string>',
amountOperation: 123,
defermentRate: 123,
baseDeferred: 123,
exemptAmount: 123,
exemptReason: 123,
exemptDeduction: 123,
fcpRate: 123,
fcpAmount: 123,
baseTaxFcpAmount: 123,
fcpStRate: 123,
fcpStAmount: 123,
fcpStRetRate: 123,
fcpStRetAmount: 123,
baseTaxFcpStAmount: 123,
baseFcpRetentionAmount: 123,
stpRate: 123,
baseTaxEffectiveReduction: 123,
baseTaxEffective: 123,
effectiveRate: 123,
effectiveAmount: 123,
substituteAmount: 123
},
ipi: {
classification: '<string>',
producerFederalTaxNumber: '<string>',
stampCode: '<string>',
stampQuantity: 123,
classificationCode: '<string>',
cst: 123,
baseTax: 123,
rate: 123,
unitQuantity: 123,
unitAmount: 123,
amount: 123
},
ii: {baseTax: 123, customsExpenditureAmount: 123, amount: 123, iofAmount: 123},
pis: {cst: 123, baseTax: 123, rate: 123, amount: 123, productQuantity: 123},
cofins: {cst: 123, baseTax: 123, rate: 123, amount: 123, productQuantity: 123},
icmsDestination: {
destBaseTax: 123,
fcpAdicRate: 123,
internalOperationRate: 123,
destinationRate: 123,
fcpDestinationAmount: 123,
destinationAmount: 123,
issuerStateAmount: 123,
fcpBaseTax: 123
},
is: {
cst: 123,
classification: 123,
baseTax: 123,
rate: 123,
specificRate: 123,
unitTax: '<string>',
quantityTax: 123,
amount: 123
},
ibsCbs: {
cst: 123,
classification: 123,
ibsAmount: 123,
baseTax: 123,
ibsStateRate: 123,
ibsStateDef: {rate: 123, amount: 123},
ibsStateDevTax: {amount: 123},
ibsStateRed: {rate: 123, effectiveRate: 123},
ibsStateAmount: 123,
ibsCityRate: 123,
ibsCityDef: {rate: 123, amount: 123},
ibsCityDevTax: {amount: 123},
ibsCityRed: {rate: 123, effectiveRate: 123},
ibsCityAmount: 123,
cbsRate: 123,
cbsDef: {rate: 123, amount: 123},
cbsDevTax: {amount: 123},
cbsRed: {rate: 123, effectiveRate: 123},
cbsAmount: 123,
regCst: 123,
regClassification: 123,
regStateIbsRate: 123,
regStateIbsAmount: 123,
regCityIbsRate: 123,
regCityIbsAmount: 123,
regCbsRate: 123,
regCbsAmount: 123,
ibsPresCred: {code: 123, rate: 123, amount: 123, suspensiveAmount: 123},
cbsPresCred: {code: 123, rate: 123, amount: 123, suspensiveAmount: 123},
govPurchaseStateIbsRate: 123,
govPurchaseStateIbsAmount: 123,
govPurchaseCityIbsRate: 123,
govPurchaseCityIbsAmount: 123,
govPurchaseCbsRate: 123,
govPurchaseCbsAmount: 123,
singleStageIbsAmount: 123,
singleStageCbsAmount: 123,
singleStageStandard: {
quantityTax: 123,
ibsAdRemRate: 123,
cbsAdRemRate: 123,
ibsAmount: 123,
cbsAmount: 123
},
singleStageReten: {
quantityTax: 123,
ibsAdRemRate: 123,
cbsAdRemRate: 123,
ibsAmount: 123,
cbsAmount: 123
},
singleStageRet: {
quantityTax: 123,
ibsAdRemRate: 123,
cbsAdRemRate: 123,
ibsAmount: 123,
cbsAmount: 123
},
singleStageDefIbsRate: 123,
singleStageDefIbsAmount: 123,
singleStageDefCbsRate: 123,
singleStageDefCbsAmount: 123,
credTransferIbsAmount: 123,
credTransferCbsAmount: 123,
presCredIbsZfmAmount: 123
}
},
specificProduct: {
fuel: {anpCode: '<string>', description: '<string>'},
vehicle: {
chassis: '<string>',
colorCode: '<string>',
colorDescription: '<string>',
power: '<string>',
cylinderCapacity: '<string>',
netWeight: '<string>',
grossWeight: '<string>',
serialNumber: '<string>',
fuelType: '<string>',
engineNumber: '<string>',
maxTractionCapacity: '<string>',
distanceType: '<string>',
modelYear: 123,
manufactureYear: 123,
paintType: '<string>',
vehicleType: '<string>',
vehicleSpecies: 123,
modelCode: '<string>',
denatranColorCode: '<string>',
seats: 123
},
medication: {anvisaCode: '<string>', exemptionReason: '<string>', maxConsumerPrice: 123}
},
trackings: [
{
batchNumber: '<string>',
batchQuantity: 123,
manufacturingDate: '2023-11-07T05:31:56Z',
expirationDate: '2023-11-07T05:31:56Z',
aggregationCode: '<string>'
}
]
}
],
referencedDocuments: [{accessKey: '<string>'}],
authorizedPersons: ['<string>'],
total: {
invoiceAmount: 123,
pisAmount: 123,
cofinsAmount: 123,
discountAmount: 123,
othersAmount: 123,
totalTax: 123,
ipiAmount: 123,
importTaxAmount: 123,
productAmount: 123,
freightAmount: 123,
insuranceAmount: 123,
icmsBaseTax: 123,
icmsAmount: 123,
icmsStBaseTax: 123,
icmsStAmount: 123,
icmsExemptAmount: 123,
fcpStRetAmount: 123,
fcpStAmount: 123,
fcpAmount: 123,
ipiReturnedAmount: 123,
icmsSenderAmount: 123,
icmsDestinationAmount: 123,
fcpDestinationAmount: 123,
isAmount: 123,
ibsCbsBaseTax: 123,
ibsStateDefAmount: 123,
ibsStateDevTaxAmount: 123,
ibsStateAmount: 123,
ibsCityDefAmount: 123,
ibsCityDevTaxAmount: 123,
ibsCityAmount: 123,
ibsAmount: 123,
ibsPresCredAmount: 123,
ibsPresCredSuspensiveAmount: 123,
cbsDefAmount: 123,
cbsDevTaxAmount: 123,
cbsAmount: 123,
cbsPresCredAmount: 123,
cbsPresCredSuspensiveAmount: 123,
ibsSingleStageStandardAmount: 123,
cbsSingleStageStandardAmount: 123,
ibsSingleStageRetenAmount: 123,
cbsSingleStageRetenAmount: 123,
ibsSingleStageRetAmount: 123,
cbsSingleStageRetAmount: 123,
ibsCbsIsAmount: 123
},
accessKey: '<string>',
code: '<string>',
govPurchase: {rate: 123}
})
};
fetch('https://api.spedy.com.br/v1/consumer-invoices', 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.spedy.com.br/v1/consumer-invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'isFinalCustomer' => true,
'integrationId' => '<string>',
'issuedOn' => '2023-11-07T05:31:56Z',
'effectiveDate' => '2023-11-07T05:31:56Z',
'number' => 123,
'additionalInformation' => '<string>',
'sendEmailToCustomer' => true,
'series' => '<string>',
'operationNature' => '<string>',
'operationDate' => '2023-11-07T05:31:56Z',
'receiver' => [
'name' => '<string>',
'federalTaxNumber' => '<string>',
'stateTaxNumber' => '<string>',
'suframaTaxNumber' => '<string>',
'cityTaxNumber' => '<string>',
'email' => '<string>',
'phoneNumber' => '<string>',
'address' => [
'street' => '<string>',
'district' => '<string>',
'postalCode' => '<string>',
'number' => '<string>',
'additionalInformation' => '<string>',
'city' => [
'name' => '<string>',
'state' => '<string>',
'code' => 123
],
'country' => '<string>'
]
],
'transport' => [
'carrier' => [
'stateTaxNumber' => '<string>',
'transportRetention' => '<string>',
'name' => '<string>',
'federalTaxNumber' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'address' => [
'street' => '<string>',
'district' => '<string>',
'postalCode' => '<string>',
'number' => '<string>',
'additionalInformation' => '<string>',
'city' => [
'name' => '<string>',
'state' => '<string>',
'code' => 123
],
'country' => '<string>'
]
],
'trailer' => [
'plate' => '<string>',
'rntc' => '<string>'
],
'volume' => [
'quantity' => 123,
'species' => '<string>',
'brand' => '<string>',
'volumeNumeration' => '<string>',
'netWeight' => 123,
'grossWeight' => 123
],
'vehicle' => [
'plate' => '<string>',
'state' => '<string>',
'rntc' => '<string>'
],
'icmsRetention' => [
'serviceAmount' => 123,
'baseTax' => 123,
'rate' => 123,
'amount' => 123,
'cfop' => '<string>',
'cityGeneratorFactCode' => 123
],
'wagon' => '<string>',
'ferry' => '<string>'
],
'intermediary' => [
'sellerRegistrationId' => '<string>',
'name' => '<string>',
'federalTaxNumber' => '<string>',
'stateTaxNumber' => '<string>',
'cityTaxNumber' => '<string>',
'email' => '<string>',
'phoneNumber' => '<string>',
'address' => [
'street' => '<string>',
'district' => '<string>',
'postalCode' => '<string>',
'number' => '<string>',
'additionalInformation' => '<string>',
'city' => [
'name' => '<string>',
'state' => '<string>',
'code' => 123
],
'country' => '<string>'
]
],
'billing' => [
'number' => '<string>',
'originalAmount' => 123,
'discountAmount' => 123,
'netAmount' => 123
],
'duplicates' => [
[
'number' => '<string>',
'dueDate' => '2023-11-07T05:31:56Z',
'amount' => 123
]
],
'payments' => [
[
'amount' => 123,
'card' => [
'federalTaxNumber' => '<string>',
'authorizationCode' => '<string>',
'isIntegratedPayment' => true
]
]
],
'items' => [
[
'code' => '<string>',
'gtinCode' => '<string>',
'description' => '<string>',
'ncm' => '<string>',
'cest' => '<string>',
'cfop' => 123,
'unit' => '<string>',
'quantity' => 123,
'unitAmount' => 123,
'totalAmount' => 123,
'unitTax' => '<string>',
'quantityTax' => 123,
'unitTaxAmount' => 123,
'freightAmount' => 123,
'insuranceAmount' => 123,
'discountAmount' => 123,
'othersAmount' => 123,
'makeupTotal' => true,
'numberOrderBuy' => '<string>',
'itemNumberOrderBuy' => 123,
'taxBenefitCode' => '<string>',
'taxes' => [
'totalTax' => 123,
'icms' => [
'origin' => 123,
'cst' => 123,
'csosn' => 123,
'baseTaxModality' => 123,
'baseTax' => 123,
'baseTaxSt' => 123,
'baseTaxStModality' => 123,
'baseTaxStReduction' => 123,
'baseTaxStAmount' => 123,
'baseTaxReduction' => 123,
'stRate' => 123,
'stAmount' => 123,
'stMarginAmount' => 123,
'rate' => 123,
'amount' => 123,
'reductionRate' => 123,
'snCreditRate' => 123,
'snCreditAmount' => 123,
'stRetentionAmount' => 123,
'baseStRetentionAmount' => 123,
'taxOperationBaseRate' => 123,
'stReason' => '<string>',
'amountOperation' => 123,
'defermentRate' => 123,
'baseDeferred' => 123,
'exemptAmount' => 123,
'exemptReason' => 123,
'exemptDeduction' => 123,
'fcpRate' => 123,
'fcpAmount' => 123,
'baseTaxFcpAmount' => 123,
'fcpStRate' => 123,
'fcpStAmount' => 123,
'fcpStRetRate' => 123,
'fcpStRetAmount' => 123,
'baseTaxFcpStAmount' => 123,
'baseFcpRetentionAmount' => 123,
'stpRate' => 123,
'baseTaxEffectiveReduction' => 123,
'baseTaxEffective' => 123,
'effectiveRate' => 123,
'effectiveAmount' => 123,
'substituteAmount' => 123
],
'ipi' => [
'classification' => '<string>',
'producerFederalTaxNumber' => '<string>',
'stampCode' => '<string>',
'stampQuantity' => 123,
'classificationCode' => '<string>',
'cst' => 123,
'baseTax' => 123,
'rate' => 123,
'unitQuantity' => 123,
'unitAmount' => 123,
'amount' => 123
],
'ii' => [
'baseTax' => 123,
'customsExpenditureAmount' => 123,
'amount' => 123,
'iofAmount' => 123
],
'pis' => [
'cst' => 123,
'baseTax' => 123,
'rate' => 123,
'amount' => 123,
'productQuantity' => 123
],
'cofins' => [
'cst' => 123,
'baseTax' => 123,
'rate' => 123,
'amount' => 123,
'productQuantity' => 123
],
'icmsDestination' => [
'destBaseTax' => 123,
'fcpAdicRate' => 123,
'internalOperationRate' => 123,
'destinationRate' => 123,
'fcpDestinationAmount' => 123,
'destinationAmount' => 123,
'issuerStateAmount' => 123,
'fcpBaseTax' => 123
],
'is' => [
'cst' => 123,
'classification' => 123,
'baseTax' => 123,
'rate' => 123,
'specificRate' => 123,
'unitTax' => '<string>',
'quantityTax' => 123,
'amount' => 123
],
'ibsCbs' => [
'cst' => 123,
'classification' => 123,
'ibsAmount' => 123,
'baseTax' => 123,
'ibsStateRate' => 123,
'ibsStateDef' => [
'rate' => 123,
'amount' => 123
],
'ibsStateDevTax' => [
'amount' => 123
],
'ibsStateRed' => [
'rate' => 123,
'effectiveRate' => 123
],
'ibsStateAmount' => 123,
'ibsCityRate' => 123,
'ibsCityDef' => [
'rate' => 123,
'amount' => 123
],
'ibsCityDevTax' => [
'amount' => 123
],
'ibsCityRed' => [
'rate' => 123,
'effectiveRate' => 123
],
'ibsCityAmount' => 123,
'cbsRate' => 123,
'cbsDef' => [
'rate' => 123,
'amount' => 123
],
'cbsDevTax' => [
'amount' => 123
],
'cbsRed' => [
'rate' => 123,
'effectiveRate' => 123
],
'cbsAmount' => 123,
'regCst' => 123,
'regClassification' => 123,
'regStateIbsRate' => 123,
'regStateIbsAmount' => 123,
'regCityIbsRate' => 123,
'regCityIbsAmount' => 123,
'regCbsRate' => 123,
'regCbsAmount' => 123,
'ibsPresCred' => [
'code' => 123,
'rate' => 123,
'amount' => 123,
'suspensiveAmount' => 123
],
'cbsPresCred' => [
'code' => 123,
'rate' => 123,
'amount' => 123,
'suspensiveAmount' => 123
],
'govPurchaseStateIbsRate' => 123,
'govPurchaseStateIbsAmount' => 123,
'govPurchaseCityIbsRate' => 123,
'govPurchaseCityIbsAmount' => 123,
'govPurchaseCbsRate' => 123,
'govPurchaseCbsAmount' => 123,
'singleStageIbsAmount' => 123,
'singleStageCbsAmount' => 123,
'singleStageStandard' => [
'quantityTax' => 123,
'ibsAdRemRate' => 123,
'cbsAdRemRate' => 123,
'ibsAmount' => 123,
'cbsAmount' => 123
],
'singleStageReten' => [
'quantityTax' => 123,
'ibsAdRemRate' => 123,
'cbsAdRemRate' => 123,
'ibsAmount' => 123,
'cbsAmount' => 123
],
'singleStageRet' => [
'quantityTax' => 123,
'ibsAdRemRate' => 123,
'cbsAdRemRate' => 123,
'ibsAmount' => 123,
'cbsAmount' => 123
],
'singleStageDefIbsRate' => 123,
'singleStageDefIbsAmount' => 123,
'singleStageDefCbsRate' => 123,
'singleStageDefCbsAmount' => 123,
'credTransferIbsAmount' => 123,
'credTransferCbsAmount' => 123,
'presCredIbsZfmAmount' => 123
]
],
'specificProduct' => [
'fuel' => [
'anpCode' => '<string>',
'description' => '<string>'
],
'vehicle' => [
'chassis' => '<string>',
'colorCode' => '<string>',
'colorDescription' => '<string>',
'power' => '<string>',
'cylinderCapacity' => '<string>',
'netWeight' => '<string>',
'grossWeight' => '<string>',
'serialNumber' => '<string>',
'fuelType' => '<string>',
'engineNumber' => '<string>',
'maxTractionCapacity' => '<string>',
'distanceType' => '<string>',
'modelYear' => 123,
'manufactureYear' => 123,
'paintType' => '<string>',
'vehicleType' => '<string>',
'vehicleSpecies' => 123,
'modelCode' => '<string>',
'denatranColorCode' => '<string>',
'seats' => 123
],
'medication' => [
'anvisaCode' => '<string>',
'exemptionReason' => '<string>',
'maxConsumerPrice' => 123
]
],
'trackings' => [
[
'batchNumber' => '<string>',
'batchQuantity' => 123,
'manufacturingDate' => '2023-11-07T05:31:56Z',
'expirationDate' => '2023-11-07T05:31:56Z',
'aggregationCode' => '<string>'
]
]
]
],
'referencedDocuments' => [
[
'accessKey' => '<string>'
]
],
'authorizedPersons' => [
'<string>'
],
'total' => [
'invoiceAmount' => 123,
'pisAmount' => 123,
'cofinsAmount' => 123,
'discountAmount' => 123,
'othersAmount' => 123,
'totalTax' => 123,
'ipiAmount' => 123,
'importTaxAmount' => 123,
'productAmount' => 123,
'freightAmount' => 123,
'insuranceAmount' => 123,
'icmsBaseTax' => 123,
'icmsAmount' => 123,
'icmsStBaseTax' => 123,
'icmsStAmount' => 123,
'icmsExemptAmount' => 123,
'fcpStRetAmount' => 123,
'fcpStAmount' => 123,
'fcpAmount' => 123,
'ipiReturnedAmount' => 123,
'icmsSenderAmount' => 123,
'icmsDestinationAmount' => 123,
'fcpDestinationAmount' => 123,
'isAmount' => 123,
'ibsCbsBaseTax' => 123,
'ibsStateDefAmount' => 123,
'ibsStateDevTaxAmount' => 123,
'ibsStateAmount' => 123,
'ibsCityDefAmount' => 123,
'ibsCityDevTaxAmount' => 123,
'ibsCityAmount' => 123,
'ibsAmount' => 123,
'ibsPresCredAmount' => 123,
'ibsPresCredSuspensiveAmount' => 123,
'cbsDefAmount' => 123,
'cbsDevTaxAmount' => 123,
'cbsAmount' => 123,
'cbsPresCredAmount' => 123,
'cbsPresCredSuspensiveAmount' => 123,
'ibsSingleStageStandardAmount' => 123,
'cbsSingleStageStandardAmount' => 123,
'ibsSingleStageRetenAmount' => 123,
'cbsSingleStageRetenAmount' => 123,
'ibsSingleStageRetAmount' => 123,
'cbsSingleStageRetAmount' => 123,
'ibsCbsIsAmount' => 123
],
'accessKey' => '<string>',
'code' => '<string>',
'govPurchase' => [
'rate' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+json",
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.spedy.com.br/v1/consumer-invoices"
payload := strings.NewReader("{\n \"isFinalCustomer\": true,\n \"integrationId\": \"<string>\",\n \"issuedOn\": \"2023-11-07T05:31:56Z\",\n \"effectiveDate\": \"2023-11-07T05:31:56Z\",\n \"number\": 123,\n \"additionalInformation\": \"<string>\",\n \"sendEmailToCustomer\": true,\n \"series\": \"<string>\",\n \"operationNature\": \"<string>\",\n \"operationDate\": \"2023-11-07T05:31:56Z\",\n \"receiver\": {\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"stateTaxNumber\": \"<string>\",\n \"suframaTaxNumber\": \"<string>\",\n \"cityTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"transport\": {\n \"carrier\": {\n \"stateTaxNumber\": \"<string>\",\n \"transportRetention\": \"<string>\",\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"trailer\": {\n \"plate\": \"<string>\",\n \"rntc\": \"<string>\"\n },\n \"volume\": {\n \"quantity\": 123,\n \"species\": \"<string>\",\n \"brand\": \"<string>\",\n \"volumeNumeration\": \"<string>\",\n \"netWeight\": 123,\n \"grossWeight\": 123\n },\n \"vehicle\": {\n \"plate\": \"<string>\",\n \"state\": \"<string>\",\n \"rntc\": \"<string>\"\n },\n \"icmsRetention\": {\n \"serviceAmount\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"cfop\": \"<string>\",\n \"cityGeneratorFactCode\": 123\n },\n \"wagon\": \"<string>\",\n \"ferry\": \"<string>\"\n },\n \"intermediary\": {\n \"sellerRegistrationId\": \"<string>\",\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"stateTaxNumber\": \"<string>\",\n \"cityTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"billing\": {\n \"number\": \"<string>\",\n \"originalAmount\": 123,\n \"discountAmount\": 123,\n \"netAmount\": 123\n },\n \"duplicates\": [\n {\n \"number\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"amount\": 123\n }\n ],\n \"payments\": [\n {\n \"amount\": 123,\n \"card\": {\n \"federalTaxNumber\": \"<string>\",\n \"authorizationCode\": \"<string>\",\n \"isIntegratedPayment\": true\n }\n }\n ],\n \"items\": [\n {\n \"code\": \"<string>\",\n \"gtinCode\": \"<string>\",\n \"description\": \"<string>\",\n \"ncm\": \"<string>\",\n \"cest\": \"<string>\",\n \"cfop\": 123,\n \"unit\": \"<string>\",\n \"quantity\": 123,\n \"unitAmount\": 123,\n \"totalAmount\": 123,\n \"unitTax\": \"<string>\",\n \"quantityTax\": 123,\n \"unitTaxAmount\": 123,\n \"freightAmount\": 123,\n \"insuranceAmount\": 123,\n \"discountAmount\": 123,\n \"othersAmount\": 123,\n \"makeupTotal\": true,\n \"numberOrderBuy\": \"<string>\",\n \"itemNumberOrderBuy\": 123,\n \"taxBenefitCode\": \"<string>\",\n \"taxes\": {\n \"totalTax\": 123,\n \"icms\": {\n \"origin\": 123,\n \"cst\": 123,\n \"csosn\": 123,\n \"baseTaxModality\": 123,\n \"baseTax\": 123,\n \"baseTaxSt\": 123,\n \"baseTaxStModality\": 123,\n \"baseTaxStReduction\": 123,\n \"baseTaxStAmount\": 123,\n \"baseTaxReduction\": 123,\n \"stRate\": 123,\n \"stAmount\": 123,\n \"stMarginAmount\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"reductionRate\": 123,\n \"snCreditRate\": 123,\n \"snCreditAmount\": 123,\n \"stRetentionAmount\": 123,\n \"baseStRetentionAmount\": 123,\n \"taxOperationBaseRate\": 123,\n \"stReason\": \"<string>\",\n \"amountOperation\": 123,\n \"defermentRate\": 123,\n \"baseDeferred\": 123,\n \"exemptAmount\": 123,\n \"exemptReason\": 123,\n \"exemptDeduction\": 123,\n \"fcpRate\": 123,\n \"fcpAmount\": 123,\n \"baseTaxFcpAmount\": 123,\n \"fcpStRate\": 123,\n \"fcpStAmount\": 123,\n \"fcpStRetRate\": 123,\n \"fcpStRetAmount\": 123,\n \"baseTaxFcpStAmount\": 123,\n \"baseFcpRetentionAmount\": 123,\n \"stpRate\": 123,\n \"baseTaxEffectiveReduction\": 123,\n \"baseTaxEffective\": 123,\n \"effectiveRate\": 123,\n \"effectiveAmount\": 123,\n \"substituteAmount\": 123\n },\n \"ipi\": {\n \"classification\": \"<string>\",\n \"producerFederalTaxNumber\": \"<string>\",\n \"stampCode\": \"<string>\",\n \"stampQuantity\": 123,\n \"classificationCode\": \"<string>\",\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"unitQuantity\": 123,\n \"unitAmount\": 123,\n \"amount\": 123\n },\n \"ii\": {\n \"baseTax\": 123,\n \"customsExpenditureAmount\": 123,\n \"amount\": 123,\n \"iofAmount\": 123\n },\n \"pis\": {\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"productQuantity\": 123\n },\n \"cofins\": {\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"productQuantity\": 123\n },\n \"icmsDestination\": {\n \"destBaseTax\": 123,\n \"fcpAdicRate\": 123,\n \"internalOperationRate\": 123,\n \"destinationRate\": 123,\n \"fcpDestinationAmount\": 123,\n \"destinationAmount\": 123,\n \"issuerStateAmount\": 123,\n \"fcpBaseTax\": 123\n },\n \"is\": {\n \"cst\": 123,\n \"classification\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"specificRate\": 123,\n \"unitTax\": \"<string>\",\n \"quantityTax\": 123,\n \"amount\": 123\n },\n \"ibsCbs\": {\n \"cst\": 123,\n \"classification\": 123,\n \"ibsAmount\": 123,\n \"baseTax\": 123,\n \"ibsStateRate\": 123,\n \"ibsStateDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"ibsStateDevTax\": {\n \"amount\": 123\n },\n \"ibsStateRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"ibsStateAmount\": 123,\n \"ibsCityRate\": 123,\n \"ibsCityDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"ibsCityDevTax\": {\n \"amount\": 123\n },\n \"ibsCityRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"ibsCityAmount\": 123,\n \"cbsRate\": 123,\n \"cbsDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"cbsDevTax\": {\n \"amount\": 123\n },\n \"cbsRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"cbsAmount\": 123,\n \"regCst\": 123,\n \"regClassification\": 123,\n \"regStateIbsRate\": 123,\n \"regStateIbsAmount\": 123,\n \"regCityIbsRate\": 123,\n \"regCityIbsAmount\": 123,\n \"regCbsRate\": 123,\n \"regCbsAmount\": 123,\n \"ibsPresCred\": {\n \"code\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"suspensiveAmount\": 123\n },\n \"cbsPresCred\": {\n \"code\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"suspensiveAmount\": 123\n },\n \"govPurchaseStateIbsRate\": 123,\n \"govPurchaseStateIbsAmount\": 123,\n \"govPurchaseCityIbsRate\": 123,\n \"govPurchaseCityIbsAmount\": 123,\n \"govPurchaseCbsRate\": 123,\n \"govPurchaseCbsAmount\": 123,\n \"singleStageIbsAmount\": 123,\n \"singleStageCbsAmount\": 123,\n \"singleStageStandard\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageReten\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageRet\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageDefIbsRate\": 123,\n \"singleStageDefIbsAmount\": 123,\n \"singleStageDefCbsRate\": 123,\n \"singleStageDefCbsAmount\": 123,\n \"credTransferIbsAmount\": 123,\n \"credTransferCbsAmount\": 123,\n \"presCredIbsZfmAmount\": 123\n }\n },\n \"specificProduct\": {\n \"fuel\": {\n \"anpCode\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"vehicle\": {\n \"chassis\": \"<string>\",\n \"colorCode\": \"<string>\",\n \"colorDescription\": \"<string>\",\n \"power\": \"<string>\",\n \"cylinderCapacity\": \"<string>\",\n \"netWeight\": \"<string>\",\n \"grossWeight\": \"<string>\",\n \"serialNumber\": \"<string>\",\n \"fuelType\": \"<string>\",\n \"engineNumber\": \"<string>\",\n \"maxTractionCapacity\": \"<string>\",\n \"distanceType\": \"<string>\",\n \"modelYear\": 123,\n \"manufactureYear\": 123,\n \"paintType\": \"<string>\",\n \"vehicleType\": \"<string>\",\n \"vehicleSpecies\": 123,\n \"modelCode\": \"<string>\",\n \"denatranColorCode\": \"<string>\",\n \"seats\": 123\n },\n \"medication\": {\n \"anvisaCode\": \"<string>\",\n \"exemptionReason\": \"<string>\",\n \"maxConsumerPrice\": 123\n }\n },\n \"trackings\": [\n {\n \"batchNumber\": \"<string>\",\n \"batchQuantity\": 123,\n \"manufacturingDate\": \"2023-11-07T05:31:56Z\",\n \"expirationDate\": \"2023-11-07T05:31:56Z\",\n \"aggregationCode\": \"<string>\"\n }\n ]\n }\n ],\n \"referencedDocuments\": [\n {\n \"accessKey\": \"<string>\"\n }\n ],\n \"authorizedPersons\": [\n \"<string>\"\n ],\n \"total\": {\n \"invoiceAmount\": 123,\n \"pisAmount\": 123,\n \"cofinsAmount\": 123,\n \"discountAmount\": 123,\n \"othersAmount\": 123,\n \"totalTax\": 123,\n \"ipiAmount\": 123,\n \"importTaxAmount\": 123,\n \"productAmount\": 123,\n \"freightAmount\": 123,\n \"insuranceAmount\": 123,\n \"icmsBaseTax\": 123,\n \"icmsAmount\": 123,\n \"icmsStBaseTax\": 123,\n \"icmsStAmount\": 123,\n \"icmsExemptAmount\": 123,\n \"fcpStRetAmount\": 123,\n \"fcpStAmount\": 123,\n \"fcpAmount\": 123,\n \"ipiReturnedAmount\": 123,\n \"icmsSenderAmount\": 123,\n \"icmsDestinationAmount\": 123,\n \"fcpDestinationAmount\": 123,\n \"isAmount\": 123,\n \"ibsCbsBaseTax\": 123,\n \"ibsStateDefAmount\": 123,\n \"ibsStateDevTaxAmount\": 123,\n \"ibsStateAmount\": 123,\n \"ibsCityDefAmount\": 123,\n \"ibsCityDevTaxAmount\": 123,\n \"ibsCityAmount\": 123,\n \"ibsAmount\": 123,\n \"ibsPresCredAmount\": 123,\n \"ibsPresCredSuspensiveAmount\": 123,\n \"cbsDefAmount\": 123,\n \"cbsDevTaxAmount\": 123,\n \"cbsAmount\": 123,\n \"cbsPresCredAmount\": 123,\n \"cbsPresCredSuspensiveAmount\": 123,\n \"ibsSingleStageStandardAmount\": 123,\n \"cbsSingleStageStandardAmount\": 123,\n \"ibsSingleStageRetenAmount\": 123,\n \"cbsSingleStageRetenAmount\": 123,\n \"ibsSingleStageRetAmount\": 123,\n \"cbsSingleStageRetAmount\": 123,\n \"ibsCbsIsAmount\": 123\n },\n \"accessKey\": \"<string>\",\n \"code\": \"<string>\",\n \"govPurchase\": {\n \"rate\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.spedy.com.br/v1/consumer-invoices")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"isFinalCustomer\": true,\n \"integrationId\": \"<string>\",\n \"issuedOn\": \"2023-11-07T05:31:56Z\",\n \"effectiveDate\": \"2023-11-07T05:31:56Z\",\n \"number\": 123,\n \"additionalInformation\": \"<string>\",\n \"sendEmailToCustomer\": true,\n \"series\": \"<string>\",\n \"operationNature\": \"<string>\",\n \"operationDate\": \"2023-11-07T05:31:56Z\",\n \"receiver\": {\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"stateTaxNumber\": \"<string>\",\n \"suframaTaxNumber\": \"<string>\",\n \"cityTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"transport\": {\n \"carrier\": {\n \"stateTaxNumber\": \"<string>\",\n \"transportRetention\": \"<string>\",\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"trailer\": {\n \"plate\": \"<string>\",\n \"rntc\": \"<string>\"\n },\n \"volume\": {\n \"quantity\": 123,\n \"species\": \"<string>\",\n \"brand\": \"<string>\",\n \"volumeNumeration\": \"<string>\",\n \"netWeight\": 123,\n \"grossWeight\": 123\n },\n \"vehicle\": {\n \"plate\": \"<string>\",\n \"state\": \"<string>\",\n \"rntc\": \"<string>\"\n },\n \"icmsRetention\": {\n \"serviceAmount\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"cfop\": \"<string>\",\n \"cityGeneratorFactCode\": 123\n },\n \"wagon\": \"<string>\",\n \"ferry\": \"<string>\"\n },\n \"intermediary\": {\n \"sellerRegistrationId\": \"<string>\",\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"stateTaxNumber\": \"<string>\",\n \"cityTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"billing\": {\n \"number\": \"<string>\",\n \"originalAmount\": 123,\n \"discountAmount\": 123,\n \"netAmount\": 123\n },\n \"duplicates\": [\n {\n \"number\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"amount\": 123\n }\n ],\n \"payments\": [\n {\n \"amount\": 123,\n \"card\": {\n \"federalTaxNumber\": \"<string>\",\n \"authorizationCode\": \"<string>\",\n \"isIntegratedPayment\": true\n }\n }\n ],\n \"items\": [\n {\n \"code\": \"<string>\",\n \"gtinCode\": \"<string>\",\n \"description\": \"<string>\",\n \"ncm\": \"<string>\",\n \"cest\": \"<string>\",\n \"cfop\": 123,\n \"unit\": \"<string>\",\n \"quantity\": 123,\n \"unitAmount\": 123,\n \"totalAmount\": 123,\n \"unitTax\": \"<string>\",\n \"quantityTax\": 123,\n \"unitTaxAmount\": 123,\n \"freightAmount\": 123,\n \"insuranceAmount\": 123,\n \"discountAmount\": 123,\n \"othersAmount\": 123,\n \"makeupTotal\": true,\n \"numberOrderBuy\": \"<string>\",\n \"itemNumberOrderBuy\": 123,\n \"taxBenefitCode\": \"<string>\",\n \"taxes\": {\n \"totalTax\": 123,\n \"icms\": {\n \"origin\": 123,\n \"cst\": 123,\n \"csosn\": 123,\n \"baseTaxModality\": 123,\n \"baseTax\": 123,\n \"baseTaxSt\": 123,\n \"baseTaxStModality\": 123,\n \"baseTaxStReduction\": 123,\n \"baseTaxStAmount\": 123,\n \"baseTaxReduction\": 123,\n \"stRate\": 123,\n \"stAmount\": 123,\n \"stMarginAmount\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"reductionRate\": 123,\n \"snCreditRate\": 123,\n \"snCreditAmount\": 123,\n \"stRetentionAmount\": 123,\n \"baseStRetentionAmount\": 123,\n \"taxOperationBaseRate\": 123,\n \"stReason\": \"<string>\",\n \"amountOperation\": 123,\n \"defermentRate\": 123,\n \"baseDeferred\": 123,\n \"exemptAmount\": 123,\n \"exemptReason\": 123,\n \"exemptDeduction\": 123,\n \"fcpRate\": 123,\n \"fcpAmount\": 123,\n \"baseTaxFcpAmount\": 123,\n \"fcpStRate\": 123,\n \"fcpStAmount\": 123,\n \"fcpStRetRate\": 123,\n \"fcpStRetAmount\": 123,\n \"baseTaxFcpStAmount\": 123,\n \"baseFcpRetentionAmount\": 123,\n \"stpRate\": 123,\n \"baseTaxEffectiveReduction\": 123,\n \"baseTaxEffective\": 123,\n \"effectiveRate\": 123,\n \"effectiveAmount\": 123,\n \"substituteAmount\": 123\n },\n \"ipi\": {\n \"classification\": \"<string>\",\n \"producerFederalTaxNumber\": \"<string>\",\n \"stampCode\": \"<string>\",\n \"stampQuantity\": 123,\n \"classificationCode\": \"<string>\",\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"unitQuantity\": 123,\n \"unitAmount\": 123,\n \"amount\": 123\n },\n \"ii\": {\n \"baseTax\": 123,\n \"customsExpenditureAmount\": 123,\n \"amount\": 123,\n \"iofAmount\": 123\n },\n \"pis\": {\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"productQuantity\": 123\n },\n \"cofins\": {\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"productQuantity\": 123\n },\n \"icmsDestination\": {\n \"destBaseTax\": 123,\n \"fcpAdicRate\": 123,\n \"internalOperationRate\": 123,\n \"destinationRate\": 123,\n \"fcpDestinationAmount\": 123,\n \"destinationAmount\": 123,\n \"issuerStateAmount\": 123,\n \"fcpBaseTax\": 123\n },\n \"is\": {\n \"cst\": 123,\n \"classification\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"specificRate\": 123,\n \"unitTax\": \"<string>\",\n \"quantityTax\": 123,\n \"amount\": 123\n },\n \"ibsCbs\": {\n \"cst\": 123,\n \"classification\": 123,\n \"ibsAmount\": 123,\n \"baseTax\": 123,\n \"ibsStateRate\": 123,\n \"ibsStateDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"ibsStateDevTax\": {\n \"amount\": 123\n },\n \"ibsStateRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"ibsStateAmount\": 123,\n \"ibsCityRate\": 123,\n \"ibsCityDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"ibsCityDevTax\": {\n \"amount\": 123\n },\n \"ibsCityRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"ibsCityAmount\": 123,\n \"cbsRate\": 123,\n \"cbsDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"cbsDevTax\": {\n \"amount\": 123\n },\n \"cbsRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"cbsAmount\": 123,\n \"regCst\": 123,\n \"regClassification\": 123,\n \"regStateIbsRate\": 123,\n \"regStateIbsAmount\": 123,\n \"regCityIbsRate\": 123,\n \"regCityIbsAmount\": 123,\n \"regCbsRate\": 123,\n \"regCbsAmount\": 123,\n \"ibsPresCred\": {\n \"code\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"suspensiveAmount\": 123\n },\n \"cbsPresCred\": {\n \"code\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"suspensiveAmount\": 123\n },\n \"govPurchaseStateIbsRate\": 123,\n \"govPurchaseStateIbsAmount\": 123,\n \"govPurchaseCityIbsRate\": 123,\n \"govPurchaseCityIbsAmount\": 123,\n \"govPurchaseCbsRate\": 123,\n \"govPurchaseCbsAmount\": 123,\n \"singleStageIbsAmount\": 123,\n \"singleStageCbsAmount\": 123,\n \"singleStageStandard\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageReten\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageRet\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageDefIbsRate\": 123,\n \"singleStageDefIbsAmount\": 123,\n \"singleStageDefCbsRate\": 123,\n \"singleStageDefCbsAmount\": 123,\n \"credTransferIbsAmount\": 123,\n \"credTransferCbsAmount\": 123,\n \"presCredIbsZfmAmount\": 123\n }\n },\n \"specificProduct\": {\n \"fuel\": {\n \"anpCode\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"vehicle\": {\n \"chassis\": \"<string>\",\n \"colorCode\": \"<string>\",\n \"colorDescription\": \"<string>\",\n \"power\": \"<string>\",\n \"cylinderCapacity\": \"<string>\",\n \"netWeight\": \"<string>\",\n \"grossWeight\": \"<string>\",\n \"serialNumber\": \"<string>\",\n \"fuelType\": \"<string>\",\n \"engineNumber\": \"<string>\",\n \"maxTractionCapacity\": \"<string>\",\n \"distanceType\": \"<string>\",\n \"modelYear\": 123,\n \"manufactureYear\": 123,\n \"paintType\": \"<string>\",\n \"vehicleType\": \"<string>\",\n \"vehicleSpecies\": 123,\n \"modelCode\": \"<string>\",\n \"denatranColorCode\": \"<string>\",\n \"seats\": 123\n },\n \"medication\": {\n \"anvisaCode\": \"<string>\",\n \"exemptionReason\": \"<string>\",\n \"maxConsumerPrice\": 123\n }\n },\n \"trackings\": [\n {\n \"batchNumber\": \"<string>\",\n \"batchQuantity\": 123,\n \"manufacturingDate\": \"2023-11-07T05:31:56Z\",\n \"expirationDate\": \"2023-11-07T05:31:56Z\",\n \"aggregationCode\": \"<string>\"\n }\n ]\n }\n ],\n \"referencedDocuments\": [\n {\n \"accessKey\": \"<string>\"\n }\n ],\n \"authorizedPersons\": [\n \"<string>\"\n ],\n \"total\": {\n \"invoiceAmount\": 123,\n \"pisAmount\": 123,\n \"cofinsAmount\": 123,\n \"discountAmount\": 123,\n \"othersAmount\": 123,\n \"totalTax\": 123,\n \"ipiAmount\": 123,\n \"importTaxAmount\": 123,\n \"productAmount\": 123,\n \"freightAmount\": 123,\n \"insuranceAmount\": 123,\n \"icmsBaseTax\": 123,\n \"icmsAmount\": 123,\n \"icmsStBaseTax\": 123,\n \"icmsStAmount\": 123,\n \"icmsExemptAmount\": 123,\n \"fcpStRetAmount\": 123,\n \"fcpStAmount\": 123,\n \"fcpAmount\": 123,\n \"ipiReturnedAmount\": 123,\n \"icmsSenderAmount\": 123,\n \"icmsDestinationAmount\": 123,\n \"fcpDestinationAmount\": 123,\n \"isAmount\": 123,\n \"ibsCbsBaseTax\": 123,\n \"ibsStateDefAmount\": 123,\n \"ibsStateDevTaxAmount\": 123,\n \"ibsStateAmount\": 123,\n \"ibsCityDefAmount\": 123,\n \"ibsCityDevTaxAmount\": 123,\n \"ibsCityAmount\": 123,\n \"ibsAmount\": 123,\n \"ibsPresCredAmount\": 123,\n \"ibsPresCredSuspensiveAmount\": 123,\n \"cbsDefAmount\": 123,\n \"cbsDevTaxAmount\": 123,\n \"cbsAmount\": 123,\n \"cbsPresCredAmount\": 123,\n \"cbsPresCredSuspensiveAmount\": 123,\n \"ibsSingleStageStandardAmount\": 123,\n \"cbsSingleStageStandardAmount\": 123,\n \"ibsSingleStageRetenAmount\": 123,\n \"cbsSingleStageRetenAmount\": 123,\n \"ibsSingleStageRetAmount\": 123,\n \"cbsSingleStageRetAmount\": 123,\n \"ibsCbsIsAmount\": 123\n },\n \"accessKey\": \"<string>\",\n \"code\": \"<string>\",\n \"govPurchase\": {\n \"rate\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/consumer-invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"isFinalCustomer\": true,\n \"integrationId\": \"<string>\",\n \"issuedOn\": \"2023-11-07T05:31:56Z\",\n \"effectiveDate\": \"2023-11-07T05:31:56Z\",\n \"number\": 123,\n \"additionalInformation\": \"<string>\",\n \"sendEmailToCustomer\": true,\n \"series\": \"<string>\",\n \"operationNature\": \"<string>\",\n \"operationDate\": \"2023-11-07T05:31:56Z\",\n \"receiver\": {\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"stateTaxNumber\": \"<string>\",\n \"suframaTaxNumber\": \"<string>\",\n \"cityTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"transport\": {\n \"carrier\": {\n \"stateTaxNumber\": \"<string>\",\n \"transportRetention\": \"<string>\",\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"trailer\": {\n \"plate\": \"<string>\",\n \"rntc\": \"<string>\"\n },\n \"volume\": {\n \"quantity\": 123,\n \"species\": \"<string>\",\n \"brand\": \"<string>\",\n \"volumeNumeration\": \"<string>\",\n \"netWeight\": 123,\n \"grossWeight\": 123\n },\n \"vehicle\": {\n \"plate\": \"<string>\",\n \"state\": \"<string>\",\n \"rntc\": \"<string>\"\n },\n \"icmsRetention\": {\n \"serviceAmount\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"cfop\": \"<string>\",\n \"cityGeneratorFactCode\": 123\n },\n \"wagon\": \"<string>\",\n \"ferry\": \"<string>\"\n },\n \"intermediary\": {\n \"sellerRegistrationId\": \"<string>\",\n \"name\": \"<string>\",\n \"federalTaxNumber\": \"<string>\",\n \"stateTaxNumber\": \"<string>\",\n \"cityTaxNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"district\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"number\": \"<string>\",\n \"additionalInformation\": \"<string>\",\n \"city\": {\n \"name\": \"<string>\",\n \"state\": \"<string>\",\n \"code\": 123\n },\n \"country\": \"<string>\"\n }\n },\n \"billing\": {\n \"number\": \"<string>\",\n \"originalAmount\": 123,\n \"discountAmount\": 123,\n \"netAmount\": 123\n },\n \"duplicates\": [\n {\n \"number\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"amount\": 123\n }\n ],\n \"payments\": [\n {\n \"amount\": 123,\n \"card\": {\n \"federalTaxNumber\": \"<string>\",\n \"authorizationCode\": \"<string>\",\n \"isIntegratedPayment\": true\n }\n }\n ],\n \"items\": [\n {\n \"code\": \"<string>\",\n \"gtinCode\": \"<string>\",\n \"description\": \"<string>\",\n \"ncm\": \"<string>\",\n \"cest\": \"<string>\",\n \"cfop\": 123,\n \"unit\": \"<string>\",\n \"quantity\": 123,\n \"unitAmount\": 123,\n \"totalAmount\": 123,\n \"unitTax\": \"<string>\",\n \"quantityTax\": 123,\n \"unitTaxAmount\": 123,\n \"freightAmount\": 123,\n \"insuranceAmount\": 123,\n \"discountAmount\": 123,\n \"othersAmount\": 123,\n \"makeupTotal\": true,\n \"numberOrderBuy\": \"<string>\",\n \"itemNumberOrderBuy\": 123,\n \"taxBenefitCode\": \"<string>\",\n \"taxes\": {\n \"totalTax\": 123,\n \"icms\": {\n \"origin\": 123,\n \"cst\": 123,\n \"csosn\": 123,\n \"baseTaxModality\": 123,\n \"baseTax\": 123,\n \"baseTaxSt\": 123,\n \"baseTaxStModality\": 123,\n \"baseTaxStReduction\": 123,\n \"baseTaxStAmount\": 123,\n \"baseTaxReduction\": 123,\n \"stRate\": 123,\n \"stAmount\": 123,\n \"stMarginAmount\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"reductionRate\": 123,\n \"snCreditRate\": 123,\n \"snCreditAmount\": 123,\n \"stRetentionAmount\": 123,\n \"baseStRetentionAmount\": 123,\n \"taxOperationBaseRate\": 123,\n \"stReason\": \"<string>\",\n \"amountOperation\": 123,\n \"defermentRate\": 123,\n \"baseDeferred\": 123,\n \"exemptAmount\": 123,\n \"exemptReason\": 123,\n \"exemptDeduction\": 123,\n \"fcpRate\": 123,\n \"fcpAmount\": 123,\n \"baseTaxFcpAmount\": 123,\n \"fcpStRate\": 123,\n \"fcpStAmount\": 123,\n \"fcpStRetRate\": 123,\n \"fcpStRetAmount\": 123,\n \"baseTaxFcpStAmount\": 123,\n \"baseFcpRetentionAmount\": 123,\n \"stpRate\": 123,\n \"baseTaxEffectiveReduction\": 123,\n \"baseTaxEffective\": 123,\n \"effectiveRate\": 123,\n \"effectiveAmount\": 123,\n \"substituteAmount\": 123\n },\n \"ipi\": {\n \"classification\": \"<string>\",\n \"producerFederalTaxNumber\": \"<string>\",\n \"stampCode\": \"<string>\",\n \"stampQuantity\": 123,\n \"classificationCode\": \"<string>\",\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"unitQuantity\": 123,\n \"unitAmount\": 123,\n \"amount\": 123\n },\n \"ii\": {\n \"baseTax\": 123,\n \"customsExpenditureAmount\": 123,\n \"amount\": 123,\n \"iofAmount\": 123\n },\n \"pis\": {\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"productQuantity\": 123\n },\n \"cofins\": {\n \"cst\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"productQuantity\": 123\n },\n \"icmsDestination\": {\n \"destBaseTax\": 123,\n \"fcpAdicRate\": 123,\n \"internalOperationRate\": 123,\n \"destinationRate\": 123,\n \"fcpDestinationAmount\": 123,\n \"destinationAmount\": 123,\n \"issuerStateAmount\": 123,\n \"fcpBaseTax\": 123\n },\n \"is\": {\n \"cst\": 123,\n \"classification\": 123,\n \"baseTax\": 123,\n \"rate\": 123,\n \"specificRate\": 123,\n \"unitTax\": \"<string>\",\n \"quantityTax\": 123,\n \"amount\": 123\n },\n \"ibsCbs\": {\n \"cst\": 123,\n \"classification\": 123,\n \"ibsAmount\": 123,\n \"baseTax\": 123,\n \"ibsStateRate\": 123,\n \"ibsStateDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"ibsStateDevTax\": {\n \"amount\": 123\n },\n \"ibsStateRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"ibsStateAmount\": 123,\n \"ibsCityRate\": 123,\n \"ibsCityDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"ibsCityDevTax\": {\n \"amount\": 123\n },\n \"ibsCityRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"ibsCityAmount\": 123,\n \"cbsRate\": 123,\n \"cbsDef\": {\n \"rate\": 123,\n \"amount\": 123\n },\n \"cbsDevTax\": {\n \"amount\": 123\n },\n \"cbsRed\": {\n \"rate\": 123,\n \"effectiveRate\": 123\n },\n \"cbsAmount\": 123,\n \"regCst\": 123,\n \"regClassification\": 123,\n \"regStateIbsRate\": 123,\n \"regStateIbsAmount\": 123,\n \"regCityIbsRate\": 123,\n \"regCityIbsAmount\": 123,\n \"regCbsRate\": 123,\n \"regCbsAmount\": 123,\n \"ibsPresCred\": {\n \"code\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"suspensiveAmount\": 123\n },\n \"cbsPresCred\": {\n \"code\": 123,\n \"rate\": 123,\n \"amount\": 123,\n \"suspensiveAmount\": 123\n },\n \"govPurchaseStateIbsRate\": 123,\n \"govPurchaseStateIbsAmount\": 123,\n \"govPurchaseCityIbsRate\": 123,\n \"govPurchaseCityIbsAmount\": 123,\n \"govPurchaseCbsRate\": 123,\n \"govPurchaseCbsAmount\": 123,\n \"singleStageIbsAmount\": 123,\n \"singleStageCbsAmount\": 123,\n \"singleStageStandard\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageReten\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageRet\": {\n \"quantityTax\": 123,\n \"ibsAdRemRate\": 123,\n \"cbsAdRemRate\": 123,\n \"ibsAmount\": 123,\n \"cbsAmount\": 123\n },\n \"singleStageDefIbsRate\": 123,\n \"singleStageDefIbsAmount\": 123,\n \"singleStageDefCbsRate\": 123,\n \"singleStageDefCbsAmount\": 123,\n \"credTransferIbsAmount\": 123,\n \"credTransferCbsAmount\": 123,\n \"presCredIbsZfmAmount\": 123\n }\n },\n \"specificProduct\": {\n \"fuel\": {\n \"anpCode\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"vehicle\": {\n \"chassis\": \"<string>\",\n \"colorCode\": \"<string>\",\n \"colorDescription\": \"<string>\",\n \"power\": \"<string>\",\n \"cylinderCapacity\": \"<string>\",\n \"netWeight\": \"<string>\",\n \"grossWeight\": \"<string>\",\n \"serialNumber\": \"<string>\",\n \"fuelType\": \"<string>\",\n \"engineNumber\": \"<string>\",\n \"maxTractionCapacity\": \"<string>\",\n \"distanceType\": \"<string>\",\n \"modelYear\": 123,\n \"manufactureYear\": 123,\n \"paintType\": \"<string>\",\n \"vehicleType\": \"<string>\",\n \"vehicleSpecies\": 123,\n \"modelCode\": \"<string>\",\n \"denatranColorCode\": \"<string>\",\n \"seats\": 123\n },\n \"medication\": {\n \"anvisaCode\": \"<string>\",\n \"exemptionReason\": \"<string>\",\n \"maxConsumerPrice\": 123\n }\n },\n \"trackings\": [\n {\n \"batchNumber\": \"<string>\",\n \"batchQuantity\": 123,\n \"manufacturingDate\": \"2023-11-07T05:31:56Z\",\n \"expirationDate\": \"2023-11-07T05:31:56Z\",\n \"aggregationCode\": \"<string>\"\n }\n ]\n }\n ],\n \"referencedDocuments\": [\n {\n \"accessKey\": \"<string>\"\n }\n ],\n \"authorizedPersons\": [\n \"<string>\"\n ],\n \"total\": {\n \"invoiceAmount\": 123,\n \"pisAmount\": 123,\n \"cofinsAmount\": 123,\n \"discountAmount\": 123,\n \"othersAmount\": 123,\n \"totalTax\": 123,\n \"ipiAmount\": 123,\n \"importTaxAmount\": 123,\n \"productAmount\": 123,\n \"freightAmount\": 123,\n \"insuranceAmount\": 123,\n \"icmsBaseTax\": 123,\n \"icmsAmount\": 123,\n \"icmsStBaseTax\": 123,\n \"icmsStAmount\": 123,\n \"icmsExemptAmount\": 123,\n \"fcpStRetAmount\": 123,\n \"fcpStAmount\": 123,\n \"fcpAmount\": 123,\n \"ipiReturnedAmount\": 123,\n \"icmsSenderAmount\": 123,\n \"icmsDestinationAmount\": 123,\n \"fcpDestinationAmount\": 123,\n \"isAmount\": 123,\n \"ibsCbsBaseTax\": 123,\n \"ibsStateDefAmount\": 123,\n \"ibsStateDevTaxAmount\": 123,\n \"ibsStateAmount\": 123,\n \"ibsCityDefAmount\": 123,\n \"ibsCityDevTaxAmount\": 123,\n \"ibsCityAmount\": 123,\n \"ibsAmount\": 123,\n \"ibsPresCredAmount\": 123,\n \"ibsPresCredSuspensiveAmount\": 123,\n \"cbsDefAmount\": 123,\n \"cbsDevTaxAmount\": 123,\n \"cbsAmount\": 123,\n \"cbsPresCredAmount\": 123,\n \"cbsPresCredSuspensiveAmount\": 123,\n \"ibsSingleStageStandardAmount\": 123,\n \"cbsSingleStageStandardAmount\": 123,\n \"ibsSingleStageRetenAmount\": 123,\n \"cbsSingleStageRetenAmount\": 123,\n \"ibsSingleStageRetAmount\": 123,\n \"cbsSingleStageRetAmount\": 123,\n \"ibsCbsIsAmount\": 123\n },\n \"accessKey\": \"<string>\",\n \"code\": \"<string>\",\n \"govPurchase\": {\n \"rate\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"integrationId": "<string>",
"issuedOn": "2023-11-07T05:31:56Z",
"effectiveDate": "2023-11-07T05:31:56Z",
"receiver": {
"name": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"suframaTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"company": {
"name": "<string>",
"legalName": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"cityTaxNumber": "<string>"
},
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"date": "2023-11-07T05:31:56Z",
"transactionId": "<string>"
},
"authorization": {
"date": "2023-11-07T05:31:56Z",
"protocol": "<string>",
"digestValue": "<string>"
},
"amount": 123,
"number": 123,
"processingDetail": {
"message": "<string>",
"code": "<string>",
"on": "2023-11-07T05:31:56Z"
},
"accessKey": "<string>",
"series": "<string>",
"govPurchase": {
"rate": 123
},
"contingency": {
"date": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"authorizedPersons": [
"<string>"
]
}Authorizations
Authorization By X-Api-Key inside request's header
Body
Consumidor Final [indFinal]
Identificador único da nota fiscal no sistema do cliente (máx. 36 caracteres).
36Data de emissão [dhEmi]
Data de competência [dCompet]
Número da NF [nNF]
Valores possíveis:
- created: Criada — aguarda emissão explícita via issue ou gatilho automático (ex: afterPayment)
- enqueued: Enfileirada para processamento junto à SEFAZ ou Prefeitura
- received: Recebido
- authorized: Autorizado
- inContingent: Em contingência
- rejected: Rejeitado
- canceled: Cancelado
- denied: Denegado
- removed: Removido
- disabled: Inutilizado
created, enqueued, received, authorized, inContingent, rejected, canceled, denied, removed, disabled Informações adicionais [infCpl]
Enviar e-mail para o cliente / tomador
Série [serie]
Formato de impressão do DANFE
Valores possíveis:
- none: Sem geração de DANFE
- portrait: Retrato (orientação vertical)
- landscape: Paisagem (orientação horizontal)
- simplified: Simplificado
- consumerInvoice: DANFE NFC-e (cupom fiscal eletrônico)
- electronicMessage: Mensagem eletrônica
none, portrait, landscape, simplified, consumerInvoice, electronicMessage Tipo de operação da nota fiscal
Valores possíveis:
- incoming: Entrada
- outgoing: Saída
incoming, outgoing Valores possíveis:
- normal: Normal
- complement: Complemento
- adjustment: Ajustamento
- devolution: Devolução
- credit: Crédito
- debit: Débito
normal, complement, adjustment, devolution, credit, debit Forma de emissão da NF-e
Valores possíveis:
- normal: Emissão normal (não em contingência)
- fSIA: Contingência FS-IA — DANFE em formulário de segurança com impressão no verso
- sCAN: Contingência SCAN — Sistema de Contingência do Ambiente Nacional (desativado)
- ePEC: Contingência EPEC — Declaração Prévia de Emissão em Contingência
- fSDA: Contingência FS-DA — DANFE em formulário de segurança sem impressão no verso
- sVCAN: Contingência SVC-AN — SEFAZ Virtual de Contingência do Ambiente Nacional
- sVCRS: Contingência SVC-RS — SEFAZ Virtual de Contingência do Rio Grande do Sul
- offLine: Contingência off-line
- website: Website do provedor (NFS-e)
- aNNFS: Ambiente Nacional da NFS-e
- alt: Ambiente alternativo do provedor (NFS-e)
normal, fsia, scan, epec, fsda, svcan, svcrs, offLine, website, annfs, alt Natureza de Operação [natOp]
Data da Operação [dhSaiEnt]
Valores possíveis:
- internal: Interna
- interstate: Interestadual
- international: Exterior
internal, interstate, international Indicador de presença do comprador no estabelecimento comercial
Valores possíveis:
- none: Não se aplica (ex: NF-e complementar ou de ajuste)
- presence: Operação presencial
- internet: Operação não presencial via Internet
- telephone: Operação não presencial via teleatendimento
- delivery: Entrega em domicílio (NFC-e)
- othersNonPresenceOperation: Operação não presencial — outros
none, presence, internet, telephone, delivery, othersNonPresenceOperation Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Faturas
Show child attributes
Show child attributes
Pagamentos [pag]
Show child attributes
Show child attributes
Itens da nota [det]
Show child attributes
Show child attributes
Documentos Fiscais Referenciados [NFref]
Show child attributes
Show child attributes
Pessoas autorizadas a acessar o XML da nota na SEFAZ [autXML] (máx. 10).
Show child attributes
Show child attributes
Chave de acesso [Id]
Código Numérico [cNF]
Tipo de Nota de Débito — NT 2025.002 Reforma Tributária
Valores possíveis:
- creditTransferToCooperatives: Transferência de créditos para Cooperativas
- creditReversalForExemptOrImmuneOutputs: Anulação de crédito por saídas imunes/isentas
- unprocessedInvoiceDebitInAssessment: Débitos de notas fiscais não processadas na apuração
- penaltyAndInterest: Multa e juros
- creditTransferBySuccession: Transferência de crédito de sucessão
- advancePayment: Pagamento antecipado
- inventoryLoss: Perda em estoque
creditTransferToCooperatives, creditReversalForExemptOrImmuneOutputs, unprocessedInvoiceDebitInAssessment, penaltyAndInterest, creditTransferBySuccession, advancePayment, inventoryLoss Tipo de Nota de Crédito — NT 2025.002 Reforma Tributária
Valores possíveis:
- finesAndInterest: Multa e juros
- appropriation: Apropriação de crédito presumido de IBS sobre o saldo devedor na ZFM (art. 450, § 1º, LC 214/25)
finesAndInterest, appropriation Show child attributes
Show child attributes
Tipo de operação com o ente governamental — NT 2025.002 Reforma Tributária
Valores possíveis:
- supply: Fornecimento
- receipt: Recebimento do pagamento, conforme fato gerador do IBS/CBS (Art. 10 § 2º)
supply, receipt Response
OK
ID da NF
ID de integração
Valores possíveis:
- created: Criada — aguarda emissão explícita via issue ou gatilho automático (ex: afterPayment)
- enqueued: Enfileirada para processamento junto à SEFAZ ou Prefeitura
- received: Recebido
- authorized: Autorizado
- inContingent: Em contingência
- rejected: Rejeitado
- canceled: Cancelado
- denied: Denegado
- removed: Removido
- disabled: Inutilizado
created, enqueued, received, authorized, inContingent, rejected, canceled, denied, removed, disabled Valores possíveis:
- productInvoice: NF-e
- consumerInvoice: NFC-e
- serviceInvoice: NFS-e
productInvoice, consumerInvoice, serviceInvoice Valores possíveis:
- production: Produção
- development: Homologação
- simulation:
production, development, simulation Data de emissão
Data de competência
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Dados de autorização da nota fiscal
Show child attributes
Show child attributes
Valor total da NF
Número
Show child attributes
Show child attributes
Tipo de operação da nota fiscal
Valores possíveis:
- incoming: Entrada
- outgoing: Saída
incoming, outgoing Formato de impressão do DANFE
Valores possíveis:
- none: Sem geração de DANFE
- portrait: Retrato (orientação vertical)
- landscape: Paisagem (orientação horizontal)
- simplified: Simplificado
- consumerInvoice: DANFE NFC-e (cupom fiscal eletrônico)
- electronicMessage: Mensagem eletrônica
none, portrait, landscape, simplified, consumerInvoice, electronicMessage Forma de emissão da NF-e
Valores possíveis:
- normal: Emissão normal (não em contingência)
- fSIA: Contingência FS-IA — DANFE em formulário de segurança com impressão no verso
- sCAN: Contingência SCAN — Sistema de Contingência do Ambiente Nacional (desativado)
- ePEC: Contingência EPEC — Declaração Prévia de Emissão em Contingência
- fSDA: Contingência FS-DA — DANFE em formulário de segurança sem impressão no verso
- sVCAN: Contingência SVC-AN — SEFAZ Virtual de Contingência do Ambiente Nacional
- sVCRS: Contingência SVC-RS — SEFAZ Virtual de Contingência do Rio Grande do Sul
- offLine: Contingência off-line
- website: Website do provedor (NFS-e)
- aNNFS: Ambiente Nacional da NFS-e
- alt: Ambiente alternativo do provedor (NFS-e)
normal, fsia, scan, epec, fsda, svcan, svcrs, offLine, website, annfs, alt Valores possíveis:
- normal: Normal
- complement: Complemento
- adjustment: Ajustamento
- devolution: Devolução
- credit: Crédito
- debit: Débito
normal, complement, adjustment, devolution, credit, debit Tipo de Nota de Débito — NT 2025.002 Reforma Tributária
Valores possíveis:
- creditTransferToCooperatives: Transferência de créditos para Cooperativas
- creditReversalForExemptOrImmuneOutputs: Anulação de crédito por saídas imunes/isentas
- unprocessedInvoiceDebitInAssessment: Débitos de notas fiscais não processadas na apuração
- penaltyAndInterest: Multa e juros
- creditTransferBySuccession: Transferência de crédito de sucessão
- advancePayment: Pagamento antecipado
- inventoryLoss: Perda em estoque
creditTransferToCooperatives, creditReversalForExemptOrImmuneOutputs, unprocessedInvoiceDebitInAssessment, penaltyAndInterest, creditTransferBySuccession, advancePayment, inventoryLoss Tipo de Nota de Crédito — NT 2025.002 Reforma Tributária
Valores possíveis:
- finesAndInterest: Multa e juros
- appropriation: Apropriação de crédito presumido de IBS sobre o saldo devedor na ZFM (art. 450, § 1º, LC 214/25)
finesAndInterest, appropriation Show child attributes
Show child attributes
Tipo de operação com o ente governamental — NT 2025.002 Reforma Tributária
Valores possíveis:
- supply: Fornecimento
- receipt: Recebimento do pagamento, conforme fato gerador do IBS/CBS (Art. 10 § 2º)
supply, receipt Show child attributes
Show child attributes