question

yilipiao avatar image
yilipiao asked David Marginian Deactivated answered

Received error with code 429

I am using nodejs to get all orders and sync to my database, but always get data: { message: '429 Too Many Requests' } error.

Here is my code:

    let expand =   'employee,payments,refunds,credits,voids,payment.tender,payment.cardTransaction,lineItems,customers,serviceCharge,discounts,orderType,lineItems.discounts,lineItems.modifications';
    const {
      data,
      payment_id,
      employee,
      lineItems,
      customers,
    } = await clover.getOneCloverOrder(order_num, expand);
    let cardTransaction, payment_method, credit_card_number;
    if (payment_id) {
      cardTransaction = await clover.getOneCloverOrderPaymentTransaction(
        payment_id
      );
    }

May I know how to fix it?


Thank you!

REST API
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

https://docs.clover.com/docs/429-too-many-requests

https://docs.clover.com/docs/api-usage-rate-limits

You are violating our rate limits. The code provided isn't helpful because we can't see the rate at which you are making requests. However, advice on resolving this can be found on the provided links (you need to back off). If you are making requests withing loops you should reconsider your approach (is there another API you can call, etc.).

10 |2000

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

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