Overview
The PromoStandards Client is the main entry point for interacting with PromoStandards SOAP APIs. Proper configuration ensures your application can communicate with the correct service endpoints and handle responses appropriately.Creating a Client
The Client is initialized with a configuration object containing credentials, endpoints, and optional response format preferences:Configuration Options
Authentication Credentials
Username provided by the supplier for API access
Password provided by the supplier for API access
Credentials are optional at initialization but required for API calls. See Authentication for details.
Service Endpoints
Array of service endpoint configurations
ServiceEndpointType structure:
Endpoint Properties
type (ServiceType) The PromoStandards service type. Supported values:InventoryInvoiceMediaContentOrderShipmentNotificationOrderStatusProductDataProductPricingAndConfigurationPurchaseOrder
"2.0.0", "1.0.0"). The SDK extracts the major version for SOAP requests.
url (string)
Full URL to the SOAP service endpoint provided by your supplier.
Response Format
Determines the format of API responses
json- Responses are automatically converted from XML to JSON (default)xml- Raw XML responses from the SOAP service
Multiple Service Configuration
Most PromoStandards integrations require multiple services. Configure all needed endpoints during initialization:Retrieving Endpoints
The SDK automatically retrieves the correct endpoint when you call a service method. You can also manually access an endpoint:Configuration Best Practices
Environment Variables
Store credentials and URLs in environment variables, never in source code
Centralized Config
Create a single configuration module to manage all supplier endpoints
Version Management
Document which API versions each supplier supports
Error Handling
Always wrap endpoint access in try-catch blocks
Example: Environment-Based Configuration
Next Steps
Authentication
Learn how credentials are used in API requests
Response Formats
Understand XML to JSON conversion