Announcements
Why Use SCAPI
Base URL and Request Formation
Quick Start
Client IP Forwarding
Select Response Properties
Encode Special Characters
SCAPI Specifications
B2C Commerce Release Notes
Ask the Community
In SCAPI, the comma (,) is used as a value separator and percent sign (%) is used for URL encoding.
These characters are treated as reserved characters and must be additionally URL encoded in UTF-8 when used within the following resource identifiers for SCAPI requests:
for example: productID, categoryID, and promotionID.
If a comma (,) or percent sign (%) is contained within resource identifiers in request path parameter values, the values must be additionally URL encoded in UTF-8. The following example shows a request for the productId resource identifier: “Flour,1KG”:
1`curl "https://{shortCode}.api.commercecloud.salesforce.com/product/products/v1/organizations/{organizationId}/products/Flour%2C1KG"`When the client submits the request, the request is usually automatically encoded one more time by the HTTP library and sent to SCAPI:
1https://{shortCode}.api.commercecloud.salesforce.com/product/products/v1/organizations/{organizationId}/products/Flour%252C1KGSCAPI decodes the resource identifier in the request:
1ProductId -> "Flour,1KG"If a comma (,) or percent sign (%) is contained within resource identifiers in query parameter values, the values must be additionally URL encoded in UTF-8. The following example shows a request for the productId resource identifier: “Flour,1KG” and “1%Milk”:
1`curl "https://{shortCode}.api.commercecloud.salesforce.com/product/products/v1/organizations/{organizationId}/products?ids=Flour%2C1KG,1%25Milk`When the client submits the request, the request is usually automatically encoded one more time by the HTTP library and sent to SCAPI:
1https://{shortCode}.api.commercecloud.salesforce.com/product/products/v1/organizations/{organizationId}/products?ids=Flour%252C1KG%2C1%2525MilkSCAPI decodes the resource identifier in the request:
1ProductIds -> "Flour,1KG"
2 -> "1%Milk"We generally recommend NOT using special characters like commas (,) or percent signs (%) within resource identifiers.
Note