Install and authorize
There is no partner dashboard yet: everything on this page is a Partner API call, which any GraphQL client can make.
POST partners.kaladan.shop/api/2026-10/graphql1. Sign in as a partner
Section titled “1. Sign in as a partner”mutation { partnerOtpRequest(phone: "09121234567") { challenge { challengeId resendAfter } userErrors { code } } }The code arrives by SMS. Exchange it for your account session:
mutation { partnerOtpVerify(challengeId: "…", code: "12345", organizationName: "Studio Mehr") { tokens { accessToken refreshToken } organization { id } userErrors { code field } }}Your first verification creates your organization, with you as its owner. Then open an organization session, which nearly every other call needs:
mutation { partnerSessionCreate(organizationId: "…") { tokens { accessToken refreshToken } } }Send it as Authorization: Bearer …. Refresh tokens rotate and are single-use:
presenting a spent one ends the session, on the assumption it was stolen. Never
refresh twice at once.
2. Create the app
Section titled “2. Create the app”mutation { appCreate(input: { name: "Anbar Sync" handle: "anbar-sync" distribution: CUSTOM applicationUrl: "https://anbar.example.ir/kaladan" }) { app { id oauth { clientId } } clientSecret signingSecret userErrors { code field } }}- The client id (
client_…) is permanent. - The client secret authenticates your server at the token endpoint.
appSecretRotatereplaces it immediately. - The signing secret (
whsec_…) signs your webhooks.appSigningSecretRotatekeeps the old one signing alongside the new for a day.
Both secrets are returned once. Store them before you do anything else.
3. Declare a version
Section titled “3. Declare a version”mutation { appVersionCreate(appId: "…", input: { versionName: "1.0.0" requestedScopes: [READ_PRODUCTS, WRITE_INVENTORY, READ_ORDERS] requiresOfflineAccess: true redirectUris: ["https://anbar.example.ir/kaladan/callback"] webhookSubscriptions: [ { topic: "orders/paid", endpoint: "https://anbar.example.ir/hooks" } { topic: "app/uninstalled", endpoint: "https://anbar.example.ir/hooks" } ] }) { appVersion { id status } userErrors { code field } }}Then appVersionSubmit, which reports every blocker at once, and
appVersionPublish. A submitted version is frozen.
Publishing makes it the version new installs get; existing installs keep theirs
until the merchant re-approves.
4. Install on a shop
Section titled “4. Install on a shop”For a custom app, make a link for the one shop it is for:
mutation { appInstallLinkCreate(appId: "…", shopHandle: "golnar") { installLink expiresAt } }The merchant opens the link (it lasts 30 days) and is sent to your
applicationUrl with ?shop=…. Your app then starts the authorization.
5. Authorize with OAuth 2 and PKCE
Section titled “5. Authorize with OAuth 2 and PKCE”Send the merchant’s browser to Kaladan’s approval page:
https://admin.kaladan.shop/oauth/authorize ?client_id=client_… &redirect_uri=https://anbar.example.ir/kaladan/callback &state=… # yours; check it on the way back &code_challenge=… # BASE64URL(SHA256(code_verifier)) &code_challenge_method=S256 &shop=golnar.kaladan.store # the platform host, not a custom domainThe approval page lists every scope in the merchant’s own words, whether the app works offline, and its data disclosure. Only someone allowed to manage apps, and holding every scope the app asks for, can approve. A wrong client id or an unregistered redirect URI shows an error and never redirects.
Kaladan then redirects to your redirect_uri with code, state and shop,
or with error=access_denied if the merchant declined.
6. Exchange the code
Section titled “6. Exchange the code”curl https://golnar.kaladan.store/admin/oauth/token \ -d grant_type=authorization_code \ -d code=… \ -d code_verifier=… \ -d redirect_uri=https://anbar.example.ir/kaladan/callback \ -d client_id=client_… \ -d client_secret=…{ "access_token": "…", "token_type": "bearer", "expires_in": 900, "refresh_token": "…", "scope": "READ_PRODUCTS WRITE_INVENTORY READ_ORDERS"}The token endpoint is standard RFC 6749: form-encoded, client_secret_post or
HTTP Basic, and the PKCE verifier is always required.
Online and offline tokens
Section titled “Online and offline tokens”| Offline | Online | |
|---|---|---|
| When | The version sets requiresOfflineAccess | Otherwise |
| Acts as | The app | One staff member, and never more than they may do |
| Access token | 15 minutes | 15 minutes |
| Refresh | A single-use refresh token, valid 30 days from its last use | None: authorize again |
Each refresh issues a token with the scopes as currently approved. Uninstalling the app revokes every token at once.
7. Call the Admin API
Section titled “7. Call the Admin API”curl https://golnar.kaladan.store/admin/api/2026-10/graphql \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -H 'Content-Type: application/json' \ -d '{"query":"{ products(first: 5) { nodes { title } } }"}'The shop is read from the host and must match the token, or the answer is
401. A query that touches any field outside the grant is refused whole with
SCOPE_ESCALATION, listing what was missing. See the Admin API.