question

androiddev avatar image
androiddev asked jcarrig answered

Customer REST API

Hi everyone,

I want to create/update clover customer(with all properties: company name, dob, emails, etc) in my android app.

What I have discovered that I can't make this with Clover Android SDK. Because CustomerConnector has no such methods and it use Customer v1.

So I have to use direct Clover REST API.
I have read REST API documentation, but not everything is clear for me.

My questions:
1. Is it possible to create Customer(with metadata, emails, phones, addresses) using only one request (POST /v3/merchants/{mId}/customers) or I have to make a lot of requests(separate for emails, addresses, metadata, etc) to push all customer data to REST API?
2. Is it possible to push all customers phones at once using REST API (what I have noticed I have to make request for each phone)?
Clover Android SDKCustomers
10 |2000

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

1 Answer

jcarrig avatar image
jcarrig answered
Answers to your numbered questions are as follows:

1. Yes it is possible to create a Customer (with metadata, emailAddresses, phoneNumbers, mailingAddresses) using only one request.

2. Yes the phoneNumber field is an array.

For an example payload to create a Customer see Clover's V3 API Documentation: https://www.clover.com/api_docs/#!/customers/DelegatedCreateCustomer
10 |2000

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