# sendInvoiceEvent

Send an event of a service invoice national model

`POST /v3/invoices/services/natnfse/event`

**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/sendInvoiceEvent/

## Description

(en) Send an event of a service invoice national model
(pt) Enviar um evento de NFse modelo nacional

## Request Body

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

| Property | Type | Required | Description |
|---|---|---|---|
| `companyLocation` | string | **Yes** | (en) This string contains a previously configured company code which may also have codes needed for tax return purposes. These codes are maintained through the customer portal. Main company address identity.
(pt) Essa string contém um código de empresa configurado anteriormente que também pode ter códigos necessários para fins de declaração de imposto. Esses códigos são mantidos através do portal do cliente. Identidade do endereço principal da empresa |
| `dateTime` | string | No | (en) Timestamp of when this event is fired. AAAA-MM-DDThh:mm:ssTZD
(pt) Carimbo de data/hora de quando este evento é disparado. AAAA-MM-DDThh:mm:ssTZD" |
| `seq` | string | No | (en) Each action type has a sequence number, if not informed, is defined by the engine. 
(pt) Cada tipo de evento possui um número de sequência, caso não seja informado, é assumido 001 |
| `eventInfo` | object | No | (en) Event Registration Request Information Group
(pt) Grupo de informações do pedido de registro do evento |

## Responses

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

### 200 Response: `eInvoiceReturnXml`

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

## Example Request

```bash
curl -X POST "https://avataxbr.sandbox.avalarabrasil.com.br/v3/invoices/services/natnfse/event" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json" \
  -d '{
  "companyLocation": "",
  "dateTime": "",
  "seq": "",
  "eventInfo": {
    "federalTaxId": "",
    "nfsAccessKey": "",
    "events": {
      "e101101": {
        "eventDescription": "",
        "reasonCode": "",
        "reasonDescription": ""
      },
      "e105102": {
        "eventDescription": "",
        "reasonCode": "",
        "reasonDescription": "",
        "nfsReplacementAccessKey": ""
      },
      "e101103": {
        "eventDescription": "",
        "reasonCode": "",
        "reasonDescription": ""
      },
      "e105104": {
        "eventDescription": "",
        "reasonCode": "",
        "reasonDescription": "",
        "federalTaxIdAgent": "",
        "nProcAdm": ""
      },
      "e105105": {
        "eventDescription": "",
        "reasonCode": "",
        "reasonDescription": "",
        "federalTaxIdAgent": "",
        "nProcAdm": ""
      },
      "e202201": {
        "eventDescription": ""
      },
      "e203202": {
        "eventDescription": ""
      },
      "e204203": {
        "eventDescription": ""
      },
      "e205204": {
        "eventDescription": ""
      },
      "e202205": {
        "eventDescription": "",
        "infRej": {
          "reasonCode": "",
          "reasonDescription": ""
        }
      },
      "e203206": {
        "eventDescription": "",
        "infRej": {
          "reasonCode": "",
          "reasonDescription": ""
        }
      },
      "e204207": {
        "eventDescription": "",
        "infRej": {
          "reasonCode": "",
          "reasonDescription": ""
        }
      },
      "e205208": {
        "eventDescription": "",
        "infAnRej": {
          "federalTaxIdAgent": "",
          "idEvManifRej": "",
          "reasonDescription": ""
        }
      },
      "e305101": {
        "eventDescription": "",
        "federalTaxIdAgent": "",
        "nProcAdm": "",
        "xProcAdm": ""
      },
      "e305102": {
        "eventDescription": "",
        "federalTaxIdAgent": "",
        "reasonDescription": "",
        "eventCode": ""
      },
      "e305103": {
        "eventDescription": "",
        "federalTaxIdAgent": "",
        "idBloqOfic": ""
      }
    }
  }
}'
```