question

vhsg avatar image
vhsg asked ·

Birthday Field, Can it be captured?

Hi Guys, We saw that you have added Birthdays as a field in Clover customers app. That's awesome! Any way for us to capture this information through the SDK/API? Thanks!
Customers
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.

Miguel avatar image
Miguel answered ·
From the REST API, you can access the birthday information in the dobMonth and dobDay fields, using this expansion:
/v3/merchants/{
                {mId}}/customers?expand=metadata

The Clover Android SDK unfortunately only returns a V1 Customer object, which does not have access to V3 properties including dobMonth and dobDay. An alternative would be to call the REST API within your Android app to get this data.
2 comments Share
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.

Hi Miguel,

Thanks for that. Sadly, when we try this...

customer, that's received from order.getCustomers() has NULL metadata;
if we attempt to get the same customer by id from CustomerConnector - it's result is com.clover.sdk.v1.customer.Customer which does NOT have a field metadata

Can you advise please?

Thank you
0 Likes 0 · ·

@vhsg, I forgot that the Android SDK only returns V1 Customer objects. If you need a V3 Customer object, you'll need to make the calls through our REST API. You are able to generate an API token through the Android SDK which you can use to call the REST API.

0 Likes 0 · ·
vhsg avatar image
vhsg answered ·
Hi, Have you improved this yet? We are doing it and it's mostly ok but it's rather cumbersome. It would be better if we could do it through the SDK.
Share
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.

Welcome to the
Clover Developer Community