Unable to pass Custom Headers when calling REST API from Order Management Extension
Summary:
To address a business process, we are trying to call the InventoryReservations REST API (POST method) to create reservations (reserve "On Hand" quantity against "User-defined" Demand) when clicking "Save" in sales order using the OM Extension. Generally this API produces error if the ReservationQuantity passed in payload is greater than AvailableToReserve in that Org/Subinv/Lot.
When trying from Postman, we noticed that this API does not produce this error in JSON format (empty body with just error message) and hence we used the custom Header "REST-Framework-Version = 4" to get the error details in the JSON format.
We tried to mimic the same using the OM Extension (On Save), however the same is not honored and giving us
Tagged:
1