ResourcesCredits
Retrieve a credit balance
Retrieve one customer-product balance and recent ledger entries.
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
Path Parameters
customer*integer
The customer path parameter.
creditProduct*integer
The creditProduct path parameter.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://sell.app/api/v2/credit-balances/0/0"{
"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"
}
}{
"message": "Unauthenticated."
}{
"message": "This action is unauthorized."
}{
"message": "Rule not found."
}{
"message": "The given data was invalid.",
"errors": {
"data": [
"The data field is required."
]
}
}