{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/optimizely/main/json-schema/optimizely-insite-account-web-api-v1-api-models-account-model-schema.json",
  "title": "Insite.Account.WebApi.V1.ApiModels.AccountModel",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/optimizely-accounts-api-openapi.yml#/components/schemas/Insite.Account.WebApi.V1.ApiModels.AccountModel",
  "type": "object",
  "properties": {
    "uri": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "userName": {
      "type": "string"
    },
    "password": {
      "type": "string"
    },
    "isSubscribed": {
      "type": "boolean"
    },
    "isGuest": {
      "type": "boolean"
    },
    "canApproveOrders": {
      "type": "boolean"
    },
    "canViewApprovalOrders": {
      "type": "boolean"
    },
    "billToId": {
      "format": "uuid",
      "type": "string"
    },
    "shipToId": {
      "format": "uuid",
      "type": "string"
    },
    "firstName": {
      "type": "string"
    },
    "lastName": {
      "type": "string"
    },
    "role": {
      "type": "string"
    },
    "roleTranslated": {
      "type": "string"
    },
    "vmiRole": {
      "type": "string"
    },
    "vmiRoleTranslated": {
      "type": "string"
    },
    "approver": {
      "type": "string"
    },
    "isApproved": {
      "type": "boolean"
    },
    "activationStatus": {
      "type": "string"
    },
    "lastLoginOn": {
      "format": "date-time",
      "type": "string"
    },
    "availableApprovers": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "availableRoles": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "availableRolesTranslated": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "requiresActivation": {
      "type": "boolean"
    },
    "setDefaultCustomer": {
      "type": "boolean"
    },
    "defaultCustomerId": {
      "format": "uuid",
      "type": "string"
    },
    "defaultFulfillmentMethod": {
      "type": "string"
    },
    "defaultWarehouseId": {
      "format": "uuid",
      "type": "string"
    },
    "defaultWarehouse": {
      "$ref": "#/$defs/Insite.Catalog.WebApi.V1.ApiModels.WarehouseModel"
    },
    "accessToken": {
      "type": "string"
    },
    "properties": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "Insite.Catalog.WebApi.V1.ApiModels.WarehouseModel": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string"
        },
        "id": {
          "format": "uuid",
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "address1": {
          "type": "string"
        },
        "address2": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "contactName": {
          "type": "string"
        },
        "countryId": {
          "format": "uuid",
          "type": "string"
        },
        "deactivateOn": {
          "format": "date-time",
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "postalCode": {
          "type": "string"
        },
        "shipSite": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "isDefault": {
          "type": "boolean"
        },
        "alternateWarehouses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Insite.Catalog.WebApi.V1.ApiModels.WarehouseModel"
          }
        },
        "latitude": {
          "format": "decimal",
          "type": "number"
        },
        "longitude": {
          "format": "decimal",
          "type": "number"
        },
        "hours": {
          "type": "string"
        },
        "distance": {
          "format": "double",
          "type": "number"
        },
        "allowPickup": {
          "type": "boolean"
        },
        "pickupShipViaId": {
          "format": "uuid",
          "type": "string"
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    }
  }
}