API Documentation

In-depth reference documentation for iQmetrix API's.

NAV

OVERVIEW

The inventory availability API allows you to configure stock levels and to view a snapshot of inventory stock of catalog items for your company.

ENDPOINTS

Sandbox: https://availabilitydemo.iqmetrix.net/v1
Production: https://availability.iqmetrix.net/v1

RESOURCES

Availability

{
    "Id": "a183f1a9-c58f-426a-930a-9a6357db52ed",
    "CompanyId": 14146,
    "EntityId": 14202,
    "Quantity": 15,
    "IsDropShippable": false,
    "IsSerialized": false
}
Name Description  
Id (GUID) Unique identifier for a CatalogItem  
CompanyId (Integer) Identifier for a Company  
EntityId (Integer) Identifier for a CompanyTreeNode  
Quantity (Integer) Quantity  
IsDropShippable (Boolean) A flag to indicate if the CatalogItem can be shipped  
IsSerialized (Boolean) A flag to indicate Quantity is determined by a count of SerialNumbers. When true, Quantitiy is read-only and flag cannot be modified  
IsLot (Boolean) Reserved for internal use  
UnitId (Integer) Reserved for internal use  

SerialNumber

{
    "Id": "B7FQ-RANC",
    "CatalogProductId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
    "EntityId": 14202,
    "CompanyId": 14146
}
Name Description
Id (String) Serial number
CatalogProductId (GUID) Unique identifier for a CatalogItem
EntityId (Integer) Identifier for a CompanyTreeNode
CompanyId (Integer) Identifier for a Company

SupplierSKU

[
    {
        "Id": "c896e638-0268-4d2f-8764-0e7d315910e6",
        "SupplierSku": "802975856602",
        "SupplierEntityId": 14107,
        "IsAvailable": true,
        "Quantity": 94
    }
]
Name Description
Id (String) Unique identifier
SupplierSku (String) Supplier SKU
SupplierEntityId (Integer) Identifier for a Supplier
IsAvailable (Boolean) A flag to indicate supplier availability
Quantity (Integer) Quantity

REQUESTS

Configuring Availability

Request

POST /Companies({CompanyId})/CatalogItems

Example Request

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

{
    "Id": "a183f1a9-c58f-426a-930a-9a6357db52ed",
    "EntityId": 14202,
    "Quantity": 15,
    "IsDropShippable": false,
    "IsSerialized": false
}
curl -X POST "https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/CatalogItems" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "Id": "a183f1a9-c58f-426a-930a-9a6357db52ed",
    "EntityId": 14202,
    "Quantity": 15,
    "IsDropShippable": false,
    "IsSerialized": false
}'
static IRestResponse ConfiguringAvailability()
{
    var client = new RestClient("https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/CatalogItems");
    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", "{\"Id\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"EntityId\":14202,\"Quantity\":15,\"IsDropShippable\":false,\"IsSerialized\":false}", 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 ConfiguringAvailability() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPost request = new HttpPost("https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/CatalogItems");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"Id\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"EntityId\":14202,\"Quantity\":15,\"IsDropShippable\":false,\"IsSerialized\":false}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"Id\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"EntityId\":14202,\"Quantity\":15,\"IsDropShippable\":false,\"IsSerialized\":false}";

response = RestClient.post 'https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/CatalogItems', 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": "a183f1a9-c58f-426a-930a-9a6357db52ed",
    "CompanyId": 14146,
    "EntityId": 14202,
    "Quantity": 15,
    "IsDropShippable": false,
    "IsSerialized": false
}

Availability

GET Availability For a Catalog Item For a Location

Request

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

Example Request

GET /Companies(14146)/Entities(14202)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingAvailabilityForACatalogItemForALocation()
{
    var client = new RestClient("https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)");
    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 GettingAvailabilityForACatalogItemForALocation() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": "a183f1a9-c58f-426a-930a-9a6357db52ed",
    "CompanyId": 14146,
    "EntityId": 14202,
    "Quantity": 15,
    "IsDropShippable": false,
    "IsSerialized": false
}

Availability

GET Availability For All Catalog Items For a Location

Request

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

Example Request

GET /Companies(14146)/Entities(14202)/CatalogItems
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingAvailabilityForAllCatalogItemsForALocation()
{
    var client = new RestClient("https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems");
    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 GettingAvailabilityForAllCatalogItemsForALocation() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "a183f1a9-c58f-426a-930a-9a6357db52ed",
        "CompanyId": 14146,
        "EntityId": 14202,
        "Quantity": 15,
        "IsDropShippable": false,
        "IsSerialized": false
    }
]

Array[Availability]

GET Availability For a Catalog Item For All Locations

Request

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

Example Request

GET /Companies(14146)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/Availability
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/Availability" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingAvailabilityForACatalogItemForAllLocations()
{
    var client = new RestClient("https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/Availability");
    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 GettingAvailabilityForACatalogItemForAllLocations() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/Availability");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/Availability', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "a183f1a9-c58f-426a-930a-9a6357db52ed",
        "CompanyId": 14146,
        "EntityId": 14202,
        "Quantity": 15,
        "IsDropShippable": false,
        "IsSerialized": false
    }
]

Array[Availability]

GET Serial Numbers For a Catalog Item

Request

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

Example Request

GET /Companies(14146)/Entities(14202)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/SerialNumbers
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/SerialNumbers" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingSerialNumbersForACatalogItem()
{
    var client = new RestClient("https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/SerialNumbers");
    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 GettingSerialNumbersForACatalogItem() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/SerialNumbers");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/SerialNumbers', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "B7FQ-RANC",
        "CatalogProductId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
        "EntityId": 14202,
        "CompanyId": 14146
    }
]

Array[SerialNumber]

GET a Serial Number

Request

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

Example Request

GET /Companies(14146)/Entities(14202)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/SerialNumbers(B7FQ-RANC)
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/SerialNumbers(B7FQ-RANC)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingASerialNumber()
{
    var client = new RestClient("https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/SerialNumbers(B7FQ-RANC)");
    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 GettingASerialNumber() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/SerialNumbers(B7FQ-RANC)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/CatalogItems(41519509-b798-4630-abba-89c9a30df83a)/SerialNumbers(B7FQ-RANC)', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": "B7FQ-RANC",
    "CatalogProductId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
    "EntityId": 14202,
    "CompanyId": 14146
}

SerialNumber

GET a Serial Number by Location

This request may return multiple SerialNumber resources if a Serial Number is associated with more than one CatalogItem for a Location.

Request

GET /Companies({CompanyId})/Entities({LocationId})/SerialNumbers?$filter=Id eq '{SerialNumber}'

Example Request

GET /Companies(14146)/Entities(14202)/SerialNumbers?$filter=Id eq 'B7FQ-RANC'
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/SerialNumbers?$filter=Id eq 'B7FQ-RANC'" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingASerialNumberByLocation()
{
    var client = new RestClient("https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/SerialNumbers?$filter=Id eq 'B7FQ-RANC'");
    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 GettingASerialNumberByLocation() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/SerialNumbers?$filter=Id eq 'B7FQ-RANC'");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://availabilitydemo.iqmetrix.net/v1/Companies(14146)/Entities(14202)/SerialNumbers?$filter=Id eq 'B7FQ-RANC'', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "B7FQ-RANC",
        "CatalogProductId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
        "EntityId": 14202,
        "CompanyId": 14146
    }
]

Array[SerialNumber]

GET Supplier Availability by Supplier SKU

Request

GET /Suppliers({SupplierId})/Companies({CompanyId})/SupplierSkus

Example Request

GET /Suppliers(14107)/Companies(14146)/SupplierSkus
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://availabilitydemo.iqmetrix.net/v1/Suppliers(14107)/Companies(14146)/SupplierSkus" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingSupplierAvailabilityBySupplierSku()
{
    var client = new RestClient("https://availabilitydemo.iqmetrix.net/v1/Suppliers(14107)/Companies(14146)/SupplierSkus");
    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 GettingSupplierAvailabilityBySupplierSku() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://availabilitydemo.iqmetrix.net/v1/Suppliers(14107)/Companies(14146)/SupplierSkus");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://availabilitydemo.iqmetrix.net/v1/Suppliers(14107)/Companies(14146)/SupplierSkus', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "c896e638-0268-4d2f-8764-0e7d315910e6",
        "SupplierSku": "802975856602",
        "SupplierEntityId": 14107,
        "IsAvailable": true,
        "Quantity": 94
    }
]

Array[SupplierSKU]

ERRORS

HTTP Status Code Description How to Resolve
HTTP 404 InventoryAvailability resource with EntityId {x}
and ProductId {y} cannot be found, nor is there
availability in the tree branch.
Ensure CatalogItemId is valid and belongs to the Location specified in the request
HTTP 404 Resource cannot be found Ensure Serial Number is valid
HTTP 500 Entity is not related to company Ensure Location belongs to Company specified in request
Was this page helpful?