{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/marketsdk/json-schema/marketsdk-media-list-schema.json",
  "title": "MediaList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/marketsdk-listings-api-openapi.yml#/components/schemas/MediaList",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "list"
      ]
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MediaObject"
      }
    },
    "has_more": {
      "type": "boolean",
      "description": "Whether another page follows."
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ],
      "description": "Pass as `starting_after` (or `cursor` for search) to get the next page."
    }
  },
  "required": [
    "object",
    "data",
    "has_more",
    "next_cursor"
  ],
  "$defs": {
    "MediaObject": {
      "type": "object",
      "properties": {
        "object": {
          "type": "string",
          "enum": [
            "media"
          ]
        },
        "id": {
          "type": "string"
        },
        "listing": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "ready"
          ]
        },
        "content_type": {
          "type": "string"
        },
        "size_bytes": {
          "type": "number"
        },
        "position": {
          "type": "number"
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "description": "A signed link to the file, valid for an hour. Null until the upload completes."
        },
        "url_expires_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "object",
        "id",
        "listing",
        "status",
        "content_type",
        "size_bytes",
        "position",
        "url",
        "url_expires_at",
        "created_at"
      ]
    }
  }
}