> ## Documentation index
> Fetch the complete documentation index at: https://developer.rhombus.com/llms.txt
> Use it to discover all available pages before exploring further.

# Preview a claim key for the MSP pool

> MSP only. Looks up a claim key by code before claiming it into the pool. Same visibility rule as the customer-console getClaimKeyByCode: an unclaimed key, or one already claimed by the calling MSP org; a key claimed by any other org is refused.

```http
POST https://api2.rhombussystems.com/api/partner/license/getClaimKeyByCode
```

EU organizations send the same request to `https://api2.eu.rhombussystems.com`.

## Authentication and parameters

- `x-auth-apikey` (header, required): Your Rhombus API key. Must be accompanied by the `x-auth-scheme` header set to `api-token` (or `partner-api-token` for partner endpoints).
- `Authorization` (header): instead of an API key, an OAuth access token (`Bearer <token>`) with the `read` scope.
- `x-auth-scheme` (header, string, default: `partner-api-token`): Authentication scheme identifier. Use `api-token` or `partner-api-token` with the `x-auth-apikey` header, `api` or `partner-api` with `x-auth-apikey` plus a client certificate, `api-oauth-token` or `partner-api-oauth-token` with `x-auth-access-token`, and `federated-token` with `x-auth-ft`. A request with `Authorization: Bearer <token>` and no `x-auth-scheme` is treated as OAuth, and `federated-token` may also be sent as the `x-auth-scheme` and `x-auth-ft` query parameters. One of: `api-token`, `api`, `api-oauth-token`, `federated-token`, `partner-api-token`, `partner-api`, `partner-api-oauth-token`.
- `x-auth-org` (header, string<RUUID>): Client organization UUID (22-character RUUID), for partner credentials only. With it the call runs in that client organization with the partner support authority's role. Without it a partner credential runs as the partner organization, which outside the partner endpoints is deprecated (responses carry `Deprecation` and `Sunset: Tue, 05 Jan 2027 00:00:00 GMT`). A malformed value returns 400 `INVALID_AUTH_ORG`; a client organization the partner cannot access returns 403 `PARTNER_CLIENT_ACCESS_DENIED`.

## Request body

Content type: `application/json`

- `claimCode` (string | null)

## Response 200

OK. Content type: `application/json`

- `claimKey` (object)

## Errors

Also 400, 401, 403, 429, 500, 503 with the standard error body (`errorCode`, `errorMsg`): https://developer.rhombus.com/errors

## OpenAPI

````yaml
openapi: 3.0.1
info:
  title: Rhombus API
  version: "1.0"
servers:
  - description: Production Server
    url: https://api2.rhombussystems.com
security:
  - ApiKeyAuth: []
paths:
  /api/partner/license/getClaimKeyByCode:
    post:
      description: "MSP only. Looks up a claim key by code before claiming it into the pool. Same visibility rule as the customer-console getClaimKeyByCode: an unclaimed key, or one already claimed by the calling MSP org; a key claimed by any other org is refused."
      operationId: getPoolClaimKeyByCode
      parameters:
        - description: "Authentication scheme identifier. Use `api-token` or `partner-api-token` with the `x-auth-apikey` header, `api` or `partner-api` with `x-auth-apikey` plus a client certificate, `api-oauth-token` or `partner-api-oauth-token` with `x-auth-access-token`, and `federated-token` with `x-auth-ft`. A request with `Authorization: Bearer <token>` and no `x-auth-scheme` is treated as OAuth, and `federated-token` may also be sent as the `x-auth-scheme` and `x-auth-ft` query parameters."
          example: partner-api-token
          in: header
          name: x-auth-scheme
          required: false
          schema:
            default: partner-api-token
            enum:
              - api-token
              - api
              - api-oauth-token
              - federated-token
              - partner-api-token
              - partner-api
              - partner-api-oauth-token
            type: string
        - description: "Client organization UUID (22-character RUUID), for partner credentials only. With it the call runs in that client organization with the partner support authority's role. Without it a partner credential runs as the partner organization, which outside the partner endpoints is deprecated (responses carry `Deprecation` and `Sunset: Tue, 05 Jan 2027 00:00:00 GMT`). A malformed value returns 400 `INVALID_AUTH_ORG`; a client organization the partner cannot access returns 403 `PARTNER_CLIENT_ACCESS_DENIED`."
          in: header
          name: x-auth-org
          required: false
          schema:
            format: RUUID
            maxLength: 22
            minLength: 22
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/License_claimkey_GetClaimKeyByCodeWSRequest"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/License_claimkey_GetClaimKeyByCodeWSResponse"
          description: OK
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalServerError"
        "503":
          $ref: "#/components/responses/ServiceUnavailable"
      security:
        - ApiKeyAuth: []
        - oauth2:
            - read
      summary: Preview a claim key for the MSP pool
      tags:
        - Partner Webservice
components:
  schemas:
    License_claimkey_GetClaimKeyByCodeWSRequest:
      properties:
        claimCode:
          nullable: true
          type: string
      type: object
    License_claimkey_GetClaimKeyByCodeWSResponse:
      properties:
        claimKey:
          $ref: "#/components/schemas/BaseClaimKey"
      type: object
    BaseClaimKey:
      discriminator:
        propertyName: type
      properties:
        claimEndDate:
          description: Date/time when claiming of licenses represented by this claim key ended successfully.
          format: date-time
          nullable: true
          type: string
        claimStartDate:
          description: Date/time when claiming of licenses represented by this claim key started.
          format: date-time
          nullable: true
          type: string
        createdOn:
          format: date-time
          nullable: true
          type: string
        endDate:
          format: date-time
          nullable: true
          type: string
        expirationEmailState:
          $ref: "#/components/schemas/ClaimKeyExpirationEmailStateEnum"
        gracePeriodEndDate:
          format: date-time
          nullable: true
          type: string
        maskedClaimCode:
          description: Masked claim code for redeemed claim keys. This field can be used for reference purposes.
          nullable: true
          type: string
        orgUuid:
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          format: RUUID
          nullable: true
          type: string
        ownerOrgUuid:
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          format: RUUID
          nullable: true
          type: string
        renewedByClaimKeyUuid:
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          format: RUUID
          nullable: true
          type: string
        requestId:
          description: Externally supplied request id to prevent creation of unnecessary claim keys due to reprocessing or bugs. Unnecessary claim keys are claim keys that are not tied to anything in the external system.  This property is unique for all claim keys.
          nullable: true
          type: string
        returnHistory:
          items:
            $ref: "#/components/schemas/ClaimKeyReturnEvent"
          nullable: true
          type: array
        state:
          $ref: "#/components/schemas/ClaimKeyStateEnum"
        trial:
          nullable: true
          type: boolean
        type:
          $ref: "#/components/schemas/ClaimKeyTypeEnum"
        updatedOn:
          format: date-time
          nullable: true
          type: string
        uuid:
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          format: RUUID
          nullable: true
          type: string
      type: object
    ClaimKeyExpirationEmailStateEnum:
      enum:
        - NINETY_DAY_EMAIL_SUCCEEDED
        - NINETY_DAY_EMAIL_FAILED
        - SIXTY_DAY_EMAIL_SUCCEEDED
        - SIXTY_DAY_EMAIL_FAILED
        - FOURTY_FIVE_DAY_EMAIL_SUCCEEDED
        - FOURTY_FIVE_DAY_EMAIL_FAILED
        - THIRTY_DAY_EMAIL_SUCCEEDED
        - THIRTY_DAY_EMAIL_FAILED
        - TWENTY_ONE_DAY_EMAIL_SUCCEEDED
        - TWENTY_ONE_DAY_EMAIL_FAILED
        - FOURTEEN_DAY_EMAIL_SUCCEEDED
        - FOURTEEN_DAY_EMAIL_FAILED
        - TEN_DAY_EMAIL_SUCCEEDED
        - TEN_DAY_EMAIL_FAILED
        - SEVEN_DAY_EMAIL_SUCCEEDED
        - SEVEN_DAY_EMAIL_FAILED
        - FIVE_DAY_EMAIL_SUCCEEDED
        - FIVE_DAY_EMAIL_FAILED
        - FOUR_DAY_EMAIL_SUCCEEDED
        - FOUR_DAY_EMAIL_FAILED
        - THREE_DAY_EMAIL_SUCCEEDED
        - THREE_DAY_EMAIL_FAILED
        - TWO_DAY_EMAIL_SUCCEEDED
        - TWO_DAY_EMAIL_FAILED
        - ONE_DAY_EMAIL_SUCCEEDED
        - ONE_DAY_EMAIL_FAILED
        - ZERO_DAY_EMAIL_SUCCEEDED
        - ZERO_DAY_EMAIL_FAILED
        - GRACE_PERIOD_EMAILS_IN_PROGRESS
        - GRACE_PERIOD_EMAILS_COMPLETED
        - UNKNOWN
      type: string
    ClaimKeyReturnEvent:
      properties:
        returnedProductQuantities:
          additionalProperties:
            format: int32
            nullable: true
            type: integer
          nullable: true
          type: object
        timestamp:
          format: date-time
          nullable: true
          type: string
      type: object
    ClaimKeyStateEnum:
      enum:
        - CREATED
        - CLAIMING_PENDING
        - CLAIMING_IN_PROGRESS
        - CLAIMING_FAILED
        - CLAIMED
        - EXPIRED_UNCLAIMED
        - EXPIRED
        - RETURNED
        - RENEWED
      type: string
    ClaimKeyTypeEnum:
      enum:
        - NEW
        - RENEWAL
      type: string
  securitySchemes:
    ApiKeyAuth:
      description: Your Rhombus API key. Must be accompanied by the `x-auth-scheme` header set to `api-token` (or `partner-api-token` for partner endpoints).
      in: header
      name: x-auth-apikey
      type: apiKey
    oauth2:
      description: 'OAuth 2.0 authorization code flow with PKCE (`S256`). Send the access token as `Authorization: Bearer <token>`. Each operation lists the scopes it requires; a token without them is refused 403 with `WWW-Authenticate: Bearer error="insufficient_scope"`.'
      flows:
        authorizationCode:
          authorizationUrl: https://console.rhombus.com/oauth/authorize
          refreshUrl: https://auth-web.rhombussystems.com/oauth/token
          scopes:
            physical: Unlock doors and elevators, lockdown, alarms, speakers and robots
            read: View cameras, footage and settings
            write: Change settings and data
          tokenUrl: https://auth-web.rhombussystems.com/oauth/token
      type: oauth2
````
