Skip to main content
GET
/
external
/
customer
/
search
Search customers based on passed search parameters
curl --request GET \
  --url https://api.valyx.com/external/customer/search \
  --header 'X-Valyx-Signature: <x-valyx-signature>'
{
  "error": "<string>",
  "message": "<string>",
  "data": {
    "totalDocs": 123,
    "docs": [
      {
        "id": "<string>",
        "buyerId": "<string>",
        "companyId": "<string>",
        "name": "<string>",
        "alias": "<string>",
        "registeredAddress": {
          "line1": "<string>",
          "line2": "<string>",
          "state": "<string>",
          "city": "<string>",
          "country": "<string>",
          "zipCode": "<string>"
        },
        "addresses": [
          {
            "line1": "<string>",
            "line2": "<string>",
            "state": "<string>",
            "city": "<string>",
            "country": "<string>",
            "zipCode": "<string>"
          }
        ],
        "contacts": [
          {
            "id": "<string>",
            "name": "<string>",
            "primaryPhone": "<string>",
            "primaryEmail": "<string>",
            "role": "<string>"
          }
        ],
        "internalStakeholders": [
          {
            "id": "<string>",
            "name": "<string>",
            "primaryPhone": "<string>",
            "primaryEmail": "<string>",
            "role": "<string>",
            "isRegistered": true
          }
        ],
        "taxIdentifiers": [
          {
            "value": "<string>",
            "type": "<string>"
          }
        ],
        "customerContactPerson": "<string>",
        "currency": "<string>",
        "currencyId": "<string>",
        "tags": {},
        "metaData": {},
        "customerStatus": "<string>",
        "upcomingCustomerStatus": "<string>",
        "upcomingCustomerStatusChangeDate": "<string>",
        "upcomingCustomerStatusChangeReason": "<string>",
        "upcomingCustomerStatusChangeByUserid": "<string>",
        "isManuallyCreated": true,
        "erpId": "<string>",
        "createdAt": "<string>",
        "updatedAt": "<string>",
        "totalInvoiceAmount": 123,
        "totalPaidAmount": 123,
        "totalOutstandingAmount": 123,
        "totalAdjustedAmount": 123,
        "invoiceCount": 123,
        "creditNoteCount": 123,
        "overdueAmount": 123,
        "overdueCount": 123
      }
    ],
    "hasNext": true,
    "hasPrev": true,
    "pageNumber": 123,
    "pageSize": 123,
    "totalPages": 123,
    "prevPageNumber": 123,
    "nextPageNumber": 123
  }
}

Headers

X-Valyx-Signature
string
required

Auth key

X-Fields
string<mask>

An optional fields mask

Query Parameters

amountType
string
identifierType
enum<string>
Available options:
GSTIN,
PAN,
BUYER_ID,
CUSTOMER_NAME
identifierValue
string
minAmount
number
maxAmount
number
invoiceStatus
string[]

list of invoice statuses to filter by

paymentStatus
string[]

list of payment statuses to filter by

customerStatus
string[]

list of customer statuses to filter by

tag
string[]

list of tag key-value pair to filter by

excludeTag
string[]

list of tag key-value pair to filter by (exclude)

excludeTagKey
string[]

list of tag key to filter by (exclude)

ownerId
string[]

owner ID to search by

ownerRole
string[]

owner role to search by

notOwnerRole
string[]

not owner role to search by

contactRole
string[]

contact role to search by

notContactRole
string[]

not contact role to search by

page
integer
required

Page number for pagination.

pageSize
integer
required

Page size for pagination.

dateType
enum<string>
Available options:
INVOICE_DATE,
DUE_DATE,
PROMISE_TO_PAY_DATE
startDate
string

Start date for invoices

endDate
string

End date for invoices

createdAtStart
string

Customer creation date start - will return customers created on or after this date. Pass as YYYY-MM-DD string

createdAtEnd
string

Customer creation date end - will return customers created on or before this date. Pass as YYYY-MM-DD string

currencies
string[]

Currencies

Response

200 - application/json

Success

error
string
message
string
data
object