Retrieve order subscription references
List the references associated with the subscription generated for an order.
Requirements
This method requires you to set a specific partner using setPartner.
Request parameters
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 2Checkout system.
pageNo
Optional (int)
Break down the subscription information using pagination into groups of 50 items (PartnerSubscription objects) per page. Example values:
1 — the first 50
2 — the next 50
3 — the next 50
Can be NULL.
Request sample
<?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';
$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'getOrderSubscriptions',
'params' => array($sessionID, $refNo)
);
var_dump (callRPC((Object)$jsonRpcRequest, $host));Response parameters
PartnerSubscription
Array of objects Details below
PartnerSubscription.SubscriptionReference
String The unique reference associated with a subscription generated for a product included in a partner order.
PartnerSubscription.HasEndUserInformation
Boolean True or false, depending on whether end-user information is attached to the subscription.
PartnerSubscription.RegistrationStatus
String
Possible values:
Not registered
Registered
PartnerSubscription.RegistrationEmails
String The email used by the end-user in the registration process. Can be NULL.
PartnerSubscription.FullfilmentStatus
String
Fulfillment status possible values:
DELIVERED - Order was fulfilled/delivered.
NOT_DELIVERED - Fulfillment is blocked due to various reasons including lack of payment/credit, missing reseller/end-user details.
NO_DELIVERY_REQUIRED - No fulfillment confirmation is required.
VENDOR_CONFIRMED_DELIVERY - Fulfillment has been confirmed.
VENDOR_DELIVERY_CONFIRMATION_REQUIRED - You need to confirm fulfillment.
Errors
NOT_FOUND_PARTNER
A partner must be set first.
EMPTY_ORDER_REFERENCE
Order reference not provided.
INVALID_REFERENCE
Invalid order reference.
Last updated
Was this helpful?