List Customers

Obtains a list of customers that match the specified criteria.

Name Data Type Description
stateCode string Returns customers that reside in the specified stateCode.

Optional
countryCode string Returns customers that reside in the specified countryCode. Use the two-letter ISO Origin Country code.

Optional
marketplaceId number Returns customers that purchased items from the specified marketplaceId.

Optional
tagId number Returns customers that have been tagged with the specified tagId.

Optional
sortBy string Sorts the order of the response based off the specified value.
Values:
  • Name
  • ModifyDate
  • CreateDate

Optional
sortDir string Sets the direction of the sort order.
Values:
  • ASC
  • DESC

Optional
page number Page number.

Optional
pageSize number Requested page size. Max value is 500.

Optional

Example Request

GET /customers?stateCode={stateCode}&countryCode={countryCode}&tagId={tagId}&marketplaceId={marketplaceId}&sortBy={sortBy}&sortDir={sortDir}&page={page}&pageSize={pageSize} HTTP/1.1
Host: ssapi.shipstation.com
Authorization: __YOUR_AUTH_HERE__

Example Response


{
  "customers": [
    {
      "customerId": 12345678,
      "createDate": "2014-11-18T10:33:01.1900000",
      "modifyDate": "2014-11-18T10:33:01.1900000",
      "name": "Cam Newton",
      "company": "Test Company",
      "street1": "123 War Eagle Lane",
      "street2": "",
      "city": "Auburn",
      "state": "AL",
      "postalCode": "36830",
      "countryCode": "US",
      "phone": "555-555-5555",
      "email": "[email protected]",
      "addressVerified": "Verified",
      "marketplaceUsernames": [
        {
          "customerUserId": 67195020,
          "customerId": 12345678,
          "createDate": "2015-04-27T12:35:03.8300000",
          "modifyDate": "2015-05-14T08:16:15.2700000",
          "marketplaceId": 0,
          "marketplace": "ShipStation",
          "username": "[email protected]"
        },
        {
          "customerUserId": 37568588,
          "customerId": 12345678,
          "createDate": "2014-11-18T10:33:01.1970000",
          "modifyDate": "2014-11-18T10:33:01.1970000",
          "marketplaceId": 36,
          "marketplace": "WooCommerce",
          "username": "[email protected]"
        },
        {
          "customerUserId": 46038940,
          "customerId": 12345678,
          "createDate": null,
          "modifyDate": null,
          "marketplaceId": 67,
          "marketplace": "TradeGecko",
          "username": "[email protected]"
        }
      ],
      "tags": [
        {
          "tagId": 1234,
          "name": "Expedited"
        },
        {
          "tagId": 9725,
          "name": "00 BULK ORDERED"
        }
      ]
    },
    {
      "customerId": 87654321,
      "createDate": "2015-06-21T12:48:07.5400000",
      "name": "Bo Jackson",
      "company": "Test Company",
      "street1": "456 Heisman Ave",
      "street2": "",
      "city": "Auburn",
      "state": "AL",
      "postalCode": "36830",
      "countryCode": "US",
      "phone": "555-555-5555",
      "email": "[email protected]",
      "addressVerified": "Verified",
      "marketplaceUsernames": [
        {
          "customerUserId": 77215410,
          "customerId": 87654321,
          "createDate": "2015-08-27T14:36:05.7500000",
          "modifyDate": "2015-09-01T09:18:25.3100000",
          "marketplaceId": 0,
          "marketplace": "ShipStation",
          "username": "[email protected]"
        },
        {
          "customerUserId": 43759100,
          "customerId": 87654321,
          "createDate": "2015-07-05T11:38:01.1970000",
          "modifyDate": "2015-07-05T11:38:01.1970000",
          "marketplaceId": 36,
          "marketplace": "WooCommerce",
          "username": "[email protected]"
        },
        {
          "customerUserId": 81565241,
          "customerId": 87654321,
          "createDate": null,
          "modifyDate": null,
          "marketplaceId": 67,
          "marketplace": "TradeGecko",
          "username": "[email protected]"
        }
      ],
      "tags": [
        {
          "tagId": 1234,
          "name": "Expedited"
        },
        {
          "tagId": 9725,
          "name": "00 BULK ORDERED"
        }
      ]
    }
  ],
  "total": 2,
  "page": 1,
  "pages": 1
}