Re-send subscription activation keys
Last updated: 28-Apr-2017
Rate this article:
Overview
Use this method to send or re-send activation keys for a list of subscriptions. If no email is provided, messages get sent to to the end user email set on each subscription.
Requirements
Parameters
Parameter | Type/Description |
---|---|
sessionID | Required (String) |
Session identifier, output of the Login method. An exception is thrown if the values are incorrect. | |
refNo | Required (String) |
The unique identifier of an order from the Avangate system. | |
subscriptionReferencesList | Required (StringArray) |
Array of subscription references for which activation keys will be sent. You can send keys for up to 50 subscriptions at once. | |
Optional (String) | |
End user email address. Can be NULL. |
Response
Parameter | Type/Description |
---|---|
result | Boolean |
True or false |
Request
<?php
require ('PATH_TO_AUTH'); // Authentication example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/02Authentication
require ('PATH_TO_setPartner'); // setPartner example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/06Reference/Partner/00Set_partner
$refNo = 'YOUR_ORDER_REFERENCE';
$subscriptionReferencesList = array('REFERENCE_1', 'REFERENCE_2');
$email = 'YOUR_EMAIL_ADDRESS';
$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'resendSubscriptionsActivationKeys ',
'params' => array($sessionID, $refNo, $subscriptionReferencesList, $email)
);
var_dump (callRPC((Object)$jsonRpcRequest, $host));
Errors
Error | Description |
---|---|
NOT_FOUND_PARTNER |
A partner must be set first. |
INVALID_ORDER |
Order is not yet completed. |
EMPTY_SUBSCRIPTION_REFERENCES_LIST |
The subscription references list is empty. |
INVALID_SUBSCRIPTION_REFERRENCE |
The subscription reference is invalid. |
INVALID_EMAIL |
The email address is invalid. |
Rate this article: