Jump to content

Product endpoint for creating a product has purchase ledger account error


 Share

Recommended Posts

Hi,

I'm using the product endpoint to create a product in my Sage BCA account. Here is my request payload:

{'product': {'description': 'Example Product', 'sales_ledger_account_id': 'k6d41a1c29b11ea8d3c022ace18d9e2', 'purchase_ledger_account_id': 'd7fh34o1c29b11ea8d3c022aced7f78e', 'item_code': '123456', 'active': true}}

I'm getting a 422 code error with the following message:

[{'$severity': 'error', '$dataCode': 'SecureValidationError', '$message': 'Saving Non-stock failed: value of purchase_ledger_account was not allowed.', '$source': 'purchase_ledger_account'}]

The purchase ledger account ID is correct as I use the ledger endpoint to get the ID for my purchase ledger account from my account.

Any ideas why this could be happening,

Cheers

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...