Skip to main content
Vindicia Knowledgebase




The behavior and use of the fetchByEntitlementIdAndAccount call are similar to those of the fetchByAccount() call. The only exception is that, instead of retrieving all the Entitlement objects for a specific customer, this method enables you to retrieve an Entitlement object with a specific entitlement ID for that customer. For details on how to interpret and store fetched Entitlement objects, see the Entitlement.fetchByAccount method.


srd: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a method call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.

Some fields are required, either practically or in the WSDL, and will be returned regardless of the srd. A null srd returns the complete response.

entitlementId: your entitlement ID (merchantEntitlementId), which serves as one of the two search criteria.

account: the Account object, which serves as one of the two search criteria. Use the merchantAccountId or VID to identify the object.

showAll: a Boolean flag, which, if set to true, shows all entitlements, including those that have expired; if set to false or null, returns only active entitlements.

includeChildren: an optional Boolean flag that, if set to true, includes any children associated with this Account. If this flag is omitted, Vindicia Subscribe will interpret it as false and construct the query without looking at any child's account.


return: an object of type Return that indicates the success or failure of the call.

entitlement: the Entitlement object with the specified entitlement ID (merchantEntitlementId) for the specified Account object.


In addition to those listed in Standard Return Codes, this call returns:

Return Code

Return String


Account not specified.


Account not found.


$account = new Account();


// create the entitlement object to make the SOAP call

$entitlement = new Entitlement();
$entitlement_id = 'ent_id_to_search_by';

// fetch the record

$response =

$entitlement->fetchByEntitlementIdAndAccount($entitlement_id, $account);

if ($response['returnCode'] == 200) {

$ent = $response['data']->entitlement;
if ($ent != null) {

$customer_id = $ent->getAccount()->getMerchantAccountId();
$entitlement_id= $ent->getMerchantEntitlementId();
$active = $ent->getActive();
if ($active) {
$active_till = $ent->getEndTimestamp();

// use or locally store info obtained above



For Users

Learn More
For Users

Vindicia Subscribe Features

Learn More
Vindicia Subscribe Features
Back to Top