{
  "openapi": "3.1.0",
  "info": {
    "title": "GTD Core Base — local qualification",
    "version": "0.1.0",
    "description": "Closed-by-default synthetic pilot extension. This contract does not assert public availability. See docs/integrations/api-status.md."
  },
  "servers": [
    {
      "url": "/api/v1/integrations/core"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/rat/observations": {
      "post": {
        "operationId": "observe_rat",
        "description": "Required scope: rat:events:write. Explicit module admission required. Repeated key/body returns current same receipt.",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{15,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ratObservation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                }
              }
            }
          },
          "400": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/rat/records": {
      "get": {
        "operationId": "read_rat",
        "description": "Required scope: rat:activities:read. Own mappings only. current uses native human-readable text for dataSubjectCategories and own source references for relations; unmappedRelationshipCount exposes count only.",
        "parameters": [
          {
            "in": "query",
            "name": "after",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "nextAfter"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "maxItems": 50,
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "sourceRef",
                          "observation",
                          "observedAt",
                          "current"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
                          },
                          "sourceRef": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
                          },
                          "observation": {
                            "oneOf": [
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "name"
                                ],
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "maxLength": 300,
                                    "minLength": 1
                                  },
                                  "purpose": {
                                    "type": "string",
                                    "maxLength": 2000
                                  },
                                  "dataCategories": {
                                    "type": "array",
                                    "maxItems": 50,
                                    "uniqueItems": true,
                                    "items": {
                                      "type": "string",
                                      "maxLength": 100
                                    }
                                  },
                                  "dataSubjectCategories": {
                                    "type": "array",
                                    "maxItems": 50,
                                    "uniqueItems": true,
                                    "items": {
                                      "type": "string",
                                      "maxLength": 100
                                    }
                                  },
                                  "providerRefs": {
                                    "type": "array",
                                    "maxItems": 50,
                                    "uniqueItems": true,
                                    "items": {
                                      "type": "string",
                                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
                                    }
                                  }
                                }
                              }
                            ]
                          },
                          "observedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "current": {
                            "oneOf": [
                              {
                                "type": "null"
                              },
                              {
                                "$ref": "#/components/schemas/ratCurrent"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "nextAfter": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/providers/observations": {
      "post": {
        "operationId": "observe_providers",
        "description": "Required scope: providers:events:write. Explicit module admission required. Repeated key/body returns current same receipt.",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{15,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/providersObservation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                }
              }
            }
          },
          "400": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/providers/records": {
      "get": {
        "operationId": "read_providers",
        "description": "Required scope: providers:read. Own mappings only. current uses native human-readable text for dataSubjectCategories and own source references for relations; unmappedRelationshipCount exposes count only.",
        "parameters": [
          {
            "in": "query",
            "name": "after",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "nextAfter"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "maxItems": 50,
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "sourceRef",
                          "observation",
                          "observedAt",
                          "current"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
                          },
                          "sourceRef": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
                          },
                          "observation": {
                            "oneOf": [
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "name"
                                ],
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "maxLength": 300,
                                    "minLength": 1
                                  },
                                  "service": {
                                    "type": "string",
                                    "maxLength": 300
                                  },
                                  "country": {
                                    "type": "string",
                                    "maxLength": 300
                                  }
                                }
                              }
                            ]
                          },
                          "observedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "current": {
                            "oneOf": [
                              {
                                "type": "null"
                              },
                              {
                                "$ref": "#/components/schemas/providersCurrent"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "nextAfter": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/assets/observations": {
      "post": {
        "operationId": "observe_assets",
        "description": "Required scope: integrations:events:write. Explicit module admission required. Repeated key/body returns current same receipt.",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{15,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/assetsObservation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                }
              }
            }
          },
          "400": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/assets/records": {
      "get": {
        "operationId": "read_assets",
        "description": "Required scope: integrations:capabilities:read. Own mappings only. current uses native human-readable text for dataSubjectCategories and own source references for relations; unmappedRelationshipCount exposes count only.",
        "parameters": [
          {
            "in": "query",
            "name": "after",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "nextAfter"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "maxItems": 50,
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "sourceRef",
                          "observation",
                          "observedAt",
                          "current"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
                          },
                          "sourceRef": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
                          },
                          "observation": {
                            "oneOf": [
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "name"
                                ],
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "maxLength": 300,
                                    "minLength": 1
                                  },
                                  "description": {
                                    "type": "string",
                                    "maxLength": 2000
                                  },
                                  "owner": {
                                    "type": "string",
                                    "maxLength": 300
                                  },
                                  "location": {
                                    "type": "string",
                                    "maxLength": 300
                                  },
                                  "treatmentRefs": {
                                    "type": "array",
                                    "maxItems": 50,
                                    "uniqueItems": true,
                                    "items": {
                                      "type": "string",
                                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
                                    }
                                  }
                                }
                              }
                            ]
                          },
                          "observedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "current": {
                            "oneOf": [
                              {
                                "type": "null"
                              },
                              {
                                "$ref": "#/components/schemas/assetsCurrent"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "nextAfter": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/submissions/{id}": {
      "get": {
        "operationId": "read_submission",
        "description": "Requires integrations:events:read and module read scope. Only this connection.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                }
              }
            }
          },
          "400": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/rights/requests": {
      "post": {
        "operationId": "receive_rights",
        "description": "rights:requests:write; published portal required. HOSTED_PORTAL storage, machine origin and immutable connection binding. Human fulfillment.",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{15,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RightsIntake"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "requestId",
                    "receivedAt",
                    "organizationName",
                    "receipt",
                    "message"
                  ],
                  "properties": {
                    "requestId": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
                    },
                    "receivedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "organizationName": {
                      "type": "string",
                      "maxLength": 300
                    },
                    "receipt": {
                      "const": "RECORDED"
                    },
                    "message": {
                      "type": "string",
                      "maxLength": 2000
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/rights/requests/{id}": {
      "get": {
        "operationId": "read_rights_status",
        "description": "rights:requests:read; own bound case only. No private file, message or human session token.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "requestId",
                    "receivedAt",
                    "status",
                    "identityState",
                    "representationState",
                    "version",
                    "fulfillment"
                  ],
                  "properties": {
                    "requestId": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
                    },
                    "receivedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 300
                    },
                    "identityState": {
                      "type": "string",
                      "maxLength": 300
                    },
                    "representationState": {
                      "type": "string",
                      "maxLength": 300
                    },
                    "version": {
                      "type": "integer"
                    },
                    "fulfillment": {
                      "const": "ASSISTED"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Resultado confirmado en transacción.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Permanent test pilot, SYNTHETIC_ONLY, approved per-connection core admission."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "maxLength": 300
              },
              "message": {
                "type": "string",
                "maxLength": 2000
              }
            }
          }
        }
      },
      "Receipt": {
        "type": "object",
        "required": [
          "id",
          "module",
          "sourceRef",
          "status",
          "reason",
          "version",
          "createdAt",
          "decidedAt",
          "replayed"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
          },
          "module": {
            "enum": [
              "rat",
              "providers",
              "assets"
            ]
          },
          "sourceRef": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
          },
          "status": {
            "enum": [
              "AWAITING_REVIEW",
              "APPLIED",
              "REJECTED"
            ]
          },
          "reason": {
            "type": "string",
            "maxLength": 300
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "decidedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "replayed": {
            "type": "boolean"
          }
        }
      },
      "ratObservation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "sourceRef",
          "observedAt",
          "data"
        ],
        "properties": {
          "sourceRef": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
          },
          "observedAt": {
            "type": "string",
            "format": "date-time",
            "description": "UTC ISO canonical including milliseconds; max five minutes ahead of server."
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 300,
                "minLength": 1
              },
              "purpose": {
                "type": "string",
                "maxLength": 2000
              },
              "dataCategories": {
                "type": "array",
                "maxItems": 50,
                "uniqueItems": true,
                "items": {
                  "type": "string",
                  "maxLength": 100
                }
              },
              "dataSubjectCategories": {
                "type": "array",
                "maxItems": 50,
                "uniqueItems": true,
                "items": {
                  "type": "string",
                  "maxLength": 100
                }
              },
              "providerRefs": {
                "type": "array",
                "maxItems": 50,
                "uniqueItems": true,
                "items": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
                }
              }
            }
          }
        }
      },
      "providersObservation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "sourceRef",
          "observedAt",
          "data"
        ],
        "properties": {
          "sourceRef": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
          },
          "observedAt": {
            "type": "string",
            "format": "date-time",
            "description": "UTC ISO canonical including milliseconds; max five minutes ahead of server."
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 300,
                "minLength": 1
              },
              "service": {
                "type": "string",
                "maxLength": 300
              },
              "country": {
                "type": "string",
                "maxLength": 300
              }
            }
          }
        }
      },
      "assetsObservation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "sourceRef",
          "observedAt",
          "data"
        ],
        "properties": {
          "sourceRef": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
          },
          "observedAt": {
            "type": "string",
            "format": "date-time",
            "description": "UTC ISO canonical including milliseconds; max five minutes ahead of server."
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 300,
                "minLength": 1
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              },
              "owner": {
                "type": "string",
                "maxLength": 300
              },
              "location": {
                "type": "string",
                "maxLength": 300
              },
              "treatmentRefs": {
                "type": "array",
                "maxItems": 50,
                "uniqueItems": true,
                "items": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"
                }
              }
            }
          }
        }
      },
      "RightsIntake": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "email",
          "actingAs",
          "rights"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 160,
            "minLength": 1
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "actingAs": {
            "enum": [
              "SELF",
              "REPRESENTATIVE_CLAIMED"
            ]
          },
          "subjectName": {
            "type": "string",
            "maxLength": 160
          },
          "rights": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "enum": [
                "ACCESS",
                "RECTIFICATION",
                "SUPPRESSION",
                "OPPOSITION",
                "PORTABILITY",
                "BLOCKING",
                "OTHER_REVIEW_REQUIRED"
              ]
            }
          },
          "description": {
            "type": "string",
            "maxLength": 5000
          },
          "website": {
            "type": "string",
            "const": ""
          }
        },
        "description": "Representative subjectName required; description required except ACCESS-only. All identity checks remain pending at intake."
      },
      "ratCurrent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "version",
          "archived",
          "unmappedRelationshipCount",
          "purpose",
          "dataSubjectCategories",
          "dataCategories",
          "providerRefs"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "archived": {
            "type": "boolean"
          },
          "unmappedRelationshipCount": {
            "type": "integer",
            "minimum": 0
          },
          "purpose": {
            "type": "string"
          },
          "dataSubjectCategories": {
            "type": "string"
          },
          "dataCategories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "providerRefs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "providersCurrent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "version",
          "archived",
          "unmappedRelationshipCount",
          "service",
          "country",
          "treatmentRefs"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "archived": {
            "type": "boolean"
          },
          "unmappedRelationshipCount": {
            "type": "integer",
            "minimum": 0
          },
          "service": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "treatmentRefs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "assetsCurrent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "version",
          "archived",
          "unmappedRelationshipCount",
          "description",
          "owner",
          "location",
          "treatmentRefs"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "archived": {
            "type": "boolean"
          },
          "unmappedRelationshipCount": {
            "type": "integer",
            "minimum": 0
          },
          "description": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "treatmentRefs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
