question

anayooleru avatar image
anayooleru asked parquet76 edited

Can someone please explain how to add customer's info or ID when creating a new atomic order, aside from updating it

And I would also like to know, in the production data, is the customer(s) id who created the order added to each order?

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.

parquet76 avatar image
parquet76 answered
10 |2000

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

anayooleru avatar image
anayooleru answered

I have created a customer and updated an order with the customer.

When creating a customer, I added the phone number and email, but the phone number and email are not being returned on the response. When I try to get that single customer I created, the phone number and email are not on the payload.

When I try to pass the filter to the endpoint:
https://sandbox.dev.clover.com/v3/merchants/123/customers/123?filter=firstName

This request keeps on loading forever.

Is there permission again to get phone number from a single customer?

10 |2000

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

anayooleru avatar image
anayooleru answered parquet76 edited

Well, apparently filter query param doesn't work. Only expand query param works.

3 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.

parquet76 avatar image parquet76 commented ·

Your request /customers/123?filter=firstName doesn't make a lot of sense. What is 123? Is that the uuid of a Clover customer? If so, why are you applying a filter when obtaining a single customer? If you meant /customers?filter=firstName your format is incorrect, it should be /customers?filter=firstName=someFirstName

See the docs:

https://docs.clover.com/docs/applying-filters

0 Likes 0 ·
anayooleru avatar image anayooleru parquet76 commented ·

This is a public space, and I used `123` as a sample, not my correct customerId and merchantId, any dev should be able to understand that. Secondly, I also used firstName, as a sample, I can't paste the real name I used, another example: `?filter=someExistingName`, which is how the requests params in the sandbox are.

If the name on the filter does not exist, the endpoint is supposed to return a response, that it does not exist, instead of loading forever

0 Likes 0 ·
parquet76 avatar image parquet76 anayooleru commented ·

I get 123 is a sample, what I don't get is why you have a need to filter when you are getting a customer by ID. Which is why I said I think you meant /customers?filter not /customers/{id}?filter. Regardless, it looks like either endpoint supports it (per the docs) and your format is incorrect. The correct format (per the docs) is "?filter=firstName=Bob&filter=lastName=Johnson". Your request is "?filter=Bob" which makes no sense, the API has no idea what you are trying to filter on. I agree that a response should be returned with the improperly formatted request, probably just some internal working of the API.

1 Like 1 ·

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