Is there any way to a get request for customer by a custom field? I want to mark a customer as deleted and then get all customers excluding the ones that have been deleted.
Asked
Active
Viewed 233 times
1 Answers
0
Currently the best way to do this is to start by adding a custom boolean field to the customer and then post to /v1/customers/search
{
"and": [{
"customer_custom_deletedBool": {
"equals": "true"
}
}],
"or": [],
"queryContext": "customer"
}
Which will return all deleted customers.
Or
{
"and": [],
"or": [{
"customer_custom_deletedBool": {
"not_set": true
}
}, {
"customer_custom_deletedBool": {
"equals": "false"
}
}],
"queryContext": "customer"
}
Which will return all customers that do not have the deleted flag set, or have deletedBool set to false.

John
- 30
- 4