curl --request POST \
--url https://sdp.suki-stage.com/api/v1/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"partner_id": "your-partner-id",
"partner_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"provider_id": "provider-123",
"provider_name": "Dr. John Smith",
"provider_org_id": "org-123",
"provider_specialty": "CARDIOLOGY"
}
'This response has no body data.Register new healthcare provider or link existing provider to partner organization
curl --request POST \
--url https://sdp.suki-stage.com/api/v1/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"partner_id": "your-partner-id",
"partner_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"provider_id": "provider-123",
"provider_name": "Dr. John Smith",
"provider_org_id": "org-123",
"provider_specialty": "CARDIOLOGY"
}
'This response has no body data.| Scenario | Condition | Actions Taken | Response |
|---|---|---|---|
| New User | The provider does not exist in Suki. | • Creates a new organization • Links your partner account to the organization • Creates a new user with the provided details | 201 Created |
| Existing User, New Link | The provider exists but is not yet linked to your partner account. | • Verifies the user and organization details • Links your partner account to the existing organization | 201 Created |
| Existing User, Already Linked | The provider and organization are already linked to your partner account. | • Detects the existing link | 409 Conflict |
import requests
url = "https://sdp.suki.ai/api/v1/auth/register"
payload = {
"partner_id": "your-partner-id",
"partner_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"provider_name": "Dr. John Smith",
"provider_org_id": "org-123",
"provider_id": "provider-123", # Optional
"provider_specialty": "CARDIOLOGY" # Optional, defaults to FAMILY_MEDICINE
}
response = requests.post(url, json=payload)
if response.status_code == 201:
print("Provider registered successfully")
elif response.status_code == 409:
print("Provider already linked to this partner")
else:
print(f"Registration failed: {response.status_code}")
print(response.json())
const response = await fetch('https://sdp.suki.ai/api/v1/auth/register', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
partner_id: 'your-partner-id',
partner_token: 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...',
provider_name: 'Dr. John Smith',
provider_org_id: 'org-123',
provider_id: 'provider-123', // Optional
provider_specialty: 'CARDIOLOGY' // Optional, defaults to FAMILY_MEDICINE
})
});
if (response.status === 201) {
console.log('Provider registered successfully');
} else if (response.status === 409) {
console.log('Provider already linked to this partner');
} else {
const error = await response.json();
console.error(`Registration failed: ${response.status}`, error);
}
RegistrationRequest
Request body for the /auth/register endpoint
Unique identifier for the partner. This will be shared securely by Suki to the partner through a separate partner registration process.
"your-partner-id"
JWT token issued by trusted authorization server. The token must include Provider Email.
"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
Name of the provider.
"Dr. John Smith"
Health system or organization to which the provider belongs.
"org-123"
Optional - Unique identifier for the provider. This is required for Bearer type partners only and will be ignored for other partner types. This must match a pre-defined expression.
"provider-123"
Optional - Medical specialty of the provider. Defaults to FAMILY_MEDICINE if not provided.
"CARDIOLOGY"