# Estorno Empenho | Schema V1 | 2025 - ∞

##### **Tipo Envio: Diário**

---

##### **Objeto Raiz**

<figure class="wp-block-table is-style-stripes" id="bkmrk-campo-informa%C3%A7%C3%B5es-ti"><table class="has-fixed-layout" style="width: 100%; height: 123.297px;"><thead><tr style="height: 29.7969px;"><td style="width: 26.3382%; height: 29.7969px;">**Campo**</td><td style="width: 73.6618%; height: 29.7969px;">**Informações**</td></tr></thead><tbody><tr style="height: 63.3906px;"><td style="width: 26.3382%; height: 63.3906px;">`timestamp`</td><td style="width: 73.6618%; height: 63.3906px;">Campo utilizado para **ordenar** a validação das informações enviadas. Caso sejam enviados **múltiplos payloads** do mesmo tipo, a ordenação ocorrerá da **<span style="color: rgb(186, 55, 42);">data mais antiga para a mais recente</span>**</td></tr><tr style="height: 30.1094px;"><td style="width: 26.3382%; height: 30.1094px;">`elementos`</td><td style="width: 73.6618%; height: 30.1094px;">–</td></tr></tbody></table>

</figure>---

##### **Item**

<div class="overflow-x-auto w-full px-2 mb-6" id="bkmrk-campo-chave-informa%C3%A7"><table class="min-w-full border-collapse text-sm leading-[1.7] whitespace-normal" style="width: 100%; height: 351.875px;"><thead><tr style="height: 29.7969px;"><td class="text-text-100 border-b-0.5 border-border-300/60 py-2 pr-4 align-top font-bold" style="width: 24.7914%; height: 29.7969px;">**Campo**</td><td class="text-text-100 border-b-0.5 border-border-300/60 py-2 pr-4 align-top font-bold" style="width: 6.91242%; height: 29.7969px;">**Chave**</td><td class="text-text-100 border-b-0.5 border-border-300/60 py-2 pr-4 align-top font-bold" style="width: 68.2962%; height: 29.7969px;">**Informações**</td></tr></thead><tbody><tr style="height: 30.6094px;"><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top" style="width: 24.7914%; height: 30.6094px;">`codigoUnidadeOrcamentaria`</td><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top align-center" style="width: 6.91242%; height: 30.6094px;">✅</td><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top" style="width: 68.2962%; height: 30.6094px;">Código da **unidade orçamentária** cadastrada pela Unidade Gestora para o exercício</td></tr><tr style="height: 30.6094px;"><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top" style="width: 24.7914%; height: 30.6094px;">`numeroEmpenho`</td><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top align-center" style="width: 6.91242%; height: 30.6094px;">✅</td><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top" style="width: 68.2962%; height: 30.6094px;">–</td></tr><tr style="height: 30.6094px;"><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top" style="width: 24.7914%; height: 30.6094px;">`numeroEstornoEmpenho`</td><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top align-center" style="width: 6.91242%; height: 30.6094px;">✅</td><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top" style="width: 68.2962%; height: 30.6094px;">–</td></tr><tr style="height: 30.6094px;"><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top" style="width: 24.7914%; height: 30.6094px;">`dataEstornoEmpenho`</td><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top align-center" style="width: 6.91242%; height: 30.6094px;">–</td><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top" style="width: 68.2962%; height: 30.6094px;">–</td></tr><tr style="height: 30.6094px;"><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top" style="width: 24.7914%; height: 30.6094px;">`valorEstornoEmpenho`</td><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top align-center" style="width: 6.91242%; height: 30.6094px;">–</td><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top" style="width: 68.2962%; height: 30.6094px;">–</td></tr><tr style="height: 30.6094px;"><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top" style="width: 24.7914%; height: 30.6094px;">`motivo`</td><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top align-center" style="width: 6.91242%; height: 30.6094px;">–</td><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top" style="width: 68.2962%; height: 30.6094px;">–</td></tr><tr style="height: 46.5938px;"><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top" style="width: 24.7914%; height: 46.5938px;">`action`</td><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top align-center" style="width: 6.91242%; height: 46.5938px;">–</td><td class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top" style="width: 68.2962%; height: 46.5938px;">Define a operação a ser realizada com a informação, seja ela **criação, atualização ou exclusão**</td></tr></tbody></table>

</div>##### **Schema**

```
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Estornos de Empenho",
  "description": "Schema para envio de estornos de empenho por unidade gestora",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):([0-5]\\d):([0-5]\\d)\\.\\d{3,6}$",
      "examples": ["2025-09-11T15:30:00.123456"]
    },
    "elementos": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "object",
        "properties": {
          "codigoUnidadeOrcamentaria": {
            "type": "string",
            "minLength": 5,
            "maxLength": 5,
            "pattern": "^[0-9]+$"
          },
          "numeroEmpenho": {
            "type": "string",
            "minLength": 7,
            "maxLength": 7,
            "pattern": "^[0-9]+$"
          },
          "numeroEstornoEmpenho": {
            "type": "string",
            "minLength": 7,
            "maxLength": 7,
            "pattern": "^[0-9]+$"
          },
          "dataEstornoEmpenho": {
            "type": "string",
            "format": "date"
          },
          "valorEstornoEmpenho": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "motivo": {
            "type": "string",
            "maxLength": 500
          },
          "action": {
            "type": "string",
            "enum": ["CREATE", "UPDATE", "DELETE"]
          }
        },
        "required": [
          "codigoUnidadeOrcamentaria",
          "numeroEmpenho",
          "numeroEstornoEmpenho",
          "dataEstornoEmpenho",
          "valorEstornoEmpenho",
          "motivo",
          "action"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": ["timestamp", "elementos"],
  "additionalProperties": false
}
```

---

##### **Exemplo de Payload**

```
{
  "timestamp": "2026-03-02T11:32:45.123456",
  "elementos": [
    {
      "codigoUnidadeOrcamentaria": "54321",
      "numeroEmpenho": "0000001",
      "numeroEstornoEmpenho": "0000001",
      "dataEstornoEmpenho": "2026-03-01",
      "valorEstornoEmpenho": 150000.50,
      "motivo": "Estorno referente a empenho emitido com valor incorreto",
      "action": "CREATE"
    },
    {
      "codigoUnidadeOrcamentaria": "12345",
      "numeroEmpenho": "0000002",
      "numeroEstornoEmpenho": "0000002",
      "dataEstornoEmpenho": "2026-03-02",
      "valorEstornoEmpenho": 82500.00,
      "motivo": "Estorno de empenho com despesa previamente liquidada",
      "action": "UPDATE"
    }
  ]
}
```