{
  "openapi": "3.1.0",
  "info": {
    "title": "iMoving Agent API",
    "version": "1.0.0",
    "summary": "Moving quotes from vetted US movers, for AI assistants and agents.",
    "description": "iMoving (https://www.imoving.com) is a US marketplace of licensed and insured moving companies with fixed, binding prices.\n\nTypical flow for an assistant helping someone move:\n1. `GET /move-sizes` once, to map what the person says (\"a 2 bedroom apartment\") to a `move_size_id`.\n2. `GET /quotes` with the two ZIP codes, the move size and the date. Show the person the offers.\n3. Optionally `GET /movers/{mover_id}` for a mover's track record and recent reviews.\n4. Give the person the offer's `booking_url`. They open it in a browser, confirm the inventory and addresses, and pay on imoving.com. The API never takes payment or personal data.\n\nPrices are calculated for the typical inventory of the chosen move size, from ZIP code centers. They become final once the person confirms the inventory and exact addresses on imoving.com, so present them as \"from\" prices, never as a guaranteed total.\n\nNo API key is needed. Requests are rate limited per client; on HTTP 429 wait for the `Retry-After` seconds.",
    "contact": {
      "name": "iMoving",
      "url": "https://www.imoving.com/contact-us/"
    },
    "termsOfService": "https://www.imoving.com/terms-and-conditions/"
  },
  "servers": [
    { "url": "https://www.imoving.com/api/agent/v1" }
  ],
  "paths": {
    "/move-sizes": {
      "get": {
        "operationId": "listMoveSizes",
        "summary": "List the move sizes a quote can be priced for",
        "description": "Apartment and house sizes with the volume iMoving prices them at. Rarely changes; safe to cache for a day.",
        "responses": {
          "200": {
            "description": "The move sizes.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/MoveSizeList" },
                "example": {
                  "move_sizes": [
                    { "id": 32970, "title": "Studio (15 ft. truck)", "volume_cuft": 500 },
                    { "id": 32972, "title": "2 Bedroom (20 ft. truck)", "volume_cuft": 900 },
                    { "id": 32973, "title": "3 Bedroom (26 ft. truck)", "volume_cuft": 1800 }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/quotes": {
      "get": {
        "operationId": "getMovingQuote",
        "summary": "Get prices from movers for a move",
        "description": "Prices the move with every mover that serves both locations and returns the best offers: the cheapest ones, plus the top-rated mover if it is not among them. Has no side effects - nothing is booked or stored.",
        "parameters": [
          { "$ref": "#/components/parameters/FromZip" },
          { "$ref": "#/components/parameters/ToZip" },
          {
            "name": "move_size_id",
            "in": "query",
            "required": true,
            "description": "A move size `id` from `GET /move-sizes`.",
            "schema": { "type": "integer" },
            "example": 32972
          },
          {
            "name": "move_date",
            "in": "query",
            "required": true,
            "description": "Moving day, `YYYY-MM-DD`. From tomorrow up to 18 months ahead.",
            "schema": { "type": "string", "format": "date" },
            "example": "2026-12-15"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many of the cheapest offers to return (1-10).",
            "schema": { "type": "integer", "minimum": 1, "maximum": 10, "default": 5 }
          }
        ],
        "responses": {
          "200": {
            "description": "The quote. `offers` is empty when no mover serves the route; `booking_url` still lets the person continue on the site.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Quote" }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" }
        }
      }
    },
    "/movers/{mover_id}": {
      "get": {
        "operationId": "getMover",
        "summary": "Get a mover's profile and recent reviews",
        "parameters": [
          {
            "name": "mover_id",
            "in": "path",
            "required": true,
            "description": "`mover_id` of an offer.",
            "schema": { "type": "integer" }
          }
        ],
        "responses": {
          "200": {
            "description": "The mover.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Mover" }
              }
            }
          },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/TooManyRequests" }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "FromZip": {
        "name": "from_zip",
        "in": "query",
        "required": true,
        "description": "5-digit US ZIP code of the place being moved out of.",
        "schema": { "type": "string", "pattern": "^\\d{5}$" },
        "example": "33101"
      },
      "ToZip": {
        "name": "to_zip",
        "in": "query",
        "required": true,
        "description": "5-digit US ZIP code of the destination.",
        "schema": { "type": "string", "pattern": "^\\d{5}$" },
        "example": "10001"
      }
    },
    "responses": {
      "BadRequest": {
        "description": "A parameter is missing or invalid. `error.field` names it; fix it and retry.",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/Error" },
            "example": { "error": { "code": "unknown_zip", "field": "to_zip", "message": "ZIP code 00000 is not a known US ZIP code." } }
          }
        }
      },
      "NotFound": {
        "description": "No mover that can be quoted has this id.",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/Error" },
            "example": { "error": { "code": "mover_not_found", "field": "mover_id", "message": "No mover has id 42." } }
          }
        }
      },
      "ServerError": {
        "description": "The quote could not be calculated (code `internal_error`). Retry later.",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/Error" }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate limit reached. Wait for `Retry-After` seconds.",
        "headers": {
          "Retry-After": { "schema": { "type": "integer" } }
        }
      }
    },
    "schemas": {
      "MoveSizeList": {
        "type": "object",
        "required": ["move_sizes"],
        "properties": {
          "move_sizes": { "type": "array", "items": { "$ref": "#/components/schemas/MoveSize" } }
        }
      },
      "MoveSize": {
        "type": "object",
        "required": ["id", "title", "volume_cuft"],
        "properties": {
          "id": { "type": "integer" },
          "title": { "type": "string", "description": "e.g. \"2 Bedroom (20 ft. truck)\" - the same for an apartment or a house." },
          "volume_cuft": { "type": "number", "description": "Typical volume of belongings, in cubic feet, that the price is calculated for." }
        }
      },
      "Quote": {
        "type": "object",
        "required": ["quote_id", "move", "currency", "offers_found", "offers", "booking_url", "price_note"],
        "properties": {
          "quote_id": { "type": "string", "description": "Identifies the move details of this quote. Opaque." },
          "move": { "$ref": "#/components/schemas/Move" },
          "currency": { "type": "string", "const": "USD" },
          "offers_found": { "type": "integer", "description": "How many movers can do this move. `offers` holds the best of them." },
          "price_range": {
            "type": ["object", "null"],
            "description": "Lowest and highest price across all `offers_found`; null when there are none.",
            "properties": {
              "min": { "type": "number" },
              "max": { "type": "number" }
            }
          },
          "offers": { "type": "array", "items": { "$ref": "#/components/schemas/Offer" } },
          "booking_url": { "type": "string", "format": "uri", "description": "Opens this move on imoving.com with every offer listed, for the person to choose and book." },
          "price_note": { "type": "string", "description": "What the prices include and assume. Pass it on to the person." }
        }
      },
      "Move": {
        "type": "object",
        "required": ["from", "to", "move_size", "move_date", "distance_miles", "long_distance"],
        "properties": {
          "from": { "$ref": "#/components/schemas/Place" },
          "to": { "$ref": "#/components/schemas/Place" },
          "move_size": { "$ref": "#/components/schemas/MoveSize" },
          "move_date": { "type": "string", "format": "date" },
          "distance_miles": { "type": "number", "description": "Driving distance." },
          "long_distance": { "type": "boolean", "description": "True for a move between two states." }
        }
      },
      "Place": {
        "type": "object",
        "required": ["zip", "city", "state"],
        "properties": {
          "zip": { "type": "string" },
          "city": { "type": "string" },
          "state": { "type": "string", "description": "Two-letter state code." }
        }
      },
      "Offer": {
        "type": "object",
        "required": ["mover_id", "mover_name", "price", "badges", "booking_url"],
        "properties": {
          "mover_id": { "type": "integer" },
          "mover_name": { "type": "string" },
          "mover_location": { "type": "string", "description": "Where the mover is based, \"City, ST\"." },
          "rating": { "type": ["number", "null"], "description": "iMoving rating on a 1-10 scale (10 best): customer reviews plus on-time pickup and delivery, response time, claims and declined jobs. Null without reviews." },
          "review_count": { "type": "integer" },
          "jobs_completed": { "type": "integer", "description": "Moves done through iMoving." },
          "years_in_business": { "type": ["integer", "null"] },
          "price": { "type": "number", "description": "Total price in USD, discounts applied, for the typical inventory of the move size." },
          "savings": { "type": "number", "description": "Discount already taken off `price`, in USD (0 when none)." },
          "badges": {
            "type": "array",
            "description": "`lowest_price` and/or `top_rated`; empty for other offers.",
            "items": { "type": "string" }
          },
          "profile_url": { "type": ["string", "null"], "format": "uri", "description": "The mover's page on imoving.com, with all reviews. Null for movers without a public page; GET /movers/{mover_id} still works for them." },
          "booking_url": { "type": "string", "format": "uri", "description": "Opens this move on imoving.com to book. The person reviews the details and pays there." }
        }
      },
      "Mover": {
        "type": "object",
        "required": ["mover_id", "mover_name", "recent_reviews"],
        "properties": {
          "mover_id": { "type": "integer" },
          "mover_name": { "type": "string" },
          "mover_location": { "type": "string" },
          "description": { "type": ["string", "null"] },
          "rating": { "type": ["number", "null"], "description": "1-10 scale, as in Offer." },
          "review_count": { "type": "integer" },
          "jobs_completed": { "type": "integer" },
          "years_in_business": { "type": ["integer", "null"] },
          "profile_url": { "type": ["string", "null"], "format": "uri" },
          "recent_reviews": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["rating", "date"],
              "properties": {
                "rating": { "type": "number", "description": "This customer's stars, 1-5 (unlike the mover's 1-10 rating)." },
                "date": { "type": "string", "format": "date" },
                "text": { "type": ["string", "null"], "description": "Null when the review has no approved text." },
                "author": { "type": ["string", "null"], "description": "First name and last initial." },
                "move_size": { "type": ["string", "null"] }
              }
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "required": ["code", "message"],
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable machine-readable code: `missing_parameter`, `invalid_zip`, `unknown_zip`, `invalid_move_size`, `invalid_move_date`, `invalid_limit`, `mover_not_found`, `internal_error`."
              },
              "field": { "type": ["string", "null"], "description": "The parameter at fault." },
              "message": { "type": "string", "description": "Human-readable explanation." }
            }
          }
        }
      }
    }
  }
}
