Negative Allocation Amounts in PUT/PATCH /inventory_lists/{}/product_inventory_records/{} Are Disallowed

With the OCAPI 22.10 release, the PUT /inventory_lists/{}/product_inventory_records/{} and PATCH /inventory_lists/{}/product_inventory_records/{} resources no longer allow a negative allocation amount to be passed in. A constraint has been added to the ProductInventoryRecordAllocation document.

How: If you call these resources with a negative allocation amount, this error response is returned:

status code: 400 
"type": "PropertyConstraintViolationException" 
"message": "An error occurred while decoding the request. There's a value constraint violation of property '$.allocation.amount' in document 'product_inventory_record'."
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.