Skip to content
Internal docs

Quickstart

Before you start

You need:

  • A kurnl provider account — contact your kurnl account manager to get onboarded
  • An API key from Settings → API Key (/api-keys) with the scopes plans:read and provisioning:write (see Partner API keys)
  • A test location hash / unit you control (from a Marketplace redirect or your account manager)

Step 1 — Verify your credentials

Terminal window
curl https://middleware.kurnl.ca/partner/marketplace/plans/me \
-H "X-API-Key: YOUR_API_KEY"

You should get a list of your active plan versions. If you get a 401, double-check your API key (krnl_...).

Step 2 — Pick a plan version ID

The response is wrapped as {"plan_versions": [...]} — copy one plan version’s id. This is your plan_version_id for the next step.

Step 3 — Provision your first subscriber

Terminal window
curl -X POST https://middleware.kurnl.ca/partner/provisioning/provider-initiated \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"plan_version_id": "PLAN_VERSION_ID_FROM_STEP_2",
"location_hash": "YOUR_TEST_LOCATION_HASH",
"subscriber": {
"email": "test+qs@example.com",
"username": "testuser",
"password": "test-password-123",
"customer_type": "RESIDENTIAL",
"invoice_contact_detail": {
"firstname": "Test",
"lastname": "User",
"email": "test+qs@example.com"
},
"contract_contact_detail": {
"firstname": "Test",
"lastname": "User",
"email": "test+qs@example.com"
},
"invoice_address": {
"street": "Maple St",
"housenumber": "42",
"postalcode": "A1B 2C3",
"city": "Anytown",
"province": "ON"
}
}
}'

Expected response:

{
"job_id": "3d6e8f12-...",
"subscription_id": "8c4a1b9e-...",
"subscriber_id": "2f5d7a0c-...",
"message": "Provisioning started",
"route": "provision",
"billing_owner": "partner",
"unit_confirmation_pending": false
}

This is the provider-initiated call (CKO-04): it creates the subscriber and the subscription and starts provisioning the port. In a building where a technician installs the line, route is "install" and job_id is null — see Provider-initiated provisioning.

Step 4 — Check webhook delivery

If you have a webhook URL configured, you should receive provisioning.completed (or provisioning.failed) and subscription.activated once the switch job has run, usually within a minute. provisioning.completed is the one that says the port is live; see Webhooks.

No webhook URL yet? Use webhook.site to get a temporary receiver, then set it as the Webhook URL under Billing → Checkout & Integrations › Partner webhooks in the dashboard and press Send test event.

Next steps