Loading
Slack製品の問い合わせ先はSalesforce Helpへ統合・変更されます続きを読む
PHPの脆弱性に関する監視状況について 続きを読む
メールアドレスがデフォルトのログイン方式となります 続きを読む
Experience Cloud – Lightning Web Runtimeサイトにおける機能低下続きを読む

scapi admin api encoding of special character "+" to avoid silent failures

公開日: Nov 4, 2026
説明

The user could not delete a custom object through the SCAPI Custom Objects API when the object key contained a + character.

when running the DELETE request without encoding the key in the endpoint path, for example: https://{{shortcode}}.api.commercecloud.salesforce.com/custom-object/custom-objects/v1/organizations/{{orgID}}/sites/{{siteId}}/custom-objects/NewsletterSubscription/user-testing+1@emailtest-domain.com.

The API returns 204 No Content, but the object remained present, making it unclear whether the key had been resolved correctly. In addition, when reviewing the custom object in the business manager it further confirms the key is not deleted meaning silent failure of 204 no content did not effect any delete.

Further tested below encodings for the key path parameter. Each request returned 204, and the object was still present afterwards:
user-testing%2B1%40emailtest-domain.com.
user-testing%2B1@emailtest-domain.com.
user-testing%252B1@emailtest-domain.com.
user-testing%252B1%2540emailtest-domain.com.

There was some guidance on what special characters covers “,” and “%” (the “Encode Special Characters” guide and the encodeSCAPISpecialCharacters helper in commerce-sdk). However it does not cover  how other characters such as “+” should be encoded in path parameters.

解決策

1. Encode the + character in the custom object key path parameter using triple encoding as %25252B before sending the SCAPI Custom Objects API DELETE request.

2. Run the DELETE request with the correctly encoded key in the endpoint path, for example: https://{{shortcode}}.api.commercecloud.salesforce.com/custom-object/custom-objects/v1/organizations/{{orgID}}/sites/{{siteId}}/custom-objects/NewsletterSubscription/user-testing%25252B1@emailtest-domain.com.

3. Confirm the result after applying the triple encoding. You should see that custom object is deleted by reviewing it through business manager interface.

ナレッジ記事番号

005466044

 
読み込み中
Salesforce Help | Article