.md Productsmd mdEmail® Registration API

getDebitList

getDebitList has 1 parameter (string $session_id).
Its response is a getDebitListObj object with 3 attributes.
This function should be called to receive a table of all debit accounts for a reseller. A debit account ID is needed to make purchases.

Parameters

ParameterNotes
(string) $session_idA valid session ID which can be obtained from login()

Response

Object type: getDebitListObj
getDebitListObj attributes

Response Object Attributes
AttributeNotes
(string) codeA string containing the code of your response. 000 is a success. See below for a list of codes
(string) message
(ArrayOfArray) debitlistA list of debit accounts with the first row being field names. See below for a list of field names.
Codes
CodesMessage
000Success
This is a partial list of codes which may not be clear by their message.
Debitlist Field Names
ColumnDescription
c_idUnique ID
c_admin_user_idUser ID of the main administration account
c_billing_contact_idBilling account contact ID
c_min_balanceThe minimum allowable balance for this account
c_current_balanceThe current balance
c_statusIs the account active (true = 1)
c_create_dateCreated date (YYYY-MM-DD HH-MM-SS)
c_modified_tsModified date (YYYY-MM-DD HH-MM-SS)

Sample Code (using NuSoap)

$soap2 = new soapclient("https://api.max.md/getDebitList.php?wsdl",array( 'trace' => true, 'exceptions' => true, ));
$response = $soap2->getDebitList($my_session_id);
if ($response->code == '000')
{
  $debit_list = $response->debitlist;
  //handle the debit list
}else{
  //handle the error
}