Thank you for posting in the Community page, Ankur.
Since you're managing your invoice document number through the API, I recommend posting your inquiry on the Intuit Developer platform. Our Intuit Developer team can provide valuable insights on developing or integrating the invoice feature. Visit this link to explore discussions and resources related to this topic.
Let us know in the Comments section if you need further assistance; we'll be here to guide you.