Skip to content

getCustomers filter throws "field 'id' is not supported by this resource" #249

@CosmePantin

Description

@CosmePantin

I am trying to get the customer information with the address in 1 call/

The client.php getCustomer function only allows $id value. I thought about using the getCustomers function which allows filters:

/**
* The list of customers.
*
* @param array $filter
* @return array
*/
public static function getCustomers($filter = array())
{
$filter = Filter::create($filter);
return self::getCollection('/customers' . $filter->toQuery(), 'Customer');
}

When I call the function with an array with the id and the include addresses I get errors. I can't pass even the id in the filter:

"The field 'id' is not supported by this resource."

I tried setting the key in the array as 'id' and 'id:in', as shown in the query parameters in:

https://developer.bigcommerce.com/api-reference/customer-subscribers/v3-customers-api/customers/customersget

In the example of the documentation I can get the customer information and the addresses in 1 call using v3. I checked the customer v2 schema and I can't find any filter option.

How do I use the filter option in the function if it seems it is unavailable?
Am I using the right function or is it unavailable through the php client?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions