Solved

Adding a Vendor with GL Account Data via REST API

  • 14 June 2023
  • 3 replies
  • 113 views

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?

icon

Best answer by jinin 14 June 2023, 09:15

View original

3 replies

Userlevel 7
Badge +11

Hi @cjprindle ,

If we define the GL accounts at the Vendor class level, whenever a vendor is created with the vendor class through API, it will be auto-populated.

If you want to pass the values while creating the vendor, follow the steps below.

By default, the Vendor entity does not have the GL account details.

  • First, select the endpoint.
  • Next, select the vendor entity.
  • Click on the insert button to create the GL Accounts sub-entity within the Vendor entity, specifying the required fields.
  • In the API request, provide the necessary details when creating the vendor.


 

 

Badge

How did you add the GLAccounts node under Vendor? 

Userlevel 7
Badge +11

Hi @abhijit ,

Shared the steps on this post. Let me know if you have any questions.

Insert Vendor API needs cash discount account and cash discount sub. | Community (acumatica.com)

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved