Skip to main content
Value Type

DecimalValue

Wrapper type for decimal values

Wraps primitive:decimal

DecimalValue

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

PropertyTypeDescription
valuedecimalThe actual decimal value with high precision
errorstringError 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, Balance
  • UnitPrice, ExtendedPrice, Discount
  • Quantity (when fractional units allowed)
  • CurrencyRate, ExchangeRate
  • Any monetary or precise numeric field