> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crewpass.co.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# The partner's effective granted scopes (derived, no key minted)

> What this partner can do, without minting a key or calling the live gate.

Customer scopes are derived from the employer ``subscriptionPlan`` (the same
resolver the auth path uses); external scopes are the per-contract overrides.
An empty set means the plan has no API access (Essentials / no plan), which
the console surfaces as an upgrade prompt rather than an error.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/admin/partners/{partner_id}/effective-scopes
openapi: 3.1.0
info:
  title: crewpass-api-v2
  description: >-
    CrewPass V2 Partner API — a scope-gated, consent-intersected, multi-tenant
    front door onto existing CrewPass crew/vessel/compliance data.
  version: 0.1.0
servers: []
security: []
paths:
  /api/v2/admin/partners/{partner_id}/effective-scopes:
    get:
      tags:
        - admin
      summary: The partner's effective granted scopes (derived, no key minted)
      description: >-
        What this partner can do, without minting a key or calling the live
        gate.


        Customer scopes are derived from the employer ``subscriptionPlan`` (the
        same

        resolver the auth path uses); external scopes are the per-contract
        overrides.

        An empty set means the plan has no API access (Essentials / no plan),
        which

        the console surfaces as an upgrade prompt rather than an error.
      operationId: effective_scopes_api_v2_admin_partners__partner_id__effective_scopes_get
      parameters:
        - name: partner_id
          in: path
          required: true
          schema:
            type: string
            title: Partner Id
        - name: X-Internal-Auth
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Internal-Auth
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EffectiveScopesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    EffectiveScopesResponse:
      properties:
        partner_id:
          type: string
          title: Partner Id
        partner_type:
          type: string
          enum:
            - customer
            - external
          title: Partner Type
        subscription_plan:
          anyOf:
            - type: string
            - type: 'null'
          title: Subscription Plan
        granted_scopes:
          items:
            type: string
          type: array
          title: Granted Scopes
        api_enabled:
          type: boolean
          title: Api Enabled
      type: object
      required:
        - partner_id
        - partner_type
        - granted_scopes
        - api_enabled
      title: EffectiveScopesResponse
      description: |-
        A partner's effective granted scopes, derived WITHOUT minting a key.

        For customer partners the scopes are derived from the employer plan
        (``subscription_plan``); for external partners they are the per-contract
        ``scope_overrides``. ``api_enabled`` is false when the set is empty (an
        Essentials / no-plan customer) — the console renders the upgrade prompt.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````