question

jms avatar image
jms asked waveexecutor-01 sent

Adding line items with modifiers

Hi

Is it still not possible to add modifiers while creating the line items using the bulkLineItems endpoint?

https://docs.clover.com/reference/orders-1#orderbulkcreatelineitems-2

I know this question was asked before in 2017 and was closed by Clover with a response saying that it will be logged as a feature request.

https://community.clover.com/questions/559/adding-line-items-with-modifiers-using-api.html

Was wondering if this support was implemented and if so, how to get it working? The following request still does not create modifiers:

curl --request POST \
  --url 'https://sandbox.dev.clover.com/v3/merchants/BUSINESSID/orders/K4435MYFBXCME/bulk_line_items?access_token=accesstoken' \
  --header 'content-type: application/json' \
  --data '{"items":[{"id":null,"item":{"id":"SZFDKVSGWG0CC"},"name":"Vanila Cream Pufffs","price":1000,"taxRates":{"elements":[{"rate":500000,"name":"Business Tax","id":"6QHM2895C0350"}]},"modifications":[{"amount":50,"modifier":{"id":"0PM87MR2K27SY","name":null,"price":0},"quantitySold":0}],"note":null}]}'

Would be very beneficial if this was in place, since all these calls count towards Clover's API Rate Limits and can impact/slow down subsequent clover api flows.

Thank You

OrdersLineItemsModifiers
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

·
David Marginian avatar image
David Marginian Deactivated answered pamelaladd commented

Unfortunately, it is still not possible. I found a few internal issues on the subject and made some comments to see if we can get this revived and possibly take another look.

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

jms avatar image jms commented ·

The problem is we have an order ahead application. When the no. of modifiers selected for a line item exceeds around 14 (along with the order creation and bulk line item adding calls), this adds up to >16 requests at times. If we have two lineItems in the order with similar modifiers, then we have to execute 2x14 calls just to add lineItemModifiers for the order. A total of >30 API calls just for one order.

Throttling the order placing flows cause the other orders placed at the same time to also take a hit since now they all have to be waiting for the previous requests to complete and/or wait out a retry-period if a previous order gives a 429.

The problem is the fact that the no. of modifiers can easily dominate the order placing call and severely limit our order processing throughput. What solution would you recommend?

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ jms commented ·

I understand the problem and I agree with you that is seems the lineitems bulk endpoint should support modifications. That being said, this isn't my area of expertise and I don't understand the challenges involved. I have made a case for this issue to be revisited and I will add your comments to that issue.

1 Like 1 ·
captainben avatar image captainben David Marginian ♦♦ commented ·

i'm not understanding the development team not prioritizing this issue, is there a reason, i too am anticipating this to lead to issues with time outs and data integrity

0 Likes 0 ·
Show more comments
pamelaladd avatar image pamelaladd jms commented ·

I don't understand the challenges involved geometry dash online

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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