Domain values
The concept of domain values is used a lot in the RamBase API resources. Domain values are a set of values that is possible to use (or have been used) for one or more fields in the API resources. One domain value is sometimes referred to as a DOV, and has the following properties:
- Key
The key/value used and stored in the API resources. - Description
Description of the domain value. Visible in GET requests by adding query parameter $showDomainDescriptions=true. - Priority
The sorting index to be used for the domain value. When equal priority, domain values are sorted by the key.
In most of the RamBase client applications these fields are presented as drop downs, both when filtering and when selecting value to update and store.
Applicable domain values
Sales order and shipping advices in RamBase has a property called ShippingDay, which specifies when the goods should be shipped. The selected value will be used to calculate the scheduled shipping date for each item. The field is of datatype string, but only strings matching the keys of the domain values is allowed: V1, V2 ,V3, V4, V5, W1, W2, W3, W4, W5, D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D21
Note that these domain values represent all possible domain values. The applicable domain values might be a different list pending on the requesting user, company requesting in, activated modules and more. When hovering a field with domain values in the API documentation, a link to the API resource to use for retrieving these applicable domain values is presented. It is also possible to retrieve this URL by using a metadata request. The following URL would be retrieved for the ShippingDay field:
The result could be like this:
Note that it is possible to use $filter and $orderBy like described in the filtering and sorting page. You can filter and order by priority, description and key.
The $showDomainDescription query parameter
When retrieving, creating and updating fields with domain values in the RamBase API, only the key to the domain value is presented and used.
As an example, in the shipment element in sales orders there are 4 fields with domain values: DeliveryTerms, ShippingDay, ShippingAdviceConsolidationField and ShippingAdviceItemSortBy:
To include the description in GET requests, set the $showDomainDescriptions to True:
If specified, the description will be translated to the language provided in the $lang query parameter (if a translation is available in provided language).