> ## 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.

# AWS Marketplace SaaS onboarding: resolve the registration token to the

> customer's identifiers via ResolveCustomer, then link them to the org so the hourly flush bills their AWS account. Requires NSR_METERING_AWS_*…

customer's identifiers via ResolveCustomer, then link them to the org so the
hourly flush bills their AWS account. Requires `NSR_METERING_AWS_*`.

**Required scope:** `admin`

### Request body

`AwsRegisterRequest`

<ParamField body="dimension" type="string">
  Metered dimension to bill against (default `verified_decisions`).
</ParamField>

<ParamField body="org_id" type="string" required>
  The NSR org/tenant to bill for this subscription.
</ParamField>

<ParamField body="registration_token" type="string" required>
  The `x-amzn-marketplace-token` the customer's browser POSTs to our landing page right after they subscribe on AWS Marketplace.
</ParamField>

### Response

No response body. Customer resolved and linked.

### Status codes

| Code  | Meaning                                            |
| ----- | -------------------------------------------------- |
| `200` | Customer 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` | AWS ResolveCustomer failed                         |
| `503` | AWS marketplace metering not configured            |

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