Skip to content

GET Get Contacts

Base URLs

Demo URL: https://demoapi.openletterconnect.com/api/v1

Production URL: https://api.openletterconnect.com/api/v1

{{base_url}}/contacts

Description

This endpoint is used to retrieve contact list from the system. It allows filtering contacts based on various parameters such as address status, last mailed status, tags, and more. The response includes contact information, such as names and associated metadata.

AUTHORIZATION

Bearer Token

  • Token: {{jwt_token}}

HEADERS

  • refreshtoken: {{refresh_token}}

PARAMS

Name Type Data Type Required Description
search Query Param String No Search text to filter contacts. Example: s A
addressStatus Query Param Array No Array of statuses. Possible values: Failed, Verified. Example: ["Verified"]
lastMailedStatus Query Param Array No Array of mailing statuses. Possible values: In Transit, Mailed, Scheduled, etc. Example: ["In Transit", "Mailed", "Scheduled"]
lastMailedDate Query Param JSON Object No JSON object specifying the start and end dates. Format: { "startDate": "date", "endDate": "date" }. Example: {startDate: "20-11-2023", endDate: "21-11-2023"}
page Query Param Integer No Page number for pagination. Default is 0. Example: 0
pageSize Query Param Integer No Number of results per page. Default is 10. Example: 10
tags Query Param Array No Array of tag IDs. Example: [4,5,6]
addressStatus Query Param Encoded String No Encoded array of statuses. Example: %22Failed%22
lastMailedStatus Query Param Encoded String No Encoded array of mailing statuses. Example: %22In%20Transit%22,%22Mailed%22
lastMailedDate Query Param Encoded JSON No Encoded JSON object specifying start and end dates. Example: {"startDate": "2023-10-02", "endDate": "2023-10-02"}
withPropertyAddresses Query Param Boolean No Whether to include property addresses. Example: false
meta.account_id Query Param String No Account ID metadata. Example: 123-1234-12342355-12323534634
isReturnAddress Query Param Boolean No Whether it is a return address.

Example Request

curl --location -g --request GET '{{base_url}}/contacts?page=0&pageSize=1&tags=[%22house%22]' \
--data '{

}'

Example Response

{
  "message": "Success",
  "data": {
    "count": 3,
    "rows": [
      {
        "id": "1",
        "firstName": "Alex",
        "lastName": "Brown",
        "fullName": "Alex Brown",
        "companyName": "TechCorp",
        "address1": "1234 Random Street, Suite 567",
        "address2": "Springfield, IL 62704",
        "city": "Springfield",
        "state": "Illinois",
        "zip": "62704",
        "phoneNo": "217-555-1234",
        "extension": "123",
        "websiteUrl": "https://techcorp.com",
        "orgId": "1",
        "email": "[email protected]",
        "isVerified": null,
        "isLiveMode": false,
        "ContactLabels": [
          {
            "id": "1",
            "title": "office"
          },
          {
            "id": "2",
            "title": "shop"
          },
          {
            "id": "3",
            "title": "house"
          }
        ],
        "createdAt": "2023-12-04T13:49:32.768Z"
      }
    ]
  }
}