Announcements
Why Use SCAPI
Base URL and Request Formation
Quick Start
Hook Method Details
Custom Properties
Remote Includes
SCAPI Specifications
B2C Commerce Release Notes
Ask the Community
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.
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}SCAPI supports the following value types for input and output of custom properties:
The value types HTML and Image are only supported as output, but not as input value type for custom properties in SCAPI.
Note
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.
The following Shopper API documents support custom properties.
| Document Type | Reference |
|---|---|
| Basket v1 | Basket v1 |
| Basket v2 | Basket v2 |
| BasketPaymentInstrumentRequest | BasketPaymentInstrumentRequest |
| BonusDiscountLineItem | BonusDiscountLineItem |
| Category | Category |
| CouponItem | CouponItem |
| CustomObject | customObject |
| Customer | Customer |
| CustomerAddress | CustomerAddress |
| CustomerInfo | CustomerInfo |
| CustomerPaymentInstrument | CustomerPaymentInstrument |
| CustomerPaymentInstrumentRequest | CustomerPaymentInstrumentRequest |
| CustomerProductList | CustomerProductList |
| CustomerProductListItem | CustomerProductListItem |
| CustomerProductListItemPurchase | CustomerProductListItemPurchase |
| GiftCertificate | GiftCertificate |
| GiftCertificateItem | GiftCertificateItem |
| OptionItem | OptionItem |
| Order | Order |
| OrderAddress | OrderAddress |
| OrderPaymentInstrument | OrderPaymentInstrument |
| OrderPaymentInstrumentRequest | OrderPaymentInstrumentRequest |
| PathRecord | PathRecord |
| PaymentCardSpec | PaymentCardSpec |
| PaymentMethod | PaymentMethod) |
| PriceAdjustment | PriceAdjustment |
| PriceAdjustmentRequest | PriceAdjustmentRequest |
| Product | Product |
| ProductItem | ProductItem |
| ProductListItem | CustomerProductListItem |
| ProductListItemReference | ProductListItemReference |
| ProductListLink | ProductListLink |
| ProductSearchHit | ProductSearchHit |
| Promotion | Promotion |
| PublicProductList | PublicProductList |
| PublicProductListItem | PublicProductListItem |
| PublicProductListLink | ProductListLink |
| Recommendation | Recommendation |
| Shipment | Shipment |
| ShippingItem | ShippingItem |
| ShippingMethod | ShippingMethod |
| ShippingPromotion | ShippingPromotion |
| Store | Store |
| SuggestedCategory | SuggestedCategory |
| SuggestedPhrase | SuggestedPhrase |
| SuggestedProduct | SuggestedProduct |
| Suggestion | Suggestion |