getItemFields
ItemField[] getItemFields(SessionId sessionId,
BitemId[] itemIds,
ColumnId[] columnIds,
GetItemFieldsOptions *options)
throws BasketServiceFault;
See also: ItemField, SessionId, BItemId, ColumnId, GetItemFieldsOptions, BasketServiceFault
Get the values for the fields defined by the intersection of one or more basket columns and a set of selected basket items (rows)0 of the specified session’s basket.
Basket items whose fields are to be returned are selected based on the specified item IDs and the item selection options that may be given with the options parameter. If no item ID is specified, then all currently existing basket items are selected, including the top folder.
The operation returns field values for the specified columns or, if not columns have been specified, for all columns found in the session’s basket. If a column is specified more than once, then fields of this column may be returned multiple times.
If a view ID has been specified (field viewId of type ItemSelectionOptions inherited by type GetItemFieldsOptions), then the item IDs must be view item IDs, the position number will be returned for the position number column, and images returned for items of views with merge mode Compact will include sub-articles.
There is no guarantee about the order of returned fields. For each field with a non-empty value, the item ID, column ID and value are returned.
If one of the column IDs specifies a user-defined column of type Number, and the column references a variable (directly or indirectly through its default value or column), or a default predefined column, then formatting of numeric values will be modified so the result adheres to the number syntax specified for column type Number. Most importantly, this enforces the use of the period (U+002E) as decimal separator, disables the use of grouping, disables the insertion of units (currency, percent sign, UNECE units of measure) into the field’s value, and disables unit conversion and rounding to specified precision in case of packaging information. Furthermore, in case of the TaxRate variable and a valid quantity relation, it causes division of the amount by the quantity relation (for example, if the condition amount is 3 EUR, and the quantity relation is 2 KGM, then field’s value will be 1.5).
The operation fails with a BasketServiceFault if
-
The session ID, one of the item IDs, or one of the column IDs is not a properly formatted UUID.
-
The session ID does not reference an existing session.
-
One of the item IDs does not reference an item currently existing in the session’s basket.
-
An item ID is specified more than once (optional).
-
One of the column IDs does not reference a column within the session’s basket.
Operation ‘getItemFields’ properly hande a specified view ID (attribute ‘viewId’ of complex type ‘ItemSelectionOptions’ inherited by complex type ‘GetItemFieldsOptions’). If a view ID has been specified, then the item IDs must be view item IDs, the position number will be returned for the position number column, and images returned for items of views with merge mode ‘Compact’ will include sub-articles.