Value Type
DecimalValue
Wrapper type for decimal values
Wraps primitive:
decimalDecimalValue
A wrapper type that encapsulates a decimal value in API requests and responses.
Overview
DecimalValue is used throughout the Acumatica API to wrap decimal/currency properties. This wrapper pattern allows the API to distinguish between "no value provided" (field omitted) and "explicitly set to zero".
JSON Structure
{
"value": 1234.56
}
Examples
Reading a DecimalValue
When retrieving an entity, decimal properties are returned as objects:
{
"Amount": {
"value": 1500.00
},
"UnitPrice": {
"value": 29.99
}
}
Setting a DecimalValue
When creating or updating an entity, provide the value in the wrapper:
{
"Amount": {
"value": 2500.50
}
}
Properties
| Property | Type | Description |
|---|---|---|
| value | decimal | The actual decimal value with high precision |
| error | string | Error message describing validation or processing issues with this field |
Error Handling
All value wrapper types inherit an error property that contains a description when there is an issue with the field. Always check this property when processing API responses.
Common Fields Using DecimalValue
Amount,Total,BalanceUnitPrice,ExtendedPrice,DiscountQuantity(when fractional units allowed)CurrencyRate,ExchangeRate- Any monetary or precise numeric field