An object representing a choice for customers to make when ordering an article.
Property | Type | Description |
---|---|---|
uid | integer | The unique identifier of the choice. |
type | string | The type of choice; "enum" for selecting among options, "number" if the customer is expected to enter a numeric value, "string" if the customer is expected to enter text or "file" if the customer is expected to upload a file. |
name | object | Name of the choice, by language. |
description | object | Description of the choice, by language. Exists only if "type" is "number" or "string" . |
mandatory | boolean | Whether this choice is mandatory for customers when ordering an article with this choice. |
Choices of type "number"
has the following additional properties:
Property | Type | Description |
---|---|---|
maximum | number | The maximum value allowed (optional). |
minimum | number | The minimum value allowed (default is 0 ). |
multipleOf | number | The entered value must be a multiple of this value. Possible values are 1 , 0.1 , 0.01 , 0.001 and 0.0001 . |
quantity | boolean | If true, the price of the article is multiplied with the entered value. |
quantityWeight | boolean | If true, the weight of the article is multiplied with the entered value. |
Choices of type "enum"
have the following additional properties:
Property | Type | Description |
---|---|---|
options | array | An array of unique identifiers representing ArticleChoiceOption objects. |
quantityChoicesAffectsOptionPrices | boolean | Whether the price of options should be affected by any quantity choices on the same article, i.e. numeric choices with quantity set to true . |
Fetches an article-choice object.
Parameter | Description |
---|---|
uid | The unique identifier of an article choice. |
query | Which info to return. See Query language. |
ArticleChoice.get(879278, true)
Fetches the JSON Schema which can be used for client-side validation.
The unique identifier of an article choice or null
for a new article choice.