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
- 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.
The following DATA API documents support custom properties.
Document Type | Reference |
---|---|
Campaign | campaign |
Catalog | catalog |
Category | category |
ContentAsset | content_asset |
ContentFolder | content_folder |
Coupon | coupon |
CustomObject | custom_object |
Customer | customer |
CustomerAddress | customer_address |
CustomerGroup | customer_group |
GiftCertificate | gift_certificate |
OrderUpdateRequest | order_update_request |
OrganizationPreferences | organization_preferences |
PathRecord | path_record |
PaymentInstrumentUpdateRequest | payment_instrument_update_request |
PaymentTransactionUpdateRequest | payment_transaction_update_request |
Product | product |
ProductInventoryRecord | product_inventory_record |
Promotion | promotion |
PromotionCampaignAssignment | promotion_campaign_assignment |
RedemptionLimitPerPeriod | redemption_limit_per_period |
RedemptionLimits | redemption_limits |
ShippingAddressUpdateRequest | shipping_address_update_request |
SitePreferences | site_preferences |
SlotConfiguration | slot_configuration |
SortingRule | sorting_rule |
SortingRuleStep | sorting_rule_step |
Store | store |