# Programa | Schema V1 | 2025 - ∞

##### **Tipo Envio: Orçamento/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 style="width: 12.1549%;">`timestamp`</td><td style="width: 87.8451%;">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 style="width: 12.1549%;">`elementos`</td><td style="width: 87.8451%;">–</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: 98.3333%; height: 227.735px;"><thead><tr style="height: 30.5938px;"><td style="width: 25.9399%; height: 30.5938px;">**Campo**</td><td class="has-text-align-left" data-align="left" style="width: 7.03178%; height: 30.5938px;">**Chave**</td><td style="width: 67.0302%; height: 30.5938px;">**Informações**</td></tr></thead><tbody><tr style="height: 30.1094px;"><td style="width: 25.9399%; height: 30.1094px;">`codigoUnidadeGestora`  
</td><td class="has-text-align-left align-center" data-align="left" style="width: 7.03178%; height: 30.1094px;">✅</td><td style="width: 67.0302%; height: 30.1094px;">–</td></tr><tr style="height: 30.1094px;"><td style="width: 25.9399%; height: 30.1094px;">`codigoPrograma`</td><td class="has-text-align-left align-center" data-align="left" style="width: 7.03178%; height: 30.1094px;">✅</td><td style="width: 67.0302%; height: 30.1094px;">–</td></tr><tr style="height: 30.1094px;"><td style="width: 25.9399%; height: 30.1094px;">`descricaoPrograma`</td><td class="has-text-align-left align-center" data-align="left" style="width: 7.03178%; height: 30.1094px;">–</td><td style="width: 67.0302%; height: 30.1094px;">–</td></tr><tr style="height: 30.1094px;"><td style="width: 25.9399%; height: 30.1094px;">`descricaoObjetivoMilenio`</td><td class="has-text-align-left align-center" data-align="left" style="width: 7.03178%; height: 30.1094px;">–</td><td style="width: 67.0302%; height: 30.1094px;">–</td></tr><tr style="height: 30.1094px;"><td style="width: 25.9399%; height: 30.1094px;">`tipoObjetivoMilenio`</td><td class="has-text-align-left align-center" data-align="left" style="width: 7.03178%; height: 30.1094px;">–</td><td style="width: 67.0302%; height: 30.1094px;">**[Tabela Tipo Objetivo Milênio](https://docs.tcepb.tc.br/books/tabelas-de-dominio/page/tipo-objeto-milenio)** </td></tr><tr style="height: 46.5938px;"><td style="width: 25.9399%; height: 46.5938px;">`action`</td><td class="has-text-align-left align-center" data-align="left" style="width: 7.03178%; height: 46.5938px;">–</td><td style="width: 67.0302%; 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 Programas",
  "description": "Lista de objetos representando a entidade Programa",
  "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": "Programa",
        "description": "Representação do schema para envio da entidade Programa",
        "type": "object",
        "properties": {
          "codigoUnidadeGestora": {
            "type": "string",
            "minLength": 6,
            "maxLength": 6,
            "pattern": "^[0-9]+$"
          },
          "codigoPrograma": {
            "type": "string",
            "minLength": 4,
            "maxLength": 4,
            "pattern": "^[0-9]+$"
          },
          "descricaoPrograma": {
            "type": "string",
            "minLength": 10,
            "maxLength": 70
          },
          "descricaoObjetivoMilenio": {
            "type": "string",
            "minLength": 10,
            "maxLength": 150
          },
          "tipoObjetivoMilenio": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "pattern": "^[0-9]+$"
          },
          "action": {
            "type": "string",
            "enum": [
              "CREATE",
              "UPDATE",
              "DELETE"
            ]
          }
        },
        "required": [
          "codigoUnidadeGestora",
          "codigoPrograma",
          "descricaoPrograma",
          "descricaoObjetivoMilenio",
          "tipoObjetivoMilenio",
          "action"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "timestamp",
    "elementos"
  ],
  "additionalProperties": false
}

```

---

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

```
{
  "timestamp": "2025-09-11T15:30:00.123456",
  "programas": [
    {
      "codigoUnidadeGestora": "123456",
      "codigoPrograma": "0001",
      "descricaoPrograma": "Programa de Desenvolvimento Urbano Sustentável",
      "descricaoObjetivoMilenio": "Promover melhorias na infraestrutura e na qualidade de vida urbana.",
      "tipoObjetivoMilenio": "01",
      "action": "CREATE"
    },
    {
      "codigoUnidadeGestora": "654321",
      "codigoPrograma": "0002",
      "descricaoPrograma": "Programa de Educação Inclusiva e Inovadora",
      "descricaoObjetivoMilenio": "Garantir acesso à educação de qualidade e promover a inclusão social.",
      "tipoObjetivoMilenio": "02",
      "action": "UPDATE"
    }
  ]
}

```