Skip to content

Latest commit

 

History

History
64 lines (55 loc) · 2.41 KB

search-customers-request.md

File metadata and controls

64 lines (55 loc) · 2.41 KB

Search Customers Request

Defines the fields that are included in the request body of a request to the SearchCustomers endpoint.

Structure

SearchCustomersRequest

Fields

Name Type Tags Description Getter Setter
cursor ?string Optional Include the pagination cursor in subsequent calls to this endpoint to retrieve
the next set of results associated with the original query.

For more information, see Pagination.
getCursor(): ?string setCursor(?string cursor): void
limit ?int Optional The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.
If the specified limit is invalid, Square returns a 400 VALUE_TOO_LOW or 400 VALUE_TOO_HIGH error. The default value is 100.

For more information, see Pagination.
Constraints: >= 1, <= 100
getLimit(): ?int setLimit(?int limit): void
query ?CustomerQuery Optional Represents filtering and sorting criteria for a SearchCustomers request. getQuery(): ?CustomerQuery setQuery(?CustomerQuery query): void
count ?bool Optional Indicates whether to return the total count of matching customers in the count field of the response.

The default value is false.
getCount(): ?bool setCount(?bool count): void

Example (as JSON)

{
  "limit": 2,
  "query": {
    "filter": {
      "created_at": {
        "end_at": "2018-02-01T00:00:00-00:00",
        "start_at": "2018-01-01T00:00:00-00:00"
      },
      "creation_source": {
        "rule": "INCLUDE",
        "values": [
          "THIRD_PARTY"
        ]
      },
      "email_address": {
        "fuzzy": "example.com",
        "exact": "exact2"
      },
      "group_ids": {
        "all": [
          "545AXB44B4XXWMVQ4W8SBT3HHF"
        ]
      },
      "updated_at": {
        "start_at": "start_at6",
        "end_at": "end_at6"
      },
      "phone_number": {
        "exact": "exact2",
        "fuzzy": "fuzzy8"
      }
    },
    "sort": {
      "field": "CREATED_AT",
      "order": "ASC"
    }
  },
  "cursor": "cursor0",
  "count": false
}