---
updatedAt: 2026-11-06T13:12:22.000Z
agentTools:
  projectIndex: https://developer.surense.com/llms.txt
---

# Search customers

Search the customers the caller may access, with filters and sorts on customer fields. Results omit the 'relatedCustomers' and 'employments' associations (null); use getCustomer for the full record. Supports both offset-based (startRow/endRow) and cursor-based (cursor/pageSize) pagination: cursor-based pagination is used when 'cursor' or 'pageSize' is provided, otherwise offset-based pagination is used. For cursor-based pagination, leave 'cursor' empty for the first page, then pass back 'nextCursor' from the response together with the same sort definitions to fetch the following page. The 'nextCursor' field of the response is only populated for cursor-based pagination. Limits: at most 100 rows per page (endRow - startRow, or pageSize between 1 and 100), and offset pagination cannot start beyond row 10000. Errors: 400 when these limits are exceeded, startRow is greater than endRow, or a filter is invalid.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Customer API",
    "description": "Manages customers — the insured persons and policy holders an insurance agency serves — together\nwith the tenant's customer lookup lists (statuses, classes and sources) and birthday reminders.\n\nEvery endpoint is tenant-scoped, and customer data is further restricted per caller: a user only\nsees the customers they manage, the customers managed by contributors of their teams, or every\ncustomer of their agency when they hold the agency-wide view permission (or all customers with the\nview-all permission). Customers flagged as sensitive additionally require the sensitive-customers\npermission. A user can always see the customer record linked to their own identity.\n\nAuthenticate with an OAuth2 bearer token; each operation lists the scope it requires. Errors are\nreturned as an `ApiError` body; note that authorization failures detected by the service (for\nexample a customer the caller may not access) are reported as HTTP 400 with error code 40000.\n",
    "version": "1.0.22"
  },
  "servers": [
    {
      "url": "https://api.surense.com/api/v1",
      "description": "Production"
    }
  ],
  "security": [
    {
      "oauth2": []
    }
  ],
  "tags": [
    {
      "name": "Customers",
      "description": "Create, read, search, update and delete the customers (insured persons and policy holders) of the caller's tenant, and list the tenant's customer statuses, classes and sources."
    }
  ],
  "paths": {
    "/customers/search": {
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "Search customers",
        "description": "Search the customers the caller may access, with filters and sorts on customer fields. Results omit the 'relatedCustomers' and 'employments' associations (null); use getCustomer for the full record. Supports both offset-based (startRow/endRow) and cursor-based (cursor/pageSize) pagination: cursor-based pagination is used when 'cursor' or 'pageSize' is provided, otherwise offset-based pagination is used. For cursor-based pagination, leave 'cursor' empty for the first page, then pass back 'nextCursor' from the response together with the same sort definitions to fetch the following page. The 'nextCursor' field of the response is only populated for cursor-based pagination. Limits: at most 100 rows per page (endRow - startRow, or pageSize between 1 and 100), and offset pagination cannot start beyond row 10000. Errors: 400 when these limits are exceeded, startRow is greater than endRow, or a filter is invalid.",
        "operationId": "searchCustomers",
        "requestBody": {
          "description": "Filters, sorts and either offset (startRow/endRow) or cursor (cursor/pageSize) pagination.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaginatedOrCursorSearchRequest"
              },
              "examples": {
                "offsetPagination": {
                  "summary": "First 50 customers living in Tel Aviv, by last name",
                  "description": "offsetPagination",
                  "value": {
                    "filters": [
                      {
                        "field": "city",
                        "operator": "equals",
                        "value": "תל אביב"
                      }
                    ],
                    "sorts": [
                      {
                        "field": "lastName",
                        "dir": "asc"
                      }
                    ],
                    "startRow": 0,
                    "endRow": 50
                  }
                },
                "cursorPagination": {
                  "summary": "Next page of a cursor-based search",
                  "description": "cursorPagination",
                  "value": {
                    "sorts": [
                      {
                        "field": "lastName",
                        "dir": "asc"
                      }
                    ],
                    "cursor": "WyIyMDI0LTAxLTAxVDAwOjAwOjAwWiIsIjAxOTAtLi4uIl0",
                    "pageSize": 100
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A page of customers",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/CursorSearchResponseCustomerValue"
                }
              }
            }
          },
          "400": {
            "description": "Invalid pagination, sort or filter"
          }
        },
        "security": [
          {
            "oauth2": [
              "customers:read"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CustomerRelationshipType": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "The value's code",
            "format": "int32",
            "enum": [
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              100,
              8,
              9
            ]
          },
          "description": {
            "type": "string",
            "description": "The value's display name (Hebrew)"
          }
        }
      },
      "CustomerEmploymentValue": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "position": {
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "type": "integer",
            "format": "int32",
            "enum": [
              1,
              2,
              3
            ]
          },
          "employerId": {
            "type": "string",
            "format": "uuid"
          },
          "employerName": {
            "type": "string"
          },
          "employerContactId": {
            "type": "string",
            "format": "uuid"
          },
          "occupation": {
            "type": "string"
          },
          "income": {
            "type": "integer",
            "format": "int32"
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "format": "date"
          },
          "notes": {
            "type": "string"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "CustomerIdentityType": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "The value's code",
            "format": "int32",
            "enum": [
              1,
              2,
              3,
              4,
              5,
              6
            ]
          },
          "description": {
            "type": "string",
            "description": "The value's display name (Hebrew)"
          }
        },
        "description": "Customer Identity Type:<br/>1 - ת.ז<br/>2 - דרכון<br/>3 - רישיון נהיגה<br/>4 - אחר<br/>5 - ח.פ<br/>6 - ח.צ"
      },
      "CustomerReportFormat": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "The value's code",
            "format": "int32",
            "enum": [
              1,
              2
            ]
          },
          "description": {
            "type": "string",
            "description": "The value's display name (Hebrew)"
          }
        }
      },
      "CustomerReportPeriod": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "The value's code",
            "format": "int32",
            "enum": [
              1,
              2,
              3,
              4,
              5
            ]
          },
          "description": {
            "type": "string",
            "description": "The value's display name (Hebrew)"
          }
        }
      },
      "CustomerValue": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "agencyId": {
            "type": "string",
            "description": "ID of the agency the customer belongs to",
            "format": "uuid",
            "example": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string",
            "format": "uuid"
          },
          "creatorName": {
            "type": "string"
          },
          "lastModifiedDate": {
            "type": "string",
            "format": "date-time"
          },
          "lastModifiedBy": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "format": "int64"
          },
          "id": {
            "type": "string",
            "description": "Customer ID",
            "format": "uuid",
            "example": "3f2b8c1e-7d4a-4e9b-a1c2-5d6e7f8a9b0c"
          },
          "duplicate": {
            "type": "boolean",
            "description": "Whether the customer is flagged as a duplicate of another customer",
            "example": false
          },
          "statusId": {
            "type": "string",
            "format": "uuid"
          },
          "statusName": {
            "type": "string",
            "description": "Name of the customer's status",
            "example": "לקוח פעיל"
          },
          "statusActive": {
            "type": "boolean",
            "description": "Whether the customer's status is an active status",
            "example": true
          },
          "sourceId": {
            "type": "string",
            "format": "uuid"
          },
          "sourceName": {
            "type": "string",
            "description": "Name of the customer's source",
            "example": "הפניה מלקוח"
          },
          "customerClassId": {
            "type": "string",
            "description": "Deprecated alias of classId",
            "format": "uuid",
            "example": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e"
          },
          "classId": {
            "type": "string",
            "format": "uuid"
          },
          "className": {
            "type": "string",
            "description": "Name of the customer's class",
            "example": "VIP"
          },
          "managerId": {
            "type": "string",
            "description": "ID of the customer's first manager (user)",
            "format": "uuid",
            "example": "8d3f5a2e-1b4c-4f6d-9e8a-7c2b1a0f3e5d"
          },
          "managers": {
            "type": "array",
            "description": "IDs of the users managing the customer",
            "items": {
              "type": "string",
              "description": "IDs of the users managing the customer",
              "format": "uuid"
            }
          },
          "sensitive": {
            "type": "boolean",
            "description": "Whether the customer is sensitive (visible only to users with the sensitive-customers permission)",
            "example": false
          },
          "mailingStatus": {
            "$ref": "#/components/schemas/MailingStatus"
          },
          "mailingStatusDate": {
            "type": "string",
            "description": "When the mailing status was last changed",
            "format": "date-time",
            "example": "2024-01-15T10:00:00Z"
          },
          "creationSource": {
            "type": "integer",
            "description": "Creation Source (null when unknown):<br/>1 - ידני<br/>2 - קישור קבוע<br/>3 - טעינת קבצי מידע<br/>4 - ייבוא מקובץ<br/>5 - יצירת ליד<br/>6 - API<br/>7 - בן משפחה של לקוח<br/>8 - סנכרון תהליכים<br/>9 - מסלקה פנסיונית<br/>10 - הסבת נתונים",
            "format": "int32",
            "enum": [
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10
            ]
          },
          "creationSourceParams": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "description": "The details of creationSource, when known: e.g. channel (WEB_APP or MOBILE_APP) for 1, urlId and urlName (the permanent link) for 2, leadId for 5, parentCustomerId for 7",
              "example": "{\"urlId\":\"aB3x9Qk\",\"urlName\":\"קמפיין נובמבר\"}"
            },
            "description": "The details of creationSource, when known: e.g. channel (WEB_APP or MOBILE_APP) for 1, urlId and urlName (the permanent link) for 2, leadId for 5, parentCustomerId for 7",
            "example": {
              "urlId": "aB3x9Qk",
              "urlName": "קמפיין נובמבר"
            }
          },
          "idType": {
            "$ref": "#/components/schemas/CustomerIdentityType"
          },
          "idNumber": {
            "type": "string"
          },
          "idNumberLocked": {
            "type": "boolean",
            "description": "Whether the ID number has been locked (confirmed); it is unlocked again when the ID number changes",
            "example": false
          },
          "idCardIssueDate": {
            "type": "string",
            "format": "date"
          },
          "firstName": {
            "type": "string"
          },
          "shortName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "fullName": {
            "type": "string",
            "description": "Full name (first name followed by last name)",
            "example": "ישראל ישראלי"
          },
          "fullNameReverse": {
            "type": "string",
            "description": "Full name in reverse order (last name followed by first name)",
            "example": "ישראלי ישראל"
          },
          "maidenName": {
            "type": "string"
          },
          "engFirstName": {
            "type": "string"
          },
          "engLastName": {
            "type": "string"
          },
          "cellNumber": {
            "type": "string"
          },
          "cellNumberVerified": {
            "type": "boolean",
            "description": "Whether the cell number has been verified",
            "example": false
          },
          "cellNumberFormatted": {
            "type": "string",
            "description": "Cell number formatted for display",
            "example": "050-123-4567"
          },
          "cellNumberUri": {
            "type": "string"
          },
          "cellNumberWhatsAppUri": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "phoneNumberFormatted": {
            "type": "string"
          },
          "phoneNumberUri": {
            "type": "string"
          },
          "phoneNumberWhatsAppUri": {
            "type": "string"
          },
          "phoneNumber2": {
            "type": "string"
          },
          "phoneNumber2Formatted": {
            "type": "string"
          },
          "phoneNumber2Uri": {
            "type": "string"
          },
          "phoneNumber2WhatsAppUri": {
            "type": "string"
          },
          "phoneNumber3": {
            "type": "string"
          },
          "phoneNumber3Formatted": {
            "type": "string"
          },
          "phoneNumber3Uri": {
            "type": "string"
          },
          "phoneNumber3WhatsAppUri": {
            "type": "string"
          },
          "faxNumber": {
            "type": "string"
          },
          "faxNumberFormatted": {
            "type": "string"
          },
          "faxNumberUri": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "emailBounce": {
            "type": "boolean",
            "description": "Whether emails sent to the customer's address bounced",
            "example": false
          },
          "emailComplaint": {
            "type": "boolean",
            "description": "Whether the customer marked an email as spam",
            "example": false
          },
          "otherEmail": {
            "type": "string"
          },
          "gender": {
            "$ref": "#/components/schemas/Gender"
          },
          "birthDate": {
            "type": "string",
            "format": "date"
          },
          "birthDay": {
            "type": "integer",
            "description": "Day of month of the birth date, null when only the birth year is known",
            "format": "int32",
            "example": 14
          },
          "birthMonth": {
            "type": "integer",
            "description": "Month of the birth date (1-12), null when only the birth year is known",
            "format": "int32",
            "example": 3
          },
          "birthYear": {
            "type": "integer",
            "description": "Year of the birth date",
            "format": "int32",
            "example": 1985
          },
          "birthDateYearOnly": {
            "type": "boolean"
          },
          "age": {
            "type": "string"
          },
          "minor": {
            "type": "boolean",
            "description": "Whether the customer is under 18, null when the birth date is unknown",
            "example": false
          },
          "death": {
            "type": "boolean"
          },
          "deathDate": {
            "type": "string",
            "format": "date"
          },
          "street": {
            "type": "string"
          },
          "streetNumber": {
            "type": "string"
          },
          "apartmentNumber": {
            "type": "string"
          },
          "postalBox": {
            "type": "integer",
            "format": "int32"
          },
          "city": {
            "type": "string"
          },
          "postalCode": {
            "type": "integer",
            "format": "int32"
          },
          "country": {
            "type": "string"
          },
          "address": {
            "type": "string",
            "description": "Formatted postal address",
            "example": "הרצל 12, תל אביב"
          },
          "maritalStatus": {
            "$ref": "#/components/schemas/MaritalStatus"
          },
          "childrenCount": {
            "type": "integer",
            "description": "Number of related customers that are the customer's children",
            "format": "int32",
            "example": 2
          },
          "relatedCustomers": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelatedCustomerValue"
            }
          },
          "partnerId": {
            "type": "string",
            "description": "ID of the related customer that is the customer's spouse or partner",
            "format": "uuid"
          },
          "partnerName": {
            "type": "string",
            "description": "Full name of the customer's spouse or partner"
          },
          "profession": {
            "type": "string"
          },
          "employmentStatus": {
            "$ref": "#/components/schemas/EmploymentStatus"
          },
          "employerId1": {
            "type": "string",
            "format": "uuid"
          },
          "employerName1": {
            "type": "string"
          },
          "employmentIncome1": {
            "type": "integer",
            "format": "int32"
          },
          "employerId2": {
            "type": "string",
            "format": "uuid"
          },
          "employerName2": {
            "type": "string"
          },
          "employmentIncome2": {
            "type": "integer",
            "format": "int32"
          },
          "employments": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerEmploymentValue"
            }
          },
          "lastEmployment": {
            "$ref": "#/components/schemas/CustomerEmploymentValue"
          },
          "usCitizen": {
            "type": "boolean"
          },
          "foreignTaxResidency": {
            "type": "boolean"
          },
          "engAddress": {
            "type": "string"
          },
          "taxResidencies": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaxResidency"
            }
          },
          "kupatHolim": {
            "$ref": "#/components/schemas/KupatHolim"
          },
          "kupatHolimComplementary": {
            "$ref": "#/components/schemas/KupatHolimComplementary"
          },
          "height": {
            "type": "integer",
            "format": "int32"
          },
          "weight": {
            "type": "integer",
            "format": "int32"
          },
          "smoker": {
            "type": "boolean"
          },
          "cigarettesCountPerDay": {
            "type": "integer",
            "format": "int32"
          },
          "drugs": {
            "type": "string"
          },
          "surgeries": {
            "type": "string"
          },
          "hospitalizations": {
            "type": "string"
          },
          "backgroundDiseases": {
            "type": "string"
          },
          "bankAccountType": {
            "type": "string"
          },
          "bankCode": {
            "type": "integer",
            "format": "int32"
          },
          "bankBranchCode": {
            "type": "integer",
            "format": "int32"
          },
          "bankAccountNumber": {
            "type": "string"
          },
          "swiftnessProxyInviteDate": {
            "type": "string",
            "format": "date"
          },
          "swiftnessProxySignDate": {
            "type": "string",
            "format": "date"
          },
          "swiftnessProxyExpiryDate": {
            "type": "string",
            "format": "date"
          },
          "swiftnessProxyExpired": {
            "type": "boolean"
          },
          "lastE9100DataDate": {
            "type": "string",
            "format": "date"
          },
          "outdatedE9100Data": {
            "type": "boolean"
          },
          "swiftnessData": {
            "type": "boolean"
          },
          "hbProxyInviteDate": {
            "type": "string",
            "format": "date"
          },
          "hbProxySignDate": {
            "type": "string",
            "format": "date"
          },
          "hbProxyExpiryDate": {
            "type": "string",
            "format": "date"
          },
          "hbProxyExpired": {
            "type": "boolean"
          },
          "hbDataDate": {
            "type": "string",
            "format": "date"
          },
          "policiesProxyInviteDate": {
            "type": "string",
            "format": "date"
          },
          "policiesProxySignDate": {
            "type": "string",
            "format": "date"
          },
          "policiesProxyExpiryDate": {
            "type": "string",
            "format": "date"
          },
          "policiesProxyExpired": {
            "type": "boolean"
          },
          "lastSwiftnessProductiaMonth": {
            "type": "string"
          },
          "lastPratProductiaMonth": {
            "type": "string"
          },
          "lastProductiaMonth": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "notesUpdatedBy": {
            "type": "string",
            "format": "uuid"
          },
          "notesUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "notesAlert": {
            "type": "boolean"
          },
          "customFields": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmartDialogFieldValue"
            }
          },
          "reportEnabled": {
            "type": "boolean"
          },
          "reportPeriod": {
            "$ref": "#/components/schemas/CustomerReportPeriod"
          },
          "reportFormat": {
            "$ref": "#/components/schemas/CustomerReportFormat"
          },
          "reportByEmail": {
            "type": "boolean"
          },
          "reportByCellNumber": {
            "type": "boolean"
          },
          "reportIncludesInvestmentProducts": {
            "type": "boolean"
          },
          "reportIncludesInsuranceProducts": {
            "type": "boolean"
          },
          "reportDetailType": {
            "type": "integer",
            "format": "int32",
            "enum": [
              1,
              2,
              3
            ]
          },
          "reportFamily": {
            "type": "boolean"
          },
          "reportFamilyDate": {
            "type": "string",
            "format": "date-time"
          },
          "reportFamilyExpiryDate": {
            "type": "string",
            "format": "date-time"
          },
          "reportFamilyExpired": {
            "type": "boolean"
          },
          "lastSentConsultingReportId": {
            "type": "string",
            "format": "uuid"
          },
          "lastSentConsultingReportTimestamp": {
            "type": "string",
            "format": "date-time"
          },
          "lastSentProductiaReportId": {
            "type": "string",
            "format": "uuid"
          },
          "lastSentProductiaReportTimestamp": {
            "type": "string",
            "format": "date-time"
          },
          "lastProductiaReportAccessDate": {
            "type": "string",
            "format": "date-time"
          },
          "lastActivityDate": {
            "type": "string",
            "description": "When the last activity was recorded on the customer",
            "format": "date-time",
            "example": "2024-06-01T08:30:00Z"
          },
          "lastActivityBy": {
            "type": "string",
            "format": "uuid"
          },
          "lastMeetingDate": {
            "type": "string",
            "description": "Date of the last meeting with the customer",
            "format": "date",
            "example": "2024-05-20"
          },
          "monthlyRevenue": {
            "type": "number",
            "description": "Monthly revenue from the customer, only returned to users with the customers fees permission",
            "example": 350
          },
          "appMailAddress": {
            "type": "string",
            "description": "The customer's dedicated Surense mailbox address (mail sent there is attached to the customer)"
          },
          "tromStats": {
            "$ref": "#/components/schemas/TromStats"
          },
          "productiaStats": {
            "$ref": "#/components/schemas/ProductiaStats"
          },
          "customerServiceEnabled": {
            "type": "boolean"
          },
          "customerServiceRecurrence": {
            "type": "integer",
            "format": "int32",
            "enum": [
              1,
              2,
              3,
              4
            ]
          },
          "customerServiceSms": {
            "type": "boolean"
          },
          "customerServiceEmail": {
            "type": "boolean"
          },
          "tags": {
            "type": "array",
            "description": "IDs of the tags assigned to the customer",
            "items": {
              "type": "string",
              "description": "IDs of the tags assigned to the customer",
              "format": "uuid"
            }
          },
          "surenseOneActive": {
            "type": "boolean",
            "description": "Whether the customer's SurenseOne service is active (identity fields are then locked)",
            "example": false
          }
        },
        "description": "A customer. Fields of the create/update requests are returned under the same names, except the phoneNumber1-3 of the create request (returned as cellNumber, phoneNumber, phoneNumber2 and phoneNumber3) and email1/email2 (returned as email/otherEmail)."
      },
      "EmploymentStatus": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "The value's code",
            "format": "int32",
            "enum": [
              1,
              2,
              3,
              4,
              5,
              6,
              7
            ]
          },
          "description": {
            "type": "string",
            "description": "The value's display name (Hebrew)"
          }
        },
        "description": "Employment Status:<br/>1 - שכיר/ה<br/>2 - עצמאי/ת<br/>3 - שכיר/ה ועצמאי/ת<br/>4 - שכיר/ה בעל/ת שליטה<br/>5 - לא מועסק/ת<br/>6 - שכיר/ה בעל/ת שליטה ועצמאי/ת<br/>7 - פנסיונר/ית"
      },
      "Gender": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "The value's code",
            "format": "int32",
            "enum": [
              1,
              2,
              3
            ]
          },
          "description": {
            "type": "string",
            "description": "The value's display name (Hebrew)"
          }
        },
        "description": "Gender:<br/>1 - לא מוגדר<br/>2 - זכר<br/>3 - נקבה"
      },
      "KupatHolim": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "The value's code",
            "format": "int32",
            "enum": [
              1,
              2,
              3,
              4,
              5
            ]
          },
          "description": {
            "type": "string",
            "description": "The value's display name (Hebrew)"
          }
        },
        "description": "Kupat Holim:<br/>1 - כללית<br/>2 - מכבי<br/>3 - מאוחדת<br/>4 - לאומית<br/>5 - צה\"לית"
      },
      "KupatHolimComplementary": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "The value's code",
            "format": "int32",
            "enum": [
              10,
              11,
              20,
              21,
              22,
              30,
              31,
              40,
              41
            ]
          },
          "description": {
            "type": "string",
            "description": "The value's display name (Hebrew)"
          }
        },
        "description": "Kupat Holim Complementary:<br/>10 - כללית מושלם זהב<br/>11 - כללית פלטינום<br/>20 - מכבי שלי<br/>21 - מכבי כסף<br/>22 - מכבי זהב<br/>30 - מאוחדת עדיף<br/>31 - מאוחדת שיא<br/>40 - לאומית כסף<br/>41 - לאומית זהב"
      },
      "MailingStatus": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "The value's code",
            "format": "int32",
            "enum": [
              1,
              2,
              3,
              4
            ]
          },
          "description": {
            "type": "string",
            "description": "The value's display name (Hebrew)"
          }
        },
        "description": "Mailing Status:<br/>1 - אושר דיוור<br/>2 - לא אושר דיוור<br/>3 - הוסר מדיוור<br/>4 - לא התבקש אישור"
      },
      "MaritalStatus": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "The value's code",
            "format": "int32",
            "enum": [
              1,
              2,
              3,
              4,
              5
            ]
          },
          "description": {
            "type": "string",
            "description": "The value's display name (Hebrew)"
          }
        },
        "description": "Marital Status:<br/>1 - רווק/ה<br/>2 - נשוי/אה<br/>3 - גרוש/ה<br/>4 - אלמן/ה<br/>5 - ידוע/ה בציבור"
      },
      "ProductiaStats": {
        "type": "object",
        "properties": {
          "statsValidityMonth": {
            "type": "string"
          },
          "statsDate": {
            "type": "string",
            "format": "date-time"
          },
          "statsTzvira": {
            "type": "number"
          },
          "statsTzviraHon": {
            "type": "number"
          },
          "statsTzviraKitzba": {
            "type": "number"
          },
          "statsTzviraPitsuim": {
            "type": "number"
          },
          "statsTzviraPensia": {
            "type": "number"
          },
          "statsTzviraPensiaVatika": {
            "type": "number"
          },
          "statsTzviraMenaalim": {
            "type": "number"
          },
          "statsTzviraHishtalmut": {
            "type": "number"
          },
          "statsTzviraGemelLeashkaa": {
            "type": "number"
          },
          "statsTzviraGemel": {
            "type": "number"
          },
          "statsTzviraGemel190": {
            "type": "number"
          },
          "statsTzviraHisahonFinansi": {
            "type": "number"
          },
          "statsTzviraAlternativiim": {
            "type": "number"
          },
          "statsTzviraNihulTikim": {
            "type": "number"
          },
          "statsTzviraNezila": {
            "type": "number"
          },
          "statsHafkadot": {
            "type": "number"
          },
          "statsHafkadotHishtalmut": {
            "type": "number"
          },
          "statsHafkadotGemelLeashkaa": {
            "type": "number"
          },
          "statsDmeiNihulHazuim": {
            "type": "number"
          },
          "statsRevahimMithilatShana": {
            "type": "number",
            "deprecated": true
          },
          "statsAvgNetReturnPercentStartYear": {
            "type": "number"
          },
          "statsKitzbaHazuyaKolelHafkadot": {
            "type": "number"
          },
          "statsKitzbaHazuyaLeloHafkadot": {
            "type": "number"
          },
          "statsKayamHalvaot": {
            "type": "boolean"
          },
          "statsKayamIkulimShiabudim": {
            "type": "boolean"
          },
          "statsPremia": {
            "type": "number"
          },
          "statsKayamHaim": {
            "type": "boolean"
          },
          "statsPremiaHaim": {
            "type": "number"
          },
          "statsKayamHaimMashkanta": {
            "type": "boolean"
          },
          "statsPremiaHaimMashkanta": {
            "type": "number"
          },
          "statsKayamBriut": {
            "type": "boolean"
          },
          "statsPremiaBriut": {
            "type": "number"
          },
          "statsKayamMahalotKashot": {
            "type": "boolean"
          },
          "statsPremiaMahalotKashot": {
            "type": "number"
          },
          "statsKayamTeunotIshiot": {
            "type": "boolean"
          },
          "statsPremiaTeunotIshiot": {
            "type": "number"
          },
          "statsKayamSiudi": {
            "type": "boolean"
          },
          "statsPremiaSiudi": {
            "type": "number"
          },
          "statsKayamSiudiKupah": {
            "type": "boolean"
          },
          "statsKayamAka": {
            "type": "boolean"
          },
          "statsKayamNehutMiteuna": {
            "type": "boolean"
          },
          "statsKitzbaNehut": {
            "type": "number"
          },
          "statsKitzbaLealman": {
            "type": "number"
          },
          "statsKitzbaLeyetom": {
            "type": "number"
          },
          "statsKisuiHadPaamiSheerim": {
            "type": "number"
          }
        }
      },
      "RelatedCustomerValue": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "format": "uuid"
          },
          "relatedCustomerId": {
            "type": "string",
            "format": "uuid"
          },
          "idType": {
            "$ref": "#/components/schemas/CustomerIdentityType"
          },
          "idNumber": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "gender": {
            "$ref": "#/components/schemas/Gender"
          },
          "birthDate": {
            "type": "string",
            "format": "date"
          },
          "birthDateYearOnly": {
            "type": "boolean"
          },
          "age": {
            "type": "string"
          },
          "death": {
            "type": "boolean"
          },
          "cellNumber": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "relationshipType": {
            "$ref": "#/components/schemas/CustomerRelationshipType"
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "SmartDialogFieldValue": {
        "type": "object",
        "properties": {
          "fieldId": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "integer",
            "format": "int32"
          },
          "value": {
            "type": "object"
          }
        }
      },
      "TaxResidency": {
        "type": "object",
        "properties": {
          "country": {
            "type": "string"
          },
          "taxIdNumber": {
            "type": "string"
          }
        }
      },
      "TromStats": {
        "type": "object",
        "properties": {
          "validityMonth": {
            "type": "string"
          },
          "calculatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "tzvira": {
            "type": "number"
          },
          "tzviraHon": {
            "type": "number"
          },
          "tzviraKitzba": {
            "type": "number"
          },
          "tzviraPitsuim": {
            "type": "number"
          },
          "tzviraPensia": {
            "type": "number"
          },
          "tzviraPensiaVatika": {
            "type": "number"
          },
          "tzviraMenaalim": {
            "type": "number"
          },
          "tzviraHishtalmut": {
            "type": "number"
          },
          "tzviraGemelLeashkaa": {
            "type": "number"
          },
          "tzviraGemel": {
            "type": "number"
          },
          "tzviraGemel190": {
            "type": "number"
          },
          "tzviraHisahonFinansi": {
            "type": "number"
          },
          "tzviraAlternativiim": {
            "type": "number"
          },
          "tzviraNihulTikim": {
            "type": "number"
          },
          "tzviraNezila": {
            "type": "number"
          },
          "hafkadot": {
            "type": "number"
          },
          "hafkadotHishtalmut": {
            "type": "number"
          },
          "hafkadotGemelLeashkaa": {
            "type": "number"
          },
          "dmeiNihulHazuim": {
            "type": "number"
          },
          "revahimMithilatShana": {
            "type": "number",
            "deprecated": true
          },
          "avgNetReturnPercentStartYear": {
            "type": "number"
          },
          "kitzbaHazuyaKolelHafkadot": {
            "type": "number"
          },
          "kitzbaHazuyaLeloHafkadot": {
            "type": "number"
          },
          "kayamHalvaot": {
            "type": "boolean"
          },
          "kayamIkulimShiabudim": {
            "type": "boolean"
          },
          "premia": {
            "type": "number"
          },
          "kayamHaim": {
            "type": "boolean"
          },
          "premiaHaim": {
            "type": "number"
          },
          "kayamHaimMashkanta": {
            "type": "boolean"
          },
          "premiaHaimMashkanta": {
            "type": "number"
          },
          "kayamBriut": {
            "type": "boolean"
          },
          "premiaBriut": {
            "type": "number"
          },
          "kayamMahalotKashot": {
            "type": "boolean"
          },
          "premiaMahalotKashot": {
            "type": "number"
          },
          "kayamTeunotIshiot": {
            "type": "boolean"
          },
          "premiaTeunotIshiot": {
            "type": "number"
          },
          "kayamSiudi": {
            "type": "boolean"
          },
          "premiaSiudi": {
            "type": "number"
          },
          "kayamSiudiKupah": {
            "type": "boolean"
          },
          "kayamAka": {
            "type": "boolean"
          },
          "kayamNehutMiteuna": {
            "type": "boolean"
          },
          "kitzbaNehut": {
            "type": "number"
          },
          "kitzbaLealman": {
            "type": "number"
          },
          "kitzbaLeyetom": {
            "type": "number"
          },
          "kisuiHadPaamiSheerim": {
            "type": "number"
          }
        }
      },
      "FilterDefinition": {
        "required": [
          "field",
          "operator"
        ],
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "Field name to filter by. Available fields can be fetched using GET /{entity}/fields (e.g., /meetings/fields, /workflows/fields, /leads/fields). The field name is shown under `fieldName`",
            "example": "status"
          },
          "value": {
            "type": "object",
            "description": "Filter value. Can be a string or an array of values.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "operator": {
            "type": "string",
            "description": "Filter operator",
            "example": "equals",
            "enum": [
              "inRange",
              "notInRange",
              "greaterThan",
              "lessThan",
              "equals",
              "isAnyOf",
              "isNoneOf",
              "notEquals",
              "isEmpty",
              "greaterThanOrEqual"
            ]
          },
          "list": {
            "type": "boolean"
          }
        },
        "description": "Filter definition for search criteria"
      },
      "PaginatedOrCursorSearchRequest": {
        "type": "object",
        "properties": {
          "sorts": {
            "type": "array",
            "description": "List of sort definitions for search results",
            "items": {
              "$ref": "#/components/schemas/SortDefinition"
            }
          },
          "filtersOperator": {
            "type": "string",
            "description": "Operator to combine multiple filters (defaults to 'and' if not specified)",
            "example": "and",
            "enum": [
              "and",
              "or"
            ]
          },
          "filters": {
            "type": "array",
            "description": "List of filter definitions for search criteria",
            "items": {
              "$ref": "#/components/schemas/FilterDefinition"
            }
          },
          "startRow": {
            "minimum": 0,
            "type": "integer",
            "description": "Offset pagination: starting row index (0-based), at most 10000; use cursor pagination to read further (defaults to 0 if not specified)",
            "format": "int32",
            "example": 0
          },
          "endRow": {
            "type": "integer",
            "description": "Offset pagination: ending row index (exclusive). The page size (endRow - startRow) must be less than or equal to 100. (defaults to 50 if not specified)",
            "format": "int32",
            "example": 50
          },
          "cursor": {
            "type": "string",
            "description": "Cursor pagination: opaque cursor identifying the position after which results should be returned. Obtain it from 'nextCursor' of the previous response. Omit or leave null to fetch the first page. The cursor is only valid together with the same sort definitions used to produce it.",
            "example": "WyIyMDI0LTAxLTAxVDAwOjAwOjAwWiIsIjAxOTAtLi4uIl0"
          },
          "pageSize": {
            "maximum": 100,
            "minimum": 1,
            "type": "integer",
            "description": "Cursor pagination: maximum number of rows to return (defaults to 50 if not specified). Providing this field (or 'cursor') switches the request to cursor-based pagination.",
            "format": "int32",
            "example": 50
          }
        },
        "description": "Request for search operations supporting both offset-based (startRow/endRow) and cursor-based (cursor/pageSize) pagination. Cursor-based pagination is used when 'cursor' or 'pageSize' is provided; otherwise offset-based pagination is used."
      },
      "SortDefinition": {
        "required": [
          "field"
        ],
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "Field name to sort by. Available fields can be fetched using GET /{entity}/fields (e.g., /meetings/fields, /workflows/fields, /leads/fields). The field name is shown under `fieldName`",
            "example": "name"
          },
          "dir": {
            "type": "string",
            "description": "Sort direction: 'asc' for ascending order, 'desc' for descending order (defaults to 'asc' if not specified)",
            "example": "asc",
            "enum": [
              "asc",
              "desc"
            ]
          }
        },
        "description": "Sort definition for search results"
      },
      "CursorSearchResponseCustomerValue": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerValue"
            }
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "nextCursor": {
            "type": "string"
          },
          "totalElements": {
            "type": "integer",
            "format": "int64"
          }
        }
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth2 client credentials. Tokens are issued by the Surense authorization server and presented as `Authorization: Bearer <token>`.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://api.surense.com/oauth/token",
            "scopes": {
              "customers:read": "Read customers, customer birthdays and the customer statuses, classes and sources",
              "customers:create": "Create customers",
              "customers:update": "Update customers",
              "customers:delete": "Delete customers",
              "global:export": "Export customers and download the exports"
            }
          }
        }
      }
    }
  }
}
```