Custom Properties

Use SCAPI to set custom properties of business objects in input documents and to read custom properties in output documents. Whether a business object supports custom properties can be found in the following tables. Custom properties are always marked with the prefix c_ and have therefore their own namespace.

Custom Properties Example 

The following example shows a document response including some custom properties:

1REQUEST: GET /product/shopper-products/v1/organizations/ORG_ID/products/creative-zen-v HTTP/1.1
2Host: SHORTCODE.api.commercecloud.salesforce.com
3Accept: application/json
4
5RESPONSE: HTTP/1.1 200 OK
6Content-Type:  application/json; charset=UTF-8
7Cache-Control:  max-age=900,must-revalidate
8{
9   ...
10   "c_mediaFormat" : [ "0010", "0020", "0030", "0040" ],
11   "c_memorySize" : "1GB",
12   "c_tabDescription" : "The ZEN V player was designed for people like you those who walk a step or two ahead of the pack."
13}

Custom Properties Value Types 

SCAPI supports the following value types for input and output of custom properties:

  • Text
  • String
  • Enum of Strings
  • Set of Strings
  • Integer
  • Enum of Integers
  • Set of Integers
  • Double
  • Set of Doubles
  • Boolean
  • EMail
  • Password
  • Date
  • Date+Time

The value types HTML and Image are only supported as output, but not as input value type for custom properties in SCAPI.

Note

Document Types Supporting Custom Properties 

The following tables list the document types that support custom properties. Hooks (modify...) that use the referenced document types can add custom properties using the c_ prefix. See Customization With Hooks for more information.

Shopper API 

The following Shopper API documents support custom properties.

Document TypeReference
Basket v1Basket v1
Basket v2Basket v2
BasketPaymentInstrumentRequestBasketPaymentInstrumentRequest
BonusDiscountLineItemBonusDiscountLineItem
CategoryCategory
CouponItemCouponItem
CustomObjectcustomObject
CustomerCustomer
CustomerAddressCustomerAddress
CustomerInfoCustomerInfo
CustomerPaymentInstrumentCustomerPaymentInstrument
CustomerPaymentInstrumentRequestCustomerPaymentInstrumentRequest
CustomerProductListCustomerProductList
CustomerProductListItemCustomerProductListItem
CustomerProductListItemPurchaseCustomerProductListItemPurchase
GiftCertificateGiftCertificate
GiftCertificateItemGiftCertificateItem
OptionItemOptionItem
OrderOrder
OrderAddressOrderAddress
OrderPaymentInstrumentOrderPaymentInstrument
OrderPaymentInstrumentRequestOrderPaymentInstrumentRequest
PathRecordPathRecord
PaymentCardSpecPaymentCardSpec
PaymentMethodPaymentMethod)
PriceAdjustmentPriceAdjustment
PriceAdjustmentRequestPriceAdjustmentRequest
ProductProduct
ProductItemProductItem
ProductListItemCustomerProductListItem
ProductListItemReferenceProductListItemReference
ProductListLinkProductListLink
ProductSearchHitProductSearchHit
PromotionPromotion
PublicProductListPublicProductList
PublicProductListItemPublicProductListItem
PublicProductListLinkProductListLink
RecommendationRecommendation
ShipmentShipment
ShippingItemShippingItem
ShippingMethodShippingMethod
ShippingPromotionShippingPromotion
StoreStore
SuggestedCategorySuggestedCategory
SuggestedPhraseSuggestedPhrase
SuggestedProductSuggestedProduct
SuggestionSuggestion