Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
CosmePantin opened this issue Aug 20, 2019 · 3 comments

Comments

@CosmePantin
Copy link

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.

@karen-white
Copy link

Hey @Reshkill , This API client only supports our v2 API, which would require 2 separate calls to get the customer by ID and then their address. We're hoping to support v3 in the PHP client in the near future.

@0dp
Copy link

0dp commented Oct 31, 2019

@karen-white what is the roadmap for for v3 support, because the v3 branch does not look active.

@THPAdmin
Copy link

@0dp (1 year later..) Apparently it is not a priority. Sigh. Last release was 2+ years ago.. Isn't this the official API? Shopify has made tons of updates this year! Our company should have gone with Shopify..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants