{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/autodesk/json-schema/autodesk-download-payload-schema.json",
  "title": "DownloadPayload",
  "description": "The payload for creating a download of a specified format.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/autodesk-aps-data-management-openapi.yml#/components/schemas/DownloadPayload",
  "type": "object",
  "properties": {
    "jsonapi": {
      "$ref": "#/$defs/JsonApiVersion"
    },
    "data": {
      "type": "object",
      "description": "Contains information about the desired download format and the version of the item to convert to this format.",
      "required": [
        "type",
        "attributes",
        "relationships"
      ],
      "properties": {
        "type": {
          "$ref": "#/$defs/TypeDownloads"
        },
        "attributes": {
          "type": "object",
          "description": "Contains information about the desired download format.",
          "required": [
            "format"
          ],
          "properties": {
            "format": {
              "type": "object",
              "description": "Specifies the desired download format.",
              "required": [
                "fileType"
              ],
              "properties": {
                "fileType": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The file name extension of the desired download format. Must be one of the supported file name extensions returned by the [List Supported Download Formats](/en/docs/data/v2/reference/http/projects-project_id-versions-version_id-downloadFormats-GET/) operation for the specified version."
                }
              }
            }
          }
        },
        "relationships": {
          "type": "object",
          "required": [
            "source"
          ],
          "description": "Contains information about the version the download format is being created for. ",
          "properties": {
            "source": {
              "type": "object",
              "required": [
                "data"
              ],
              "description": "Contains information about the version the download format is being created for.",
              "properties": {
                "data": {
                  "type": "object",
                  "required": [
                    "type",
                    "id"
                  ],
                  "description": "Contains information about the version the download format is being created for.",
                  "properties": {
                    "type": {
                      "$ref": "#/$defs/TypeVersion"
                    },
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The URN of the version the download is being created for. \n\n**Note**: Must be the raw string, not the URL encoded string."
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "required": [
    "jsonapi",
    "data"
  ],
  "$defs": {
    "JsonApiVersion": {
      "title": "json_api_version",
      "type": "object",
      "description": "The JSON API object.",
      "properties": {
        "version": {
          "$ref": "#/$defs/JsonApiVersionValue"
        }
      },
      "required": [
        "version"
      ]
    },
    "JsonApiVersionValue": {
      "description": "The version of JSON API. Will always be ``1.0``.",
      "type": "string",
      "enum": [
        "1.0"
      ]
    },
    "TypeDownloads": {
      "type": "string",
      "enum": [
        "downloads"
      ],
      "description": "The type of this resource. Possible values are ``downloads``."
    },
    "TypeVersion": {
      "type": "string",
      "enum": [
        "versions"
      ],
      "description": "The type of the resource. Possible values are ``versions``."
    }
  }
}