question

gokulselvan avatar image
gokulselvan asked gokulselvan commented

500 Internal Server Error - Get Orders From Ecommerce API Token

When I Execute

curl --request GET \
     --url 'https://scl-sandbox.dev.clover.com/v1/orders?customer={customer_id}&limit=1' \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer {ecommerce_token}'


I got

{
  "message": "500 Internal Server Error",
  "error": {
    "type": "api_error",
    "code": "processing_error",
    "message": "Internal Server Error."
  }
}


But When I execute without customer filter, it retuns all the records, but get error when we try filter.

What Am I mising Here.


Please help...

REST APIecommerce
10 |2000

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

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

I don't see any available filters on that endpoint? Have you seen something in the docs that led you to believe you can filter like this?

I would recommend using our v3/orders endpoint, a request like this will work:

/v3/merchants/{ {mid}}/orders?filter=customer.id={customerId}

Please see our docs:

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



10 |2000

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

gokulselvan avatar image
gokulselvan answered gokulselvan commented

Hi,

Thanks for your response.

I just followed the link below to get the list of orders for a particular customer.

https://docs.clover.com/reference/getorders


v3/order endpoint with filter work as per your example.

But I can't find indept information in https://docs.clover.com/docs/applying-filters


Is there any link for refrence?

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.

David Marginian avatar image David Marginian ♦♦ commented ·

Do you mean indepth? What information are you looking for?

0 Likes 0 ·
gokulselvan avatar image gokulselvan David Marginian ♦♦ commented ·
Indept information about filters
0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ gokulselvan commented ·

The information we have is here https://docs.clover.com/docs/applying-filters and in the API spec there is a filters section for most APIs which lists the filters that are available.

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community