Skip to content

ProductSubscriptionTermList_Load_Query#


Description#

This function loads a list of product subscription terms for a subscription.

Request Parameters#

Parameter
Type Description
product_id
Edit_Product
Product_Code
Product_SKU
Number
String
String
String
ID Number of product
Product code string
Product code string
Product SKU string
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 subscription terms returned
start_offset Number The offset starting point for pagination of return data
id Number Customer subscription term id
product_id Number Product id associated with the subscription
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 Count of subscriptions with this term
dates Object Array of objects containing subscription dates.

Example Request#

{
    "Store_code": "beta",
    "Function": "ProductSubscriptionTermList_Load_Query",
    "Product_ID": 9,
    "Filter": [],
    "Sort": "id",
    "Offset": 0,
    "Count": 42
}

Example Response#

{
    "success": 1,
    "data": {
        "total_count": 2,
        "start_offset": 0,
        "data": [
            {
                "id": 1,
                "product_id": 9,
                "frequency": "biweekly",
                "term": 0,
                "descrip": "Reorder bi-weekly",
                "n": 0,
                "fixed_dow": 0,
                "fixed_dom": 0,
                "sub_count": 2,
                "dates": []
            },
            {
                "id": 2,
                "product_id": 9,
                "frequency": "monthly",
                "term": 0,
                "descrip": "Reorder every month",
                "n": 0,
                "fixed_dow": 0,
                "fixed_dom": 0,
                "sub_count": 0,
                "dates": []
            }
        ]
    }
}

Error Responses#

Error Code Error Message Error Description
MER-JSN-PRD-00070 Product not found Product not found