Solved

Create SalesOrder - Rest API. Unit conversion is missing error

  • 29 November 2022
  • 3 replies
  • 408 views

Userlevel 2
Badge

I have an issue when trying to place a SalesOrder via the Rest API. For this scenario, I am getting an error 422 - Unprocessable Entity. The error message is: 

 

 "error": "Unit conversion  is missing.; Unit conversion  is missing.",

 

This particular order has a quite a few items, so if the issue is related to one of the products, how could I find that out.

Any thoughts on how I could find the offending entity?

 

Thank you!

 

icon

Best answer by eelliston 29 November 2022, 19:27

View original

3 replies

Userlevel 7
Badge +11

Hi @eelliston ,

We will get this error if the product is not available in the system or one of the data missing on the particular product.

To identify the issue, please create an order with all products on the screen(without saving) and see if you can be able to get the issue on the screen.

Userlevel 4
Badge +2

You should also be getting a more specific error back on the details portion of your JSON or XML returned from the site. I usually get this error at the header and more errors at the detail line

rowNumber":1,"note":{"value":""},"error":"Unit conversion  is missing.; Unit conversion  is missing.",

"InventoryID":{"error":"'Inventory ID' cannot be empty."}

"UOM":{"error":"'UOM' cannot be empty."}

Userlevel 2
Badge

I think I might have just found it. When I ran it via PostMan, I received more details in the JSON response. Its along the lines of your suggestion @Troy Vars 

The order has two products that are no longer active. There was an error related to those line items. I think/hope that was the issue. Going to remove those and resubmit. 

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