question

namrata avatar image
namrata asked sam Deactivated answered

About service charge id

Hello,

I developing web application by using clover API. In API doc I found one method i.e "BulkLineItems". I want to know what is the use of this method. There is no any description given in API doc.

And secondly I want to know how to post service charge in order via API because its give me the error -"Service charge in body is missing an ID". So, where to find this service charge id. I run this method "DefaultServiceCharge" but except service charge id I got all response.

So, please response ASAP.

Thank You

10 |2000

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

rachel avatar image
rachel Deactivated answered namrata commented

Hi @namrata,

Welcome to DevAsk. To get the most out of the forum, please read: https://devask.clover.com/question/6855/how-do-i-ask-a-good-question/

You say that you're developing a web app, but also make reference to methods; are you using the REST API or the Android SDK?

The endpoint POST /v3/merchants/{mId}/orders/{orderId}/bulklineitems is documented at https://sandbox.dev.clover.com/apidocs/#ordersBulkLineItems. It is used to add an array of line items to an order in a single API call.

See this post for more about service charges: https://devask.clover.com/question/6683/post-service-charge-to-order/

1 comment
10 |2000

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

namrata avatar image namrata commented ·

Thanks for your response. I am using REST API. "https://sandbox.dev.clover.com/apidocs/#ordersBulkLineItems" I use this method but when I pass item id of the inventory it did not include. So, I want to know "BulkLineItems" only create those line item which are not available in our inventory.

And secondly, I enable service charge from "Setup" option of account. And I get service charge detail from this endpoint "https://www.clover.com/apidocs/#merchantsDefaultServiceCharge" but in did not get service charge id. So, where from I will get so that I can use it.

0 Likes 0 ·
namrata avatar image
namrata answered rachel Deactivated commented

Thanks for your response. I am using REST API. "https://sandbox.dev.clover.com/apidocs/#ordersBulkLineItems" I use this method but when I pass item id of the inventory it did not include. So, I want to know "BulkLineItems" only create those line item which are not available in our inventory.

And secondly, I enable service charge from "Setup" option of account. And I get service charge detail from this endpoint "https://www.clover.com/apidocs/#merchantsDefaultServiceCharge" but in did not get service charge id. So, where from I will get so that I can pass it in "POST /v3/merchants/{mId}/orders/{orderId}/service_charge/" this endpoint.

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.

rachel avatar image rachel commented ·

Per the above link, web apps cannot use service charges at this time.

0 Likes 0 ·
rachel avatar image rachel commented ·

The bulklineitem endpoint requires that items have a price. It's up to you to ensure that this price matches the price of the inventory item you're referencing. Here's a sample payload: https://pastebin.com/kiRALXXx

0 Likes 0 ·
sam avatar image
sam Deactivated answered
The service charge id is now being returned from the endpoint:

GET /v3/merchants/{ {mid}}/default_service_charge

response: { "id": "Z4MKX1B4RSQ34", "name": "Service Charge", "enabled": true, "percentage": 10, "percentageDecimal": 100000}

Please refer to this thread:
https://clover.cloud.answerhub.com/questions/2038/...
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