Search received documents using JSON

Retrieves list of documents for the user using JSON

POST /documents/search

Arguments

Name (bold if mandatory) Type Comments Default
IsCriteria boolean
CriteriaName string Options:

  • “documentid”
  • “status”
  • “receivetime”
  • “remotecsid”
  • “callerid”
  • “messagetype”
  • “messageid”
  • “labelname”
  • “labelreference”
  • “contactname”
  • “emailaddress”
  • “docname”
  • “docstatus”

A ‘Customized property’ name may be used here also.

Verb Options:

  • Equals
  • GreaterThan
  • GreaterOrEqual
  • LessThan
  • LessOrEqual
  • [Like]
  • IncludedIn
  • Between
  • NotEquals
  • Missing
  • Exists
Data Options:

  • Data String
IsProperty boolean Options:

  • True
  • False

If using a ‘Customized property’ name for the CriteriaName, the IsProperty should be equal to ‘true’.

false
Operator Options:

  • AND
  • OR
ExpressionList Here you should list all the expressions if included
MaxNumerOfRecords integer 100
FirstRecordZeroBased integer 0
OrderBy string Options:

  • DocumentID
  • TransactionID
  • ShareTime
DocumentID
AscOrderDirection boolean true
ReturnItems boolean true
ReturnStats boolean true
AccessLevel string Options:

  • Any
  • Owner
  • SharedWith
Any
UserList string any
ExternalDocumentType string Options:

  • Inbound
  • Upload
  • InboundEmail
  • InternalUpload
(All)

Response

If successful, a structure listing contacts is returned, containing the following properties:

Property Type Description

Sample Calls


POST /documents/search HTTP/1.1
Host: rest.interfax.net
Authorization:
Bearer - generated from accounts/token method.

Sample response (prettified for display here)

{
"QueryExpression":{ 
    "IsCriteria": "true", 
    "Criteria": {"CriteriaName":"Criteria Name", 
             "Verb":"Equals", 
                 "Data":"Data String", 
                 "IsProperty":"false"}, 
        "Operator":"AND", 
        "ExpressionList":[] 
}, 
"QueryControl":{
    "MaxNumerOfRecords":"100",
    "FirstRecordZeroBased":"0",
    "OrderBy":"DocumentID",
    "AscOrderDirection":"true",
    "ReturnItems":"true",
    "ReturnStats":"true",
    "AccessLevel":"Any",
    "UserList":"",
    "ExternalDocumentType":"",} 
},
{"QueryExpression":{ 
    "IsCriteria": "false",
    "Criteria": {"CriteriaName":"Criteria Name", 
                 "Verb":"Equals", 
                 "Data":"Data String", 
                 "IsProperty":"false"},     
    "Operator":"AND",
"ExpressionList": [ 
    "QueryExpression":{ 
    "IsCriteria": "true", 
    "Criteria": {"CriteriaName":"Criteria Name", 
                     "Verb":"Equals", 
                     "Data":"Data String", 
                     "IsProperty":"false"},
    "Operator":"AND",
"ExpressionList": []}, 
    "QueryExpression":{"IsCriteria": "true", 
        "Criteria": {"CriteriaName":"Criteria Name", 
    "Verb":"Equals", 
        "Data":"Data String", 
        "IsProperty":"false"}, 
        Operator":"AND", 
        "ExpressionList": []} 
] 
}, 
"QueryControl":{"MaxNumerOfRecords":"100",
    "FirstRecordZeroBased":"0",
    "OrderBy":"DocumentID",
    "AscOrderDirection":"true",
    "ReturnItems":"true",
    "ReturnStats":"true",
    "AccessLevel":"Any",
    "UserList":"",
    "ExternalDocumentType":"", 
  } 
}