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