Menu
Amazon DevPay
Developer Guide (API Version 2007-12-01)

GetActiveSubscriptionsByPid

Description

The GetActiveSubscriptionsByPid action takes a customer's persistent identifier (PID) and returns a product code list for the products the customer is actively subscribed to. Only the product codes for products you own are returned. To use GetActiveSubscriptionsByPid, you must have previously requested ActivateHostedProduct to get a PID for the customer. For more information about how to use GetActiveSubscriptionsByPid, see Confirming a Customer's Subscription Status.

Request Authentication

Requests for GetActiveSubscriptionsByPid must be made over HTTPS and authenticated by AWS. For more information, see Authentication of REST-Query Requests (for REST-Query) or Authentication of SOAP Requests (for SOAP).

Request Parameters

Name Description Required

Action

The License Service action to perform. Set this to GetActiveSubscriptionsByPid.

Type: String

Default: None

Condition: Required for REST-Query requests (for more information, see REST-Query Requests). For SOAP requests, the action is automatically indicated in the SOAP request's root element (for more information, see SOAP Requests).

Conditional

AWSAccessKeyId

Your Access Key ID. For more information, see Your AWS Access Credentials.

Type: String

Default: None

Condition: Required for REST-Query requests. Not applicable to SOAP requests.

Conditional

Expires

The date and time at which the signature included in the request expires.

Type: String in the format YYYY-MM-DDThh:mm:ssZ, as specified in the ISO 8601 standard.

Default: None

Condition: REST-Query requests must include either the Timestamp parameter or the Expires parameter, but not both. For information about handling message expiration for SOAP requests, see Message Expiration.

Conditional

PersistentIdentifier

The customer's PID.

Type: String

Default: None

Yes

Signature

A request signature. For more information, see Calculating an HMAC-SHA1 Request Signature.

Type: String

Default: None

Condition: Required for REST-Query requests. Not applicable to SOAP requests.

Conditional

SignatureVersion

A legacy parameter AWS requires. Set this value to 1.

Type: String

Default: None

Condition: Required for REST-Query requests. Not applicable to SOAP requests.

Conditional

Timestamp

The date and time the request is signed.

Type: String in the format YYYY-MM-DDThh:mm:ssZ, as specified in the ISO 8601 standard.

Default: None

Condition: Authenticated REST-Query requests must include either the Timestamp parameter or the Expires parameter, but not both. For information about handling message expiration for SOAP requests, see Message Expiration.

Conditional

Version

The version of the API to use. For example: 2008-04-28

Type: String

Default: 2007-06-05

Condition: Highly recommended for REST-Query requests. Not applicable to SOAP requests (the API version is indicated in the namespace).

Conditional

Response Elements

The response to this action contains the following element in addition to the elements returned in all successful responses. For more information, see Structure of a Successful Response.

Name Description

ProductCode

The product code for the product the customer is subscribed to. The response can contain multiple <ProductCode> elements.

Type: String

Ancestor: GetActiveSubscriptionsByPidResult

Special Errors

The errors listed in the following table are returned in addition to the errors returned by all actions. For more information, see Errors.

Important

We might throttle requests to the License Service as necessary. When we throttle, we return a 503 (service unavailable) HTTP status code. Your system should be prepared to retry any request that receives a 503 code.

Name Description

InvalidPersistentIdentifier

The persistent identifier (PID) is invalid or malformed.

MissingPersistentIdentifier

The request is missing the required parameter PersistentIdentifier.

Examples

The following example REST-Query request gets a product code list for the products the customer is subscribed to.

Sample Request

https://ls.amazonaws.com/
?Action=GetActiveSubscriptionsByPid
&PersistentIdentifier=PMNGLKRRYHLOXDQKEMKLEXAMPLE
&Version=2008-04-28
&AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE
&Timestamp=2008-05-19T12:00:00Z
&Signature=Dqlp3Sd6ljTUA9Uf6SGtEExwUQEEXAMPLE=
&SignatureVersion=1

Sample Response

<GetActiveSubscriptionsByPidResponse>
   <GetActiveSubscriptionsByPidResult>
      <ProductCode>
         6883959E
      </ProductCode>
      <ProductCode>
         774F4FF8
      </ProductCode>
   </GetActiveSubscriptionsByPidResult>
   <ResponseMetadata>
      <RequestId>
         cb919c0a-9bce-4afe-9b48-9bdf2412bb67
      </RequestId>
   </ResponseMetadata>
</GetActiveSubscriptionsByPidResponse>