> ## Documentation Index
> Fetch the complete documentation index at: https://docs.partner-api.tryrima.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get membership status

> For looking up app access by external ID.

The lookup accepts only `hhaexchange` as `external_system` and requires a nonempty `external_id`. It accepts no other request properties and has no company or organization parameter. Invalid input returns `400 invalid_request`; a body over 16 KiB returns `413 payload_too_large`.

The response contains exactly three booleans, without an envelope or identifiers. `enrolled` requires effective Rima coverage plus a linked company membership or a pending, unexpired invitation for the covered employee. `opted_out` is true only when every applicable participation is effectively opted out.

No authorized identity match returns all three values as `false`. Multiple authorized matches return `409 ambiguous_identifier` unless they share one non-null Person ID, including when linked and unlinked records match. Service failures return `500 internal_error` rather than false booleans.


## OpenAPI

````yaml openapi.json POST /v1/get-membership-status
openapi: 3.1.0
info:
  title: Rima Partner API
  version: 0.0.1
  description: >-
    Use `https://partner-api.tryrima.com` for the Rima Partner API.


    Send requests from your backend with `Authorization: Bearer <key>`. Keep the
    key in a secrets manager and out of email, support requests, and shared
    documents. Keys are scoped to approved operations and companies.


    Responses include `x-request-id`. Include that ID and the request timestamp
    when reporting a failed request; never include the key.
servers:
  - url: https://partner-api.tryrima.com
    description: Rima
security: []
paths:
  /v1/get-membership-status:
    post:
      summary: Get membership status
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                external_system:
                  type: string
                  description: Exact supported system name.
                  enum:
                    - hhaexchange
                external_id:
                  type: string
                  description: Opaque ID in that system.
                  minLength: 1
              required:
                - external_system
                - external_id
              example:
                external_system: hhaexchange
                external_id: 33333333-3333-4333-8333-333333333333
              additionalProperties: false
        description: JSON request body. Bodies over 16 KiB return 413 payload_too_large.
      responses:
        '200':
          description: App access result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  enrolled:
                    type: boolean
                    description: >-
                      True when an employee has effective Rima coverage and
                      either a linked company membership or a pending, unexpired
                      invitation for that covered employee.
                  registered:
                    type: boolean
                    description: Existing app account, independent of enrollment.
                  opted_out:
                    type: boolean
                    description: >-
                      True when every applicable participation is effectively
                      opted out; false when none exists.
                required:
                  - enrolled
                  - registered
                  - opted_out
                additionalProperties: false
              examples:
                example:
                  value:
                    enrolled: true
                    registered: false
                    opted_out: false
        '400':
          $ref: '#/components/responses/InvalidRequest'
        '401':
          $ref: '#/components/responses/InvalidApiKey'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/AmbiguousIdentifier'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - bearerAuth: []
components:
  responses:
    InvalidRequest:
      description: Invalid membership-status request.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                enum:
                  - invalid_request
            required:
              - error
            additionalProperties: false
          example:
            error: invalid_request
    InvalidApiKey:
      description: Missing or invalid partner API key.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                enum:
                  - invalid_api_key
            required:
              - error
            additionalProperties: false
          example:
            error: invalid_api_key
    Forbidden:
      description: Operation or company access is not permitted.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                enum:
                  - forbidden
            required:
              - error
            additionalProperties: false
          example:
            error: forbidden
    AmbiguousIdentifier:
      description: Authorized matches do not all share one non-null Person ID.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                enum:
                  - ambiguous_identifier
            required:
              - error
            additionalProperties: false
          example:
            error: ambiguous_identifier
    PayloadTooLarge:
      description: Membership-status request body exceeds 16 KiB.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                enum:
                  - payload_too_large
            required:
              - error
            additionalProperties: false
          example:
            error: payload_too_large
    RateLimited:
      description: Partner API key request allowance is exhausted.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                enum:
                  - rate_limited
            required:
              - error
            additionalProperties: false
          example:
            error: rate_limited
    InternalError:
      description: The service could not complete the request.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                enum:
                  - internal_error
            required:
              - error
            additionalProperties: false
          example:
            error: internal_error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.