Jump to content

Invoice numbering


 Share

Recommended Posts

I am creating an invoice in my application and sending it to Sage Business Cloud Accounting via the API.  I note from the documentation that the invoice_number field is a string. However, I get an error if I send anything to this field other than an integer.  Is this correct?  I also note that you can't send invoices to Sage using duplicate numbers.  Is this correct?  

Link to comment
Share on other sites

  • Administrators

Hi Dave,

Welcome to the new community!

I've had a look at the docs and on closer inspection you are indeed correct. When entering an invoice via the API it must be a positive integer only. I'll amend the docs to reflect that, it's possibly stated that way due to a string being accepted for draft invoices, which is changed to a positive integer when the draft is updated to a full invoice. 

Accounting must have unique invoice numbers yes, and will automatically attempt to post the invoice using the next available number which you can check via a GET request to /invoice_settings and using the `next_invoice_number` attribute.

I hope that helps,

 

Ben

  • Like 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...