.md Productsmd mdEmail® Registration API

getCart

getCart has 6 parameters (string $session_id, ArrayOfArray $cart_records, ArrayOfArray $registration_data, string $debit_account, string $commit, string $coupon).
It's response is a CartObj object with 4 attributes.

Parameters

ParameterNotes
(string) $session_idA valid session ID which can be obtained from login()
(ArrayOfArray) $cart_recordsA list of items in the cart with the first row being field names. See below for a list of field names.
(ArrayOfArray) $registration_dataThe data for a new registration (required for new domain purchases only).
(string) $debit_accountThe id of the debit account being used.
(string) $commitThis field must equal 'commit' in order for this trasaction to be commited. Any other input will result in the cart being validated but not committed.
(string) $couponA coupon code for an item

Cart Records
ColumnDescription
idThis is used to keep the cart item in order.
domain_nameThe domain name of this item
start_dateNot expected as an input. It is assumed to be today on new accounts or the day of expiration of renewal. It is always returned but its input is ignored.
expire_dateNot expected as an input. It is calculated by the term of the product or expiration of the domain. The expiration will always be on the same day of the month as the domain expiration and can never go beyond. It is always returned but its input is ignored.
qtyThe quantity of items. This number will be switched to 0 if the product cannot be purchased.
priceNot expected as an input. It is calculated and returned.
offer_id(Requirted) The id of the offer being purchased.
category_nameNot expected as an input.
subscription_idThe id of the subscription being renewed. This is required for renewals or add ons.
total_monthNot expected as an input. This is determined by the offer and billing period. It will always be returned.
billing_period'Y' or 'M' based on wether the product is being billed yearly or monthly.
comment_codeA user should input an 'n', 'r', or 'a' based on the item being a 'new purchase', 'renewal', or 'add on'. A three digit code will be returned with the first letter being unchanged. The second and third letters detail any price or duration changes (see below)
coupon_code(optional) Place any coupon codes in this spot to recieve discounts.
message_textAny notes regarding this item.
is_validNot expected as an input. It is returned as confirmation of the validity of the item.
Registration Fields
ColumnDescription
org_name
org_address
org_city
org_postal_code
org_state_code
org_country
adm_first_name
adm_last_name
adm_address
adm_city
adm_postal_code
adm_state_code
adm_country
adm_phone
adm_fax
adm_e_mail
tech_first_name
tech_last_name
tech_address
tech_city
tech_postal_code
tech_state_code
tech_country
tech_e_mail
tech_phone
tech_fax
bill_first_name
bill_last_name
bill_address
bill_city
bill_postal_code
bill_state_code
bill_country
bill_phone
bill_fax
bill_e_mail
ns_prim_hostname
ns_prim_netaddress
ns_sec1_hostname
ns_sec1_netaddress
created_user

Response

Object type: CartObj
CartObj attributes

Response Object Attributes
AttributeNotes
(string) code
(string) message
(ArrayOfArray) cartRecords
(ArrayOfArray) registrationData
Codes
CodesMessage
000Success
This is a partial list of codes which may not be clear by their message.
Cart Records
ColumnDescription
idThis is used to keep the cart item in order.
domain_nameThe domain name of this item
start_dateNot expected as an input. It is assumed to be today on new accounts or the day of expiration of renewal. It is always returned but its input is ignored.
expire_dateNot expected as an input. It is calculated by the term of the product or expiration of the domain. The expiration will always be on the same day of the month as the domain expiration and can never go beyond. It is always returned but its input is ignored.
qtyThe quantity of items. This number will be switched to 0 if the product cannot be purchased.
priceNot expected as an input. It is calculated and returned.
offer_id(Requirted) The id of the offer being purchased.
category_nameNot expected as an input.
subscription_idThe id of the subscription being renewed. This is required for renewals or add ons.
total_monthNot expected as an input. This is determined by the offer and billing period. It will always be returned.
billing_period'Y' or 'M' based on wether the product is being billed yearly or monthly.
comment_codeA user should input an 'n', 'r', or 'a' based on the item being a 'new purchase', 'renewal', or 'add on'. A three digit code will be returned with the first letter being unchanged. The second and third letters detail any price or duration changes (see below)
coupon_code(optional) Place any coupon codes in this spot to recieve discounts.
message_textAny notes regarding this item.
is_validNot expected as an input. It is returned as confirmation of the validity of the item.

Sample Code (using NuSoap)

$soap = new soapclient("https://api.max.md/getCart.php?wsdl",array( 'trace' => true, 'exceptions' => true, ));
$response= $soap->getCart($username, $password);
if ($response->code == '000') {
  $session_id = $response->values[0];
}else{
  echo $response->message;
}