Hi,
I'm using REST API to calculate order subtotal from order lineItems but i get already 429 Too Many Requests.
what's the best way to get it without doing a lot of requests.
Thank you.
Hi,
I'm using REST API to calculate order subtotal from order lineItems but i get already 429 Too Many Requests.
what's the best way to get it without doing a lot of requests.
Thank you.
i'm using https://api.clover.com/v3/merchants/M...id/lineitems/item_id for every discounted item.;
Pseudocode, the subtotal can be calculated by Order.total - sum(Order.payments.tipAmount)
.
As such, the endpoint you'd likely find more helpful is https://sandbox.dev.clover.com/v3/merchants/{MID}/orders/{orderID}?expand=payments
Hi, but there is not tipAmount attribute in payment did you mean amount. but if the employee make just partial payment how can i check that.
A Payment has a tipAmount property that, if not present, will be null. Display all the properties with the return_null_fields=true query param.
The order.payType has possible values of ['SPLIT_GUEST' or 'SPLIT_ITEM' or 'SPLIT_CUSTOM' or 'FULL'], if you want to determine if an order has been paid for in full, or not. For additional logic at the Payment level, you'll need to check if the payment.amount == order.total.
Hope this helps-
Mark
2 People are following this question.