Order line items are stored internally as instances of the commerceItem
item type. You can view this item type with the following call:
GET /ccadmin/v1/itemTypes/commerceItem HTTP/1.1
Authorization: Bearer <access_token>
The following example shows a portion of the response representing one of the commerceItem
properties. Each property has a group of attributes whose values control the behavior associated with the property:
... "productId": { "length": 254, "label": "Product id", "type": "shortText", "required": false, "searchable": false, "writable": true, "internalOnly": false, "uiEditorType": "shortText", "default": null, "audienceVisibility": null, "localizable": false, "textSearchable": false, "dimension": false, "multiSelect": null, "editableAttributes": [ "internalOnly", "default", "audienceVisibility", "textSearchable", "label", "dimension", "required", "searchable", "multiSelect" ] } ...
You can use the updateItemType
endpoint to modify the commerceItem
item type:
Modify existing properties by changing the values of their attributes.
Create custom properties by specifying their attributes.
See Settable attributes of shopper type properties for descriptions of these attributes.
The next section provides an example of creating a custom property.