OCAPI Custom Properties

The Open Commerce API allows you 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 tables below. Custom properties are always marked with the prefix c_ and have therefore their own namespace.

The example below shows a document response including some custom properties in OCAPI:

The following value types are supported in OCAPI 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 OCAPI.

The tables below lists the document types that support custom properties in OCAPI SHOP and DATA APIs. OCAPI modify... hooks that used the referenced document types can add custom properties using the c_ prefix. See Customization With Hooks, Hooks for SHOP API, and Hooks for DATA API for more information.

The following shop API documents support custom properties.

Document TypeReference
ApproachingDiscountapproaching_discount
Basketbasket
BasketPaymentInstrumentRequestbasket_payment_instrument_request
BonusDiscountLineItembonus_discount_line_item
BundledProductItembundled_product_item
Categorycategory
Contentcontent
ContentFoldercontent_folder
CouponItemcoupon_item
CustomObjectcustom_object
Customercustomer
CustomerAddresscustomer_address
CustomerInfocustomer_info
CustomerPaymentInstrumentcustomer_payment_instrument
CustomerPaymentInstrumentRequestcustomer_payment_instrument_request
CustomerProductListcustomer_product_list
CustomerProductListItemcustomer_product_list_item
CustomerProductListItemPurchasecustomer_product_list_item_purchase
GiftCertificategift_certificate
GiftCertificateItemgift_certificate_item
OptionItemoption_item
Orderorder
OrderAddressorder_address
OrderPaymentInstrumentorder_payment_instrument
OrderPaymentInstrumentRequestorder_payment_instrument_request
PathRecordpath_record
PaymentCardSpecpayment_card_spec
PaymentMethodpayment_method
PriceAdjustmentprice_adjustment
PriceAdjustmentRequestprice_adjustment_request
Productproduct
ProductItemproduct_item
ProductListItemproduct_list_item
ProductListItemReferenceproduct_list_item_reference
ProductListLinkproduct_list_link
ProductSearchHitproduct_search_hit
Promotionpromotion
PublicProductListpublic_product_list
PublicProductListItempublic_product_list_item
PublicProductListLinkpublic_product_list_link
Recommendationrecommendation
Shipmentshipment
ShippingItemshipping_item
ShippingMethodshipping_method
ShippingPromotionshipping_promotion
Storestore
SuggestedCategorysuggested_category
SuggestedContentsuggested_content
SuggestedPhrasesuggested_phrase
SuggestedProductsuggested_product
Suggestionsuggestion

The following DATA API documents support custom properties.

Document TypeReference
Campaigncampaign
Catalogcatalog
Categorycategory
ContentAssetcontent_asset
ContentFoldercontent_folder
Couponcoupon
CustomObjectcustom_object
Customercustomer
CustomerAddresscustomer_address
CustomerGroupcustomer_group
GiftCertificategift_certificate
OrderUpdateRequestorder_update_request
OrganizationPreferencesorganization_preferences
PathRecordpath_record
PaymentInstrumentUpdateRequestpayment_instrument_update_request
PaymentTransactionUpdateRequestpayment_transaction_update_request
Productproduct
ProductInventoryRecordproduct_inventory_record
Promotionpromotion
PromotionCampaignAssignmentpromotion_campaign_assignment
RedemptionLimitPerPeriodredemption_limit_per_period
RedemptionLimitsredemption_limits
ShippingAddressUpdateRequestshipping_address_update_request
SitePreferencessite_preferences
SlotConfigurationslot_configuration
SortingRulesorting_rule
SortingRuleStepsorting_rule_step
Storestore