question

rohitpandey avatar image
rohitpandey asked rohitpandey commented

Not able to create customer for a order while creating an order on sandbox account using API

Hello Everyone,

I was trying to add customer information alongwith creating an order on sandbox account using API but cannot do so. I can create order successfully but customer info. doesn't went along with it. Below is the json I was using within json format of order creation:

"customers": [ { "customerSince": "", "firstName": "Just", "lastName": "Happen", "addresses": [ { "zip": "123456", "country": "India", "address3": "street 3", "address2": "street 2", "city": "city", "address1": "#123", "id": "", "state": "Haryana" } ], "emailAddresses": [ { "emailAddress": "rohitpandey@gmail.com", "id": "", "verifiedTime": "" } ], "cards": [ { "last4": "1234", "firstName": "", "lastName": "", "cardType": "", "id": "", "first6": "987654", "expirationDate": "", "token": "" } ], "id": "", "phoneNumbers": [ { "phoneNumber": "7696070761", "id": "" } ] } ],

Please suggest what I may be doing wrong?

Thanks!

OrdersCustomers
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

Mike M avatar image
Mike M answered rohitpandey commented

As per the documentation: https://www.clover.com/api_docs#!/ord...

Only supports basic order creation. Valid fields are limited to taxRemoved, note, title, and orderType. Adding line items must be done in separate calls.

You will need to add customers with an additional API call.

4 comments
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