Created by potrace 1.16, written by Peter Selinger 2001-2019

Miva Developer Docs

Retrieves the product-specific prices for a given customer.


Retrieves the product-specific prices for a given customer, from a price group that uses the customer-specific pricing discount module. It runs through the Module function, so Function, Module_Code and Module_Function always have the fixed values shown below.

Before you begin#

  • The API token needs Customer_ProductPriceList_Load_Query, either assigned directly under Functions or through a group. See Create an API token.
  • Requests must be signed if the token requires it. See Make a signed request with HMAC.
  • You need the customer’s Customer_Login and the name of the price group (PriceGroup_Name).

Example requests#

Retrieve a customer’s discounted prices#

Returns the products that have a discounted price for this customer in the “Customer Specific Pricing” price group.

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "Module",
    "Module_Code": "discount_customerspecific",
    "Module_Function": "Customer_ProductPriceList_Load_Query",
    "PriceGroup_Name": "Customer Specific Pricing",
    "Customer_Login": "{{Customer_Login}}",
    "Discounted": true,
    "Undiscounted": false,
    "Count": 0,
    "Offset": 0,
    "Sort": "login",
    "Filter": []
}

Request parameters#

Parameter Type Required Description
count Number No Maximum lines of data allowed to be returned in the response. This limit is used to prevent excessive amounts of data return
filter String No A string for filtering returned data
offset Number No Used with the Count parameter for paginating results of large datasets. Default 0 is no offset.
sort String No The order for sorting returned data
Function String Yes Always a value of “Module”.
Module_Code String Always a value of “discount_customerspecific”.
Module_Function String Always a value of “Customer_ProductPriceList_Load_Query”.
Customer_Login String Customer Login.
PriceGroup_Name String Price Group Name.
Discounted Boolean No Flag to only return customers who have a discounted price.
Undiscounted Boolean No Flag to only return customers who don’t have a discounted price.

Example response#

{
    "success": 1,
    "data": {
        "total_count": 1,
        "start_offset": 0,
        "data": [
            {
                "id": 3,
                "code": "armor-leather",
                "sku": "",
                "name": "Leather Armor",
                "thumbnail": "",
                "image": "",
                "price": 100.0,
                "formatted_price": "$100.00",
                "cost": 75.0,
                "formatted_cost": "$75.00",
                "weight": 15.0,
                "taxable": true,
                "active": true,
                "page_title": "",
                "dt_created": 1595517720,
                "dt_Updated": 1595517720,
                "discounted_price": 17.56
            }
        ]
    }
}

Response parameters#

Parameter Type Description
total_count Number Total number of records that match your search criteria.
start_offset Number Number of the starting offset of products to return.
id Number Product Id
code String Miva Product Code (unique)
sku String Product SKU
thumbnail String Relative Path to the product thumbnail image.
image String Relative Path to the product full-size image.
price Number Product Price
formatted_price String Currency Formatted Product Price
cost Number Product Cost
formatted_cost String Currency Formatted Product Cost
weight Number Product Weight
taxable Boolean True/false flag if the product is taxable
active Boolean True/false flag if the product is active
page_title String Product Page Title - used in HTML title tag within head
dt_created Unix TS Unix timestamp product was created
dt_Updated Unix TS Unix timestamp product was last updated
discounted_price Number Specific Discounted Price for this customer (for the product requested)

Additional options#

Pagination#

Count and Offset page through results, and the response’s total_count says how many products match. See Pagination. List Load Query overview explains the Filter and Sort formats.

Function Use it to
Product_CustomerPriceList_Load_Query Load the customer-specific prices for one product
CustomerPriceGroupList_Load_Query Load the price groups a customer belongs to
PriceGroupList_Load_Query Find the price group name
CustomerList_Load_Query Find the customer’s login

Try in Postman#

In the Miva: JSON API: Authenticated collection, open Customers > Customer_ProductPriceList_Load_Query. See Set Up Postman.