question

Suraj Dubey avatar image
Suraj Dubey asked Lee Tickett answered

I am not able to get the customer info in my order details via REST API

this is the customer info
{"href":" https://sandbox.dev.clover.com/v3/merchants/SR42RYN87Y001/customers/QHKPK9K8Z8QY4""id":"QHKPK9K8Z8QY4""firstName":"suraj""lastName":"new""marketingAllowed":true"customerSince":1562848240000}

This is my order info

{"href":" https://sandbox.dev.clover.com/v3/merchants/SR42RYN87Y001/orders/NEXE4AEYZHFST""id":"NEXE4AEYZHFST""currency":"USD""taxRemoved":false"isVat":false"state":"open""manualTransaction":false"groupLineItems":true"testMode":false"createdTime":1562848361000"clientCreatedTime":1562848361000"modifiedTime":1562848360000}

This is the api i am hitting for order info with customer associated with it

https://apisandbox.dev.clover.com/v3/merchants/SR4...

And I am getting this

{
"href":
"id":
"NEXE4AEYZHFST"
"currency":
"USD"
"taxRemoved":
false
"isVat":
false
"state":
"open"
"manualTransaction":
false
"groupLineItems":
true
"testMode":
false
"createdTime":
1562848361000
"clientCreatedTime":
1562848361000
"modifiedTime":
1562848360000
}


Please help......
Orders
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

·
Lee Tickett avatar image
Lee Tickett answered
Clover were supposed to drop the ability to expand customers from orders a few years back.
Interestingly I hadn't considered that you might still be able to do it on a single order;
e.g. https://api.eu.clover.com/v3/merchants/CMGJ1XS1DAD...
does work
https://api.eu.clover.com/v3/merchants/CMGJ1XS1DAD...
does not work
Your example I believe has no customer attached which is why no customers have been returned. Have you looked in the dashboard/on the device and believe that order to have a customer attached?
The API documentation seems to back up my findings for the most part https://www.clover.com/api_docs/#!/orders/GetOrder shows the expand option, but https://www.clover.com/api_docs/#!/orders/GetOrders does not (although oddly does should the expanded fields in the sample json response, i think they've just forgotten to update it)
10 |2000

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

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