{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/doorloop/json-schema/doorloop-vendor-schema.json",
  "title": "vendor",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/doorloop-vendors-api-openapi.yml#/components/schemas/vendor",
  "allOf": [
    {
      "$ref": "#/$defs/person"
    },
    {
      "type": "object",
      "properties": {
        "active": {
          "type": "boolean"
        },
        "balance": {
          "type": "number",
          "description": "Read Only"
        },
        "properties": {
          "type": "array",
          "description": "References the properties served by this vendor",
          "items": {
            "$ref": "#/$defs/mongoId"
          }
        },
        "insuranceInfo": {
          "$ref": "#/$defs/insuranceInfo"
        },
        "federalTaxInfo": {
          "$ref": "#/$defs/federalTaxInfo"
        }
      },
      "required": [
        "active"
      ]
    }
  ],
  "$defs": {
    "address": {
      "title": "address",
      "x-stoplight": {
        "id": "a6vhbqoeituyk"
      },
      "type": "object",
      "description": "",
      "properties": {
        "street1": {
          "type": "string"
        },
        "street2": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "zip": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "lat": {
          "type": "string"
        },
        "lng": {
          "type": "string"
        }
      }
    },
    "email": {
      "title": "email",
      "x-stoplight": {
        "id": "33vnq3pmvuy4l"
      },
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "Primary",
            "Secondary",
            "Personal",
            "Work",
            "Other"
          ]
        },
        "address": {
          "type": "string"
        }
      },
      "required": [
        "type",
        "address"
      ]
    },
    "federalTaxInfo": {
      "title": "federalTaxInfo",
      "x-stoplight": {
        "id": "d1fvqgbj6zgev"
      },
      "type": "object",
      "properties": {
        "addressFor1099SameAsPrimaryAddress": {
          "type": "boolean",
          "description": "If set to \"true\", will use the primaryAddress on the 1099 form. Otherwise addressFor1099 will be required."
        },
        "addressFor1099": {
          "$ref": "#/$defs/address"
        },
        "taxpayerName": {
          "type": "string"
        },
        "taxpayerId": {
          "type": "string"
        }
      },
      "required": [
        "addressFor1099SameAsPrimaryAddress",
        "taxpayerName",
        "taxpayerId"
      ]
    },
    "insuranceInfo": {
      "title": "insuranceInfo",
      "x-stoplight": {
        "id": "0u3re29llsdch"
      },
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "maxLength": 200
        },
        "policyNumber": {
          "type": "string",
          "maxLength": 200
        },
        "coverage": {
          "type": "number",
          "minimum": 0
        },
        "effectiveDate": {
          "type": "string",
          "description": "Format: YYYY-MM-DD. Must be before expirationDate."
        },
        "expirationDate": {
          "type": "string",
          "description": "Format: YYYY-MM-DD. Must be after effectiveDate."
        }
      },
      "required": [
        "provider",
        "policyNumber",
        "coverage",
        "effectiveDate",
        "expirationDate"
      ]
    },
    "mongoId": {
      "type": "string",
      "title": "mongoId",
      "x-stoplight": {
        "id": "40j7qlmpihfdj"
      },
      "pattern": "/^[a-f\\d]{24}$/i"
    },
    "person": {
      "title": "person",
      "x-stoplight": {
        "id": "w8ihhyv3ctmy8"
      },
      "type": "object",
      "description": "",
      "properties": {
        "id": {
          "$ref": "#/$defs/mongoId"
        },
        "name": {
          "type": "string",
          "description": "Read Only"
        },
        "firstName": {
          "type": "string"
        },
        "middleName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        },
        "gender": {
          "type": "string",
          "enum": [
            "MALE",
            "FEMALE",
            "PREFER_NOT_TO_SAY"
          ]
        },
        "fullName": {
          "type": "string",
          "description": "Read Only"
        },
        "dateOfBirth": {
          "type": "string",
          "description": "Format: YYYY-MM-DD"
        },
        "timezone": {
          "type": "string"
        },
        "company": {
          "type": "string"
        },
        "companyName": {
          "type": "string"
        },
        "jobTitle": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "phones": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/phone"
          }
        },
        "emails": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/email"
          }
        },
        "primaryAddress": {
          "$ref": "#/$defs/address"
        },
        "pictureUrl": {
          "type": "string"
        },
        "": {
          "type": "string"
        }
      },
      "required": [
        "firstName",
        "lastName"
      ]
    },
    "phone": {
      "title": "phone",
      "x-stoplight": {
        "id": "9kqyepto63cpi"
      },
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "Home",
            "Work",
            "Mobile",
            "Fax",
            "Other"
          ]
        },
        "number": {
          "type": "string",
          "maxLength": 50
        }
      },
      "required": [
        "type",
        "number"
      ]
    }
  }
}