Announcements
Why Use SCAPI
Base URL and Request Formation
Quick Start
SCAPI Caching
SCAPI CDN Caching
SCAPI Response Compression
SCAPI Specifications
B2C Commerce Release Notes
Ask the Community
Compressed responses reduce the amount of data transferred between B2C Commerce and your API client. The larger the response, the bigger the benefit.
SCAPI compresses a response only if the request includes the Accept-Encoding header.
Include both Brotli and Gzip in the Accept-Encoding header of every SCAPI request:
1Accept-Encoding: br, gzipThe B2C Commerce web tier compresses larger responses with Gzip, and the CDN compresses smaller responses with Brotli. SCAPI doesn’t compress the smallest responses or error responses.
To turn off compression, omit the Accept-Encoding header.
Accept-Encoding Request Header | Content-Encoding of the Response |
|---|---|
br, gzip (recommended) | gzip (web tier) for larger responses, br (CDN) for smaller responses |
gzip | gzip |
| Not sent | Uncompressed |