{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/blackbaud/main/json-schema/blackbaud-order-patron-view-schema.json",
  "title": "OrderPatronView",
  "description": "ViewOrderPatron",
  "x-generated": "2026-10-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/blackbaud-altru-sales-api-openapi.yml#/components/schemas/OrderPatronView",
  "type": "object",
  "properties": {
    "constituent_id": {
      "type": "string",
      "description": "The constituentid."
    },
    "address": {
      "maxLength": 300,
      "minLength": 0,
      "type": "string",
      "description": "The address."
    },
    "phone_number": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The phonenumber."
    },
    "email_address": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The emailaddress."
    },
    "recognition_constituency_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The recognitionconstituencytext."
    },
    "member_constituency_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The memberconstituencytext."
    },
    "board_member_constituency_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The boardmemberconstituencytext."
    },
    "relation_constituency_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The relationconstituencytext."
    },
    "staff_constituency_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The staffconstituencytext."
    },
    "donor_constituency_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The donorconstituencytext."
    },
    "fundraiser_constituency_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The fundraiserconstituencytext."
    },
    "prospect_constituency_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The prospectconstituencytext."
    },
    "volunteer_constituency_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The volunteerconstituencytext."
    },
    "community_member_constituency_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The communitymemberconstituencytext."
    },
    "user_defined_constituency_text": {
      "maxLength": 4000,
      "minLength": 0,
      "type": "string",
      "description": "The userdefinedconstituencytext."
    },
    "alumnus_status_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The alumnusstatustext."
    },
    "registrant_status_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The registrantstatustext."
    },
    "vendor_status_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The vendorstatustext."
    },
    "matchfinder_constituency_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The matchfinderconstituencytext."
    },
    "matchfinder_online_record_id": {
      "type": "integer",
      "description": "The matchfinderonlinerecordid.",
      "format": "int32"
    },
    "memberships": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OrderPatronMemberships"
      },
      "description": "Memberships."
    },
    "associated": {
      "type": "boolean",
      "description": "Indicates whether isassociated."
    },
    "not_associated": {
      "type": "boolean",
      "description": "Indicates whether notassociated."
    },
    "does_not_exist": {
      "type": "boolean",
      "description": "Indicates whether doesnotexist."
    },
    "info_exists": {
      "type": "boolean",
      "description": "Indicates whether infoexists."
    },
    "constituent_name": {
      "maxLength": 40,
      "minLength": 0,
      "type": "string",
      "description": "The constituentname."
    },
    "order_number": {
      "type": "integer",
      "description": "The order #.",
      "format": "int32"
    },
    "order_date": {
      "$ref": "#/$defs/DateWithTimeOffSet"
    },
    "post_status": {
      "maxLength": 50,
      "minLength": 0,
      "type": "string",
      "description": "The post status."
    },
    "post_date": {
      "type": "string",
      "description": "The post date. Uses the format YYYY-MM-DDThh:mm:ss. An example date: <i>1955-11-05T22:04:00</i>.",
      "format": "date-time"
    },
    "order_total": {
      "type": "number",
      "description": "The total.",
      "format": "double"
    },
    "amount_paid": {
      "type": "number",
      "description": "The amount paid.",
      "format": "double"
    },
    "balance": {
      "type": "number",
      "description": "The balance.",
      "format": "double"
    },
    "amount_refunded": {
      "type": "number",
      "description": "The amount refunded.",
      "format": "double"
    },
    "refund_id": {
      "type": "string",
      "description": "The refundid."
    },
    "user_name": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The created by."
    },
    "sales_method_type": {
      "maxLength": 50,
      "minLength": 0,
      "type": "string",
      "description": "The sales method."
    },
    "order_status": {
      "type": "integer",
      "description": "The status.",
      "format": "int32"
    },
    "receiptoption": {
      "maxLength": 50,
      "minLength": 0,
      "type": "string",
      "description": "The receipt option."
    },
    "salesorderemailaddress": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The email."
    },
    "delivery_method": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The method."
    },
    "recipient": {
      "maxLength": 154,
      "minLength": 0,
      "type": "string",
      "description": "The recipient."
    },
    "delivery_address": {
      "maxLength": 300,
      "minLength": 0,
      "type": "string",
      "description": "The address."
    },
    "delivery_phone": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The phone."
    },
    "delivery_email": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The email."
    },
    "order_status_text": {
      "maxLength": 50,
      "minLength": 0,
      "type": "string",
      "description": "The order status."
    },
    "bank_constituency_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The bankconstituencytext."
    },
    "patron_constituency_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The patronconstituencytext."
    },
    "same_as_patron": {
      "type": "boolean",
      "description": "Indicates whether same as patron."
    },
    "address_required": {
      "type": "boolean",
      "description": "Indicates whether addressrequired. Read-only in the SOAP API."
    },
    "phone_required": {
      "type": "boolean",
      "description": "Indicates whether phonerequired. Read-only in the SOAP API."
    },
    "email_required": {
      "type": "boolean",
      "description": "Indicates whether emailrequired. Read-only in the SOAP API."
    },
    "recipient_associated": {
      "type": "boolean",
      "description": "Indicates whether recipientassociated. Read-only in the SOAP API."
    },
    "sales_method_type_code": {
      "type": "integer",
      "description": "The salesmethodtypecode.",
      "format": "int32"
    },
    "loyal_donor_constituency_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The loyaldonorconstituencytext."
    },
    "major_donor_constituency_text": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The majordonorconstituencytext."
    },
    "overage_kept": {
      "type": "number",
      "description": "The overage kept.",
      "format": "double"
    },
    "tax_exempt": {
      "type": "boolean",
      "description": "Indicates whether istaxexempt."
    },
    "tax_exempt_reason": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string",
      "description": "The reason."
    },
    "tax_exempt_comments": {
      "maxLength": 255,
      "minLength": 0,
      "type": "string",
      "description": "The comments."
    }
  },
  "additionalProperties": false,
  "x-display-name": "Order Patron View",
  "x-display-id": "Order Patron View",
  "$defs": {
    "DateWithTimeOffSet": {
      "type": "object",
      "properties": {
        "date_time": {
          "type": "string",
          "description": "The date time.",
          "format": "datetime"
        },
        "offset_minutes": {
          "type": "integer",
          "description": "The offset minutes.",
          "format": "int32"
        }
      },
      "description": "DateWithTimeOffSet",
      "x-display-name": "DateTime OffsetMinutes",
      "x-display-id": "DateTime OffsetMinutes"
    },
    "OrderPatronMemberships": {
      "type": "object",
      "properties": {
        "membership_id": {
          "type": "string",
          "description": "membershipid"
        },
        "membership_program_name": {
          "type": "string",
          "description": "membershipprogramname"
        },
        "membership_level_name": {
          "type": "string",
          "description": "membershiplevelname"
        },
        "membership_expiration": {
          "type": "string",
          "description": "membershipexpiration",
          "format": "date"
        },
        "in_renewal_window": {
          "type": "boolean",
          "description": "inrenewalwindow"
        },
        "lapsed": {
          "type": "boolean",
          "description": "islapsed"
        },
        "cancelled": {
          "type": "boolean",
          "description": "iscancelled"
        },
        "pending": {
          "type": "boolean",
          "description": "ispending"
        }
      },
      "description": "OrderPatronMemberships",
      "x-display-name": "memberships",
      "x-display-id": "memberships"
    }
  }
}