• Getting Started
  • API Reference

BScheduler Partner Authentication Integration Gateway

Purpose of the Integration

This Partner Authentication Integration Gateway is intended to support the authentication of users from partners such as Karmak into BScheduler. The gateway provides a secure, streamlined authentication flow that allows partner systems to seamlessly integrate their users into the BScheduler platform.

Getting Started

API Key Requirements

To use this integration, partners must obtain an API key from BlueTread. Each API key is:

  • Unique to the tenant/account - Ensures secure, isolated authentication
  • Provided and managed by BlueTread - Contact BlueTread to receive your API key
  • Required for all authentication requests - Must be included in the Authorization header

Partner Authentication Login Endpoint

Endpoint Details

POST /api/v1/partner-auth-login

This is the primary endpoint for partner authentication. It handles both user creation and login in a single request.

Authentication

  • Authorization Header: Required - Include your tenant-specific API key provided by BlueTread
    Code
    Authorization: Bearer YOUR_API_KEY_HERE

Request Parameters

Required Fields

ParameterTypeDescription
userIdstringUnique identifier for the user from the integration partner system. If the userId does not exist in BScheduler, a new user will be created automatically.
userDataobjectUser information object (see below)
providerstringName of the partner requesting the authentication flow (e.g., "karmak")

userData Object

FieldTypeRequiredDescription
emailstringYesUser's email address
firstNamestringYesUser's first name
lastNamestringYesUser's last name
contactTypeIdsarray of integersNoList of contact type identifiers (see mapping table below)

Contact Type to BScheduler Role Mapping

Contact types from the partner system are automatically mapped to BScheduler roles according to the following table.

Important Notes:

  • If no contact types are provided, new users will be assigned the User role by default
  • Contact types are additive - users can be assigned multiple roles. For example, if a user has contact type 16 (IT) and contact type 11 (Foreman) in the array, they will receive both the Admin and Technician roles in BScheduler
IDContact TypeBScheduler Role
1Accounts PayableUser
2Accounts ReceivableUser
3BuyerUser
4CFOUser
5ControllerUser
6Customer ServiceUser
7Decision MakerUser
8DispatcherUser
9DriverUser
10Fleet ManagerUser
11ForemanTechnician
12General ManagerUser
13Human ResourcesUser
14InstallerUser
15Inventory ManagerUser
16ITAdmin
17Leasing ManagerUser
18MaintenanceUser
19MarketingUser
20Office ManagerUser
21OperationsUser
22OwnerUser
23PartsUser
24Parts BuyerUser
25Parts ManagerUser
26PresidentUser
27ProcurementUser
28Purchasing ManagerUser
29Rental ManagerUser
30SafetyUser
31SalesUser
32Sales ManagerUser
33SchedulerUser
34ServiceUser
35Service ManagerUser
36Shop ContactUser
37SupervisorUser
38TechnicianTechnician
39Title ClerkUser
40Warranty CoordinatorUser

Request Example

Code
{ "userId": "12345", "provider": "karmak", "userData": { "email": "[email protected]", "firstName": "John", "lastName": "Doe", "contactTypeIds": [11, 38] } }

Response

Upon successful authentication, the endpoint returns:

Code
{ "redirectUrl": "https://bscheduler.app/auth/login?token=...", "expiresInSeconds": 300 }

Authentication Flow

  1. User Creation or Lookup:

    • New Users: If the userId does not exist in BScheduler, a new user is created using the provided userData and contact types are automatically mapped to the appropriate BScheduler roles
    • Existing Users: If the userId exists, the existing user's information and roles remain unchanged. The user will be authenticated and signed in with their current profile and permissions
  2. Login Processing:

    • The login request is processed and validated
    • A secure, one-time use authentication token is generated
  3. Redirect URL:

    • A short-lived redirect URL is returned in the response
    • When followed, this URL will sign the user into BScheduler
    • The URL is valid for a limited time (typically 10 minutes) and can only be used once

Error Responses

Status CodeDescription
400Bad Request - Invalid input or missing required fields
401Unauthorized - Invalid or missing API key
403Forbidden - Insufficient permissions
500Internal Server Error - Login processing failed
503Service Unavailable - Backend service temporarily unavailable

Support

For API key requests, technical support, or questions about the integration:

  • Email: [email protected]
  • Purpose: API key provisioning and integration assistance
Last modified on January 9, 2026
On this page
  • Purpose of the Integration
  • Getting Started
    • API Key Requirements
  • Partner Authentication Login Endpoint
    • Endpoint Details
    • Authentication
    • Request Parameters
    • Contact Type to BScheduler Role Mapping
    • Request Example
    • Response
    • Authentication Flow
    • Error Responses
  • Support
JSON
JSON