# sendInvoiceService

Send an e-Invoice Service

`POST /v3/invoices/services`

**API:** AvaTax Brazil
**Tag:** Invoice Service
**API Version:** 3.0
**Base URL:** https://avataxbr.sandbox.avalarabrasil.com.br

Source: https://developer.avalara.com/products/avatax-brazil/api/methods/Invoice%20Service/sendInvoiceService/

## Description

(en) Sends a invoice
(pt) Envia uma fatura

## Request Body

**Content-Type:** `application/json`
**Schema:** `TransactionFullForServices`

| Property | Type | Required | Description |
|---|---|---|---|
| `header` | HeaderFullForServices | **Yes** |  |
| `lines` | LineFullForServices[] | **Yes** |  |
| `summary` | SummaryForServices | No |  |
| `processingInfo` | ProcessingInfo | No |  |
| `version` | string | No | (en) Payload Model Version
(pt) Versão modelo do payload Values: `3`. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 201 | (en) Returns NFSe
(pt) Retorna NFSe | `eInvoiceReturnAll` |
| 400 |  |  |
| 401 |  |  |
| 403 |  |  |
| 404 |  |  |
| 429 |  |  |
| 500 |  |  |
| 503 |  |  |

### 201 Response: `eInvoiceReturnAll`

| Property | Type | Required | Description |
|---|---|---|---|
| `status` | eInvoiceReturnStatus | No |  |
| `pdf` | eInvoiceReturnObj | No |  |
| `xml` | eInvoiceReturnObj | No |  |

## Example Request

```bash
curl -X POST "https://avataxbr.sandbox.avalarabrasil.com.br/v3/invoices/services" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json" \
  -d '{
  "header": {
    "enableCitationWarnings": false,
    "eDocCreatorType": "",
    "eDocCreatorPerspective": false,
    "operationType": "",
    "amountCalcType": {},
    "companyLocation": "",
    "transactionDate": "",
    "documentCode": "",
    "locations": {
      "entity": {
        "name": "",
        "businessName": "",
        "type": {},
        "federalTaxId": "",
        "cityTaxId": "",
        "stateTaxId": "",
        "suframa": "",
        "incentiveArea": "",
        "taxRegime": {},
        "taxesSettings": {
          "icmsTaxPayer": false,
          "subjectToPayrollTaxRelief": false,
          "roundingServiceByItem": 0,
          "pisFopag": false,
          "pisCofinsReliefZF": false,
          "cofinsSubjectTo": "",
          "csllSubjectTo": "",
          "pisSubjectTo": "",
          "receiptsAreFullNoCumulativePisCofins": false,
          "issRfRateForSimplesTaxRegime": 0,
          "pCredSN": 0,
          "enableCprb": false,
          "usesInssCprbToGrossValue": false,
          "notWithHoldIRForPublicAgency": false,
          "withholdICMSTransport": false,
          "pisCofinsIcmsTaxRelief": false
        },
        "address": {
          "street": "",
          "neighborhood": "",
          "zipcode": "",
          "cityCode": "",
          "cityName": "",
          "state": "",
          "countryCode": "",
          "country": "",
          "number": "",
          "complement": "",
          "phone": "",
          "email": "",
          "addressNotInformed": false
        },
        "activitySector": {},
        "caepf": "",
        "notNIFReasonCode": ""
      },
      "establishment": {
        "name": "",
        "businessName": "",
        "type": {},
        "federalTaxId": "",
        "cityTaxId": "",
        "stateTaxId": "",
        "suframa": "",
        "incentiveArea": "",
        "taxRegime": {},
        "taxesSettings": {
          "icmsTaxPayer": false,
          "subjectToPayrollTaxRelief": false,
          "roundingServiceByItem": 0,
          "pisFopag": false,
          "pisCofinsReliefZF": false,
          "cofinsSubjectTo": "",
          "csllSubjectTo": "",
          "pisSubjectTo": "",
          "receiptsAreFullNoCumulativePisCofins": false,
          "issRfRateForSimplesTaxRegime": 0,
          "pCredSN": 0,
          "enableCprb": false,
          "usesInssCprbToGrossValue": false,
          "notWithHoldIRForPublicAgency": false,
          "withholdICMSTransport": false,
          "pisCofinsIcmsTaxRelief": false
        },
        "address": {
          "street": "",
          "neighborhood": "",
          "zipcode": "",
          "cityCode": "",
          "cityName": "",
          "state": "",
          "countryCode": "",
          "country": "",
          "number": "",
          "complement": "",
          "phone": "",
          "email": "",
          "addressNotInformed": false
        },
        "activitySector": {},
        "caepf": "",
        "notNIFReasonCode": ""
      },
      "recipient": {
        "name": "",
        "businessName": "",
        "type": {},
        "federalTaxId": "",
        "cityTaxId": "",
        "stateTaxId": "",
        "suframa": "",
        "incentiveArea": "",
        "taxRegime": {},
        "taxesSettings": {
          "icmsTaxPayer": false,
          "subjectToPayrollTaxRelief": false,
          "roundingServiceByItem": 0,
          "pisFopag": false,
          "pisCofinsReliefZF": false,
          "cofinsSubjectTo": "",
          "csllSubjectTo": "",
          "pisSubjectTo": "",
          "receiptsAreFullNoCumulativePisCofins": false,
          "issRfRateForSimplesTaxRegime": 0,
          "pCredSN": 0,
          "enableCprb": false,
          "usesInssCprbToGrossValue": false,
          "notWithHoldIRForPublicAgency": false,
          "withholdICMSTransport": false,
          "pisCofinsIcmsTaxRelief": false
        },
        "address": {
          "street": "",
          "neighborhood": "",
          "zipcode": "",
          "cityCode": "",
          "cityName": "",
          "state": "",
          "countryCode": "",
          "country": "",
          "number": "",
          "complement": "",
          "phone": "",
          "email": "",
          "addressNotInformed": false
        },
        "activitySector": {},
        "caepf": "",
        "notNIFReasonCode": ""
      },
      "rendered": {
        "name": "",
        "businessName": "",
        "type": {},
        "federalTaxId": "",
        "cityTaxId": "",
        "stateTaxId": "",
        "suframa": "",
        "incentiveArea": "",
        "taxRegime": {},
        "taxesSettings": {
          "icmsTaxPayer": false,
          "subjectToPayrollTaxRelief": false,
          "roundingServiceByItem": 0,
          "pisFopag": false,
          "pisCofinsReliefZF": false,
          "cofinsSubjectTo": "",
          "csllSubjectTo": "",
          "pisSubjectTo": "",
          "receiptsAreFullNoCumulativePisCofins": false,
          "issRfRateForSimplesTaxRegime": 0,
          "pCredSN": 0,
          "enableCprb": false,
          "usesInssCprbToGrossValue": false,
          "notWithHoldIRForPublicAgency": false,
          "withholdICMSTransport": false,
          "pisCofinsIcmsTaxRelief": false
        },
        "address": {
          "street": "",
          "neighborhood": "",
          "zipcode": "",
          "cityCode": "",
          "cityName": "",
          "state": "",
          "countryCode": "",
          "country": "",
          "number": "",
          "complement": "",
          "phone": "",
          "email": "",
          "addressNotInformed": false
        },
        "activitySector": {},
        "caepf": "",
        "notNIFReasonCode": ""
      },
      "intermediary": {
        "name": "",
        "businessName": "",
        "type": {},
        "federalTaxId": "",
        "cityTaxId": "",
        "stateTaxId": "",
        "suframa": "",
        "incentiveArea": "",
        "taxRegime": {},
        "taxesSettings": {
          "icmsTaxPayer": false,
          "subjectToPayrollTaxRelief": false,
          "roundingServiceByItem": 0,
          "pisFopag": false,
          "pisCofinsReliefZF": false,
          "cofinsSubjectTo": "",
          "csllSubjectTo": "",
          "pisSubjectTo": "",
          "receiptsAreFullNoCumulativePisCofins": false,
          "issRfRateForSimplesTaxRegime": 0,
          "pCredSN": 0,
          "enableCprb": false,
          "usesInssCprbToGrossValue": false,
          "notWithHoldIRForPublicAgency": false,
          "withholdICMSTransport": false,
          "pisCofinsIcmsTaxRelief": false
        },
        "address": {
          "street": "",
          "neighborhood": "",
          "zipcode": "",
          "cityCode": "",
          "cityName": "",
          "state": "",
          "countryCode": "",
          "country": "",
          "number": "",
          "complement": "",
          "phone": "",
          "email": "",
          "addressNotInformed": false
        },
        "activitySector": {},
        "caepf": "",
        "notNIFReasonCode": ""
      },
      "propertySite": {},
      "eventSite": {}
    },
    "rpsNumber": 0,
    "rpsSerie": "",
    "messageType": "",
    "services": {
      "competenceDate": "",
      "purchaseOrderNumber": "",
      "rpsSubsNumber": 0,
      "rpsSubsSerie": "",
      "rpsNFSeSubsNumber": 0,
      "rpsNFSeSubsCode": "",
      "rpsNFSeSubsReason": "",
      "rpsNFSeSubsDate": "",
      "indPres": "",
      "cMunFGIBS": 0,
      "publicWayServices": "",
      "specialSituation": {},
      "culturalPromoter": false,
      "adminProcess": "",
      "class": "",
      "intTrade": {
        "serviceMode": "",
        "businessRelationship": "",
        "currencyCode": "",
        "amountInCurrencyCode": 0,
        "mecAFComexP": "",
        "mecAFComexT": "",
        "tempMoveGoods": "",
        "nDI": "",
        "nRE": "",
        "mdic": ""
      },
      "lsadppu": {
        "categ": "",
        "object": "",
        "totalLength": 0,
        "nPoles": 0
      },
      "build": {
        "cCIB": "",
        "code": "",
        "art": "",
        "cei": "",
        "number": "",
        "encapsulationNumber": ""
      },
      "eventAtv": {
        "name": "",
        "startDate": "",
        "endDate": "",
        "idAtvEv": ""
      },
      "enableCalcICBS": false,
      "refDocuments": [
        {
          "docType": "",
          "dfe": {
            "refNFe": "",
            "refNSFe": ""
          },
          "nfseMun": {
            "cityCode": "",
            "nNFSe": 0,
            "cVerif": ""
          },
          "nfnfs": {
            "nNFS": 0,
            "serieNFS": "",
            "modNFS": ""
          },
          "nDocFisc": "",
          "nDoc": "",
          "tpDedRed": "",
          "xDescOutDed": "",
          "dtEmiDoc": "",
          "dtAcrualDoc": "",
          "vDeductibleReducible": 0,
          "vDeductionReduction": 0
        }
      ],
      "indOp": "",
      "govProcurement": {
        "tpOperGov": ""
      }
    },
    "natOp": "",
    "payment": {
      "upfrontPayment": false,
      "installmentTerms": {},
      "bill": {
        "nFat": "",
        "vOrig": 0,
        "vDiscount": 0,
        "vNet": 0
      },
      "withholdingMode": {},
      "installment": [
        {
          "documentNumber": "",
          "date": "",
          "grossValue": 0,
          "netValue": 0,
          "withholdingMode": {},
          "withholdingPIS": 0,
          "withholdingCOFINS": 0,
          "withholdingCSLL": 0
        }
      ],
      "paymentInfo": {
        "change": 0,
        "penaltyAmount": 0,
        "interestAmount": 0
      }
    },
    "additionalInfo": {
      "complementaryInfo": "",
      "otherInfo": "",
      "tpAto": "",
      "idDocTec": "",
      "docRef": "",
      "orderNumber": "",
      "orderItems": "",
      "orderItemNumber": ""
    },
    "subscriptionId": ""
  },
  "lines": [
    {
      "lineCode": 0,
      "itemCode": "",
      "itemDescriptor": {
        "description": "",
        "legalReference": "",
        "taxCode": "",
        "hsCode": "",
        "lc116Code": "",
        "subjectToIRRFAuto": false,
        "piscofinsRevenueType": {},
        "serviceCode": "",
        "serviceCodeOrigin": "",
        "withLaborAssignment": false,
        "notSubjectToInssWhenPerson": false,
        "issBehavior": {},
        "issTaxableIndicator": "",
        "cnae": "",
        "glAccountCode": "",
        "appropriatePISCOFINScredit": false,
        "appropriateCBSIBScreditWhenInBound": false,
        "isPisCofinsEstimatedCredit": false,
        "thresholdBehavior": {}
      },
      "numberOfItems": 0,
      "lineUnitPrice": 0,
      "lineAmount": 0,
      "lineNetUnitPrice": 0,
      "lineNetAmount": 0,
      "lineNetFigure": 0,
      "lineTaxedDiscount": 0,
      "lineUnTaxedDiscount": 0,
      "customProperties": [
        {
          "name": "",
          "value": ""
        }
      ],
      "useType": {},
      "usagePurpose": "",
      "operationType": "",
      "cfop": 0,
      "overwrite": "",
      "orderNumber": "",
      "orderItemNumber": "",
      "benefitsAbroad": false,
      "taxDeductions": {
        "cbsIbs": 0,
        "iss": 0,
        "irrfAuto": 0,
        "transferAmount": 0,
        "inssPreviousContrib": 0,
        "inssBasisDiscount": 0,
        "numberOfDependents": 0
      },
      "services": {
        "issDueAtDestination": false,
        "withLaborAssignment": false,
        "hasCpom": false
      },
      "warnings": [
        {
          "id": "",
          "code": "",
          "citation": "",
          "description": "",
          "isCustomCitation": ""
        }
      ],
      "taxDetails": [
        {}
      ]
    }
  ],
  "summary": {
    "numberOfLines": 0,
    "totalLineAmounts": 0,
    "totalLineNetAmounts": 0,
    "totalTaxedDiscounts": 0,
    "totalUntaxedDiscounts": 0,
    "totalInsurances": 0,
    "totalFreights": 0,
    "totalOtherCosts": 0,
    "totalInvoice": 0,
    "totalInvoiceIbsCbsIs": 0,
    "taxByType": {},
    "taxImpactHighlights": {}
  },
  "processingInfo": {
    "versionId": "",
    "duration": 0,
    "message": {
      "code": 0,
      "message": "",
      "type": "",
      "ambiguousAgats": [
        {
          "code": "",
          "description": ""
        }
      ]
    }
  },
  "version": ""
}'
```