{
  "openapi": "3.1.0",
  "info": {
    "title": "Smart Auto Move car shipping quotes",
    "version": "1.0.0",
    "description": "Estimated price ranges for shipping a vehicle within the US. To give the customer an exact price, create a confirm link and share it with them. They open it on smartautomove.com, see their exact price and can book."
  },
  "servers": [
    {
      "url": "https://quote-api.smartautomove.com"
    }
  ],
  "paths": {
    "/v1/estimate": {
      "post": {
        "operationId": "getEstimate",
        "summary": "Get an estimated price range for a trip",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "pickup_zip",
                  "delivery_zip",
                  "vehicle_type"
                ],
                "properties": {
                  "pickup_zip": {
                    "type": "string",
                    "description": "5-digit US ZIP code where the vehicle is picked up.",
                    "example": "27601"
                  },
                  "delivery_zip": {
                    "type": "string",
                    "description": "5-digit US ZIP code where the vehicle is delivered.",
                    "example": "33101"
                  },
                  "vehicle_type": {
                    "type": "string",
                    "enum": [
                      "Car, Small",
                      "Car, Medium",
                      "Car, Large",
                      "SUV, Small",
                      "SUV, Medium",
                      "SUV, Large",
                      "Truck, Small",
                      "Truck, Medium",
                      "Truck, Large",
                      "Van, Small",
                      "Van, Medium",
                      "Van, Large",
                      "Classic Car, Small",
                      "Classic Car, Medium",
                      "Classic Car, Large",
                      "Exotic",
                      "Motorcycle"
                    ],
                    "description": "Closest body type and size. A Toyota Camry is \"Car, Medium\"; a Ford F-150 is \"Truck, Medium\"."
                  },
                  "running": {
                    "type": "boolean",
                    "default": true,
                    "description": "Does the vehicle run and drive?"
                  },
                  "service": {
                    "type": "string",
                    "enum": [
                      "Standard",
                      "Expedited",
                      "Enclosed"
                    ],
                    "default": "Standard",
                    "description": "Standard (open trailer), Expedited (faster pickup) or Enclosed (covered trailer)."
                  },
                  "pickup_date": {
                    "type": "string",
                    "format": "date",
                    "description": "First available pickup date, YYYY-MM-DD."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Price ranges for every service level"
          },
          "422": {
            "description": "Something in the trip needs fixing; the message says what"
          },
          "429": {
            "description": "Too many requests"
          }
        }
      }
    },
    "/v1/confirm-link": {
      "post": {
        "operationId": "createConfirmLink",
        "summary": "Make a one-time link where the customer sees the exact price",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": [
                      "pickup_zip",
                      "delivery_zip",
                      "vehicle_type"
                    ],
                    "properties": {
                      "pickup_zip": {
                        "type": "string",
                        "description": "5-digit US ZIP code where the vehicle is picked up.",
                        "example": "27601"
                      },
                      "delivery_zip": {
                        "type": "string",
                        "description": "5-digit US ZIP code where the vehicle is delivered.",
                        "example": "33101"
                      },
                      "vehicle_type": {
                        "type": "string",
                        "enum": [
                          "Car, Small",
                          "Car, Medium",
                          "Car, Large",
                          "SUV, Small",
                          "SUV, Medium",
                          "SUV, Large",
                          "Truck, Small",
                          "Truck, Medium",
                          "Truck, Large",
                          "Van, Small",
                          "Van, Medium",
                          "Van, Large",
                          "Classic Car, Small",
                          "Classic Car, Medium",
                          "Classic Car, Large",
                          "Exotic",
                          "Motorcycle"
                        ],
                        "description": "Closest body type and size. A Toyota Camry is \"Car, Medium\"; a Ford F-150 is \"Truck, Medium\"."
                      },
                      "running": {
                        "type": "boolean",
                        "default": true,
                        "description": "Does the vehicle run and drive?"
                      },
                      "service": {
                        "type": "string",
                        "enum": [
                          "Standard",
                          "Expedited",
                          "Enclosed"
                        ],
                        "default": "Standard",
                        "description": "Standard (open trailer), Expedited (faster pickup) or Enclosed (covered trailer)."
                      },
                      "pickup_date": {
                        "type": "string",
                        "format": "date",
                        "description": "First available pickup date, YYYY-MM-DD."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "year",
                      "make",
                      "model",
                      "pickup_date"
                    ],
                    "properties": {
                      "year": {
                        "type": "string",
                        "example": "2021"
                      },
                      "make": {
                        "type": "string",
                        "example": "Toyota"
                      },
                      "model": {
                        "type": "string",
                        "example": "Camry"
                      },
                      "assistant_name": {
                        "type": "string",
                        "description": "Optional: the name of your AI assistant."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The link to give the customer"
          },
          "422": {
            "description": "Something in the trip needs fixing"
          },
          "429": {
            "description": "Too many requests"
          }
        }
      }
    },
    "/v1/status/{ref}": {
      "get": {
        "operationId": "getLinkStatus",
        "summary": "Check whether the customer confirmed",
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "waiting, opened or confirmed"
          },
          "404": {
            "description": "Expired or unknown link"
          }
        }
      }
    }
  }
}