{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/shepherd-vet/json-schema/shepherd-vet-open-api-client-controller-client-write-model-schema.json",
  "title": "OpenApiClientController.ClientWriteModel",
  "description": "Client write REST model.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/shepherd-vet-client-api-openapi.yml#/components/schemas/OpenApiClientController.ClientWriteModel",
  "required": [
    "clientPhones",
    "firstName",
    "lastName"
  ],
  "type": "object",
  "properties": {
    "additionalText": {
      "description": "Free-text field of additional info for the client.",
      "type": "string"
    },
    "alerts": {
      "description": "Important info for the client, e.g. \"Difficult to work with\"",
      "type": "string"
    },
    "authorizedAgents": {
      "description": "The list of related AuthorizedAgent objects.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/OpenApiClientController.AuthorizedAgentWriteModel"
      }
    },
    "clientCoOwner": {
      "$ref": "#/$defs/OpenApiClientController.ClientCoOwnerWriteModel",
      "description": "Object representing related ClientCoOwnerWriteModel entity."
    },
    "clientDiscountId": {
      "description": "Unique identifier representing the related ClientDiscount entity.",
      "type": "string"
    },
    "clientInfo": {
      "$ref": "#/$defs/OpenApiClientController.ClientInfoWriteModel",
      "description": "Object representing related ClientInfoWriteModel entity."
    },
    "clientPhones": {
      "description": "The list of related ClientPhoneWrite objects.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/OpenApiClientController.ClientPhoneWriteModel"
      }
    },
    "email": {
      "description": "The client's email.",
      "type": "string"
    },
    "emailDirectMessagingNotification": {
      "description": "Flag indicating whether the client accepts direct messaging Email notifications.",
      "type": "boolean"
    },
    "emailMassCommuncationNotification": {
      "description": "Flag indicating whether the client accepts mass message email notifications.",
      "type": "boolean"
    },
    "emailNotification": {
      "description": "Flag indicating whether the client accepts appointment Email notifications.",
      "type": "boolean"
    },
    "firstName": {
      "description": "The client's first name.",
      "type": "string"
    },
    "isTaxExempt": {
      "description": "Flag indicating whether the client is exempt from taxes.",
      "type": "boolean"
    },
    "lastName": {
      "description": "The client's last name.",
      "type": "string"
    },
    "middleName": {
      "description": "The client's middle name.",
      "type": "string"
    },
    "referralSourceIds": {
      "description": "Unique identifier list representing the related ReferralSource entity.",
      "type": "array",
      "items": {
        "format": "uuid",
        "type": "string"
      }
    },
    "reminderEmailNotification": {
      "description": "Flag indicating whether the client accepts reminder Email notifications.",
      "type": "boolean"
    },
    "reminderPostcardNotification": {
      "description": "Flag indicating whether the client accepts postcard Email notifications.",
      "type": "boolean"
    },
    "reminderSmsNotification": {
      "description": "Flag indicating whether the client accepts reminder SMS notifications. Defaults to true when omitted.",
      "type": "boolean"
    },
    "smsDirectMessagingNotification": {
      "description": "Flag indicating whether the client accepts direct messaging SMS notifications.",
      "type": "boolean"
    },
    "smsMassCommuncationNotification": {
      "description": "Flag indicating whether the client accepts mass message SMS notifications.",
      "type": "boolean"
    },
    "smsNotification": {
      "description": "Flag indicating whether the client accepts appointment SMS notifications.",
      "type": "boolean"
    }
  },
  "$defs": {
    "OpenApiClientController.AuthorizedAgentWriteModel": {
      "description": "AuthorizedAgent write REST model.",
      "required": [
        "approvalNote",
        "firstName",
        "lastName",
        "phoneNumber"
      ],
      "type": "object",
      "properties": {
        "approvalNote": {
          "description": "Authorized agent's approval note (e.g. Approved by Mrs. Smith while out of town until September 1st)",
          "type": "string"
        },
        "firstName": {
          "description": "The authorized agent's first name.",
          "type": "string"
        },
        "id": {
          "format": "uuid",
          "description": "The authorized agent's identifier, as returned by a read. Provide it to edit that existing agent in place;\nomit it to add a new agent.",
          "type": "string"
        },
        "lastName": {
          "description": "The authorized agent's last name.",
          "type": "string"
        },
        "phoneNumber": {
          "description": "The authorized agent's phone number.",
          "maxLength": 10,
          "minLength": 10,
          "pattern": "^[0-9]*$",
          "type": "string"
        },
        "role": {
          "description": "The authorized agent's role.",
          "type": "string"
        }
      }
    },
    "OpenApiClientController.ClientCoOwnerWriteModel": {
      "description": "Write REST model for client co owner.",
      "required": [
        "firstName",
        "lastName"
      ],
      "type": "object",
      "properties": {
        "clientCoOwnerPhones": {
          "description": "The list of related ClientCoOwnerPhone objects.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/OpenApiClientController.ClientPhoneWriteModel"
          }
        },
        "email": {
          "description": "The co-owner's email address.",
          "type": "string"
        },
        "emailDirectMessagingNotification": {
          "description": "Flag indicating whether the co-owner accepts Email - Direct Messaging notifications. Omit to leave the current value unchanged.",
          "type": "boolean"
        },
        "firstName": {
          "description": "The co-owner's first name.",
          "type": "string"
        },
        "lastName": {
          "description": "The co-owner's last name.",
          "type": "string"
        },
        "smsDirectMessagingNotification": {
          "description": "Flag indicating whether the co-owner accepts SMS - Direct Messaging notifications. Omit to leave the current value unchanged.",
          "type": "boolean"
        }
      }
    },
    "OpenApiClientController.ClientInfoWriteModel": {
      "description": "ClientInfo write REST model",
      "type": "object",
      "properties": {
        "address": {
          "description": "Address Line 1 should include the most essential details to identify a location clearly(e.g.street and number).",
          "type": "string"
        },
        "address2": {
          "description": "Address Line 2 should be used to capture additional information that doesn't fit into Address Line 1.\nThis line is essential for adding specific details to ensure accurate delivery or location identification (e.g. apt Apt 12C).",
          "type": "string"
        },
        "city": {
          "description": "City where the client resides.",
          "type": "string"
        },
        "driverLicenseExpirationDate": {
          "format": "date-time",
          "description": "The expiration date of the client's driver license.",
          "type": "string"
        },
        "driverLicenseNumber": {
          "description": "The client's driver license number.",
          "type": "string"
        },
        "driverLicenseState": {
          "description": "The state that issued the client's driver license.",
          "type": "string"
        },
        "state": {
          "description": "Name of the state or province in the client's residential address.\nCan be represented either as an abbreviation (e.g., \"TX\") or as the full name (e.g., \"Texas\").",
          "type": "string"
        },
        "zipCode": {
          "description": "Postal or ZIP code in the client's residential address.",
          "type": "string"
        }
      }
    },
    "OpenApiClientController.ClientPhoneWriteModel": {
      "description": "ClientPhone write REST model",
      "required": [
        "countryId",
        "phoneNumber",
        "phoneTypeId"
      ],
      "type": "object",
      "properties": {
        "countryId": {
          "description": "Unique identifier representing the related Country entity.",
          "type": "string"
        },
        "isPrimary": {
          "description": "Flag indicating whether this instance is the primary phone number for the client.",
          "type": "boolean"
        },
        "phoneNumber": {
          "description": "The client's phone number.",
          "maxLength": 10,
          "minLength": 10,
          "pattern": "^[0-9]*$",
          "type": "string"
        },
        "phoneNumberName": {
          "description": "Optional label/name for the phone number (e.g. \"Mobile\", \"Home\").",
          "type": "string"
        },
        "phoneTypeId": {
          "description": "Unique identifier representing the related PhoneType entity.",
          "type": "string"
        }
      }
    }
  }
}