Search All Entities (Index Module)

The Does_Entity_Exist_json function allows you to search across ALL Hyper entities: Clients, Suppliers, Projects, and Users (Employees).
This search includes Contact Persons tables and scans all three storage spaces (Current, Archive, and Deleted).
Because this function provides access to sensitive data, the 'Direct Access API into Hyper' permission must be enabled in the 'Website Features' settings.

NOTE:
Unlike our other API functions, this function returns textual values for status fields instead of numeric IDs.
For example, the "Agency" parameter returns the branch name instead of its number, and the "HandlingStatus" parameter returns the status name instead of its numeric value.

Function Input

{
  "phone":"400-0976",
  "Email":"person@company1.co.il"
}
Field Description
Email A single email address to search for.
Phone
Phone2
Phone3
Search for up to three phone numbers in a single API call.
Phone numbers are compared from the rightmost digit to the left, filtering out any non-numeric characters.
IdNumber
IdNumber2
Search for up to two ID numbers in a single API call.
ID_Number_Type
ID_Number_Type2
These fields allow you to filter the search by a specific document type:
  1. Value zero OR omitting this field = Search all document types; match strictly by "IdNumber".
  2. National ID
  3. National Passport
  4. Travel ID (Certificate)
  5. ICA ID (Certificate)
  6. Corporation ID
  7. Fellowship
  8. Foreign Company Registered Locally
    • For ID_Number_Type, this represents "Self-Employed (National ID)".
    • For ID_Number_Type2, this represents "Driving License".
Deleted A boolean input field. Specifies whether to include deleted records in the search results.

Function Output

Here is an example of a response to the request illustrated above:
{
  "ResponseCode":0,
  "Clients":[
    {
      "EntityNumber":500000,
      "FullName":"Sample Company",
      "Email":"yaniv@yaniv.co.il",
      "1stPhone":"052-400-0000",
      "2ndPhone":"",
      "3rdPhone":"09",
      "Country":"Israel",
      "MatchBy":"Phone",
      "Gender":"Private Company",
      "Business":"Yes",
      "Agency":"H.Q.",
      "HandlingStatus":"Approved (no activity yet)",
      "Role":"None"
    }
  ],
  "Users":[
    {
      "EntityNumber":120000000,
      "FullName":"Alonit Ronen",
      "Email":"",
      "1stPhone":"052-400-0000",
      "2ndPhone":"",
      "3rdPhone":"",
      "Country":"",
      "MatchBy":"Phone",
      "Gender":"Female",
      "Agency":"H.Q.",
      "Role":"Hyper User"
    }
  ],
  "Clients_Contacts":[
    {
      "EntityNumber":500050,
      "FullName":"Contact Person Name
Company Name", "Email":"person@company1.co.il", "1stPhone":"054-123-4567", "2ndPhone":"08-123-4567", "3rdPhone":"", "Country":"", "MatchBy":"Email", "Gender":"Male", "Business":"Yes", "Agency":"H.Q.", "HandlingStatus":"Real Active Account", "Role":"None" }, { "EntityNumber":500532, "FullName":"Shimon Kohen
Bullet Tech", "Email":"person@company1.co.il", "1stPhone":"054-123-4567", "2ndPhone":"08-123-4567", "3rdPhone":"", "Country":"", "MatchBy":"Email", "Gender":"Unknown", "Business":"No", "Agency":"H.Q.", "HandlingStatus":"Approved (no activity yet)", "Role":"Borrower & Debtor" } ], "Deleted":{ "Clients":[ { "EntityNumber":500435, "FullName":"Test client 33", "Email":"", "1stPhone":"052-400-0000", "2ndPhone":"", "3rdPhone":"", "Country":"", "MatchBy":"Phone", "Gender":"Unknown", "Business":"No", "Agency":"H.Q.", "HandlingStatus":"Approved (no activity yet)", "Role":"None" } ] } }
If the search yields an empty list, the "ResponseCode" will be 2. The message format corresponds to standard error codes:
{
  "ResponseCode":2,
  "ResponseMsgEng":"No Results \/ Data"
}

Response Tree Structure

Every entity type is returned as an array object with a predefined name: Clients, Suppliers, Projects, or Users.
Three of the entities listed above contain a sub-table for contact persons. Each of these sub-tables has its own array object: Clients_Contacts, Suppliers_Contacts, and Projects_Contacts.

Hyper maintains three storage spaces for each table: Normal (current data), Archive, and Deleted.
Entities stored in the "Normal" space are placed at the JSON root.
Archive and Deleted records are nested under their respective object levels from the root, followed by an object for each entity type as described above.

Fields Included in Every Entity Object:

Field Description
EntityNumber The unique account number assigned by Hyper.
FullName The account name (derived from combined fields, including the title).
For contact persons, this field contains the contact's full name, followed by an HTML <br> tag, and then the entity's full name.
Email The email address associated with the entity or contact.
1st Phone
2nd Phone
3rd Phone
The three phone number fields associated with the entity or contact.
Country The country field associated with the entity or contact.
Match By Indicates the parameter that triggered the match. It can be one of three values: 'ID number', 'Email', or 'Phone'. This sequence also reflects the order of the matching loops.
Gender The gender field for an entity or contact. It can have one of five values: 'Unknown', 'Male', 'Female', 'Private Company', or 'Public Company'.
* A contact person can have a 6th value: 'Branch / Office / Site', which is specific to contact tables.
* User records are restricted to the values 'Male' or 'Female'.
Business Indicates the business classification. It can be one of three values: 'No' (private individual or unknown status), 'Yes' (company or self-employed), or 'Fellowship'.
Additional categories, such as public institutions, may be added in the future based on legal requirements.
Agency The agency assigned to the (parent) entity. Contact records do not contain this field.
Handling Status The status of the (parent) entity. Contact records do not contain this field.
This field exists only in the Clients and Suppliers tables. The possible values are:
  1. New
  2. Follow up
  3. Supplier: "Did NOT Pass Qualification"
    Client: "Follow up + Meeting / P.Offer"
  4. Supplier: "Not Interested in working with us"
    Client: "Client Not Interested"
  5. Approved (no activity yet)
  6. Real Active Account
  7. InActive / Suspended
Role The designated role of the (parent) entity. Contact records do not contain this field. Each entity type utilizes a distinct list of values!

Values for the Users table:
  1. Hyper User
  2. Person, Not using Hyper
  3. Calendar Resource
  4. Warehouse User
  5. Point of Sale User
  6. Former User / Employee

Values for the Suppliers table:
  1. Unclassified
  2. Middleman (Affiliate / Marketer)
  3. For P.O. module (Purchase Order)
  4. LP / Broker

Values for the Clients table ("Role for Loan Module" field):
  1. None
  2. Borrower
  3. Debtor
  4. Borrower & Debtor
  5. Investor