ResourcesCredits

List credit balances

List customer balances for dedicated credits products.

GET
/v2/credit-balances

Authorization

bearerAuth storeAuth
AuthorizationBearer <token>

Provide your SellApp API key as a bearer token.

In: header

X-STORE<token>

Select the SellApp store for this API request.

In: header

Query Parameters

limit?integer

Number of items to return per page.

Default15
Range1 <= value <= 100
page?integer

Page number to return.

Default1
Range1 <= value
pagination?boolean

Set to false to return at most 100 matching items in one data array without pagination links or metadata.

Defaulttrue
customer_id?integer

Filter by a store customer ID.

product_id?integer

Filter by a credits product ID.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://sell.app/api/v2/credit-balances"
{
  "data": [
    {
      "id": 0,
      "store_id": 0,
      "customer_id": 0,
      "customer_email": "user@example.com",
      "product_id": 0,
      "product_title": "string",
      "balance_units": 0,
      "ledger_entries": [
        {
          "id": 0,
          "store_id": 0,
          "customer_id": 0,
          "product_id": 0,
          "kind": "grant",
          "amount_units": 0,
          "balance_after_units": 0,
          "idempotency_key": "string",
          "source_type": "string",
          "source_id": "string",
          "reason": "string",
          "metadata": {},
          "actor_user_id": 0,
          "created_at": "2019-08-24T14:15:22Z"
        }
      ],
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "links": {
    "first": "https://sell.app/api/v1/blacklists?page=1",
    "last": "https://sell.app/api/v1/blacklists?page=4",
    "prev": null,
    "next": "https://sell.app/api/v1/blacklists?page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 4,
    "links": [
      {
        "url": "string",
        "label": "string",
        "active": true
      }
    ],
    "path": "https://sell.app/api/v1/blacklists",
    "per_page": 15,
    "to": 15,
    "total": 57
  }
}
{
  "message": "Unauthenticated."
}
{
  "message": "This action is unauthorized."
}
{
  "message": "The given data was invalid.",
  "errors": {
    "data": [
      "The data field is required."
    ]
  }
}