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

# Azure Marketplace SaaS onboarding: resolve the marketplace token to the SaaS

> subscription, then link it so the flush reports usageEvents against it. Requires NSR_METERING_AZURE_TOKEN. **Required scope:** admin

subscription, then link it so the flush reports `usageEvent`s against it.
Requires `NSR_METERING_AZURE_TOKEN`.

**Required scope:** `admin`

### Request body

`AzureRegisterRequest`

<ParamField body="dimension" type="string" />

<ParamField body="marketplace_token" type="string" required>
  The `x-ms-marketplace-token` the customer's browser POSTs to our landing page after subscribing to the Azure SaaS offer.
</ParamField>

<ParamField body="org_id" type="string" required />

### Response

No response body. Subscription resolved and linked.

### Status codes

| Code  | Meaning                                            |
| ----- | -------------------------------------------------- |
| `200` | Subscription resolved and linked                   |
| `401` | Unauthorized — missing or invalid credentials      |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |
| `502` | Azure resolve failed                               |
| `503` | Azure marketplace metering not configured          |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.nsr.stateset.com/v1/metering/azure/register' \
    --header 'X-API-Key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "dimension": "string",
    "marketplace_token": "YOUR_API_KEY",
    "org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }'
  ```
</RequestExample>
