Overview

This guide is intended to demonstrate an example of how iQmetrix APIs could be used to create an eCommerce site that integrates with Endless Aisle.

This guide is not intended to represent an integration with RQ. If you are interested in an eCommerce integration with RQ, contact support.

commerce flow diagram

This image (above) shows how the APIs (below) work together in a typical eCommerce integration.

Who Is This Guide For?

You may be interested in this guide if you are creating an eCommerce solution to integrate with Endless Aisle.

Prerequisites

To use this guide, the following steps must be completed:

Tip: If the above steps are not complete or you are not sure, contact Support.

Before You Begin

To make requests to iQmetrix APIs, you must generate an Access Token.

Definition: An Access Token is a serialized security object that identifies its owner and allows authenticated access to iQmetrix APIs.

Use the request Obtaining an Access Token and the following parameters:

Example Request (cURL)
curl -X POST \
  https://accountsdemo.iqmetrix.net/v1/oauth2/token \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'grant_type=password&client_id=PROVIDEDCLIENTID&client_secret=PROVIDEDSECRET&username=EMAIL&password=PASSWORD'
Example Response
HTTP 200
{
    "access_token": "b0k0dY70N3Vv9jR1b9oEdW9IeT5WIn85WCYFJRo6AiIKLEMBFwNbEQsfeCUeM3gdPA1gAAVxWTJacX8mJyBaGRcFVwQOEV49NgBz",
    "expires_in": 43199,
    "refresh_token": "FOPAB0K3eshQjrJW4mt6FbWF3OwDJL7CGdZX"
}

The token (access_token) is placed in the Authorization header of requests to iQmetrix APIs, prefixed by the word Bearer.

Example
Authorization: Bearer b0k0dY70N3Vv9jR1b9oEdW9IeT5WIn85WCYFJRo6AiIKLEMBFwNbEQsfeCUeM3gdPA1gAAVxWTJacX8mJyBaGRcFVwQOEV49NgBz

Postman Example

iQmetrix uses Postman when testing and debugging our APIs.

Click the button below to import the collection directly into Postman.

Sections

This guide is organized by pages in a typical eCommerce site, and is not intended to be followed sequentially.



Search

Instead of browsing for Products, a Customer may have a specific Product in mind and search for the Product.

Searching Products

The search request uses a SearchTerms URI parameter, and returns Products that match the criteria in any of the following fields:

Example Request
GET https://catalogsdemo.iqmetrix.net/v1/companies(14146)/catalog/search?searchTerms=Xperia
Authorization: Bearer b0k0dY70N3Vv9jR1b9oEdW9IeT5WIn85WCYFJRo6AiIKLEMBFwNbEQsfeCUeM3gdPA1gAAVxWTJacX8mJyBaGRcFVwQOEV49NgBz
Accept: application/json
Example Response
HTTP 200 Content-Type: application/json
{
    "Items": [
        {
            "Name": "Xperia Z3 Tough Case - Black",
            "CanonicalClassification": {
                "Id": 40,
                "Name": "Cases & Skins",
                "ParentCategories": [
                    {
                        "Id": 12,
                        "Name": "Accessories"
                    },
                    {
                        "Id": 37,
                        "Name": "Cases & Protection"
                    }
                ]
            },
            "ClassificationTreeId": 1,
            "ColorDefinition": {
                "Id": "1457698d-0566-42f0-87d4-f48bae06fa57",
                "Name": "Black",
                "ColorTags": [
                    {
                        "Id": 1,
                        "Name": "Black",
                        "ColorCode": "#303232"
                    }
                ],
                "Swatch": {
                    "Type": "ColorCode",
                    "AssetId": null,
                    "ColorCode": "#303232"
                }
            },
            "HeroShotId": "5ab01256-019e-4f4d-9a35-d270ca61c867",
            "Msrp": {
                "Amount": 30,
                "CurrencyCode": "USD"
            },
            "Manufacturer": {
                "Name": "CaseMate",
                "Id": 13148
            },
            "Vendors": [
                {
                    "Name": "Hitfar",
                    "Id": 3598
                },
                {
                    "Name": "iQSupplier",
                    "Id": 13939
                }
            ],
            "Slug": "M1768-V1",
            "IsLinkedToCuratedProduct": true,
            "ProductVersion": 4,
            "IsDropShippable": true,
            "ShortDescription": "Sporty, textured finish for an easy-to-hold and secure grip",
            "IsMasterProduct": false,
            "VariationId": 1,
            "DateAddedUtc": "2017-05-25T20:24:46.027",
            "Identifiers": [
                {
                    "Sku": "9355CMSOXZ3",
                    "SkuType": "VendorSKU",
                    "Entity": {
                        "Id": 3598,
                        "Name": "Hitfar"
                    },
                    "Description": ""
                },
                {
                    "Sku": "LF-6895",
                    "SkuType": "VendorSKU",
                    "Entity": {
                        "Id": 13939,
                        "Name": "iQSupplier"
                    },
                    "Description": ""
                },
                {
                    "Sku": "CM031349",
                    "SkuType": "ManufacturerSKU",
                    "Entity": {
                        "Id": 13148,
                        "Name": "CaseMate"
                    },
                    "Description": ""
                },
                {
                    "Sku": "846127163309",
                    "SkuType": "UPC",
                    "Entity": null,
                    "Description": ""
                }
            ],
            "Entity": null,
            "Region": null,
            "CatalogItemId": "3b20e1ab-1c18-4827-b2cf-c33e1be9dfad",
            "CatalogSku": "76KR1Q1C",
            "RmsId": "",
            "CompanyId": 14146,
            "MeasurementType": "SingleUnit",
            "BatchTracking": false,
            "NonStock": false,
            "LifeCycle": "Active"
        },
    ],
    "Facets": {
        "Manufacturers": [
            {
                "Count": 1,
                "Item": {
                    "Name": "CaseMate",
                    "Id": 13148
                }
            }
        ],
        "Vendors": [
            {
                "Count": 1,
                "Item": {
                    "Name": "iQSupplier",
                    "Id": 13939
                }
            },
            {
                "Count": 1,
                "Item": {
                    "Name": "Hitfar",
                    "Id": 3598
                }
            }
        ],
        "ClassificationAndCategories": [
            {
                "Count": 1,
                "Item": 12
            },
            {
                "Count": 1,
                "Item": 37
            }
        ],
        "LifeCycles": [
            {
                "Count": 1,
                "Item": "Active"
            }
        ]
    },
    "MetaData": {
        "Page": 1,
        "PageSize": 20,
        "TotalResults": 1
    }
}

View Products

A Customer who is browsing an eCommerce site might select a general “View Products” page to:

Getting a List of Products

This request returns a list of all Products in your Catalog.

Example Request
GET https://catalogsdemo.iqmetrix.net/v1/companies(14146)/catalog/items
Authorization: Bearer b0k0dY70N3Vv9jR1b9oEdW9IeT5WIn85WCYFJRo6AiIKLEMBFwNbEQsfeCUeM3gdPA1gAAVxWTJacX8mJyBaGRcFVwQOEV49NgBz
Accept: application/json
Example Response
HTTP 200 Content-Type: application/json
[
    {
        "RmsId": null,
        "Slug": "M2307",
        "CatalogItemId": "4ee8cb58-a6cd-42ea-8537-00426aacd4cc",
        "CatalogSku": "21Z8F4AQ",
        "MeasurementType": "SingleUnit",
        "BatchTracking": false,
        "NonStock": false,
        "LifeCycle": "Active",
        "IsArchived": false,
        "SourceIds": [
            "00000000-0000-0000-0000-000000000000"
        ],
        "DateAddedUtc": "2016-06-21T20:26:00.847",
        "DateUpdatedUtc": "2016-06-21T20:26:00.847"
    }
]

Filtering Products

Now that we have a list of Products, we can use the following filters:

Name API Reference
Category Getting Products by Category or Classification
Classification Getting Products by Category or Classification
Manufacturer Getting Products by Manufacturer
Supplier Getting Products by Supplier
Combine Filters Combining Search Filters

In this example, we will filter our list using the following filters:

Example Request
GET https://catalogsdemo.iqmetrix.net/v1/companies(14146)/catalog/search?CategoryOrClassificationId=4&ManufacturerIds=11875&VendorIds=3938&Page=1&PageSize=10&OrderBy=name&OrderDir=asc
Authorization: Bearer b0k0dY70N3Vv9jR1b9oEdW9IeT5WIn85WCYFJRo6AiIKLEMBFwNbEQsfeCUeM3gdPA1gAAVxWTJacX8mJyBaGRcFVwQOEV49NgBz
Accept: application/json
Example Response
HTTP 200 Content-Type: application/json
{
    "Items": [
        {
            "Name": "Samsung Galaxy S4 64GB - Black Mist",
            "CanonicalClassification": {
                "Id": 4,
                "Name": "Smartphones",
                "ParentCategories": [
                    {
                        "Id": 2,
                        "Name": "Devices"
                    },
                    {
                        "Id": 3,
                        "Name": "Phones"
                    }
                ]
            },
            "ClassificationTreeId": 1,
            "ColorDefinition": {
                "Id": "045e44cc-7a79-41a3-a0b6-1b9612039f73",
                "Name": "Black Mist",
                "ColorTags": [
                    {
                        "Id": 1,
                        "Name": "Black",
                        "ColorCode": "#303232"
                    }
                ],
                "Swatch": null
            },
            "HeroShotId": "eecb713e-1e74-422d-84d2-b2bb4063f5d0",
            "Msrp": {
                "Amount": 639.99,
                "CurrencyCode": "USD"
            },
            "Manufacturer": {
                "Name": "Samsung",
                "Id": 11875
            },
            "Vendors": [
                {
                    "Name": "iQmetrix",
                    "Id": 3938
                }
            ],
            "Slug": "M326-V5-E38",
            "IsLinkedToCuratedProduct": true,
            "ProductVersion": 109,
            "IsDropShippable": false,
            "ShortDescription": "Live in a world of infinite possibilities",
            "IsMasterProduct": false,
            "VariationId": 5,
            "DateAddedUtc": "2015-12-16T21:46:24.133",
            "Identifiers": [
                {
                    "Sku": "ad5383fe-5673-4eba-97f1-92a229b8f36d",
                    "SkuType": "VendorSKU",
                    "Entity": {
                        "Id": 3938,
                        "Name": "iQmetrix"
                    },
                    "Description": "XQ Catalog"
                },
                {
                    "Sku": "5f90a916-8d35-4f82-af45-541af972f7fe",
                    "SkuType": "VendorSKU",
                    "Entity": {
                        "Id": 3938,
                        "Name": "iQmetrix"
                    },
                    "Description": "XQ Catalog"
                }
            ],
            "Entity": {
                "Name": "Freedom Mobile",
                "Id": 38
            },
            "Region": null,
            "CatalogItemId": "cfe632c4-1128-45b1-be2b-3bbfb77df609",
            "CatalogSku": "F4VPEFHH",
            "RmsId": null,
            "CompanyId": 14146,
            "MeasurementType": "SingleUnit",
            "BatchTracking": false,
            "NonStock": false,
            "LifeCycle": "Active"
        }
    ],
    "Facets": {
        "Manufacturers": [
            {
                "Count": 1,
                "Item": {
                    "Name": "Samsung",
                    "Id": 11875
                }
            }
        ],
        "Vendors": [
            {
                "Count": 1,
                "Item": {
                    "Name": "iQmetrix",
                    "Id": 3938
                }
            }
        ],
        "ClassificationAndCategories": [
            {
                "Count": 1,
                "Item": 2
            },
            {
                "Count": 1,
                "Item": 3
            },
            {
                "Count": 1,
                "Item": 4
            }
        ],
        "LifeCycles": [
            {
                "Count": 1,
                "Item": "Active"
            }
        ]
    },
    "MetaData": {
        "Page": 1,
        "PageSize": 10,
        "TotalResults": 1
    }
}

Product Details

A Product Details page is used to provide more information about a Product a Customer is interested in.

Getting Product Details

Most of the Product information we want can be obtained through this request.

In the example below, we request Product details for a XT711 smartphone.

Example Request
GET https://catalogsdemo.iqmetrix.net/v1/Companies(14146)/Catalog/Items(41519509-b798-4630-abba-89c9a30df83a)/ProductDetails
Authorization: Bearer b0k0dY70N3Vv9jR1b9oEdW9IeT5WIn85WCYFJRo6AiIKLEMBFwNbEQsfeCUeM3gdPA1gAAVxWTJacX8mJyBaGRcFVwQOEV49NgBz
Accept: application/json
Example Response
HTTP 200 Content-Type: application/json
{
    "ExtendedAttributes": [],
    "DateAddedUtc": "2015-12-03T21:34:49.58",
    "DateUpdatedUtc": "2016-03-24T14:35:49.4",
    "RmsId": null,
    "MeasurementType": "SingleUnit",
    "BatchTracking": false,
    "NonStock": false,
    "LifeCycle": "Archived",
    "Id": "M6",
    "Name": "XT711",
    "MasterProductId": 6,
    "VariationId": null,
    "Owner": null,
    "CanonicalClassification": {
        "TreeId": 1,
        "Id": 4,
        "Name": "Smartphones",
        "ParentCategories": [
            {
                "Id": 2,
                "Name": "Devices"
            },
            {
                "Id": 3,
                "Name": "Phones"
            }
        ]
    },
    "ShortDescription": "Motorola XT711 is an Android 2.1 smartphone",
    "LongDescription": "Motorola XT711 is an Android 2.1 smartphone, ready to take great images with its 8MP camera with Xenon flash. This really looks to be the most camera-centric Android handset to date, especially when you throw 720p HD video recording into the deal. Other than that, the Motorola MILESTONE XT720 seems to be a very good looking handset with characteristic design, large 3.7-inch, 480x854 resolution capacitive screen, HDMI interface, 3.5mm jack, and all other kinds of stuff.",
    "Manufacturer": {
        "Id": 11051,
        "Name": "Motorola"
    },
    "MSRP": {
        "Amount": 366,
        "CurrencyCode": "USD"
    },
    "ReleaseDate": null,
    "VariationInfo": [],
    "Specifications": [
        {
            "Id": "1b8bc398-1d63-431c-b91b-da9e44825a20",
            "Name": "Display and User Interface",
            "Fields": [
                {
                    "Id": 66,
                    "StringId": "Display Width",
                    "DisplayName": "Display Width",
                    "Name": "Display Width",
                    "Value": "480",
                    "Type": "Float",
                    "Unit": "pixels"
                },
                {
                    "Id": 67,
                    "StringId": "Display Height",
                    "DisplayName": "Display Height",
                    "Name": "Display Height",
                    "Value": "854",
                    "Type": "Float",
                    "Unit": "pixels"
                },
                {
                    "Id": 68,
                    "StringId": "Display Size",
                    "DisplayName": "Display Size",
                    "Name": "Display Size",
                    "Value": "3.7",
                    "Type": "Float",
                    "Unit": "inches"
                },
                {
                    "Id": 95,
                    "StringId": "Touch Screen",
                    "DisplayName": "Touch Screen",
                    "Name": "Touch Screen",
                    "Value": "Yes",
                    "Type": "YesNo",
                    "Unit": ""
                }
            ]
        }
    ],
    "Assets": [],
    "ColorDefinition": null,
    "HeroShotUri": null,
    "HeroShotId": null,
    "ManufacturerSkus": [
        {
            "Value": "Test-123455345343",
            "Description": "",
            "Entity": {
                "Id": 11051,
                "Name": "Motorola"
            }
        }
    ],
    "VendorSkus": [
        {
            "Value": "test20439485744393",
            "Description": "",
            "Entity": null
        }
    ],
    "UpcCodes": [
        {
            "Value": "test93832744985",
            "Description": "",
            "Entity": null
        }
    ],
    "Region": null,
    "Entity": null,
    "HasColor": true,
    "IsLinkedToCuratedProduct": true,
    "IsSaleable": true,
    "IsArchived": true,
    "Version": 2
}

Getting Stock Levels

This request can be used to display stock levels for the Product in every Location in the Company.

Example Request
GET https://availabilitydemo.iqmetrix.net/v1/companies(14146)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/Availability
Authorization: Bearer b0k0dY70N3Vv9jR1b9oEdW9IeT5WIn85WCYFJRo6AiIKLEMBFwNbEQsfeCUeM3gdPA1gAAVxWTJacX8mJyBaGRcFVwQOEV49NgBz
Accept: application/json
Example Response
HTTP 200 Content-Type: application/json
{
  "Id": "41519509-b798-4630-abba-89c9a30df83a",
  "CompanyId": "14146",
  "EntityId": 14202,
  "Quantity": 15,
  "IsSerialized": false,
  "IsDropShippable": false
}

Getting Regular and Sale Pricing for a Location

This request can be used to get Pricing for a single Location for a Product.

Notes

Example Request
GET https://pricingdemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/Pricing
Authorization: Bearer b0k0dY70N3Vv9jR1b9oEdW9IeT5WIn85WCYFJRo6AiIKLEMBFwNbEQsfeCUeM3gdPA1gAAVxWTJacX8mJyBaGRcFVwQOEV49NgBz
Accept: application/json
Example Response
HTTP 200 Content-Type: application/json
[
  {
    "Id": 15323,
    "CompanyId": 14146,
    "EntityId": 14202,
    "CatalogItemId": "41519509-b798-4630-abba-89c9a30df83a",
    "FloorPrice": null,
    "IsDiscountable": true,
    "PricingTermId": null,
    "RegularPrice": 60,
    "OriginalPrice": 55,
    "OverridePrice": null,
    "OverridePriceId": null  
  }
]

Getting a Pricing Term

If the Pricing for this Product has a PricingTermId, we can use this request to get the Pricing Term information.

Example Request
GET https://pricingdemo.iqmetrix.net/v1/companies(14146)/PricingTerm(78)
Authorization: Bearer b0k0dY70N3Vv9jR1b9oEdW9IeT5WIn85WCYFJRo6AiIKLEMBFwNbEQsfeCUeM3gdPA1gAAVxWTJacX8mJyBaGRcFVwQOEV49NgBz
Accept: application/json
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
}

My Profile

A Customer may visit a “My Profile” page to:

Creating a Customer

This request could be used in a checkout flow, or when logging into to an eCommerce site.

Example Request
POST https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerFull
Authorization: Bearer b0k0dY70N3Vv9jR1b9oEdW9IeT5WIn85WCYFJRo6AiIKLEMBFwNbEQsfeCUeM3gdPA1gAAVxWTJacX8mJyBaGRcFVwQOEV49NgBz
Accept: application/json
{
  "CustomerTypeId": "2",
  "PrimaryName": "Samantha",
  "FamilyName": "Brown",
  "Title": "Miss",
  "Addresses": [
    {
      "AddressTypeId": 2,
      "CountryCode": "US",
      "PostalCode": "55042",
      "StateCode": "MN",
      "Locality": "Minneapolis",
      "StreetAddress1": "1600 Amphitheatre Pkwy"
    }
  ]
}
Example Response
HTTP 201 Content-Type: application/json
{
    "Addresses": [
        {
            "Id": "f4db8b0a-406f-482e-895c-ff5f72d39e1c",
            "CustomerId": "49e807ba-aba3-4d42-b3aa-13a8cc841e16",
            "AddressTypeId": 2,
            "AddressType": "Home",
            "Default": false,
            "DoNotContact": true,
            "CountryCode": "US",
            "Country": "United States",
            "Locality": "Minneapolis",
            "StateCode": "MN",
            "State": "Minnesota",
            "PostalCode": "55042",
            "PostOfficeBoxNumber": "",
            "StreetAddress1": "1600 Amphitheatre Pkwy",
            "StreetAddress2": "",
            "Notes": null,
            "Version": 1,
            "AttentionTo": null,
            "Phone": "",
            "Email": ""
        }
    ],
    "ContactMethods": [],
    "CustomerExtensions": [],
    "RelatedCustomers": [],
    "MemberOf": [],
    "Documents": [],
    "Id": "49e807ba-aba3-4d42-b3aa-13a8cc841e16",
    "CustomerTypeId": 2,
    "CustomerType": "Person",
    "Title": "Miss",
    "PrimaryName": "Samantha",
    "AlternateName": null,
    "MiddleName": null,
    "FamilyName": "Brown",
    "DateOfBirth": null,
    "PricingGroupId": null,
    "Notes": null,
    "Disabled": false,
    "DoNotContact": true,
    "Version": 1
}

Getting a Customer

This request can be used to get all the information about a Customer in one request.

Example Request
GET https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerFull(659c2a38-d083-4421-9330-46d779702f85)
Authorization: Bearer b0k0dY70N3Vv9jR1b9oEdW9IeT5WIn85WCYFJRo6AiIKLEMBFwNbEQsfeCUeM3gdPA1gAAVxWTJacX8mJyBaGRcFVwQOEV49NgBz
Accept: application/json
Example Response
HTTP 200 Content-Type: application/json
{
  "Id": "659c2a38-d083-4421-9330-46d779702f85",      
  "PrimaryName": "Princess",
  "AlternateName": null,
  "MiddleName": null,
  "FamilyName": "Jasmine",    
  "Addresses": [
    {
      "Id": "a08b0640-606a-41f0-901a-facaf50e75dd",
      "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
      "AddressTypeId": 2,
      "AddressType": "Home",
      "Default": false,
      "DoNotContact": false,
      "CountryCode": "CA",
      "Country": "Canada",
      "Locality": "Yellowknife",
      "StateCode": "NT",
      "State": "Northwest Territories",
      "PostalCode": "X1A 3X7",
      "PostOfficeBoxNumber": null,
      "StreetAddress1": "4702 Anderson-Thomson Blvd",
      "StreetAddress2": null,
      "Notes": null,
      "Version": 1,
      "AttentionTo": null,
      "Phone": null,
      "Email": null
    }
  ],
  "ContactMethods": [
    {
      "Id": "b25dd8b2-a24d-4107-8fbe-9c7b21e18137",
      "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
      "ContactMethodCategoryId": 1,
      "ContactMethodCategory": "Phone",
      "ContactMethodTypeId": 5,
      "ContactMethodType": "Pager",
      "Value": "(306) 222-3333",
      "DoNotContact": true,
      "Default": true,
      "Notes": "After 6pm",
      "Version": 1
    }
  ],
  "CustomerExtensions": [
    {
      "Id": "74b87ece-5f70-454d-9991-7952127146b0",
      "Value": "Customer115",
      "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
      "ExtensionTypeId": 2,
      "ExtensionType": "CorrelationId",
      "Version": 1
    }
  ],
  "RelatedCustomers": [],
  "MemberOf": [],
  "CustomerTypeId": 2,
  "CustomerType": "Person",
  "Title": "Ms",
  "DateOfBirth": "2014-05-08T16:53:12.15",
  "Notes": "Interested in iPhone 6",
  "Disabled": false,
  "DoNotContact": false,
  "Version": 2
}

Updating a Customer

The request to update a Customer depends on what needs to be changed.

Change API Reference
Change to: customer name, birthday, notes, title Updating a Customer
Adding a new address Adding a Customer Address
Updating an address Updating a Customer Address
Removing an address Removing an Address from a Customer
Change to: phone number, email, fax, website, pager Adding a Customer Contact Method
Add a new contact method Updating a Customer Contact Method
Removing a contact method Removing a Customer Contact Method

The example below demonstrates updating an existing Contact Method, specifically a Customer updating their phone number.

Example Request
PUT https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods(b25dd8b2-a24d-4107-8fbe-9c7b21e18137)
Authorization: Bearer b0k0dY70N3Vv9jR1b9oEdW9IeT5WIn85WCYFJRo6AiIKLEMBFwNbEQsfeCUeM3gdPA1gAAVxWTJacX8mJyBaGRcFVwQOEV49NgBz
Accept: application/json
Content-Type: application/json
{
  "Id": "b25dd8b2-a24d-4107-8fbe-9c7b21e18137",
  "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
  "ContactMethodCategoryId": 1,
  "ContactMethodCategory": "Phone",
  "ContactMethodTypeId": 5,
  "ContactMethodType": "Pager",
  "Value": "(306) 111-8877",
  "DoNotContact": true,
  "Default": true,
  "Notes": "",
  "Version": 2
}
Example Response
HTTP 201 Content-Type: application/json
{
  "Id": "b25dd8b2-a24d-4107-8fbe-9c7b21e18137",
  "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
  "ContactMethodCategoryId": 1,
  "ContactMethodCategory": "Phone",
  "ContactMethodTypeId": 5,
  "ContactMethodType": "Pager",
  "Value": "(306) 111-8877",
  "DoNotContact": true,
  "Default": true,
  "Notes": "",
  "Version": 3
}

Find a Store

A Customer might visit a “Find a Store” page to find:

Getting a List of Stores

This request returns information for every Location in a Company.

Example Request
GET https://entitymanagerdemo.iqmetrix.net/v1/Companies(14146)/Locations
Authorization: Bearer b0k0dY70N3Vv9jR1b9oEdW9IeT5WIn85WCYFJRo6AiIKLEMBFwNbEQsfeCUeM3gdPA1gAAVxWTJacX8mJyBaGRcFVwQOEV49NgBz
Accept: application/json
Example Response

Response truncated for brevity.

HTTP 200 Content-Type: application/json
[
    {
        "Id": 14192,
        "Name": "Raine Square",    
        "LocationType": null,
        "LocationSubType": null,
        "Address": {
            "AddressLine1": "300 Murray St",
            "AddressLine2": null,
            "City": "Perth",
            "StateCode": "WA",
            "StateName": "Western",
            "CountryCode": "AU",
            "CountryName": "Australia",
            "Zip": "6000"
        },
        "Contacts": [],
        "StorePhoneNumbers": [],
        "Area": null,
        "StoreHours": {
            "Monday": null,
            "Tuesday": null,
            "Wednesday": null,
            "Thursday": null,
            "Friday": null,
            "Saturday": null,
            "Sunday": null
        },
        "Geography": null,
        "TimeZone": {
            "Id": "W. Australia Standard Time",
            "DaylightSavingTimeEnabled": true
        },
        "DisplayName": null,
        "Description": "",
        "Roles": [
            {
                "Name": "Location"
            }
        ],
        "Role": "Location",
        "SortName": "raine square",
        "Attributes": {},
        "Relationships": [
            {
                "Id": 9727,
                "Definition": 16,
                "Source": 14192,
                "Destination": 17565,
                "CreatedUtc": "2016-03-01T19:23:48.698Z",
                "Version": 1
            },
            {
                "Id": 9745,
                "Definition": 16,
                "Source": 14192,
                "Destination": 17566,
                "CreatedUtc": "2016-03-01T20:10:41.43Z",
                "Version": 1
            },
            {
                "Id": 9746,
                "Definition": 16,
                "Source": 14192,
                "Destination": 17567,
                "CreatedUtc": "2016-03-01T21:18:14.808Z",
                "Version": 1
            },
            {
                "Id": 11294,
                "Definition": 16,
                "Source": 14192,
                "Destination": 19101,
                "CreatedUtc": "2016-05-03T21:32:35.218Z",
                "Version": 1
            },
            {
                "Id": 11381,
                "Definition": 16,
                "Source": 14192,
                "Destination": 19188,
                "CreatedUtc": "2016-05-17T21:11:06.046Z",
                "Version": 1
            },
            {
                "Id": 12454,
                "Definition": 16,
                "Source": 14192,
                "Destination": 20255,
                "CreatedUtc": "2016-05-31T20:44:39.107Z",
                "Version": 1
            },
            {
                "Id": 12640,
                "Definition": 16,
                "Source": 14192,
                "Destination": 20437,
                "CreatedUtc": "2016-06-21T19:22:58.637Z",
                "Version": 1
            },
            {
                "Id": 6310,
                "Definition": 12,
                "Source": 14190,
                "Destination": 14192,
                "CreatedUtc": "2015-11-20T18:49:02.608Z",
                "Version": 1
            }
        ],
        "Version": 3,
        "CreatedUtc": "2015-11-20T18:49:02.592Z",
        "LastModifiedUtc": "2016-05-17T22:50:09.817Z",
        "CorrelationId": null,
        "ClientEntityId": null,
        "TypeId": 95,
        "Logo": null,
        "Website": null
    },
    ...
]

Order History

A customer might go to this page to:

Getting All Orders

This request could be used to make an “Order history” page, with a list of Orders the customer has previously made.

The following filters are available:

Filter Example
OrderState /Companies(14146)/OrderFull?$filter=State eq 'Pending'
EntityId (Pick up Location) /Companies(14146)/OrderFull?$filter=EntityId eq 14202
Name /Companies(14146)/OrderFull?$filter=substringof(Name, 'iPhone')
PrintableId /Companies(14146)/OrderFull?$filter=PrintableId eq '2042068'
CreatedDateUtc /Companies(14146)/OrderFull?$filter=CreatedDateUtc gt '2015-12-01T23:11:07.057'

The example below demonstrates using the following filters:

Example Request
GET https://orderdemo.iqmetrix.net/v1/Companies(14146)/OrderFull?$filter=State eq 'Pending' and EntityId eq 14202
Authorization: Bearer b0k0dY70N3Vv9jR1b9oEdW9IeT5WIn85WCYFJRo6AiIKLEMBFwNbEQsfeCUeM3gdPA1gAAVxWTJacX8mJyBaGRcFVwQOEV49NgBz
Accept: application/json
Example Response
HTTP 200 Content-Type: application/json
[
  {
    "Items": [
      {
        "ItemExtensions": [],
        "Id": "e21a8c58-7f66-41c3-9703-5c4d769959b2",
        "OrderId": "f026299b-270e-4a99-a16b-b3df3784e0f1",
        "ItemTypeId": 1,
        "ItemType": "DropShip",
        "ItemStatusId": 1,
        "ItemStatus": "New",
        "ProductId": "1",
        "SupplierEntityId": 0,
        "Quantity": 2,
        "Cost": 5.99,
        "ListPrice": 12.99,
        "SellingPrice": 9.99,
        "Index": 0,
        "Description": "LG G3 phone case",
        "SKU": "00001",
        "Notes": "",
        "SerialNumbers": [
          "abc123",
          "abc321"
        ],
        "SupplierReference": "10",
        "TrackingInformation": [],
        "ShippingOptionId": null
      }
    ],
    "Id": "f026299b-270e-4a99-a16b-b3df3784e0f1",
    "OrderTypeId": 1,
    "OrderType": "Sales",
    "State": "Pending",
    "PrintableId": "79114V2",
    "Name": "Galaxy S4 and Accessories Order",
    "TenderId": null,
    "TenderOrigin": null,
    "EntityId": 14202,
    "ShippingEntityId": 0,
    "CustomerId": "00000000-0000-0000-0000-000000000000",
    "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ShippingCustomerId": "00000000-0000-0000-0000-000000000000",
    "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "EmployeeId": 0,
    "DiscountCode": null,
    "DiscountDescription": null,
    "DiscountAmount": 0,
    "CreatedDateUtc": "2015-12-16T22:14:59.603",
    "OrderExpiryHours": 72,
    "OrderExpiryDate": "2015-12-19T22:14:59.603"
  }
]

Updating an Order

This request can be used to make changes on an Order before it enters the Processed state.

In the example below, we are adding a Shipping Address (ShippingAddressId) to the Order to match the Billing Address.

Example Request
PUT https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(f026299b-270e-4a99-a16b-b3df3784e0f1)
Authorization: Bearer b0k0dY70N3Vv9jR1b9oEdW9IeT5WIn85WCYFJRo6AiIKLEMBFwNbEQsfeCUeM3gdPA1gAAVxWTJacX8mJyBaGRcFVwQOEV49NgBz
Accept: application/json
Content-Type: application/json
{
  "Items": [
    {
      "ItemExtensions": [],
      "Id": "e21a8c58-7f66-41c3-9703-5c4d769959b2",
      "OrderId": "f026299b-270e-4a99-a16b-b3df3784e0f1",
      "ItemTypeId": 1,
      "ItemType": "DropShip",
      "ItemStatusId": 1,
      "ItemStatus": "New",
      "ProductId": "1",
      "SupplierEntityId": 0,
      "Quantity": 2,
      "Cost": 5.99,
      "ListPrice": 12.99,
      "SellingPrice": 9.99,
      "Index": 0,
      "Description": "LG G3 phone case",
      "SKU": "00001",
      "Notes": "",
      "SerialNumbers": [
        "abc321",
        "abc123"
      ],
      "SupplierReference": "10",
      "TrackingInformation": [],
      "ShippingOptionId": null
    }
  ],
  "Id": "f026299b-270e-4a99-a16b-b3df3784e0f1",
  "OrderTypeId": 1,
  "OrderType": "Sales",
  "State": "Pending",
  "PrintableId": "79114V2",
  "Name": "Galaxy S4 and Accessories Order",
  "TenderId": null,
  "TenderOrigin": null,
  "EntityId": 14202,
  "ShippingEntityId": 0,
  "CustomerId": "00000000-0000-0000-0000-000000000000",
  "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
  "ShippingCustomerId": "00000000-0000-0000-0000-000000000000",
  "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
  "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
  "EmployeeId": 0,
  "DiscountCode": null,
  "DiscountDescription": null,
  "DiscountAmount": 0,
  "CreatedDateUtc": "2015-12-16T22:14:59.603",
  "OrderExpiryHours": 72,
  "OrderExpiryDate": "2015-12-19T22:14:59.603"
}
Example Response
HTTP 201 Content-Type: application/json
{
  "Items": [
    {
      "ItemExtensions": [],
      "Id": "e21a8c58-7f66-41c3-9703-5c4d769959b2",
      "OrderId": "f026299b-270e-4a99-a16b-b3df3784e0f1",
      "ItemTypeId": 1,
      "ItemType": "DropShip",
      "ItemStatusId": 1,
      "ItemStatus": "New",
      "ProductId": "1",
      "SupplierEntityId": 0,
      "Quantity": 2,
      "Cost": 5.99,
      "ListPrice": 12.99,
      "SellingPrice": 9.99,
      "Index": 0,
      "Description": "LG G3 phone case",
      "SKU": "00001",
      "Notes": "",
      "SerialNumbers": [
        "abc123",
        "abc321"
      ],
      "SupplierReference": "10",
      "TrackingInformation": [],
      "ShippingOptionId": null
    }
  ],
  "Id": "f026299b-270e-4a99-a16b-b3df3784e0f1",
  "OrderTypeId": 1,
  "OrderType": "Sales",
  "State": "Pending",
  "PrintableId": "79114V2",
  "Name": "Galaxy S4 and Accessories Order",
  "TenderId": null,
  "TenderOrigin": null,
  "EntityId": 14202,
  "ShippingEntityId": 0,
  "CustomerId": "00000000-0000-0000-0000-000000000000",
  "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
  "ShippingCustomerId": "00000000-0000-0000-0000-000000000000",
  "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
  "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
  "EmployeeId": 0,
  "DiscountCode": null,
  "DiscountDescription": null,
  "DiscountAmount": 0,
  "CreatedDateUtc": "2015-12-16T22:14:59.603",
  "OrderExpiryHours": 72,
  "OrderExpiryDate": "2015-12-19T22:14:59.603"
}

Compatible Products

This page is generally within the checkout flow or when browsing products, and displays a list of Products that work well with other Products.

For example, if a customer has a Galaxy S4 Order, the Compatible Products page might include appropriate cases or screen protectors.

Getting Compatible Products

This request is used to get a list of Compatible Products for a Product.

Example Request
GET https://catalogsdemo.iqmetrix.net/v1/companies(14146)/catalog/items(cfe632c4-1128-45b1-be2b-3bbfb77df609)/compatible
Authorization: Bearer b0k0dY70N3Vv9jR1b9oEdW9IeT5WIn85WCYFJRo6AiIKLEMBFwNbEQsfeCUeM3gdPA1gAAVxWTJacX8mJyBaGRcFVwQOEV49NgBz
Accept: application/json
Example Response
HTTP 200 Content-Type: application/json
{
  "Items": [
    {
      "Name": "Samsung Galaxy S4 Nafrotiti",
      "Slug": "M276",
      "CatalogItemId": "334561cb-4304-472e-9457-40f03d03454c",
      "CatalogSku": "F4VPEFHH",          
      "HeroShotId": "5c23eaf8-0eec-4ce1-8abb-e0b936def643"
    },
    {
      "Name": "Samsung Galaxy S4 Standard Battery",
      "Slug": "M1119-E14146",
      "CatalogItemId": "b85cb879-bb5f-4847-a856-8287de0a92d5",
      "CatalogSku": "H4G27G8HH",          
      "HeroShotId": null
    }
  ]
}
Was this page helpful?