CustomerSubscriptionList_Load_Query
#
Description#
This function loads a list of Customer Subscriptions.
Request Parameters#
Parameter |
Type | Description |
---|---|---|
customer_id edit_customer customer_login |
Number String String |
The customer id The customer login The customer login |
count |
Number | Maximum lines of data allowed to be returned in the response. This limit is used to prevent excessive amounts of data return |
filter |
String | A string for filtering returned data |
offset |
Number | Used with the Count parameter for paginating results of large datasets. Default 0 is no offset. |
sort |
String | The order for sorting returned data |
Response Parameters#
Parameter |
Type | Description |
---|---|---|
success |
Boolean | Boolean value indicating if the api request was successful |
total_count |
Number | the number of customer subscriptions returned |
start_offset |
Number | the offset starting point for pagination of return data |
id |
Number | customer subscription item id |
order_id |
Number | order id associated with the customer subscription |
line_id |
Number | line id of the subscription |
cust_id |
Number | customer id for the subscription |
custpc_id |
Number | the id of the saved card linked to the subscription |
product_id |
Number | product id for the subscription |
subterm_id |
Number | subscription term id for the subscription terms |
addr_id |
Number | address id for the subscription |
ship_id |
Number | shipping id for the subscription |
ship_data |
String | The name of the shipping option for the subscription |
quantity |
Number | product quantity for the subscription |
termrem |
Number | Number of terms remaining for the subscription |
termproc |
Number | Number of terms processed on the subscription |
firstdate |
Object | Subscription first fulfillment date |
time_t |
Number | Unix timestamp for the first subscription fulfillment date |
year |
Number | Year of the fullfillment date |
month |
Number | Month of the fullfillment date |
day |
Number | Day of the fullfillment date |
hour |
Number | Hour of the fullfillment date |
minute |
Number | Minute of the fullfillment date |
second |
Number | Second of the fullfillment date |
timezone |
Number | Time zone of the fullfillment date |
status |
String | Subscription status |
message |
String | Subscription status message |
tax |
Number | Tax for the subscription |
formatted_tax |
String | Currency formatted subscription tax |
shipping |
Number | Shipping total for the subscription |
formatted_shipping |
String | Currency formatted shipping total |
subtotal |
Number | Subscription subtotal |
formatted_subtotal |
String | Currency formatted subtotal |
total |
Number | Subscription total price |
formatted_total |
String | Currency formatted subscription total price |
authfails |
Number | Number of times payment authorizaton has failed |
frequency |
String | The frequency of the subscription fulfillment |
term |
Number | Number of subscription terms |
descrip |
String | description of the subscription frequency |
n |
Number | Number of days or Months between each fulfillment. Only set if using Subscription Terms |
fixed_dow |
Number | Number indicating a fixed day of the week for weekly subscription fulfillment |
fixed_dom |
Number | Number indicating a fixed day of the month for monthly subscription fulfillment |
sub_count |
Number | subscription count |
method |
String | Shipping method for the subscription |
product_code |
String | Product code of the item |
product_name |
String | Product name of the item |
product_sku |
String | Product sku of the item |
product_price |
Number | Product price of the item |
product_formatted_price |
String | Currency formatted product price |
product_cost |
Number | Product cost of the item |
product_formatted_cost |
String | Currency formatted product cost |
product_weight |
Number | Product weight of the item |
product_taxable |
Boolean | Boolean value indicating if the item is taxable |
product_thumbnail |
String | filepath name of the product thumbnail image |
product_image |
String | filepath name of the product image |
product_active |
Boolean | Boolean value indicating if the product is active |
product_dt_created |
Number | Unix timestamp for the product creation date |
product_dt_Updated |
Number | Unix timestamp for the product update date |
product_page_title |
String | The title of the product page |
product_page_id |
Number | The Id of the product page |
product_page_code |
String | The code of the product page |
product_cancat_id |
Number | Canonical category id for the product |
product_cancat_code |
String | Canonical Category Code for the Product |
product_inventory_active |
Boolean | Boolean value indicating if the product inventory is active |
product_inventory |
Number | Product inventory count |
paymentcard_lastfour |
String | Last four numbers of the payment card |
paymentcard_type |
String | The type of payment card being used on the subscription |
address_descrip |
String | The address subscription |
address_fname |
String | First name for the subscription address |
address_lname |
String | Last name for the subscription address |
address_email |
String | Email address for the subscription |
address_comp |
String | IP address for the computer that made the subscription |
address_phone |
String | Phone number for the subscription address field |
address_fax |
String | Fax number for the subscription address field |
address_addr |
String | Street address for the subscription |
address_addr1 |
String | Additional street address field for the subscription |
address_addr2 |
String | Additional street address field for the subscription |
address_city |
String | City for the subscription street address |
address_state |
String | State for the subscription street address |
address_zip |
String | Zip code for the subscription street address |
address_cntry |
String | Country for the subscription street address |
address_resdntl |
Boolean | Boolean value indicating if the subscription address is residential |
customer_login |
String | Login name for the customer having the subscription |
customer_pw_email |
String | Email address associated with the password for the customer login |
customer_business_title |
String | The business title of the customer |
options |
Object | Array of objects containing options. |
Example Request#
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "CustomerSubscriptionList_Load_Query",
"Customer_ID": 2,
"Sort": "id",
"Offset": 0,
"Count": 42
}
Example Response#
{
"success": 1,
"data": {
"total_count": 1,
"start_offset": 0,
"data": [
{
"id": 2,
"order_id": 0,
"line_id": 0,
"cust_id": 2,
"custpc_id": 0,
"product_id": 9,
"subterm_id": 1,
"addr_id": 2,
"ship_id": 140,
"ship_data": "ground",
"quantity": 1,
"termrem": 0,
"termproc": 0,
"firstdate": {
"time_t": 0,
"year": 1969,
"month": 12,
"day": 31,
"hour": 19,
"minute": 0,
"second": 0,
"timezone": -5
},
"lastdate": {
"time_t": 0,
"year": 1969,
"month": 12,
"day": 31,
"hour": 19,
"minute": 0,
"second": 0,
"timezone": -5
},
"nextdate": {
"time_t": 1646974800,
"year": 2022,
"month": 3,
"day": 11,
"hour": 0,
"minute": 0,
"second": 0,
"timezone": -5
},
"status": "E",
"message": "Invalid payment method",
"cncldate": {
"time_t": 0,
"year": 1969,
"month": 12,
"day": 31,
"hour": 19,
"minute": 0,
"second": 0,
"timezone": -5
},
"tax": 1.75,
"formatted_tax": "$1.75",
"shipping": 10.0,
"formatted_shipping": "$10.00",
"subtotal": 18.0,
"formatted_subtotal": "$18.00",
"total": 29.75,
"formatted_total": "$29.75",
"authfails": 0,
"lastafail": {
"time_t": 0,
"year": 1969,
"month": 12,
"day": 31,
"hour": 19,
"minute": 0,
"second": 0,
"timezone": -5
},
"frequency": "biweekly",
"term": 0,
"descrip": "Reorder bi-weekly",
"n": 0,
"fixed_dow": 0,
"fixed_dom": 0,
"sub_count": 2,
"method": "Ground Shipping",
"product_code": "coffee",
"product_name": "Coffee",
"product_sku": "coffee_100",
"product_price": 20.0,
"product_formatted_price": "$20.00",
"product_cost": 10.0,
"product_formatted_cost": "$10.00",
"product_weight": 1.0,
"product_taxable": true,
"product_thumbnail": "graphics/00000001/coffee.jpg",
"product_image": "",
"product_active": true,
"product_dt_created": 1647039826,
"product_dt_Updated": 1647039826,
"product_page_title": "",
"product_page_id": 0,
"product_page_code": "",
"product_cancat_id": 0,
"product_cancat_code": "",
"product_inventory_active": false,
"product_inventory": 0,
"paymentcard_lastfour": "",
"paymentcard_type": "",
"address_descrip": "16000 RB Road",
"address_fname": "Test",
"address_lname": "Jones",
"address_email": "test@miva.com",
"address_comp": "",
"address_phone": "8006488080",
"address_fax": "",
"address_addr": "16000 RB Road",
"address_addr1": "16000 RB Road",
"address_city": "Hollywood",
"address_state": "CA",
"address_zip": "90046",
"address_cntry": "US",
"address_dorm": "",
"address_lastupdate": 1647039826,
"address_deleted": 0
}
]
}
}
Notes#
- The
firstdate
,lastdate
,nextdate
,cncldate
, andlastafail
parameters contain date objects with timestamp information. - The
product_active
parameter indicates whether the product associated with the subscription is currently active. - The
product_inventory_active
parameter indicates whether the product’s inventory is active.