NAV

getCustomers

POST /v2/customer/list

The following endpoint allows the developer to access SimplePin’s API in order to obtain list of all customers associated with the current company. This call allows you to search for customers by specific patterns, filter using date ranges and even sort them in ascending or descending order by specific parameter. This call comes in handy especially in situations when you want to list all your customers in one table and reflect their outstanding balance.

Parameters
Name
Description
customerListFilterModel (required)

This is the data that is required to return a list of customers associated with the company.

Response Messages
Code
Description
200
OK
201
Created
401
Unauthorized
403
Forbidden
404
Not Found
             {
    "date_from": "yyyy-MM-dd'T'HH:mm:ss.SSSXXX",
    "date_to": "yyyy-MM-dd'T'HH:mm:ss.SSSXXX",
    "search": "string",
    "sort": "CUSTOMER_ID",
    "ascending": true,
    "first": 0,
    "count": 0,
    "filter_type": "NONE"
}
             
          
{ } CustomerListFilterApiV2Model
date_from (optional) string
date_to (optional) string
search (optional) string
sort (optional) string
ascending (optional) boolean
first (optional) integer
count (optional) integer
filter_type (optional) string
             {
    "customer_models": [
        {
            "account_holder": "string",
            "customer_id": "string",
            "customer_since": "yyyy-MM-dd'T'HH:mm:ss.SSSXXX",
            "email": "string",
            "has_invoice": true,
            "id": 0,
            "imported_on": "yyyy-MM-dd'T'HH:mm:ss.SSSXXX",
            "outstanding_models": [
                {
                    "amount": 1.01,
                    "cc_id": 0,
                    "currency_code": "AED"
                }
            ],
            "phone": "string",
            "status": "string"
        }
    ]
}
             
          
{ } CustomerListResponseModel
customer_models (optional) array|CustomerApiV2Model
{ } CustomerApiV2Model
account_holder (optional) string
customer_id (optional) string
customer_since (optional) string
email (optional) string
has_invoice (optional) boolean
id (optional) integer
imported_on (optional) string
outstanding_models (optional) array|OutstandingAmountApiV2Model
phone (optional) string
status (optional) string
             <customer_list_filter_model>
  <date_from>yyyy-MM-dd'T'HH:mm:ss.SSSXXX</date_from>
  <date_to>yyyy-MM-dd'T'HH:mm:ss.SSSXXX</date_to>
  <search>string</search>
  <sort>CUSTOMER_ID</sort>
  <ascending>1</ascending>
  <first>0</first>
  <count>0</count>
  <filter_type>NONE</filter_type>
</customer_list_filter_model>

             
          
{ } CustomerListFilterApiV2Model
date_from (optional) string
date_to (optional) string
search (optional) string
sort (optional) string
ascending (optional) boolean
first (optional) integer
count (optional) integer
filter_type (optional) string
             <customer_list_response_model>
  <customer_models>
    <customer_model>
      <account_holder>string</account_holder>
      <customer_id>string</customer_id>
      <customer_since>yyyy-MM-dd'T'HH:mm:ss.SSSXXX</customer_since>
      <email>string</email>
      <has_invoice>1</has_invoice>
      <id>0</id>
      <imported_on>yyyy-MM-dd'T'HH:mm:ss.SSSXXX</imported_on>
      <outstanding_models>
        <outstanding_model>
          <amount>1.01</amount>
          <cc_id>0</cc_id>
          <currency_code>AED</currency_code>
        </outstanding_model>
        <outstanding_model>
          <amount>1.01</amount>
          <cc_id>0</cc_id>
          <currency_code>AED</currency_code>
        </outstanding_model>
      </outstanding_models>
      <phone>string</phone>
      <status>string</status>
    </customer_model>
    <customer_model>
      <account_holder>string</account_holder>
      <customer_id>string</customer_id>
      <customer_since>yyyy-MM-dd'T'HH:mm:ss.SSSXXX</customer_since>
      <email>string</email>
      <has_invoice>1</has_invoice>
      <id>0</id>
      <imported_on>yyyy-MM-dd'T'HH:mm:ss.SSSXXX</imported_on>
      <outstanding_models>
        <outstanding_model>
          <amount>1.01</amount>
          <cc_id>0</cc_id>
          <currency_code>AED</currency_code>
        </outstanding_model>
        <outstanding_model>
          <amount>1.01</amount>
          <cc_id>0</cc_id>
          <currency_code>AED</currency_code>
        </outstanding_model>
      </outstanding_models>
      <phone>string</phone>
      <status>string</status>
    </customer_model>
  </customer_models>
</customer_list_response_model>

             
          
{ } CustomerListResponseModel
customer_models (optional) array|CustomerApiV2Model
{ } CustomerApiV2Model
account_holder (optional) string
customer_id (optional) string
customer_since (optional) string
email (optional) string
has_invoice (optional) boolean
id (optional) integer
imported_on (optional) string
outstanding_models (optional) array|OutstandingAmountApiV2Model
phone (optional) string
status (optional) string