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

  1. Partner Registration: Partners must be registered and approved by GAINS clients
  2. Token Generation: Approved partners receive authentication credentials
  3. Token Usage: Include bearer token in Authorization header for all API calls
  4. 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 CodeErrorDescription
401UnauthorizedInvalid or missing bearer token
403ForbiddenPartner not authorized for requested client/SKU
422Unprocessable EntitySupplier code mismatch

Getting Started

  1. Contact GAINS: Request partner API access through your GAINS client relationship
  2. Complete Registration: Provide necessary business and technical information
  3. Receive Credentials: Obtain authentication tokens and supplier codes
  4. Test Integration: Use provided test endpoints to validate your implementation
  5. 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.