Advanced Coupons API
  • REST API
  • coupons/v1
    • Virtual Coupons (Premium)
      • Query a list of virtual coupons
      • Fetch virtual coupon stats
      • Create a virtual coupon
      • Retrieve a virtual coupon
      • Update a virtual coupon
      • Delete a virtual coupon
      • Bulk create virtual coupons
      • Bulk delete virtual coupons
    • Search Customers (Premium)
    • Settings
  • loyalty-program/v1
    • Dashboard
    • Customers
    • Settings
    • My Points
  • wc-loyalty-program/v1
    • Dashboard
    • Customers
    • Settings
  • wc-store-credits/v1
    • Entries
      • Query a list of store credit entries
      • Create a store credit entry
      • Fetch a single store credit entry
      • Update store credit entry
      • Delete store credit entry
    • Customers
      • Get dashboard statistics data
      • Query list of customers with store credits balance
      • Get single customer statistics and sources
Powered by GitBook
On this page
  • GET: /wp-json/wc-store-credits/v1/customers

Was this helpful?

  1. wc-store-credits/v1
  2. Customers

Query list of customers with store credits balance

GET: /wp-json/wc-store-credits/v1/customers

Requirements:

  • Logged-in user

  • user role with manage_woocommerce user capability

Method

Endpoint

GET

/wp-json/wc-store-credits/v1/customers

Query Parameters
Required
Type
Default value
Description

page

no

integer

1

Current page to load in query.

per_page

no

integer

10

Number of entries to load per page in query.

search

no

string

-

Search info related to customers: name, email, phone number, etc.

sort_by

no

string

date

Value to be based for sorting: user_id, date, type, action.

sort_order

no

string

desc

Order of sorting: desc or asc

Query store credit customers

GET: http://example.com/wp-json/wc-store-credits/v1/customers

Query store credit customers with search

GET: http://example.com/wp-json/wc-store-credits/v1/customers?search=test

Status: 200 OK

Headers:
{
...
X-TOTAL: 20
}

[
  {
    "key": "9",
    "id": 9,
    "first_name": "Indo",
    "last_name": "Nesia",
    "email": "indonesia@acfw.test",
    "balance_raw": 55,
    "balance": "$55.00"
  },
  {
    "key": "5",
    "id": 5,
    "first_name": "",
    "last_name": "",
    "email": "dummy3@acfw.test",
    "balance_raw": 95.5,
    "balance": "$95.50"
  },
  {
    "key": "4",
    "id": 4,
    "first_name": "",
    "last_name": "",
    "email": "dummy2@acfw.test",
    "balance_raw": 0,
    "balance": "$0.00"
  },
  ...
]

Status: 401 Unauthorized

{
    "code": "rest_forbidden_context",
    "message": "Sorry, you are not allowed access to this endpoint.",
    "data": {
        "status": 401
    }
}

PreviousGet dashboard statistics dataNextGet single customer statistics and sources

Last updated 3 years ago

Was this helpful?