{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/resollo-com/json-schema/resollo-com-photo-upload-session-schema.json",
  "title": "PhotoUploadSession",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/resollo-com-openapi.yml#/components/schemas/PhotoUploadSession",
  "type": "object",
  "required": [
    "status",
    "upload_url",
    "max_images",
    "upload_id",
    "direct_upload"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "awaiting_photos"
      ]
    },
    "upload_url": {
      "type": "string",
      "format": "uri",
      "description": "Resollo page where the seller (signed in) picks the photos. The photos are normalized in the seller's browser (resized to 1024 px WebP, metadata such as GPS location stripped) exactly as in the web listing form. Not tied to this call: an upload there creates its own inactive draft on the seller's account."
    },
    "max_images": {
      "type": "integer",
      "description": "How many photos the seller's plan allows per listing."
    },
    "upload_id": {
      "type": "string",
      "format": "uuid",
      "description": "Pass to `POST /products/from-upload` after a direct upload."
    },
    "direct_upload": {
      "type": "object",
      "required": [
        "put_urls",
        "headers",
        "requirements",
        "expires_in_seconds"
      ],
      "description": "For agents that have a tool to create the WebP files (e.g. the free photo MCP servers at github.com/resollo/mcp-servers, ImageMagick, cwebp) and can send an HTTP PUT: create each photo as WebP within `requirements` (Resollo never converts photos), PUT the raw bytes to `put_urls[i]` with `headers` (index 0 is the cover), then call `POST /products/from-upload`. Agents that can't convert use `upload_url` instead.",
      "properties": {
        "put_urls": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          }
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "requirements": {
          "type": "object",
          "required": [
            "format",
            "max_dimension_px",
            "max_bytes"
          ],
          "properties": {
            "format": {
              "type": "string",
              "enum": [
                "image/webp"
              ]
            },
            "max_dimension_px": {
              "type": "integer"
            },
            "max_bytes": {
              "type": "integer"
            }
          }
        },
        "expires_in_seconds": {
          "type": "integer"
        }
      }
    }
  }
}