API Documentation

In-depth reference documentation for iQmetrix API's.

NAV

OVERVIEW

Pricing information for products can be retrieved and managed using the Pricing API.

Distinct pricing information can be set for any level of the company’s Company Tree. Note that multiple currencies are not supported; the assumed currency is the default currency of the retailer.

BASE URLS

Demo : https://pricingdemo.iqmetrix.net/v1
Production: https://pricing.iqmetrix.net/v1

RESOURCES

BulkPricingInformation

The BulkPricingInformation resource allows you to load pricing records in bulk.

{
  "PricingRecords": [
    {
    "EntityId": 91252,
    "CatalogItemId": "060d4a3d-addb-4ce8-a0e2-d0271dc0433e",
    "RegularPrice": 9.98,
    "OverridePrice": null,
    "IsDiscountable": true,
    "FloorPrice": 5.32,
    "OriginalPrice": 5.64,
    "PricingTierId": null
    },
    {
    "EntityId": 91252,
    "CatalogItemId": "e45bfc7a-fdd0-4a23-bfc9-53dbe6590942",
    "RegularPrice": 11.34,
    "OverridePrice": 9.54,
    "IsDiscountable": false,
    "FloorPrice": null,
    "PricingTermName": "Test Term 1",
    "OverrideStartDateUtc": "2018-06-01",
    "OverrideStopDateUtc": "2018-06-30"
    },
    {
    "EntityId": 91252,
    "CatalogItemId": "81c08293-f81d-4575-86e0-75e1b5087d20",
    "RegularPrice": 21.60,
    "OverridePrice": 15.97,
    "IsDiscountable": false,
    "FloorPrice": null,
    "PricingTermName": null,
    "OverrideStartDateUtc": null,
    "OverrideStopDateUtc": null,
    "PricingTierId": 2
    }
  ]
}
Name Description
Id (Integer) The identifier of the bulk pricing resource.
PricingRecords Array[BulkPricingInformationItem] A collection of bulk pricing information records.

BulkPricingInformationItem

The BulkPricingInformationItem resource provides pricing information for a given product.

 {
    "EntityId": 91252,
    "CatalogItemId": "060d4a3d-addb-4ce8-a0e2-d0271dc0433e",
    "RegularPrice": 9.98,
    "OverridePrice": null,
    "IsDiscountable": true,
    "FloorPrice": 5.32,
    "OriginalPrice": 5.64,
    "PricingTierId": null
}
Name Description
EntityId (Integer) The entity associated with the catalog product.
CatalogItemId (GUID) The catalog product identifier for the item.
RegularPrice (Decimal) The regular price of the item. If RegularPrice is null, the associated pricing record will be deleted.
OverridePrice (Decimal) The override price of the item.
IsDiscountable (Boolean) Indicates whether the price of the product may be discounted (true) or not (false). Not enforced by the API.
FloorPrice (Decimal) The lowest price that may be charged for this item. The system should not allow a price lower than this amount without manager override.
OriginalPrice (Decimal) The original price of the item, should it need to be displayed with the regular and sale prices.
PricingTermName (String) The name of a pricing term, for prices associated with a pricing term.
TermLengthInYears (Integer) The length of the pricing term associated with the item.
OverridePrice (Decimal) The override price of the item.
OverrideStartDateUtc (DateTime) The date the override price comes into effect, in UTC. Null if default.
OverrideStopDateUtc (DateTime) The date the override price stops being effect, in UTC. Null if default.
PricingTierId (Integer) The pricing tier associated with this pricing record.
PricingShelfId (Integer) The pricing shelf associated with this pricing record.

ChangedPrice

The ChangedPrice resource records how prices have changed since a given last modified date.

To control

{
    "Id": 24,
    "CompanyId": 91416,
    "EntityId": 91452,
    "CatalogItemId": "535e1ed9-34c8-4402-89c1-48160eb1e9d0",
    "PricingTermId": null,
    "RegularPrice": 29.99,
    "IsDiscountable": true,
    "FloorPrice": 10,
    "OriginalPrice": 15,
    "PricingTierId": null,
    "PricingGroupId": null,
    "PricingShelfId": null,
    "OverridePriceId": null,
    "OverridePrice": null,
    "OverrideStartDateUtc": null,
    "OverrideStopDateUtc": null
}

Name Description    
Id (Integer) System-generated. The identifier of the pricing resource.    
CompanyId (Integer) The identifier of the company.    
EntityId (Integer) The identifier of the entity.    
CatalogItemId (GUID) The identifier of the product in the iQmetrix Product Library. If this property is not null, the PricingShelfId property must be set to null. This property is read-only for PUT operations.    
PricingTermId (Integer) The identifier of a pricing term resource associated with this resource.    
RegularPrice (Decimal) The regular price of the item. Must be greater than or equal to 0.    
IsDiscountable (Boolean)   IsDiscountable (Boolean) Indicates whether the price of the product may be discounted (true) or not (false). Not enforced by the API.
FloorPrice (Decimal) The minimum price that may be charged for this item.    
OriginalPrice (Decimal) The original price of the item.    
PricingTierId (Integer) The identifier of a pricing tier associated with this price resource.    
PricingGroupId (Integer) The identifier of a pricing group associated with this price resource.    
PricingShelfId (Integer) The identifier of a pricing shelf associated with this price resource. Note: If not null, CatalogItemId must be set to an empty GUID. This property is read-only for PUT operations.    
OverridePrice (Decimal) The override, or sale, price of an item.    
OverrideStartDateUtc (DateTime) The date the override price comes into effect, in UTC.    
OverrideStopDateUtc (DateTime) The date the override price becomes inactive, in UTC.    

PricingGroup

PricingInformation

A PricingInformation resource provides pricing details for a given product.

{
    "Id": 24,
    "CompanyId": 91416,
    "EntityId": 91452,
    "CatalogItemId": "535e1ed9-34c8-4402-89c1-48160eb1e9d0",
    "PricingTermId": null,
    "RegularPrice": 29.99,
    "IsDiscountable": true,
    "FloorPrice": 10,
    "OriginalPrice": 15,
    "PricingTierId": null,
    "PricingGroupId": null,
    "PricingShelfId": null,
    "OverridePriceId": null,
    "OverridePrice": null,
    "OverrideStartDateUtc": null,
    "OverrideStopDateUtc": null
}

Name Description    
Id (Integer) System-generated. The identifier of the pricing resource.    
CompanyId (Integer) The identifier of the company.    
EntityId (Integer) The identifier of the entity.    
CatalogItemId (GUID) The identifier of the product in the iQmetrix Product Library. If this property is not null, the PricingShelfId property must be set to null. This property is read-only for PUT operations.    
PricingTermId (Integer) The identifier of a pricing term resource associated with this resource.    
RegularPrice (Decimal) The regular price of the item. Must be greater than or equal to 0.    
IsDiscountable (Boolean)   IsDiscountable (Boolean) Indicates whether the price of the product may be discounted (true) or not (false). Not enforced by the API.
FloorPrice (Decimal) The minimum price that may be charged for this item.    
OriginalPrice (Decimal) The original price of the item.    
PricingTierId (Integer) The identifier of a pricing tier associated with this price resource.    
PricingGroupId (Integer) The identifier of a pricing group associated with this price resource.    
PricingShelfId (Integer) The identifier of a pricing shelf associated with this price resource. Note: If not null, CatalogItemId must be set to an empty GUID. This property is read-only for PUT operations.    
OverridePrice (Decimal) The override, or sale, price of an item.    
OverrideStartDateUtc (DateTime) The date the override price comes into effect, in UTC.    
OverrideStopDateUtc (DateTime) The date the override price becomes inactive, in UTC.    

PricingTerm

A PricingTerm resource describes the terms for a type of pricing.

{
    "EntityId": 94146,
    "Name": "3-year",
    "Active": true,
    "NumberOfPayments": 48,
    "CanFinance": true,
    "TermLengthInYears": 4,
    "DisplayName": "EN - f4c5788f-23c1-463b-adcf-7c0beb222cc3",
    "CarrierEntityId": null
}

Name Description
Id (Integer) The identifier for the pricing term.
EntityId (Integer) The identifier of the entity.
Name (String) A name for the pricing term.
Active (Boolean) Indicates whether the pricing term is active (true) or inactive (false).
NumberOfPayments (Integer) For pricing terms that include financing, the number of payments. If the term is not financed, set this value to null.
CanFinance (Boolean) Indicates whether the item(s) associated with this pricing term can be financed (true) or not (false).
TermLengthInYears (Integer) The length of the term.
DisplayName (String) The public-facing display name. This field is multi-lingual.
CarrierEntityId (Integer) The carrier associated with the term, if any.

ProductPrice

The ProductPrice resource represents a price for a product at an entity

{
    "EntityId": 91452,
    "CatalogItemId": "535e1ed9-34c8-4402-89c1-48160eb1e9d0",
    "PricingTermId": null,
    "RegularPrice": 29.99,
    "IsDiscountable": true,
    "FloorPrice": 10,
    "OriginalPrice": 15,
    "OverridePriceId": null,
    "OverridePrice": null,
    "OverrideStartDateUtc": null,
    "OverrideStopDateUtc": null,
    "PricingTierId": null,
    "PricingGroupId": null,
    "PricingShelfId": null,
    "SalePrices": []
}
Name Description
Id (Integer) System-generated. The identifier of the price resource.
EntityId (Integer) The identifier of the entity for which this pricing is in effect.
CatalogItemId (GUID) The identifier of the item in the iQmetrix Product Catalog.
PricingTermId (Integer) The identifier of a pricing term associated with this price resource.
PricingTierId (Integer) The identifier of a pricing tier associated with this price resource.
PricingGroupId (Integer) The identifier of a pricing group associated with this price resource.
PricingShelfId (Integer) The identifier of a pricing shelf associated with this price resource. Note: If not null, CatalogItemId must be set to an empty GUID. This property is read-only for PUT operations.
RegularPrice (Decimal) The regular price of the item. Must be greater than or equal to 0.
IsDiscountable (Boolean) Indicates whether the price of the product may be discounted (true) or not (false). Not enforced by the API.
FloorPrice (Decimal) The minimum price that may be charged for this item.
OriginalPrice (Decimal) The original price of the item.
PricingTermResource (PricingTerm]) Read-only. The pricing term resource specified by PricingTermId.
PricingTierResource (PricingTier) Read-only. The pricing term resource specified by PricingTierId.
PricingGroupResource (PricingGroup) Read-only. The pricing group specified by PricingGroupId.
PricingShelfResource (PricingGroup) Read-only. The pricing shelf specified by PricingShelfId.
SalePrices Array[SalePriceItem] A collection of sale prices associated with the product price.

ProductPriceBulk

ProductPriceList

SaleOverridePrice

SaleOverridePrice is used to set a sale pricing for a specific date. OverridePrice is set using the active SaleOverridePrice SalePrice property, determined using the following rules:


RQ Connection Future SaveOverridePrice values are not currently synced to RQ, this feature is coming soon.

{
    "Id": 1177,
    "CompanyId": 14146,
    "IsDefault": true,
    "PricingInformationId": 16446,
    "SalePrice": 3.99,
    "StartDateUTC": "2017-12-02T00:00:00",
    "StopDateUTC": "2017-12-31T00:00:00"
}
Name Description
Id (Integer) Identifier
CompanyId (Integer) Identifier for the Company associated with this Pricing
IsDefault (Boolean) A flag to indicate that this is the default SaleOverridePrice
PricingInformationId (Integer) Identifier for a Pricing
SalePrice (Decimal) Sale price
StartDateUTC (DateTime) Date and time the sale pricing begins, in UTC
StopDateUTC (DateTime) Date and time the sale pricing ends, in UTC

REQUESTS

POST or PUT Product Pricing at Company Level

When Product Pricing is set at the Company level, all Locations within the Company will use this Product Pricing by default unless overridden by a Location level Pricing. For more information, see Company Tree Inheritance.

Request

POST /Companies({CompanyId})/Pricing

Example Request

POST /Companies(14146)/Pricing
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "CatalogItemId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
    "CompanyId": 14146,
    "EntityId": 14146,
    "FloorPrice": 3.99,
    "IsDiscountable": false,
    "OriginalPrice": 4.99,
    "PricingTermId": 78,
    "RegularPrice": 10
}              

curl -X POST "https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "CatalogItemId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
    "CompanyId": 14146,
    "EntityId": 14146,
    "FloorPrice": 3.99,
    "IsDiscountable": false,
    "OriginalPrice": 4.99,
    "PricingTermId": 78,
    "RegularPrice": 10
}              
'
static IRestResponse CreatingOrUpdatingProductPricingAtCompanyLevel()
{
    var client = new RestClient("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing");
    var request = new RestRequest(Method.POST);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 
    request.AddHeader("Content-Type", "application/json"); 

     request.AddParameter("application/json", "{\"CatalogItemId\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"CompanyId\":14146,\"EntityId\":14146,\"FloorPrice\":3.99,\"IsDiscountable\":false,\"OriginalPrice\":4.99,\"PricingTermId\":78,\"RegularPrice\":10}", ParameterType.RequestBody);

    return client.Execute(request);
}
import org.apache.http.entity.StringEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse CreatingOrUpdatingProductPricingAtCompanyLevel() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPost request = new HttpPost("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"CatalogItemId\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"CompanyId\":14146,\"EntityId\":14146,\"FloorPrice\":3.99,\"IsDiscountable\":false,\"OriginalPrice\":4.99,\"PricingTermId\":78,\"RegularPrice\":10}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"CatalogItemId\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"CompanyId\":14146,\"EntityId\":14146,\"FloorPrice\":3.99,\"IsDiscountable\":false,\"OriginalPrice\":4.99,\"PricingTermId\":78,\"RegularPrice\":10}

response = RestClient.post 'https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing', body, {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Content-Type' => 'application/json',
    } 

puts response

URI Parameters

Request Parameters

Response Parameters

Example Response

HTTP 201 Content-Type: application/json
{
    "Id": 16446,
    "CatalogItemId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
    "CompanyId": 14146,
    "EntityId": 14146,
    "FloorPrice": 3.99,
    "IsDiscountable": false,
    "OriginalPrice": 4.99,
    "OverridePrice": 3.99,
    "OverridePriceId": 1177,
    "PricingTermId": 78,
    "RegularPrice": 10
}       

Pricing

POST or PUT Product Pricing at Location Level

This request can be used to set Product Pricing for a specific Location. Location level Pricing overrides any Product Pricing set at the Company level. For more information, see Company Tree Inheritance.

Request

POST /Companies({CompanyId})/Entities({LocationId})/CatalogItems({CatalogItemId})/Pricing

Example Request

POST /Companies(14146)/Entities(14202)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "CatalogItemId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
    "CompanyId": 14146,
    "EntityId": 14202,
    "FloorPrice": 3.99,
    "IsDiscountable": false,
    "OriginalPrice": 4.99,
    "PricingTermId": 78,
    "RegularPrice": 10
}
curl -X POST "https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "CatalogItemId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
    "CompanyId": 14146,
    "EntityId": 14202,
    "FloorPrice": 3.99,
    "IsDiscountable": false,
    "OriginalPrice": 4.99,
    "PricingTermId": 78,
    "RegularPrice": 10
}'
static IRestResponse CreatingOrUpdatingProductPricingAtLocationLevel()
{
    var client = new RestClient("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing");
    var request = new RestRequest(Method.POST);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 
    request.AddHeader("Content-Type", "application/json"); 

     request.AddParameter("application/json", "{\"CatalogItemId\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"CompanyId\":14146,\"EntityId\":14202,\"FloorPrice\":3.99,\"IsDiscountable\":false,\"OriginalPrice\":4.99,\"PricingTermId\":78,\"RegularPrice\":10}", ParameterType.RequestBody);

    return client.Execute(request);
}
import org.apache.http.entity.StringEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse CreatingOrUpdatingProductPricingAtLocationLevel() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPost request = new HttpPost("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"CatalogItemId\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"CompanyId\":14146,\"EntityId\":14202,\"FloorPrice\":3.99,\"IsDiscountable\":false,\"OriginalPrice\":4.99,\"PricingTermId\":78,\"RegularPrice\":10}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"CatalogItemId\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"CompanyId\":14146,\"EntityId\":14202,\"FloorPrice\":3.99,\"IsDiscountable\":false,\"OriginalPrice\":4.99,\"PricingTermId\":78,\"RegularPrice\":10}";

response = RestClient.post 'https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing', body, {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Content-Type' => 'application/json',
    } 

puts response

URI Parameters

Request Parameters

Response Parameters

Example Response

HTTP 201 Content-Type: application/json
{
    "Id": 16446,
    "CatalogItemId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
    "CompanyId": 14146,
    "EntityId": 14202,
    "FloorPrice": 3.99,
    "IsDiscountable": false,
    "OriginalPrice": 4.99,
    "OverridePrice": 3.99,
    "OverridePriceId": 1177,
    "PricingTermId": 78,
    "RegularPrice": 10
}

Pricing

GET Product Pricing for a Retail Location

Request

GET /Companies({CompanyId})/Entities({LocationId})/CatalogItems({CatalogItemId})/Pricing

Example Request

GET /Companies(14146)/Entities(14202)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingProductPricingForARetailLocation()
{
    var client = new RestClient("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingProductPricingForARetailLocation() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": 16446,
        "CatalogItemId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
        "CompanyId": 14146,
        "EntityId": 14202,
        "FloorPrice": 3.99,
        "IsDiscountable": false,
        "OriginalPrice": 4.99,
        "OverridePrice": 3.99,
        "OverridePriceId": 1177,
        "PricingTermId": 78,
        "RegularPrice": 10
    }
]

Array[Pricing]

GET Product Pricing at Company Level

Request

GET /Companies({CompanyId})/CatalogItems({CatalogItemId})/Pricing

Example Request

GET /Companies(14146)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://pricingdemo.iqmetrix.net/v1/Companies(14146)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingProductPricingAtCompanyLevel()
{
    var client = new RestClient("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingProductPricingAtCompanyLevel() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://pricingdemo.iqmetrix.net/v1/Companies(14146)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": 16446,
        "CatalogItemId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
        "CompanyId": 14146,
        "EntityId": 14202,
        "FloorPrice": 3.99,
        "IsDiscountable": false,
        "OriginalPrice": 4.99,
        "OverridePrice": 3.99,
        "OverridePriceId": 1177,
        "PricingTermId": 78,
        "RegularPrice": 10
    }
]

Array[Pricing]

GET all Active Pricing Terms

Request

GET /Companies({CompanyId})/PricingTerms

Example Request

GET /Companies(14146)/PricingTerms
Authorization: Bearer (Access Token)
Accept: application/json
Accept-Language: en-US

curl -X GET "https://pricingdemo.iqmetrix.net/v1/Companies(14146)/PricingTerms" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Accept-Language: en-US"
static IRestResponse GettingAllActivePricingTerms()
{
    var client = new RestClient("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/PricingTerms");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 
    request.AddHeader("Accept-Language", "en-US"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingAllActivePricingTerms() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/PricingTerms");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Accept-Language", "en-US"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://pricingdemo.iqmetrix.net/v1/Companies(14146)/PricingTerms', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Accept-Language' => 'en-US',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": 78,
        "Active": true,
        "CanFinance": true,
        "CarrierEntityId": 9,
        "DisplayName": "2 Year Plan",
        "EntityId": 14146,
        "Name": "2 Year Plan",
        "NumberOfPayments": 1,
        "TermLengthInYears": 3
    }
]

Array[PricingTerm]

GET a Pricing Term

Request

GET /Companies({CompanyId})/PricingTerms({PricingTermId})

Example Request

GET /Companies(14146)/PricingTerms(78)
Authorization: Bearer (Access Token)
Accept: application/json
Accept-Language: en-US

curl -X GET "https://pricingdemo.iqmetrix.net/v1/Companies(14146)/PricingTerms(78)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Accept-Language: en-US"
static IRestResponse GettingAPricingTerm()
{
    var client = new RestClient("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/PricingTerms(78)");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 
    request.AddHeader("Accept-Language", "en-US"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingAPricingTerm() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/PricingTerms(78)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Accept-Language", "en-US"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://pricingdemo.iqmetrix.net/v1/Companies(14146)/PricingTerms(78)', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Accept-Language' => 'en-US',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": 78,
    "Active": true,
    "CanFinance": true,
    "CarrierEntityId": 9,
    "DisplayName": "2 Year Plan",
    "EntityId": 14146,
    "Name": "2 Year Plan",
    "NumberOfPayments": 1,
    "TermLengthInYears": 3
}

PricingTerm

POST a Sale Price

When creating a SaleOverridePrice, the following rules are enforced:

Request

POST /Companies({CompanyId})/Pricing({PricingId})/SaleOverridePrices

Example Request

POST /Companies(14146)/Pricing(16446)/SaleOverridePrices
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "IsDefault": true,
    "SalePrice": 3.99,
    "StartDateUTC": "2015-12-02T00:00:00",
    "StopDateUTC": "2015-12-31T00:00:00"
}
curl -X POST "https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing(16446)/SaleOverridePrices" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "IsDefault": true,
    "SalePrice": 3.99,
    "StartDateUTC": "2015-12-02T00:00:00",
    "StopDateUTC": "2015-12-31T00:00:00"
}'
static IRestResponse CreatingASalePrice()
{
    var client = new RestClient("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing(16446)/SaleOverridePrices");
    var request = new RestRequest(Method.POST);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 
    request.AddHeader("Content-Type", "application/json"); 

     request.AddParameter("application/json", "{\"IsDefault\":true,\"SalePrice\":3.99,\"StartDateUTC\":\"2015-12-02T00:00:00\",\"StopDateUTC\":\"2015-12-31T00:00:00\"}", ParameterType.RequestBody);

    return client.Execute(request);
}
import org.apache.http.entity.StringEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse CreatingASalePrice() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPost request = new HttpPost("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing(16446)/SaleOverridePrices");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"IsDefault\":true,\"SalePrice\":3.99,\"StartDateUTC\":\"2015-12-02T00:00:00\",\"StopDateUTC\":\"2015-12-31T00:00:00\"}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"IsDefault\":true,\"SalePrice\":3.99,\"StartDateUTC\":\"2015-12-02T00:00:00\",\"StopDateUTC\":\"2015-12-31T00:00:00\"}";

response = RestClient.post 'https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing(16446)/SaleOverridePrices', body, {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Content-Type' => 'application/json',
    } 

puts response

URI Parameters

Request Parameters

Response Parameters

Example Response

HTTP 201 Content-Type: application/json
{
    "Id": 1177,
    "CompanyId": 14146,
    "IsDefault": true,
    "PricingInformationId": 16446,
    "SalePrice": 3.99,
    "StartDateUTC": "2015-12-02T00:00:00",
    "StopDateUTC": "2015-12-31T00:00:00"
}

SaleOverridePrice

GET All Sale Pricing

Request

GET /Companies({CompanyId})/Pricing({PricingId})/SaleOverridePrices

Example Request

GET /Companies(14146)/Pricing(16446)/SaleOverridePrices
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing(16446)/SaleOverridePrices" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingAllSalePricing()
{
    var client = new RestClient("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing(16446)/SaleOverridePrices");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingAllSalePricing() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing(16446)/SaleOverridePrices");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing(16446)/SaleOverridePrices', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": 1177,
        "CompanyId": 14146,
        "IsDefault": true,
        "PricingInformationId": 16446,
        "SalePrice": 3.99,
        "StartDateUTC": "2015-12-02T00:00:00",
        "StopDateUTC": "2015-12-31T00:00:00"
    }
]

Array[SaleOverridePrice]

PUT a Sale Pricing

Request

PUT /Companies({CompanyId})/Pricing({PricingId})/SaleOverridePrices({SaleOverridePriceId})

Example Request

PUT /Companies(14146)/Pricing(16446)/SaleOverridePrices(2802)
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "Id": 1177,
    "CompanyId": 14146,
    "IsDefault": true,
    "PricingInformationId": 16446,
    "SalePrice": 3.99,
    "StartDateUTC": "2015-12-02T00:00:00",
    "StopDateUTC": "2015-12-31T00:00:00"
}
curl -X PUT "https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing(16446)/SaleOverridePrices(2802)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "Id": 1177,
    "CompanyId": 14146,
    "IsDefault": true,
    "PricingInformationId": 16446,
    "SalePrice": 3.99,
    "StartDateUTC": "2015-12-02T00:00:00",
    "StopDateUTC": "2015-12-31T00:00:00"
}'
static IRestResponse UpdatingASalePricing()
{
    var client = new RestClient("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing(16446)/SaleOverridePrices(2802)");
    var request = new RestRequest(Method.PUT);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 
    request.AddHeader("Content-Type", "application/json"); 

     request.AddParameter("application/json", "{\"Id\":1177,\"CompanyId\":14146,\"IsDefault\":true,\"PricingInformationId\":16446,\"SalePrice\":3.99,\"StartDateUTC\":\"2015-12-02T00:00:00\",\"StopDateUTC\":\"2015-12-31T00:00:00\"}", ParameterType.RequestBody);

    return client.Execute(request);
}
import org.apache.http.entity.StringEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse UpdatingASalePricing() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPut request = new HttpPut("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing(16446)/SaleOverridePrices(2802)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"Id\":1177,\"CompanyId\":14146,\"IsDefault\":true,\"PricingInformationId\":16446,\"SalePrice\":3.99,\"StartDateUTC\":\"2015-12-02T00:00:00\",\"StopDateUTC\":\"2015-12-31T00:00:00\"}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"Id\":1177,\"CompanyId\":14146,\"IsDefault\":true,\"PricingInformationId\":16446,\"SalePrice\":3.99,\"StartDateUTC\":\"2015-12-02T00:00:00\",\"StopDateUTC\":\"2015-12-31T00:00:00\"}";

response = RestClient.put 'https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing(16446)/SaleOverridePrices(2802)', body, {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Content-Type' => 'application/json',
    } 

puts response

URI Parameters

Request Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": 1177,
    "CompanyId": 14146,
    "IsDefault": true,
    "PricingInformationId": 16446,
    "SalePrice": 3.99,
    "StartDateUTC": "2015-12-02T00:00:00",
    "StopDateUTC": "2015-12-31T00:00:00"
}

SaleOverridePrice

DELETE a Sale Pricing

Request

DELETE /Companies({CompanyId})/Pricing({PricingId})/SaleOverridePrices({SaleOverridePriceId})

Example Request

DELETE /Companies(14146)/Pricing(16446)/SaleOverridePrices(2802)
Authorization: Bearer (Access Token)

curl -X DELETE "https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing(16446)/SaleOverridePrices(2802)" -H "Authorization: Bearer (Access Token)"
static IRestResponse DeletingASalePricing()
{
    var client = new RestClient("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing(16446)/SaleOverridePrices(2802)");
    var request = new RestRequest(Method.DELETE);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse DeletingASalePricing() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpDelete request = new HttpDelete("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing(16446)/SaleOverridePrices(2802)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.delete 'https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Pricing(16446)/SaleOverridePrices(2802)', {
     :'Authorization' => 'Bearer (Access Token)',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json

GET Product Pricing by Pricing Term

Request

GET /Companies({CompanyId})/CatalogItems({CatalogItemId})/Pricing?$filter={PricingTermId}

Example Request

GET /Companies(14146)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing?$filter=78
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://pricingdemo.iqmetrix.net/v1/Companies(14146)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing?$filter=78" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingProductPricingByPricingTerm()
{
    var client = new RestClient("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing?$filter=78");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingProductPricingByPricingTerm() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://pricingdemo.iqmetrix.net/v1/Companies(14146)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing?$filter=78");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://pricingdemo.iqmetrix.net/v1/Companies(14146)/CatalogItems(a183f1a9-c58f-426a-930a-9a6357db52ed)/Pricing?$filter=78', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": 16446,
        "CatalogItemId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
        "CompanyId": 14146,
        "EntityId": 14202,
        "FloorPrice": 3.99,
        "IsDiscountable": false,
        "OriginalPrice": 4.99,
        "OverridePrice": 3.99,
        "OverridePriceId": 1177,
        "PricingTermId": 78,
        "RegularPrice": 10
    }
]

Array[Pricing]

ERRORS

HTTP Status Code Description How to Resolve
HTTP 400 A non-default sale override price must have
start and stop dates associated with it.
StartDate and StopDate must either both be set or both be null
HTTP 400 The start date is after, or equal to the end date.
The start date must come before the end date.
StartDate must be before StopDate
HTTP 400 Uri parameter representing resource id and resource
id found in the request content don't match.
When performing a PUT, ensure any URI parameters also in the request body match
HTTP 400 The date range overlaps with another sale period for
this pricing record.
Update or delelete the existing SaleOverridePrice that overlaps with the date range
HTTP 400 A default sale override price cannot have start
or stop dates associated with it.
Ensure StartDate and StopDate are not set if IsDefault is true
HTTP 400 The sale price must be greater or equal to zero. Ensure SalePrice is non-negative
HTTP 400 There is already a default sales overide for this pricing record.
Either delete it first, or modify that record.
Delete or modify the existing default SaleOverridePrice
HTTP 400 Entity is not related to company Ensure the Location belongs to the Company specified in the URI
HTTP 400 Error while extracting the request query... Ensure $filter query parameter is formatted correctly
HTTP 400 If a floor price is set, discountable must be set to true. Set discountable to true
HTTP 400 The set regular price must be smaller or equal to the floor price Ensure regular price is smaller then floor price
HTTP 400 If a floor price is set, discountable must be set to true. Set discountable to true
HTTP 404 Cannot find matching records Ensure CatalogItem ID is valid, CatalogItem exists and belongs to the Company specified in the URI
HTTP 404 That term does not exist Ensure PricingTerm ID is valid
HTTP 500 An error occurred while updating the entries Ensure request body is correct, ensure Name property does not contain more then 255 characters

RELEASE NOTES

2.8.0

Release Date: 24-05-2018

NEW
Support for Querying Changed Prices
This release adds support for querying product pricing that has been updated since a given date/time. This information helps you ensure that downstream devices have correct information. To support this feature, this release introduces the /ChangedPrices endpoint.
The new endpoint is read-only. Queries will identify new or updated prices. Returned records are ordered according to LastModifiedDateUtc, in descending order. Pagination controls ($skip and $top) are supported, as in the following example.

  • Companies({CompanyId})/Entities({EntityId})/ChangedPrices?$filter=LastModifiedDateUtc ge datetime'2018-04-01'&$skip=0&$top=1000

The query returns a list of ChangedPrice resources–a new resource derived from the PricingInformationResource.
In queries to the /ChangedPrices endpoint:
  • The CompanyId and EntityId must be distinct. In other words, you cannot query all prices changes at the company level.
  • The LastModifiedDateUtc filter is mandatory; the date/time cannot be more recent than the previous day at midnight.
  • The default value for $top is 500. The maximum allowed value for $top is 1000.

Was this page helpful?