Megaventory API v2017a

<back to all web services

ProductPriceGet

The following routes are available for this service:
GET POST/PricingRule/ProductPriceGetGets pricing details for a product Uses your API Key, a ProductId, a DocumentTypeId, Quantity and some other optional parameters to return pricing details for the requested product. If the SupplierClientId parameter is provided, then specific pricing details for that Supplier/Client are returned. The IssueDate parameter will only take effect if the pricing rule affecting the product is valid within a date range.

Examples:



A.

Get pricing details for a product that is unaffected by pricing rules.

Value:

{
  "APIKEY": "YOUR_API_KEY_HERE",
  "ProductId": 61598,
  "DocumentTypeId": 3,
  "Quantity": 1
}


Response:

{
  "PricingDetails": [
    {
      "PricingRuleName": "Default Sales Price",
      "PricingRuleID": 0,
      "CalculatedBasePrice": 100,
      "DiscountID": 0,
      "TaxID": 0,
      "MinimumQuantity": -1,
      "MaximumQuantity": 100000000,
      "AllowEdit": true
    }
  ],
  "ResponseStatus": {
    "ErrorCode": "0"
  }
}



B.

Get pricing details for a product that is affected by a pricing rule.

Value:

{
  "APIKEY": "YOUR_API_KEY_HERE",
  "ProductId": 61599,
  "DocumentTypeId": 3,
    "Quantity": 1
}


Response:

{
  "PricingDetails": [
    {
      "PricingRuleName": "Targeted Product Discount",
      "PricingRuleID": 104,
      "CalculatedBasePrice": 120,
      "DiscountID": 0,
      "TaxID": 0,
      "MinimumQuantity": -1,
      "MaximumQuantity": 100000000,
      "AllowEdit": true
    },
    {
      "PricingRuleName": "Default Sales Price",
      "PricingRuleID": 0,
      "CalculatedBasePrice": 150,
      "DiscountID": 0,
      "TaxID": 0,
      "MinimumQuantity": -1,
      "MaximumQuantity": 100000000,
      "AllowEdit": true
    }
  ],
  "ResponseStatus": {
    "ErrorCode": "0"
  }
}



C.

Get pricing details for a product that is affected by a pricing rule for a specific Supplier/Client.

Value:

{
  "APIKEY": "YOUR_API_KEY_HERE",
  "ProductId": 61599,
  "DocumentTypeId": 3,
  "Quantity": 1,
  "SupplierClientId": 5486
}


Response:

{
  "PricingDetails": [
    {
      "PricingRuleName": "Returning Customer",
      "PricingRuleID": 100,
      "CalculatedBasePrice": 85,
      "DiscountID": 0,
      "TaxID": 0,
      "MinimumQuantity": -1,
      "MaximumQuantity": 100000000,
      "AllowEdit": true
    },
    {
      "PricingRuleName": "Default Sales Price",
      "PricingRuleID": 0,
      "CalculatedBasePrice": 100,
      "DiscountID": 0,
      "TaxID": 0,
      "MinimumQuantity": -1,
      "MaximumQuantity": 100000000,
      "AllowEdit": true
    }
  ],
  "ResponseStatus": {
    "ErrorCode": "0"
  }
}



To override the Content-type in your clients HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /csv/reply/ProductPriceGet HTTP/1.1 
Host: api.megaventory.com 
Content-Type: text/csv
Content-Length: length

APIKEY,ProductId,DocumentTypeId,Quantity,SupplierClientId,Currency,IssueDate
String,0,0,0,0,String,0001-01-01

HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

PricingRuleName,PricingRuleID,CalculatedBasePrice,DiscountID,TaxID,MinimumQuantity,MaximumQuantity,AllowUserEdit
String,0,0,0,0,0,0,False