question

tmescic avatar image
tmescic asked David Marginian Deactivated edited

Customer update REST API - broken backwards compatibility

Our app is integrated with Clover customer DB, and sometimes we need to call the Customer update API (https://docs.clover.com/reference/handlersupdatecustomer).

Recently, we are seeing a lot of 500 Internal Server errors being returned by this endpoint (which previously worked normally) - on both production and sandbox.

Example of an API call:

$ curl --request POST --url https://sandbox.dev.clover.com/v3/merchants/{mId}/customers/{cId} --header 'Authorization: Bearer <token> Content-Type: application/json'      --data '
{
     "emailAddresses": [
          {

               "emailAddress": "username@domain.com",
               "id": ".....", 
               "verifiedTime": 1644663534000
          }
     ],
     "phoneNumbers": [
          {
               "id": "...",
               "phoneNumber": "11111111111"
          }
     ],
     "id": "....",
     "firstName": "firstname",
     "lastName": "lastname"
}
'

After some debugging, it looks like the issue is the verifiedTime attribute of email address (if I omit the attribute, the update is successful).

REST APICustomers
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

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

I have notified the team of this, will keep you updated.

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.

Thank you for the report. A ticket for it already exists in our system. The investigation on that ticket says that the verifiedTime wasn't even persisting correctly on updates so you can just drop it from the request for now. I will keep you updated on the status of the ticket.

0 Likes 0 ·
tmescic avatar image tmescic David Marginian ♦♦ ·
Thanks, we are already in the process of updating our code and removing this attribute, however, this change broke our code (customer update stopped working - started returning 500), and it's possible that it broke other API users code, and I think the old behaviour should be reverted. This was the main reason I reported the issue.
0 Likes 0 ·

Yes, we understand and apologize for the breakage, and thank you for reporting the issue. We have analyzed and will continue to monitor the impact (it is currently very small, less than 175 requests over a 30 day period).

0 Likes 0 ·

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