CartirraAPI
Get API keys

Retrieve key context

gethttps://api.cartirra.com/v1/me/context

Current actor, business, mode, permissions, and the plan (features, limits, usage) for every role.

Authentication
Secret key (Authorization: Bearer sk_…). How keys work

Responses

200OKRequestContextResponse
  • actorActorRefDtorequired
  • surfacestringrequired

    One of dashboard, server, widget

  • tenantContextTenantDtonullable
  • modestringnullable

    One of test, live

  • store_scopestringnullable

    Store the caller is limited to; null = all stores

  • rolestringnullable
  • permissionsarray of stringrequired

    * for super admins

  • planContextPlanRefDtonullable

    The business's plan; null without a business or on the widget

  • featuresarray of stringrequired

    Features the plan and add-ons include (e.g. data_exports, warranties); empty without a plan

  • limitsContextPlanLimitsDtonullable
  • usageContextPlanUsageDtonullable

Errors

Every error has the same body: { "error": { "code", "message", "details"?, "request_id" } }. See Errors for every code.

  • 400The request is malformed or a field is invalid (`VALIDATION_FAILED`).
  • 401Missing, malformed, revoked or expired API key (`UNAUTHENTICATED`), or a key this route does not accept, such as a public key (`CREDENTIAL_NOT_ACCEPTED`).
  • 403The key may not do this (`PERMISSION_DENIED`, `LIVE_MODE_NOT_ENABLED`, `PLAN_LIMIT_REACHED`, …).
  • 429Too many requests for this key (`RATE_LIMITED`); wait for `Retry-After` seconds.
  • 500Something went wrong on our side (`INTERNAL`). Safe to retry with the same `Idempotency-Key`.