← HomeFleetPay / Schema

Mdfe

Structure preserved from the versioned API contract.

Technical descriptions are translated from the versioned contract. Original identifiers and JSON are preserved; data examples are omitted.

idstring · uuidRequired

Public UUID used in all MDF-e paths.

driver_idinteger | nullRequired
cte_idsarrayRequired

Public UUIDs of authorized CT-e documents covered by the MDF-e.

numberinteger | nullRequired
seriesstring | nullRequired
access_keystring | nullRequired
pattern"^\\d{44}$"
protocolstring | nullRequired
sefaz_protocolstring | nullRequired
cstatstring | nullRequired
reasonstring | nullRequired
authorized_atstring | null · date-timeRequired
closed_atstring | null · dateRequired
closing_protocolstring | nullRequired
payloadobjectRequired
additionalPropertiestrue
created_atstring | null · date-timeRequired
updated_atstring | null · date-timeRequired
Original JSON Definition (Portuguese Descriptions)
{
  "type": "object",
  "required": [
    "id",
    "status",
    "vehicle",
    "driver_id",
    "trailers",
    "route",
    "cte_ids",
    "number",
    "series",
    "access_key",
    "protocol",
    "sefaz_protocol",
    "cstat",
    "reason",
    "authorized_at",
    "closed_at",
    "closing_protocol",
    "payload",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "UUID público usado em todos os caminhos do MDF-e."
    },
    "status": {
      "$ref": "#/components/schemas/MdfeStatus"
    },
    "vehicle": {
      "$ref": "#/components/schemas/Vehicle"
    },
    "driver_id": {
      "type": [
        "integer",
        "null"
      ]
    },
    "trailers": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Vehicle"
          },
          {
            "type": "object",
            "required": [
              "position"
            ],
            "properties": {
              "position": {
                "type": "integer",
                "minimum": 1,
                "maximum": 3
              }
            }
          }
        ]
      }
    },
    "route": {
      "allOf": [
        {
          "$ref": "#/components/schemas/FiscalRoute"
        },
        {
          "type": "object",
          "required": [
            "starts_at",
            "ends_at"
          ],
          "properties": {
            "starts_at": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "ends_at": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            }
          }
        }
      ]
    },
    "cte_ids": {
      "type": "array",
      "description": "UUIDs públicos dos CT-e autorizados cobertos pelo MDF-e.",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "number": {
      "type": [
        "integer",
        "null"
      ]
    },
    "series": {
      "type": [
        "string",
        "null"
      ]
    },
    "access_key": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^\\d{44}$"
    },
    "protocol": {
      "type": [
        "string",
        "null"
      ]
    },
    "sefaz_protocol": {
      "type": [
        "string",
        "null"
      ]
    },
    "cstat": {
      "type": [
        "string",
        "null"
      ]
    },
    "reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "authorized_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "closed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "closing_protocol": {
      "type": [
        "string",
        "null"
      ]
    },
    "payload": {
      "type": "object",
      "additionalProperties": true
    },
    "created_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "updated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}