GET: /wp-json/coupons/v1/searchcustomers
Requirements:
user role with manage_woocommerce
user capability
Search customers with first name as John
GET: http://example.com/wp-json/coupons/v1/searchcustomers?search=John
Status: 200 OK
Search customers with first name as John
[
{
"user_id": 7,
"user_fullname": "John Smith",
"user_email": "johnsmith@example.com"
},
{
"user_id": 6,
"user_fullname": "John Wayne",
"user_email": "johnwayne@example.com"
},
...
]
Status: 403 Forbidden
{
"code": "rest_forbidden_context",
"message": "Sorry, you are not allowed access to this endpoint.",
"data": {
"status": 401
}
}