question

pasdoy avatar image
pasdoy asked sam Deactivated answered

Create tender v2 endpoint return 500 for specific merchant

I get 500 error when trying to create a tender for this specific merchant. Any idea what's wrong with this? I am using v2 because of https://devask.clover.com/question/56...

INFO[0160] [http] 2017/01/29 HTTP Request: POST /v2/merchant/8GY6HHT3HFKNP/tenders HTTP/1.1
INFO[0160] Host: api.clover.com
INFO[0160] Authorization: Bearer <token>
INFO[0160] Content-Type: application/json
INFO[0160]
INFO[0160] {"tender":{"editable":true,"enabled":true,"id":"cs-tender","instructions":"Example instruction","label":"mylabel"}}
INFO[0160] [http] 2017/01/29 HTTP Response: HTTP/1.1 500 Internal Server Error
INFO[0160] Connection: close
INFO[0160] Content-Length: 39
INFO[0160] Content-Type: application/json; charset=utf-8
INFO[0160] X-Frame-Options: SAMEORIGIN
INFO[0160]
INFO[0160] {"message":"500 Internal Server Error"}

As a second question, must the id be unique per merchant or always unique (uuid)?

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

sam avatar image
sam Deactivated answered

It is best practice to not pass the id when POSTing to this endpoint, as it should be auto populated with a unique key. Unique name should be under label. If an id already exists when POSTing, response will return 500. The id must be entirely unique, not just for one merchant.

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