Partner Authentication
SUBJECT TO CHANGE
Authentication Method
GAINS Connect uses OAuth 2.0 with JWT tokens for partner authentication. Partners must obtain and include valid bearer tokens in all API requests.
Authentication Flow
- Partner Registration: Partners must be registered and approved by GAINS clients
- Token Generation: Approved partners receive authentication credentials
- Token Usage: Include bearer token in Authorization header for all API calls
- Token Validation: Each request validates partner authorization for specific client data
Required Headers
Authorization: Bearer {jwt_token}
X-Partner-Supplier: {supplier_code}
Content-Type: application/json
Multi-Tenant Access
Partners may be authorized to access multiple GAINS clients. The authentication system ensures:
- Tenant Isolation: Partners can only access data for clients who have authorized them
- Scope Limitation: Access is restricted to specific SKUs and operations
- Audit Trail: All partner actions are logged and trackable
Security Considerations
- Token Expiration: Bearer tokens have limited lifespans and must be refreshed
- Rate Limiting: API calls are subject to rate limits to prevent abuse
- Data Validation: All requests undergo strict validation before processing
- Supplier Verification: Supplier codes in requests must match authenticated partner credentials
Error Handling
Common authentication errors:
Status Code | Error | Description |
---|---|---|
401 | Unauthorized | Invalid or missing bearer token |
403 | Forbidden | Partner not authorized for requested client/SKU |
422 | Unprocessable Entity | Supplier code mismatch |
Getting Started
- Contact GAINS: Request partner API access through your GAINS client relationship
- Complete Registration: Provide necessary business and technical information
- Receive Credentials: Obtain authentication tokens and supplier codes
- Test Integration: Use provided test endpoints to validate your implementation
- Go Live: Begin updating vendor parameters in production
Support
For technical support and questions regarding Partner APIs:
- Documentation: Refer to this guide and API specifications
- Support Portal: Access through your GAINS client portal
- Integration Issues: Contact your GAINS client representative
This documentation covers interim functionality. Additional features and endpoints may be added as the Partner API platform evolves.
Updated 2 months ago