question

harshapaul avatar image
harshapaul asked harshapaul commented

Response Structure for APIs.

I see that the response structure for the APIs is not given anywhere. We can get to see it only after making a call. Can we have the response structure somewhere along with its documentation?

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

Mike M avatar image
Mike M answered harshapaul commented

Actually, the response structure is provided for some of the GET calls. Example: https://www.clover.com/api_docs#!/ord...

We have not shown a minimum response structure due to the expandable nature of our API: https://docs.clover.com/build/web-app...

The model schema and model have been provided for all the POST API calls, and you can expect a GET API call to consistently use the same models+schemas. That being said, we are aware the documentation could be improved and we will get to it when we can.

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

harshapaul avatar image harshapaul commented ·

So when I make a POST call to create an order, I will get the same structure in response as the request body, since this is exactly the same as in case of GET order call? What in case of a failure? What will be the possible error codes and their meanings?

0 Likes 0 ·
Mike M avatar image Mike M commented ·

We do not have any documentation for the error codes we return yet, however they do follow conventional http status codes with their respective definitions. See here for a quick list: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

I believe for error responses, we only return the status code with no additional messages in the body.

0 Likes 0 ·

Welcome to the
Clover Developer Community