Skip to main content
POST
/
v1
/
management
/
connections
/
validate-schema
Validate schema
curl --request POST \
  --url https://reporter.sandbox.lerian.net/v1/management/connections/validate-schema \
  --header 'Content-Type: application/json' \
  --data '
{
  "mappedFields": {
    "midaz_onboarding": {
      "organization": [
        "id",
        "legal_name",
        "status",
        "created_at"
      ],
      "ledger": [
        "id",
        "organization_id",
        "name"
      ]
    },
    "midaz_transaction": {
      "transaction": [
        "id",
        "ledger_id",
        "amount",
        "status"
      ],
      "account": [
        "id",
        "name",
        "balance"
      ]
    }
  }
}
'
{
  "status": "success",
  "message": "All fields validated successfully",
  "errors": []
}

Headers

Authorization
string

The authorization token in the Bearer <token> format.

Important: This header is required if your environment has Access Manager enabled. For more information, refer to the Access Manager documentation.

Example:

"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Body

application/json

Request body for validating schema mappings against configured data sources. Use configName (not the connection UUID) as the key in mappedFields.

mappedFields
object
required

Object containing the field mapping configuration. The structure is: { configName: { tableName: [field1, field2, ...] } }. Use the connection's configName as the top-level key.

Example:
{
"midaz_onboarding": {
"organization": ["id", "legal_name", "status"],
"ledger": ["id", "organization_id", "name"]
}
}

Response

The result of the schema validation.

Response object containing the result of schema validation.

status
enum<string>
required

The validation result status. Returns success when all fields are valid, or failure when validation errors are found.

Available options:
success,
failure
Example:

"success"

message
string
required

A human-readable summary of the validation result.

Example:

"All fields validated successfully"

errors
object[]
required

A list of validation errors found during schema validation. Empty when status is success.