Skip to content

API Reference

Dmytro Katashev edited this page Aug 12, 2024 · 1 revision

API Reference

Welcome to the API Reference for the SFCC Web Service Library. This section provides an organized collection of detailed documentation for each core class within the library. Click on any class below to view its full documentation, including attributes, methods, and usage examples.

Core Classes

The BaseService class is the foundation for all service interactions within the library. It provides core methods for service creation, execution, and error handling, which can be extended by other service classes.

The RestService class extends BaseService to handle RESTful web services, simplifying HTTP requests, response parsing, and error management.

The SOAPService class extends BaseService to interact with SOAP-based web services, handling XML request and response processing.

The SFTPService class extends BaseService to facilitate secure file transfers using the SFTP protocol.

The WebDavService class extends BaseService to interact with WebDAV servers, supporting file and directory management over the WebDAV protocol.

Utilities

The ByteStream utility is used for managing and manipulating byte streams in Salesforce Commerce Cloud (SFCC). This utility is particularly useful when dealing with binary data, such as file uploads and downloads, within web services.

The contentHeader utility provides functions for parsing and formatting Content-Type and Content-Disposition headers. This utility is essential for services that need to manipulate file attachments or handle multipart data.

The headers utility provides functions for parsing and formatting HTTP headers. It allows for easy conversion between raw header strings and key-value objects, enhancing the flexibility and control over HTTP headers in your web requests, especially when dealing with custom or complex headers.

The multipart utility provides functions for handling multipart form data, including the creation and parsing of multipart requests. This utility is essential for services that interact with APIs requiring complex form submissions involving file uploads.

The urlencoded utility provides functions for working with URL-encoded data, converting between objects and URL-encoded strings. This utility is useful in scenarios where data must be sent in URL query parameters or as part of HTTP POST bodies.


Explore each class to understand their specific attributes, methods, and how to integrate them into your SFCC projects.

Clone this wiki locally