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

Was this helpful?

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

Get dashboard statistics data

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

Requirements:

  • Logged-in user

  • user role with manage_woocommerce user capability

Method

Endpoint

GET

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

Query Parameters

Required

Type

Default

Description

​startPeriod

​no

​string

first day of the current month at 00:00:00 time

Start date period value of statistics to query. Date value should be in mysql date format (Y-m-d H:i:s)

endPeriod

no

string

Current date and time

End date period value of statistics to query. Date value should be in mysql date format (Y-m-d H:i:s)

Get statistics from the start of the month to current date

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

Status: 200 OK

Get statistics from the start of the month to current date

[
  {
    "key": "unclaimed",
    "label": "Unclaimed",
    "amount_raw": 420.5,
    "amount": "$420.50"
  },
  {
    "key": "added_in_period",
    "label": "Added in Period",
    "amount_raw": 623.25,
    "amount": "$623.25"
  },
  {
    "key": "used_in_period",
    "label": "Used in Period",
    "amount_raw": 283,
    "amount": "$283.00"
  }
]

Status: 403 Forbidden

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

PreviousCustomersNextQuery list of customers with store credits balance

Last updated 3 years ago

Was this helpful?