# Liquidação Resto | 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%;"><thead><tr><td style="width: 12.1549%;">**Campo**</td><td style="width: 87.8451%;">**Informações**</td></tr></thead><tbody><tr><td>`timestamp`</td><td>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><td>`elementos`</td><td>–</td></tr></tbody></table>

</figure>---

##### **Item**

<figure class="wp-block-table is-style-stripes" id="bkmrk-campo-chave-informa%C3%A7"><table class="has-fixed-layout" style="width: 100%; height: 469.094px;"><thead><tr style="height: 29.7969px;"><td style="width: 30.9893%; height: 29.7969px;">**Campo**</td><td style="width: 6.91299%; height: 29.7969px;">**Chave**</td><td style="width: 62.0977%; height: 29.7969px;">**Informações**</td></tr></thead><tbody><tr style="height: 30.1094px;"><td style="height: 30.1094px;">`anoEmissaoEmpenho`</td><td class="align-center" style="height: 30.1094px;">✅</td><td style="height: 30.1094px;">–</td></tr><tr style="height: 30.1094px;"><td style="height: 30.1094px;">`codigoUnidadeOrcamentaria`</td><td class="align-center" style="height: 30.1094px;">✅</td><td style="height: 30.1094px;">–</td></tr><tr style="height: 30.1094px;"><td style="height: 30.1094px;">`numeroEmpenho`</td><td class="align-center" style="height: 30.1094px;">✅</td><td style="height: 30.1094px;">–</td></tr><tr style="height: 30.1094px;"><td style="height: 30.1094px;">`numeroLiquidacaoResto`</td><td class="align-center" style="height: 30.1094px;">✅</td><td style="height: 30.1094px;">–</td></tr><tr style="height: 30.1094px;"><td style="height: 30.1094px;">`dataLiquidacaoResto`</td><td class="align-center" style="height: 30.1094px;">–</td><td style="height: 30.1094px;">–</td></tr><tr style="height: 31.3906px;"><td style="height: 31.3906px;">`tipoNotaFiscal`</td><td class="align-center" style="height: 31.3906px;">–</td><td style="height: 31.3906px;">**[Tabela Tipo Nota Fiscal](https://docs.tcepb.tc.br/books/tabelas-de-dominio/page/tipo-nota-fiscal)**</td></tr><tr style="height: 30.1094px;"><td style="height: 30.1094px;">`numeroChaveNotaFiscal`</td><td class="align-center" style="height: 30.1094px;">–</td><td style="height: 30.1094px;">–</td></tr><tr style="height: 30.1094px;"><td style="height: 30.1094px;">`numeroNotaFiscal`</td><td class="align-center" style="height: 30.1094px;">–</td><td style="height: 30.1094px;">–</td></tr><tr style="height: 30.1094px;"><td style="height: 30.1094px;">`serieNotaFiscal`</td><td class="align-center" style="height: 30.1094px;">–</td><td style="height: 30.1094px;">–</td></tr><tr style="height: 30.1094px;"><td style="height: 30.1094px;">`dataNotaFiscal`</td><td class="align-center" style="height: 30.1094px;">–</td><td style="height: 30.1094px;">–</td></tr><tr style="height: 30.1094px;"><td style="height: 30.1094px;">`valorNotaFiscal`</td><td class="align-center" style="height: 30.1094px;">–</td><td style="height: 30.1094px;">–</td></tr><tr style="height: 30.1094px;"><td style="height: 30.1094px;">`valorLiquidacaoResto`</td><td class="align-center" style="height: 30.1094px;">–</td><td style="height: 30.1094px;">–</td></tr><tr style="height: 30.1094px;"><td style="height: 30.1094px;">`codigoUnidadeGestoraOrigem`</td><td class="align-center" style="height: 30.1094px;">–</td><td style="height: 30.1094px;">–</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`action`</td><td class="align-center" style="height: 46.5938px;">–</td><td style="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>

</figure>---

##### **Schema**

```
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Lista de Liquidações de Restos a Pagar",
  "description": "Lista de objetos representando a entidade Liquidação Resto",
  "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": {
        "title": "Liquidação Resto",
        "description": "Representação do schema para envio da entidade Liquidação Resto",
        "type": "object",
        "properties": {
          "anoEmissaoEmpenho": {
            "type": "string",
            "minLength": 4,
            "maxLength": 4,
            "pattern": "^[0-9]+$"
          },
          "codigoUnidadeOrcamentaria": {
            "type": "string",
            "minLength": 5,
            "maxLength": 5,
            "pattern": "^[0-9]+$"
          },
          "numeroEmpenho": {
            "type": "string",
            "minLength": 7,
            "maxLength": 7,
            "pattern": "^[0-9]+$"
          },
          "numeroLiquidacaoResto": {
            "type": "string",
            "minLength": 7,
            "maxLength": 7,
            "pattern": "^[0-9]+$"
          },
          "dataLiquidacaoResto": {
            "type": "string",
            "format": "date"
          },
          "tipoNotaFiscal": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "pattern": "^[0-9]+$"
          },
          "numeroChaveNotaFiscal": {
            "type": "string",
            "minLength": 44,
            "maxLength": 44,
            "pattern": "^[0-9]+$"
          },
          "numeroNotaFiscal": {
            "type": "string",
            "minLength": 1,
            "maxLength": 15
          },
          "serieNotaFiscal": {
            "type": "string",
            "minLength": 1,
            "maxLength": 12
          },
          "dataNotaFiscal": {
            "type": "string",
            "format": "date"
          },
          "valorNotaFiscal": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "valorLiquidacaoResto": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "codigoUnidadeGestoraOrigem": {
            "type": "string",
            "minLength": 6,
            "maxLength": 6,
            "pattern": "^[0-9]+$"
          },
          "action": {
            "type": "string",
            "enum": ["CREATE", "UPDATE", "DELETE"]
          }
        },
        "required": [
          "anoEmissaoEmpenho",
          "codigoUnidadeOrcamentaria",
          "numeroEmpenho",
          "numeroLiquidacaoResto",
          "dataLiquidacaoResto",
          "tipoNotaFiscal",
          "numeroChaveNotaFiscal",
          "numeroNotaFiscal",
          "serieNotaFiscal",
          "dataNotaFiscal",
          "valorNotaFiscal",
          "valorLiquidacaoResto",
          "codigoUnidadeGestoraOrigem",
          "action"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": ["timestamp", "elementos"],
  "additionalProperties": false
}
```

---

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

```
{
  "timestamp": "2025-09-11T15:30:00.123456",
  "elementos": [
    {
      "anoEmissaoEmpenho": "2025",
      "codigoUnidadeOrcamentaria": "12345",
      "numeroEmpenho": "7654321",
      "numeroLiquidacaoResto": "1234567",
      "dataLiquidacaoResto": "2025-09-11",
      "tipoNotaFiscal": "01",
      "numeroChaveNotaFiscal": "12345678901234567890123456789012345678901234",
      "numeroNotaFiscal": "123456",
      "serieNotaFiscal": "001",
      "dataNotaFiscal": "2025-09-10",
      "valorNotaFiscal": 10000.00,
      "valorLiquidacaoResto": 10000.00,
      "codigoUnidadeGestoraOrigem": "654321",
      "action": "CREATE"
    }
  ]
}
```