{
  "openapi": "3.1.0",
  "info": {
    "title": "Skipmatch API",
    "version": "1.0.0",
    "summary": "Prepaid skip tracing for property-owner lists.",
    "description": "Upload a CSV, get a price, place an order and download the result, all paid from prepaid credit. Every call is HTTPS with a bearer key. Amounts are integer US cents, timestamps are UTC (ISO 8601), and every response carries Cache-Control: no-store and an X-Request-Id. Requests are limited per IP address, per key and per account; a limited request returns 429 with Retry-After.",
    "contact": {
      "email": "support@skipmatch.com"
    }
  },
  "servers": [
    {
      "url": "https://skipmatch.com/api/v1"
    }
  ],
  "tags": [
    {
      "name": "Uploads"
    },
    {
      "name": "Quotes"
    },
    {
      "name": "Orders"
    },
    {
      "name": "Searches"
    },
    {
      "name": "Credit"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/uploads": {
      "post": {
        "operationId": "createUpload",
        "tags": [
          "Uploads"
        ],
        "summary": "Start a CSV upload",
        "description": "Reserves an upload and returns a one-time signed address to send the CSV bytes to. Files are limited to 52428800 bytes (50 MiB). An account may have at most 50 uploads waiting or validating at once; beyond that the call returns 429 rate_limited. Requires Idempotency-Key.",
        "security": [
          {
            "bearerAuth": [
              "uploads:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadCreateRequest"
              },
              "example": {
                "filename": "owners.csv",
                "bytes": 183422
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Upload created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadCreated"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/uploads/{upload_id}/complete": {
      "post": {
        "operationId": "completeUpload",
        "tags": [
          "Uploads"
        ],
        "summary": "Finish an upload and set its column mapping",
        "description": "Call after the CSV bytes have been sent. Returns 202 with status validating (repeating the call with the same mapping while validating is accepted). Validation runs in the background; poll the upload until its status is ready or rejected. A validated upload holds exactly 1 record, or between 50 and 100000 records. Requires Idempotency-Key.",
        "security": [
          {
            "bearerAuth": [
              "uploads:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "upload_id",
            "in": "path",
            "required": true,
            "description": "The upload to complete.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadCompleteRequest"
              },
              "example": {
                "mapping": {
                  "FirstName": "First Name",
                  "LastName": "Last Name",
                  "MailingAddress": "Mail Addr",
                  "MailingCity": "Mail City",
                  "MailingState": "Mail ST",
                  "MailingZip": "Mail Zip"
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted; validation has started.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadAccepted"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/uploads/{upload_id}": {
      "get": {
        "operationId": "getUpload",
        "tags": [
          "Uploads"
        ],
        "summary": "Get an upload",
        "description": "Reads the validation state of an upload. Uses the uploads:write scope; there is no separate read scope for uploads. error_code is invalid_csv when the upload was rejected and null otherwise.",
        "security": [
          {
            "bearerAuth": [
              "uploads:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "upload_id",
            "in": "path",
            "required": true,
            "description": "The upload to read.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The upload.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Upload"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/quotes": {
      "post": {
        "operationId": "createQuote",
        "tags": [
          "Quotes"
        ],
        "summary": "Price a validated upload",
        "description": "Freezes the price for a ready upload holding at least 50 records (a single-record upload is not quotable; use POST /searches). The quote is valid for at most thirty minutes. Requires Idempotency-Key.",
        "security": [
          {
            "bearerAuth": [
              "quotes:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteCreateRequest"
              },
              "example": {
                "upload_id": "4f0c1c58-5d4b-4a43-9d57-0c4a9c3b5f11"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Quote created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/orders": {
      "post": {
        "operationId": "createOrder",
        "tags": [
          "Orders"
        ],
        "summary": "Order a quoted list",
        "description": "Consumes the quote once and reserves the maximum charge from prepaid credit. The order starts as queued. Requires Idempotency-Key.",
        "security": [
          {
            "bearerAuth": [
              "orders:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderCreateRequest"
              },
              "example": {
                "quote_id": "8a2a7ab0-3f1e-4f5b-8d0e-2b9d6a1c7e22"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Order queued.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderPlaced"
                },
                "example": {
                  "order_id": "c1d6b6a2-0b3e-4c53-8f6e-9a7d1f2e3b44",
                  "status": "queued",
                  "reserved_cents": 1500,
                  "currency": "usd"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      },
      "get": {
        "operationId": "listOrders",
        "tags": [
          "Orders"
        ],
        "summary": "List orders",
        "description": "Newest first. Page with the cursor returned as next_cursor. An unknown cursor returns 404 not_found; limit and cursor are the only accepted query parameters, each at most once.",
        "security": [
          {
            "bearerAuth": [
              "orders:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Page size, 1 to 100. Defaults to 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The next_cursor from the previous page (an order id).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of orders.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/orders/{order_id}": {
      "get": {
        "operationId": "getOrder",
        "tags": [
          "Orders"
        ],
        "summary": "Get an order",
        "description": "Reads one order, including what was reserved, charged and released.",
        "security": [
          {
            "bearerAuth": [
              "orders:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "The order to read.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The order.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/orders/{order_id}/download": {
      "get": {
        "operationId": "downloadOrder",
        "tags": [
          "Orders"
        ],
        "summary": "Get a result download link",
        "description": "Returns a short-lived link to the delivered file (CSV, or ZIP for large results). The link lasts 300 seconds; request a new one when it lapses.",
        "security": [
          {
            "bearerAuth": [
              "results:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "The delivered order.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A signed download link.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Download"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/searches": {
      "post": {
        "operationId": "createSearch",
        "tags": [
          "Searches"
        ],
        "summary": "Search one owner",
        "description": "Runs a single-record search at the account's single-search price. Send either record (a single owner, normalised by the server) or upload_id (a ready upload holding exactly one record), never both. max_charge_cents must be at least the search price, otherwise the call returns 409 quote_changed. Requires Idempotency-Key.",
        "security": [
          {
            "bearerAuth": [
              "searches:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchCreateRequest"
              },
              "example": {
                "record": {
                  "FirstName": "Jane",
                  "LastName": "Doe",
                  "MailingAddress": "100 Main St",
                  "MailingCity": "Austin",
                  "MailingState": "TX",
                  "MailingZip": "78701"
                },
                "max_charge_cents": 25
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Search queued.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderPlaced"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/credit": {
      "get": {
        "operationId": "getCredit",
        "tags": [
          "Credit"
        ],
        "summary": "Get the credit balance",
        "description": "Prepaid credit for the account that owns the key.",
        "security": [
          {
            "bearerAuth": [
              "credit:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The balance.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Credit"
                },
                "example": {
                  "available_cents": 5000,
                  "reserved_cents": 1500,
                  "bonus_cents": 0,
                  "currency": "usd"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "sm_live_<32 hex>_<64 hex>",
        "description": "Send Authorization: Bearer <key>. Each key carries a set of scopes: uploads:write (create, complete and read uploads), quotes:write, orders:write, searches:write, orders:read, results:read and credit:read. A key also has a required daily spending cap and an expiry. Keys are created in Settings; the secret is shown once."
      }
    },
    "headers": {
      "RequestId": {
        "description": "Unique id of this request. Quote it to support.",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "A unique visible-ASCII string of up to 200 characters, without commas. Required on every POST, which must also send Content-Type: application/json. Repeating a request with the same key and body returns the original result; the same key with a different body fails with 409 idempotency_conflict.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "pattern": "^[!-~]+$"
        }
      }
    },
    "responses": {
      "Error400": {
        "description": "invalid_request",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error401": {
        "description": "invalid_key",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error402": {
        "description": "insufficient_credit",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error403": {
        "description": "insufficient_scope, attestation_required or daily_spend_limit",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error404": {
        "description": "not_found",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error409": {
        "description": "idempotency_conflict, upload_not_ready, quote_expired, quote_changed, quote_consumed or result_not_ready",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error413": {
        "description": "upload_too_large (a declared file size over 52428800 bytes, or a JSON request body over 65536 bytes)",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error422": {
        "description": "invalid_mapping",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error503": {
        "description": "api_disabled or temporarily_unavailable",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "rate_limited. Limits apply per minute: 300 requests per IP address, 60 per key and 120 per account; Retry-After is 60 seconds. An account with 50 uploads already waiting or validating is limited the same way.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 3600
            }
          },
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "request_id"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "invalid_request",
                  "invalid_key",
                  "insufficient_scope",
                  "attestation_required",
                  "daily_spend_limit",
                  "insufficient_credit",
                  "not_found",
                  "idempotency_conflict",
                  "upload_not_ready",
                  "quote_expired",
                  "quote_changed",
                  "quote_consumed",
                  "result_not_ready",
                  "upload_too_large",
                  "invalid_csv",
                  "invalid_mapping",
                  "row_count_mismatch",
                  "content_changed",
                  "rate_limited",
                  "api_disabled",
                  "temporarily_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "request_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        },
        "description": "Every failure has this shape. Status by code: invalid_request 400, invalid_key 401, insufficient_scope 403, attestation_required 403, daily_spend_limit 403, insufficient_credit 402, not_found 404, idempotency_conflict 409, upload_not_ready 409, quote_expired 409, quote_changed 409, quote_consumed 409, result_not_ready 409, upload_too_large 413, invalid_csv 422, invalid_mapping 422, row_count_mismatch 422, content_changed 422, rate_limited 429, api_disabled 503, temporarily_unavailable 503. A 429 also sends Retry-After. An unknown path or method returns 404 not_found."
      },
      "UploadCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "filename",
          "bytes"
        ],
        "properties": {
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "bytes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 52428800,
            "description": "Exact size of the CSV in bytes."
          }
        }
      },
      "UploadCreated": {
        "type": "object",
        "required": [
          "upload_id",
          "status",
          "expires_at",
          "upload_url",
          "upload_token",
          "max_bytes"
        ],
        "properties": {
          "upload_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "const": "awaiting_upload"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "upload_url": {
            "type": "string",
            "format": "uri",
            "description": "One-time signed address. Send the CSV bytes to it with HTTP PUT. Treat it as a secret."
          },
          "upload_token": {
            "type": "string",
            "description": "The token embedded in upload_url."
          },
          "max_bytes": {
            "type": "integer",
            "const": 52428800
          }
        }
      },
      "UploadStatus": {
        "type": "string",
        "enum": [
          "awaiting_upload",
          "validating",
          "ready",
          "rejected",
          "expired"
        ]
      },
      "Mapping": {
        "description": "Maps your column headers to the canonical fields. Either a flat object keyed by canonical field, or an object with a columns member (plus optional ownerNameColumn, propertySameAsMailing, mailingFullAddressColumn, propertyFullAddressColumn, duplicatesRemoved). Flat form may also set ownerNameSplit, ownerNameOrder (firstLast or lastFirst), propertySameAsMailing, mailingFullAddress and propertyFullAddress. Unknown keys are rejected. At most 16384 bytes.",
        "type": "object",
        "properties": {
          "FirstName": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "LastName": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "MailingAddress": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "MailingCity": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "MailingState": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "MailingZip": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "PropertyAddress": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "PropertyCity": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "PropertyState": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "PropertyZip": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          }
        }
      },
      "UploadCompleteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "mapping"
        ],
        "properties": {
          "mapping": {
            "$ref": "#/components/schemas/Mapping"
          }
        }
      },
      "Upload": {
        "type": "object",
        "required": [
          "upload_id",
          "status",
          "declared_bytes",
          "actual_bytes",
          "row_count",
          "created_at",
          "expires_at",
          "error_code"
        ],
        "properties": {
          "upload_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/UploadStatus"
          },
          "declared_bytes": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "actual_bytes": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "row_count": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Validated record count, once known."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "invalid_csv",
              null
            ],
            "description": "invalid_csv when the upload was rejected, otherwise null."
          }
        }
      },
      "QuoteCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "upload_id"
        ],
        "properties": {
          "upload_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "Quote": {
        "type": "object",
        "required": [
          "quote_id",
          "upload_id",
          "sha256",
          "row_count",
          "per_record_mills",
          "max_charge_cents",
          "currency",
          "expires_at"
        ],
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid"
          },
          "upload_id": {
            "type": "string",
            "format": "uuid"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "description": "Hash of the validated content the price applies to."
          },
          "row_count": {
            "type": "integer",
            "minimum": 0,
            "description": "Records priced."
          },
          "per_record_mills": {
            "type": "integer",
            "minimum": 0,
            "description": "Price per record in mills (a mill is a tenth of a cent)."
          },
          "max_charge_cents": {
            "type": "integer",
            "minimum": 0,
            "description": "The most the order can cost."
          },
          "currency": {
            "type": "string",
            "const": "usd"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OrderCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "quote_id"
        ],
        "properties": {
          "quote_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "SearchCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "max_charge_cents"
        ],
        "oneOf": [
          {
            "required": [
              "record"
            ]
          },
          {
            "required": [
              "upload_id"
            ]
          }
        ],
        "properties": {
          "record": {
            "type": "object",
            "additionalProperties": false,
            "description": "One owner, keyed by canonical field. Values are strings of up to 1024 characters without control characters. Needs a name and a complete mailing or property address.",
            "properties": {
              "FirstName": {
                "type": "string",
                "maxLength": 1024
              },
              "LastName": {
                "type": "string",
                "maxLength": 1024
              },
              "MailingAddress": {
                "type": "string",
                "maxLength": 1024
              },
              "MailingCity": {
                "type": "string",
                "maxLength": 1024
              },
              "MailingState": {
                "type": "string",
                "maxLength": 1024
              },
              "MailingZip": {
                "type": "string",
                "maxLength": 1024
              },
              "PropertyAddress": {
                "type": "string",
                "maxLength": 1024
              },
              "PropertyCity": {
                "type": "string",
                "maxLength": 1024
              },
              "PropertyState": {
                "type": "string",
                "maxLength": 1024
              },
              "PropertyZip": {
                "type": "string",
                "maxLength": 1024
              }
            }
          },
          "upload_id": {
            "type": "string",
            "format": "uuid",
            "description": "A ready upload holding the single record."
          },
          "max_charge_cents": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000000,
            "description": "The most this search may cost, in cents."
          }
        }
      },
      "OrderPlaced": {
        "type": "object",
        "required": [
          "order_id",
          "status",
          "reserved_cents",
          "currency"
        ],
        "properties": {
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "const": "queued"
          },
          "reserved_cents": {
            "type": "integer",
            "minimum": 0,
            "description": "Credit held for the order."
          },
          "currency": {
            "const": "usd"
          }
        }
      },
      "Order": {
        "type": "object",
        "required": [
          "order_id",
          "status",
          "order_kind",
          "row_count",
          "per_record_mills",
          "total_cents",
          "captured_cents",
          "released_cents",
          "hit_count",
          "phones_returned",
          "created_at",
          "paid_at",
          "processing_at",
          "delivered_at",
          "failed_at"
        ],
        "properties": {
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "quoted",
              "awaiting_payment",
              "queued",
              "processing",
              "delivered",
              "failed",
              "refunded"
            ]
          },
          "order_kind": {
            "type": "string",
            "enum": [
              "list",
              "single"
            ]
          },
          "row_count": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "per_record_mills": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "total_cents": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "captured_cents": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Charged so far.",
            "minimum": 0
          },
          "released_cents": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Reserved credit returned.",
            "minimum": 0
          },
          "hit_count": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "phones_returned": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "paid_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "processing_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "delivered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "failed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "OrderList": {
        "type": "object",
        "required": [
          "orders",
          "next_cursor"
        ],
        "properties": {
          "orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Order"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Null on the last page."
          }
        }
      },
      "Download": {
        "type": "object",
        "required": [
          "url",
          "expires_in_seconds"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "expires_in_seconds": {
            "type": "integer",
            "const": 300
          }
        }
      },
      "Credit": {
        "type": "object",
        "required": [
          "available_cents",
          "reserved_cents",
          "bonus_cents",
          "currency"
        ],
        "properties": {
          "available_cents": {
            "type": "integer",
            "minimum": 0,
            "description": "Spendable now."
          },
          "reserved_cents": {
            "type": "integer",
            "minimum": 0,
            "description": "Held for unfinished orders."
          },
          "bonus_cents": {
            "type": "integer",
            "minimum": 0,
            "description": "Bonus credit included in the balance."
          },
          "currency": {
            "const": "usd"
          }
        }
      },
      "UploadAccepted": {
        "type": "object",
        "required": [
          "upload_id",
          "status"
        ],
        "properties": {
          "upload_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "const": "validating"
          }
        },
        "description": "Returned when validation has been queued."
      }
    }
  }
}
