SellAuth

Customers

Get Customers

Retrieves the customers.

GET
/v1/shops/{shopId}/customers

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Request Body

application/jsonOptional
pageinteger
perPageinteger

Must be at least 1. Must not be greater than 100.

orderColumnstring
Value in: "id" | "email" | "discord_id" | "discord_username" | "balance" | "total_completed" | "total_spent_usd" | "last_completed_at" | "newsletter_at" | "affiliate_code"
orderDirectionstring
Value in: "asc" | "desc"
idstring
emailstring
discord_idstring
discord_usernamestring
subscribedstring
affiliate_codestring
affiliate_referrer_emailstring

Path Parameters

shopIdRequiredinteger

The shop ID.

curl -X GET "https://api.sellauth.com/v1/shops/{shopId}/customers" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "page": 12,
    "perPage": 1,
    "orderColumn": "balance",
    "orderDirection": "asc",
    "id": "culpa",
    "email": "morgan93@example.net",
    "discord_id": "culpa",
    "discord_username": "culpa",
    "subscribed": null,
    "affiliate_code": "culpa",
    "affiliate_referrer_email": "morgan93@example.net"
  }'

{
  "current_page": 1,
  "data": [
    {
      "id": 240,
      "email": "my@customer.com",
      "discord_id": null,
      "discord_username": null,
      "balance": "0.00",
      "total_completed": 1,
      "total_spent_usd": "1.35",
      "last_completed_at": "2025-07-27 18:04:28",
      "newsletter_at": null,
      "affiliate_code": null,
      "affiliate_referrer_id": null,
      "affiliate_referrer": null
    }
  ],
  "first_page_url": "https://api.sellauth.com/v1/shops/38/customers?page=1",
  "from": 1,
  "last_page": 1,
  "last_page_url": "https://api.sellauth.com/v1/shops/38/customers?page=1",
  "links": [
    {
      "url": null,
      "label": "&laquo; Previous",
      "active": false
    },
    {
      "url": "https://api.sellauth.com/v1/shops/38/customers?page=1",
      "label": "1",
      "active": true
    },
    {
      "url": null,
      "label": "Next &raquo;",
      "active": false
    }
  ],
  "next_page_url": null,
  "path": "https://api.sellauth.com/v1/shops/38/customers",
  "per_page": 20,
  "prev_page_url": null,
  "to": 1,
  "total": 1
}

Get Customer

Retrieves a specific customer.

GET
/v1/shops/{shopId}/customers/{customerId}

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Path Parameters

shopIdRequiredinteger

The shop ID.

customerIdRequiredinteger

The customer ID.

curl -X GET "https://api.sellauth.com/v1/shops/{shopId}/customers/{customerId}" \
  -H "Authorization: Bearer <token>"

{
  "id": 240,
  "email": "my@customer.com",
  "shop_id": 38,
  "balance": "0.00",
  "phone_number": null,
  "discord_id": null,
  "discord_username": null,
  "newsletter_at": null,
  "affiliate_code": null,
  "affiliate_referrer_id": null,
  "affiliate_referrer_earnings": "0.00",
  "affiliate_referred_at": null,
  "otp_expires_at": null,
  "total_completed": 1,
  "total_spent_usd": "1.35",
  "last_completed_at": "2025-07-27 18:04:28",
  "created_at": "2025-07-27T18:03:40.000000Z",
  "updated_at": "2026-01-25T17:07:27.000000Z",
  "deleted_at": null,
  "sessions": [
    {
      "ip": "127.0.0.1",
      "country_code": null,
      "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
      "asn": null,
      "last_used_at": "2025-07-27 18:03:25",
      "ip_blacklisted": {
        "blocked": false,
        "messages": []
      },
      "country_code_blacklisted": {
        "blocked": false,
        "messages": []
      },
      "user_agent_blacklisted": {
        "blocked": false,
        "messages": []
      },
      "asn_blacklisted": {
        "blocked": false,
        "messages": []
      }
    }
  ]
}

Get Customer Balance Transactions

Retrieves the balance transactions for a customer in a shop.

GET
/v1/shops/{shopId}/customers/{customerId}/balance-transactions

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Path Parameters

shopIdRequiredinteger

The shop ID.

customerIdRequiredinteger

The customer ID.

curl -X GET "https://api.sellauth.com/v1/shops/{shopId}/customers/{customerId}/balance-transactions" \
  -H "Authorization: Bearer <token>"

{
  "current_page": 1,
  "data": [],
  "first_page_url": "https://api.sellauth.com/v1/shops/38/customers/240/balance-transactions?page=1",
  "from": null,
  "last_page": 1,
  "last_page_url": "https://api.sellauth.com/v1/shops/38/customers/240/balance-transactions?page=1",
  "links": [
    {
      "url": null,
      "label": "&laquo; Previous",
      "active": false
    },
    {
      "url": "https://api.sellauth.com/v1/shops/38/customers/240/balance-transactions?page=1",
      "label": "1",
      "active": true
    },
    {
      "url": null,
      "label": "Next &raquo;",
      "active": false
    }
  ],
  "next_page_url": null,
  "path": "https://api.sellauth.com/v1/shops/38/customers/240/balance-transactions",
  "per_page": 20,
  "prev_page_url": null,
  "to": null,
  "total": 0
}

Edit Customer Balance

Adds or deducts balance to/from a customer in a shop.

POST
/v1/shops/{shopId}/customers/{customerId}/balance

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Request Body

application/jsonRequired
amountRequirednumber

Must be at least -1000. Must not be greater than 1000.

descriptionstring

Must not be greater than 255 characters.

Path Parameters

shopIdRequiredinteger

The shop ID.

customerIdRequiredstring
curl -X POST "https://api.sellauth.com/v1/shops/{shopId}/customers/culpa/balance" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 15,
    "description": "Quisquam recusandae asperiores accusamus."
  }'

Edit Customer Balance

Adds or deducts balance to/from a customer in a shop.

PUT
/v1/shops/{shopId}/customers/{customerId}/balance

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Request Body

application/jsonRequired
amountRequirednumber

Must be at least -1000. Must not be greater than 1000.

descriptionstring

Must not be greater than 255 characters.

Path Parameters

shopIdRequiredinteger

The shop ID.

customerIdRequiredstring
curl -X PUT "https://api.sellauth.com/v1/shops/{shopId}/customers/culpa/balance" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 15,
    "description": "Quisquam recusandae asperiores accusamus."
  }'

Edit Customer Affiliate Code

Sets or clears the affiliate code for a customer in a shop.

PUT
/v1/shops/{shopId}/customers/{customerId}/affiliate-code

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Request Body

application/jsonOptional
affiliate_codestring

Must not be greater than 50 characters.

Path Parameters

shopIdRequiredinteger

The shop ID.

customerIdRequiredstring
curl -X PUT "https://api.sellauth.com/v1/shops/{shopId}/customers/culpa/affiliate-code" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "affiliate_code": "pasyzwszwtxpeqq"
  }'