question

harshapaul avatar image
harshapaul asked harshapaul commented

Documentation for the rest APIs.

Hi,

Is there any documentation which explains each and every json key used in the APIs, specifically the create an order API? I see that many of the keys given here https://www.clover.com/api_docs#!/ord... are readable but some are not. This is necessary to know what each key represents.

10 |2000

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

Jacob Abrams avatar image
Jacob Abrams answered harshapaul commented

By key do you mean the name in the JSON name/value pairs, such as "note" , "orderType" , "taxable", etc?

Specific explanations are fairly light, but if you look at the clover-android-sdk you can find java classes that mimic the json and there are some javadocs that might help, here is a link to the Order source:

https://github.com/clover/clover-android-sdk/blob/master/clover-android-sdk/src/main/java/com/clover/sdk/v3/order/Order.java
5 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 ·

Yes the name/value pairs. Many the names are not explained. Ideally I wont want to know what name/value pair is for e.g. the keys which represent the functions getIsVat, getManualTransaction, getGroupLineItems, getPayType etc and also if any of these keys will take only a specific set of values e.g. getPayType,getOrderType . The class mentioned is for Order, what about discounts, lineitems, payments, servicecharge etc. I think there should be a document explaining all the key/value pairs for all the APIs

0 Likes 0 ·
Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

I agree, hopefully someone will eventually properly document all this stuff. For now if you browse clover- android-sdk you will find other classes such as LineItem.java and Discount.java that may have some javadocs in them.

0 Likes 0 ·
harshapaul avatar image harshapaul commented ·

We have to integrate our system with clover POS using rest APIs. We have an orders XML, which has a list of orders. So unless we know what each key/value pair represents and what possible values it supports, how do we proceed. I believe either there will have to be documentation for this or someone will have to walk us over these key/value pairs, so that there are no assumptions.

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

We have also hosted javadoc via github pages that you can use to investigate SDK objects further (which directly reflect the API response models). https://clover.github.io/clover-andro...

You shouldn't need to know every single key to just use our API at a high-level. If you have a specific use-case in question, then please create a new question with the additional context. No young SDKs have ever had perfect documentation, sometimes not even average. That being said, we are aware our documentation needs to be improved and are working on it.

0 Likes 0 ·
harshapaul avatar image harshapaul commented ·

Have created this question as requested by you. Kindly have a look at it: http://devask.clover.com/question/110...

0 Likes 0 ·
jamesb avatar image
jamesb answered

You have been "working on" documentation for a long time ........

Let's be honest, If you documented merely a single name-value pair a day... it would be done already.... come on now....

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