Skip to content

Quickstart

This quickstart walks through the full journey with fictitious sample data. You need a Seller account with at least one registered product, a Sandbox API key and its base URL, all issued during Seller onboarding.

  1. Configure your environment.

    Terminal window
    export LICENCHAIN_API_BASE_URL="https://sandbox-api.licenchain.example" # use the URL issued to you
    export LICENCHAIN_API_KEY="..." # from your secret manager, never committed
  2. Submit a licensing request once your own order process has approved the order.

    Terminal window
    curl --request POST "$LICENCHAIN_API_BASE_URL/api/integrations/v1/licensing-requests" \
    --header "Authorization: Bearer $LICENCHAIN_API_KEY" \
    --header "Content-Type: application/json" \
    --header "Idempotency-Key: 5d1f8a3c-2b7e-4c49-9f0a-6e3b2d4c8a17" \
    --data '{
    "externalOrderId": "SELLER-PO-EXAMPLE-001",
    "productRef": "ai-specialist-standard",
    "buyer": {
    "organizationName": "Example Research Cooperative",
    "contactEmail": "licensing@example.com"
    },
    "price": {
    "currency": "EUR",
    "netLicensedAmount": "1200.00"
    },
    "validity": {
    "validFrom": "2027-01-01T00:00:00Z",
    "validUntil": "2028-01-01T00:00:00Z"
    },
    "quantity": 25
    }'

    A 201 Created response contains the request ID and the Buyer onboarding link:

    {
    "schemaVersion": "1.0",
    "requestId": "lreq_7Q2M9K4X8P3D",
    "externalOrderId": "SELLER-PO-EXAMPLE-001",
    "productRef": "ai-specialist-standard",
    "termsVersion": "2026.2",
    "status": "awaiting_buyer",
    "onboarding": {
    "url": "https://sandbox.licenchain.example/onboarding/REDACTED-ONE-TIME-TOKEN",
    "expiresAt": "2026-12-08T09:00:00Z"
    },
    "createdAt": "2026-11-08T09:00:00Z"
    }
  3. Send onboarding.url to the Buyer contact through your own channel. The link is single-use and must not be logged.

  4. Receive webhooks. onboarding.completed tells you the Buyer accepted the terms; it is not issuance. licence.issued delivers the authoritative licenceKey — store it with the order. See Webhooks.

  5. Verify before granting new access.

    Terminal window
    curl --request POST "$LICENCHAIN_API_BASE_URL/api/integrations/v1/licenses/verify" \
    --header "Authorization: Bearer $LICENCHAIN_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{
    "licenceKey": "11155111:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:42"
    }'
    200 OK — illustrative valid result
    {
    "schemaVersion": "1.0",
    "licenceKey": "11155111:0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:42",
    "productRef": "ai-specialist-standard",
    "buyerOrganizationId": "org_2B5D8F1H4K7M",
    "licenceHolderId": "org_2B5D8F1H4K7M",
    "seatLimit": 25,
    "issued": true,
    "valid": true,
    "status": "active",
    "reason": null,
    "validFrom": "2027-01-01T00:00:00Z",
    "validUntil": "2028-01-01T00:00:00Z",
    "checkedAt": "2027-03-15T10:30:00Z",
    "revision": 3
    }

    Grant access only when valid is true and your own user authentication and assignment checks pass.