Menu
AWS Marketplace Metering Service
API Reference (API Version 2016-01-14)

ResolveCustomer

ResolveCustomer is called by a SaaS application during the registration process. When a buyer visits your website during the registration process, the buyer submits a registration token through their browser. The registration token is resolved through this API to obtain a CustomerIdentifier and product code.

Request Syntax

{
   "RegistrationToken": "string"
}

Request Parameters

The request accepts the following data in JSON format.

Note

In the following list, the required parameters are described first.

RegistrationToken

When a buyer visits your website during the registration process, the buyer submits a registration token through the browser. The registration token is resolved to obtain a CustomerIdentifier and product code.

Type: String

Pattern: \S+

Required: Yes

Response Syntax

{
   "CustomerIdentifier": "string",
   "ProductCode": "string"
}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

CustomerIdentifier

The CustomerIdentifier is used to identify an individual customer in your application. Calls to BatchMeterUsage require CustomerIdentifiers for each UsageRecord.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

ProductCode

The product code is returned to confirm that the buyer is registering for your product. Subsequent BatchMeterUsage calls should be made using this product code.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Errors

For information about the errors that are common to all actions, see Common Errors.

ExpiredTokenException

The submitted registration token has expired. This can happen if the buyer's browser takes too long to redirect to your page, the buyer has resubmitted the registration token, or your application has held on to the registration token for too long. Your SaaS registration website should redeem this token as soon as it is submitted by the buyer's browser.

HTTP Status Code: 400

InternalServiceErrorException

An internal error has occurred. Retry your request. If the problem persists, post a message with details on the AWS forums.

HTTP Status Code: 500

InvalidTokenException

HTTP Status Code: 400

ThrottlingException

The calls to the MeterUsage API are throttled.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: