search_customer_nested_filters


POST /search_customer_nested_filters

The call can be used for complex search in customer fields using the logical operator provided by the user.

To get the TOTAL COUNT of list of customers for the search criteria.

Use this method with only_counted = 'Y' FIRST to determine how many total records there are for the given criteria.

After you call this method with only_counted = 'Y', then call again this method with only_counted = 'N', and pass the required paging parameters.

Bellow there are some examples.

Get all active customers, not flagged as export, belong to categories code 1 'JEW','KIOSK','PHO' and customer name containing the word 'JEWELLERY' ordered by customer name.

SQL: WHERE Active=1 AND Export=0 and CategoryCode1 IN ('JEW','KIOSK','PHO') and CustomerName Like '%JEWELLERY%'


Get all active customers, not flagged as export, belong to categories code 1 'JEW','KIOSK','PHO' and customer name containing the word 'JEWELLERY' ordered by customer name.

SQL: WHERE Active=1 AND Export=0 and CategoryCode1 IN ('JEW','KIOSK','PHO') and CustomerName Like '%JEWELLERY%'

field type description
api_credentials
token string Credentials provided by Powersoft that allow access to the API
search_options
only_counted string 'Y' = brings only the total of customers found based on user search criteria. 'N' = brings the list of the customers found based on user search criteria
display_b2b_fields boolean Indicates if the customer b2b fields are displayed.
page_number integer The page number in the entire list. eg Page 1.
page_size integer The number of rows to return. eg 10 rows
filters
field_name string The field name the search criteria is applied. Required. Allowed values are:
  • CustomerCode - 365 customer code.
  • CustomerName - customer name.
  • ContactName - contact name.
  • ShortName - short name.
  • StoreCode - store code.
  • Tel1 - phone number 1.
  • Tel2 - phone number 2.
  • Fax - fax number.
  • SMS - mobile number.
  • Email - email address.
  • WebSite - website url.
  • CustomerID - customer id.
  • VatRegistrationNo - VAT registration number
  • DetailAccountNo - 365 customer account code.
  • Address1 - address 1.
  • Address2 - address 2.
  • Address3 - address 3.
  • PostalCode - postal code.
  • Town - town.
  • CountryISOCode - country 3 characthers ISO code.
  • Category1Code - category 1 code.
  • Category2Code - category 2 code.
  • Category3Code - category 3 code.
  • Occupation - occupation.
  • NationalityISOCode - nationality country 3 characthers ISO code.
  • AgentCode - agent code.
  • CurrencyISOCode - currency ISO code.
  • PaymentTermCode - payment terms code.
  • DefaultPOSReport - default pos report.
  • DefaultPaymentTypeCode - default payment type code.
  • ImportedCode - customer imported code.
  • Gender - customer gender. Allowed values 'Female', 'Male', 'Other'.
  • Remarks - additional information.
  • DefaultPrice - customer default price.
  • MunicipalityCode - municipality code.
  • TaxOffice - tax office.
  • GeneralLedger - general ledger header.
  • DetailAccountHeader - detail account header.
  • OpeningBalance - opening balance.
  • Balance - customer balance.
  • PointsBalance - customer points balance.
  • LoyaltyFactor - customer loyalty factor.
  • AllowedCredit - credit limit.
  • DayLimit - day limit.
  • DayLimitAmount - day limit amount.
  • DiscountLimit - discount limit.
  • Age - customer age.
  • DateOfBirth - customer date of birth.
  • CreationDate - customer creation date UTC.
  • LastModifiedDate - customer last modified date UTC.
  • LastTransactionDate - last transaction date UTC.
  • LastTransactionAmount - last transaction amount.
  • LastPaymentDate - last payment date UTC.
  • LastPaymentAmount - last payment amount.
  • NextPaymentDate - next payment date.
  • ExpiredDate - expired payment date.
  • RegistrationDate - member registration date.
  • TextVal1 - customer extra text field 1.
  • TextVal2 - customer extra text field 2.
  • TextVal3 - customer extra text field 3.
  • TextVal4 - customer extra text field 4.
  • TextVal5 - customer extra text field 5.
  • NumVal1 - customer extra numeric field 1.
  • NumVal2 - customer extra numeric field 2.
  • NumVal3 - customer extra numeric field 3.
  • NumVal4 - customer extra numeric field 4.
  • NumVal5 - customer extra numeric field 5.
  • DateVal1 - customer extra date field 1.
  • DateVal2 - customer extra date field 2.
  • DateVal3 - customer extra date field 3.
  • DateVal4 - customer extra date field 4.
  • DateVal5 - customer extra date field 5.
  • IsEU - EUC flag. Customer belong to a country member of EU.
  • IsExport - Export flag. Customer to a country different the local one.
  • IsActive - Active flag.
  • IsInKap - Is in KAP flag.
  • IsInNegative - Is in negative flag.
  • IsSummarizedAccount - Is summarized account flag. POS transactions are imported as summarized at the end of the day/shift when close day is performed.
  • IsCash - is Cash customer flag.
  • IsLoyalty - is loyalty customer flag. POS transactions are imported as summarized in one loyalty customer account at the end of the day/shift when close day is performed.
  • IsVIP - flag for VIP customer.
  • IsB2B - flag for B2B customer.
  • IsLaw11E - flag for law 11E customer.
  • IsMainAccount - flag for main account customer.
  • IsOverLimit - flag for over limit. The customer balance is over the credit limit amount.
  • SMSOptIn - SMS opt in. Customer agreed to receive notifications via SMS.
  • EmailOptIn - Email opt in. Customer agreed to receive notifications via email.
search_operator string Search operator type. Required. Allowed values are:
  • StartsWith
  • Contains
  • NotContains
  • Equals
  • NotEquals
  • EndsWith
  • IsEmpty
  • IsNotEmpty
  • InList
  • NotInList
  • IsLess
  • IsLessOrEqual
  • IsGreater
  • IsGreaterOrEqual
field_value string Expression searched. Required. Minimum 3 characters needs to be provided for fields type string.
logical_operator string Logical operator for nested filters or combined criteria. Allowed values AND, OR. Required. For the last level of the filters the logical operator even is provided is ignored.
sorting
field_name string The field name the sorting is applied. Optional. If the value is not provided the default sorting is by creation date ascending, customer code ascending. Allowed values are:
  • CustomerCode - 365 customer code.
  • CustomerName - customer name.
  • ContactName - contact name.
  • ShortName - short name.
  • StoreCode - store code.
  • Tel1 - phone number 1.
  • Tel2 - phone number 2.
  • Fax - fax number.
  • SMS - mobile number.
  • Email - email address.
  • WebSite - website url.
  • CustomerID - customer id.
  • VatRegistrationNo - VAT registration number
  • DetailAccountNo - 365 customer account code.
  • Address1 - address 1.
  • Address2 - address 2.
  • Address3 - address 3.
  • PostalCode - postal code.
  • Town - town.
  • CountryISOCode - country 3 characthers ISO code.
  • Category1Code - category 1 code.
  • Category2Code - category 2 code.
  • Category3Code - category 3 code.
  • Occupation - occupation.
  • NationalityISOCode - nationality country 3 characthers ISO code.
  • AgentCode - agent code.
  • CurrencyISOCode - currency ISO code.
  • PaymentTermCode - payment terms code.
  • DefaultPOSReport - default pos report.
  • DefaultPaymentTypeCode - default payment type code.
  • ImportedCode - customer imported code.
  • Gender - customer gender. Allowed values 'Female', 'Male', 'Other'.
  • Remarks - additional information.
  • DefaultPrice - customer default price.
  • MunicipalityCode - municipality code.
  • TaxOffice - tax office.
  • GeneralLedger - general ledger header.
  • DetailAccountHeader - detail account header.
  • OpeningBalance - opening balance.
  • Balance - customer balance.
  • PointsBalance - customer points balance.
  • LoyaltyFactor - customer loyalty factor.
  • AllowedCredit - credit limit.
  • DayLimit - day limit.
  • DayLimitAmount - day limit amount.
  • DiscountLimit - discount limit.
  • Age - customer age.
  • DateOfBirth - customer date of birth.
  • CreationDate - customer creation date UTC.
  • LastModifiedDate - customer last modified date UTC.
  • LastTransactionDate - last transaction date UTC.
  • LastTransactionAmount - last transaction amount.
  • LastPaymentDate - last payment date UTC.
  • LastPaymentAmount - last payment amount.
  • NextPaymentDate - next payment date.
  • ExpiredDate - expired payment date.
  • RegistrationDate - member registration date.
  • TextVal1 - customer extra text field 1.
  • TextVal2 - customer extra text field 2.
  • TextVal3 - customer extra text field 3.
  • TextVal4 - customer extra text field 4.
  • TextVal5 - customer extra text field 5.
  • NumVal1 - customer extra numeric field 1.
  • NumVal2 - customer extra numeric field 2.
  • NumVal3 - customer extra numeric field 3.
  • NumVal4 - customer extra numeric field 4.
  • NumVal5 - customer extra numeric field 5.
  • DateVal1 - customer extra date field 1.
  • DateVal2 - customer extra date field 2.
  • DateVal3 - customer extra date field 3.
  • DateVal4 - customer extra date field 4.
  • DateVal5 - customer extra date field 5.
  • IsEU - EUC flag. Customer belong to a country member of EU.
  • IsExport - Export flag. Customer to a country different the local one.
  • IsActive - Active flag.
  • IsInKap - Is in KAP flag.
  • IsInNegative - Is in negative flag.
  • IsSummarizedAccount - Is summarized account flag. POS transactions are imported as summarized at the end of the day/shift when close day is performed.
  • IsCash - is Cash customer flag.
  • IsLoyalty - is loyalty customer flag. POS transactions are imported as summarized in one loyalty customer account at the end of the day/shift when close day is performed.
  • IsVIP - flag for VIP customer.
  • IsB2B - flag for B2B customer.
  • IsLaw11E - flag for law 11E customer.
  • IsMainAccount - flag for main account customer.
  • IsOverLimit - flag for over limit. The customer balance is over the credit limit amount.
  • SMSOptIn - SMS opt in. Customer agreed to receive notifications via SMS.
  • EmailOptIn - Email opt in. Customer agreed to receive notifications via email.
sorting_direction string The direction the sorting is applied. Required. Allowed values are ascending and descending.

More examples bellow.

Get all customers with exta text field 1 not empty and date of birth between 01/01/1970 and 31/12/1980 and balance between 100 and 1000 ordered by balance, birth of date and customer name.

SQL: WHERE ISNULL(TextVal1,'') <> '' AND convert(date,DOB) BETWEEN CONVERT(date, '1970-01-01') and CONVERT(date, '1980-12-31') AND ISNULL(Balance,0) Between 100 And 1000 ORDER BY Balance asc,DOB asc, CustomerName asc


Get all customers with general ledger containing the code '41192' and detail account header containing the code '1222' ordered by general ledger and customer name

SQL: WHERE GeneralLedger Like '%41192%' and DetailAccountHeader Like '%1222%'