Skip to main content
Question

Adding Vendor GL Account field via REST API


I’m attempting to add a new Vendor via the REST API. I receive the error:

DiscTakenAcctID: 'Cash Discount Account' cannot be empty

This is a required field located under the GL Accounts tab. However, the field does not appear when getting the list of Vendors via the REST API. How should the JSON be structured to include this field when adding a new Vendor via the REST API?

2 replies

Userlevel 3
Badge

I suggest defaulting this in the Vendor Class that you are using for these new Vendors. This way you don’t need to explicitly set it in your API call.

 

Userlevel 7
Badge +5

@cjprindle, You can extend the default endpoint and add GLAccount fields to it. For more details on extending the endpoint kindly refer, 

Feel free to post if you have any questions/doubts.

Good Luck,

Reply