question

greyskymedia avatar image
greyskymedia asked David Marginian commented

customers.csv endpoint won't include expand=metadata in export

We're trying to include the expanded fields available in metadata (companyName, specifically) in our CSV export. According to the docs for the customers.csv endpoint I SHOULD be able to structure my PHP like this:

$csv = file_get_contents('https://api.clover.com/v3/merchants/' . $params['merchant_id'] .  '/customers.csv?access_token=' . $params['access_token'] .'&expand=metadata');

The result is still just a regular CSV export (attached). I would expect the extra fields to append to the end of the CSV, but no dice.

From what I see, we have everything coded properly, is there a bug in the endpoint perhaps? Did I miss something in the code?


Thanks for your help!

REST APICustomers
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian answered David Marginian edited

The customer's export doesn't appear to support expansions.

10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

greyskymedia avatar image
greyskymedia answered

I mean, it's literally in the documentation for the csv endpoint, how can you say that?screen-shot-2021-11-29-at-74351-am.png


10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

greyskymedia avatar image
greyskymedia answered David Marginian commented

If that's the case, are you saying that the only way to get expansions in an export is to build it myself?

1 comment
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

You will have to use the non-csv API to retrieve the customers for now.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community