Skip to main content

Platform GraphQL API

The Platform GraphQL API provides advanced capabilities for creating and managing complete offers. Access the API at:

Authentication

Both endpoints include a GraphQL playground for interactive API exploration. To authenticate:

  1. In the browser authentication popup:

    • Leave the username empty
    • Enter your API key as the password
  2. In the playground's Headers section, add:

    {
    "Authorization": "Bearer YOUR-API-KEY",
    "x-partner-id": "YOUR-PARTNER-ID" // Required if you have multiple partner IDs
    }
Partner ID Mapping

If you're working with multiple partner IDs or are a platform serving multiple partners:

  • Each Partner ID must be mapped to your API key
  • Contact support to set up new ID mappings

Environments

  • Stable: A clone of our production environment, ideal for development and testing
  • Production: Live environment for real transactions
Previous Customer Digital Onboarding Users

If you previously used the Customer Digital Onboarding flow and the partner graph, your existing credentials will work with the partner-platform graph.

Security Best Practices

  1. Keep your API key secure and never expose it in client-side code
  2. Use environment variables for storing credentials
  3. Request new API keys if they are compromised
  4. Use HTTPS for all API communications

AI Integration Prompt

Copy this prompt and paste it into your AI coding assistant to set up the API client:

Set up Platform API client
Preview prompt
I need to integrate with the Prosperity Partner Platform GraphQL API. Help me set up the API client.

## Authentication
- Endpoint: https://api.stable.life.li/graphql/partner-platform (test) or https://api.life.li/graphql/partner-platform (production)
- Set header: Authorization: Bearer YOUR-API-KEY
- Set header: x-partner-id: YOUR-PARTNER-ID
- All requests are POST with Content-Type: application/json
- The body is: { "query": "...", "variables": { ... } }

## What I need
Build a GraphQL API client that:
1. Makes authenticated POST requests to the partner-platform endpoint
2. Handles the Authorization and x-partner-id headers
3. Parses GraphQL responses and handles errors via the ErrorInterface pattern
4. Uses the stable environment for development

The API uses a union-type error pattern — mutations return either success types or error types that implement ErrorInterface. Never query error types directly, always use `... on ErrorInterface { __typename message }` to catch all errors.

Interactive API Explorer

Explore the schema and run queries directly in the GraphQL playground:

Authenticate via the browser Basic Auth popup (leave username empty, enter your API key as password), then add your headers in the playground's Headers tab.