logoSellhub
Customers
background
Sellhub Docs
Sellhub Docs
Get Customers
GET
/customers

Authorization

Authorization<token>

In: header

Query Parameters

idstring

Generic ID filter (e.g., product, bundle, coupon, etc.)

createdAtFromstring

Earliest creation date (ISO 8601 datetime)

Format: "date-time"
createdAtTostring

Latest creation date (ISO 8601 datetime)

Format: "date-time"
curl -X GET "https://dash.sellhub.cx/api/sellhub/customers?id=%3Cstring%3E&createdAtFrom=2019-08-24T14%3A15%3A22Z&createdAtTo=2019-08-24T14%3A15%3A22Z" \
  -H "Authorization: <token>"

Successful response

{
  "data": {
    "customers": [
      {
        "id": "cust_123",
        "totalOrders": 10,
        "lastOrderDate": "2023-06-15T14:30:00Z",
        "firstOrderDate": "2023-01-01T10:00:00Z",
        "totalSpent": 500,
        "email": "example@email.com",
        "createdAt": "2023-01-01T09:30:00Z",
        "storeCustomerDiscordAccount": {
          "discordId": "discord_123",
          "email": "example@discord.com"
        },
        "reviews": [
          {
            "id": "rev_123",
            "rating": 5,
            "text": "Great product!",
            "productId": "prod_123",
            "createdAt": "2023-06-16T09:00:00Z"
          }
        ],
        "customerSessions": [
          {
            "ip": "192.168.1.1",
            "userAgent": "Mozilla/5.0...",
            "country": "US",
            "lastUsedAt": "2023-06-15T14:30:00Z",
            "createdAt": "2023-01-01T10:00:00Z"
          }
        ],
        "invoices": [
          {
            "id": "inv_123",
            "totalInUsd": 50,
            "paymentMethod": "credit_card",
            "displayedPaymentInfo": "Visa ****1234",
            "createdOnSessionId": "sess_123",
            "leftFeedback": true,
            "status": "paid",
            "createdAt": "2023-06-15T14:30:00Z"
          }
        ]
      }
    ]
  }
}