{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getmattered/json-schema/getmattered-apply-document-patch-response-schema.json",
  "title": "ApplyDocumentPatchResponse",
  "description": "Successful API response",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getmattered-applications-api-openapi.yml#/components/schemas/ApplyDocumentPatchResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "documentType": {
          "type": "string",
          "enum": [
            "resume",
            "cover-letter"
          ],
          "description": "Type of PDF document to download"
        },
        "content": {
          "type": "string",
          "description": "The normalized final content that was persisted and used to regenerate the PDF"
        },
        "structuredResume": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "certifications": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "education": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/EducationEntry"
              }
            },
            "experience": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ExperienceEntry"
              }
            },
            "personalInfo": {
              "$ref": "#/$defs/PersonalInfo"
            },
            "skills": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "summary": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "additionalProperties": false,
          "description": "The stored structured tailored-resume snapshot after canonical relay-email enforcement."
        }
      },
      "required": [
        "id",
        "documentType",
        "content"
      ],
      "additionalProperties": false
    },
    "meta": {
      "$ref": "#/$defs/ResponseMetadata"
    },
    "success": {
      "type": "boolean",
      "enum": [
        true
      ]
    }
  },
  "required": [
    "data",
    "success"
  ],
  "additionalProperties": false,
  "$defs": {
    "EducationEntry": {
      "type": "object",
      "properties": {
        "degree": {
          "type": "string"
        },
        "endDate": {
          "type": [
            "string",
            "null"
          ]
        },
        "gpa": {
          "type": [
            "string",
            "null"
          ]
        },
        "highlights": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "institution": {
          "type": "string"
        },
        "location": {
          "type": [
            "string",
            "null"
          ]
        },
        "startDate": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "degree",
        "institution"
      ],
      "additionalProperties": false
    },
    "ExperienceEntry": {
      "type": "object",
      "properties": {
        "bullets": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "company": {
          "type": "string"
        },
        "current": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "endDate": {
          "type": [
            "string",
            "null"
          ]
        },
        "location": {
          "type": [
            "string",
            "null"
          ]
        },
        "startDate": {
          "type": "string"
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "bullets",
        "company",
        "startDate",
        "title"
      ],
      "additionalProperties": false
    },
    "PersonalInfo": {
      "type": "object",
      "properties": {
        "email": {
          "anyOf": [
            {
              "type": "string",
              "format": "email"
            },
            {
              "type": "string",
              "enum": [
                ""
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "fullName": {
          "type": [
            "string",
            "null"
          ]
        },
        "linkedin": {
          "type": [
            "string",
            "null"
          ]
        },
        "location": {
          "type": [
            "string",
            "null"
          ]
        },
        "phone": {
          "type": [
            "string",
            "null"
          ]
        },
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "website": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "ResponseMetadata": {
      "type": "object",
      "properties": {
        "duration": {
          "type": "number",
          "minimum": 0,
          "description": "Request duration in milliseconds"
        },
        "performance": {
          "type": "object",
          "properties": {
            "dbQueries": {
              "type": "integer",
              "minimum": 0
            },
            "totalDbTime": {
              "type": "number",
              "minimum": 0
            }
          },
          "description": "Performance metrics (preview/local only)"
        },
        "requestId": {
          "type": "string",
          "description": "Unique request identifier"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp"
        },
        "version": {
          "type": "string",
          "description": "API version"
        }
      }
    }
  }
}