Customers

/loyalty-program/v1/customers

The admin customers API allows you to search for customers, view a specific customers data (status, sources and history) and adjust their unclaimed points (increase or decrease).‌

GET: /wp-json/wc-loyalty-program/v1/customers

Search customers based on id, first name, last name, email, meta values, etc.

Requirements:

  • Logged-in user

  • user role with manage_woocommerce user capability

Method

Endpoint

GET

/wp-json/wc-loyalty-program/v1/customers

Query Parameters

Required

Type

Description

​search

​true

​string

​search keyword

GET: /wp-json/wc-loyalty-program/v1/customers/status/{user_id}

Get customer's points status and sources data.

Requirements:

  • Logged-in user

  • user role with manage_woocommerce user capability

Method

Endpoint

GET

/wp-json/wc-loyalty-program/v1/customers/status/{user_id}

​GET: /wp-json/wc-loyalty-program/v1/customers/history/{user_id}

Get customer's points history data.

Requirements:

  • Logged-in user

  • user role with manage_woocommerce user capability

Method

Endpoint

GET

/wp-json/wc-loyalty-program/v1/customers/history/{user_id}

Query Parameters

Required

Type

Description

​page

​false

​number

​Page number

Custom Response Headers

Type

Description

X-TOTAL

number

Total number of history entries

POST: /wp-json/wc-loyalty-program/v1/customers/points/{user_id}

Adjust customer's unclaimed points.

Requirements:

  • Logged-in user

  • user role with manage_woocommerce user capability

Method

Endpoint

POST

/wp-json/wc-loyalty-program/v1/customers/points/{user_id}

Query Parameters

Required

Type

Description

​type

​true

​string

​increase or decrease

points

true

integer

Number of points to increase/decrease

Last updated