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 single customer statistics and sources

GET: /wp-json/wc-store-credits/v1/customers/{user_id}

Requirements:

  • Logged-in user

  • user role with manage_woocommerce user capability

Method

Endpoint

GET

/wp-json/wc-store-credits/v1/customers/{user_id}

Get store credit entry with id 1

GET: http://example.com/wp-json/wc-store-credits/v1/entries/‌1

Status: 200 OK

Get store credit entry with id 1

{
  "status": [
    {
      "label": "Total Credits",
      "key": "total",
      "amount": "$553.00"
    },
    {
      "label": "Unclaimed Credits",
      "key": "unclaimed",
      "amount": "$553.00"
    },
    {
      "label": "Claimed Credits",
      "key": "claimed",
      "amount": "$0.00"
    },
    {
      "label": "Expired Credits",
      "key": "expired",
      "amount": "$0.00"
    },
    {
      "label": "Deducted Credits",
      "key": "deducted",
      "amount": "$0.00"
    }
  ],
  "sources": [
    {
      "label": "Purchased gift cards",
      "key": "gift_card",
      "amount": "$0.00"
    },
    {
      "label": "Refunded order",
      "key": "refund",
      "amount": "$0.00"
    },
    {
      "label": "Admin adjustment (increase)",
      "key": "admin_increase",
      "amount": "$0.00"
    }
  ],
  "customer": "Test Test"
}

Status: 403 Forbidden

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

PreviousQuery list of customers with store credits balance

Last updated 3 years ago

Was this helpful?