API Documentation

In-depth reference documentation for iQmetrix API's.

NAV

OVERVIEW

The RQ Inventory Adjustment API allows you to make quantity adjustments in RQ.

To use this API, the following steps are required:

At this time, the Purchase Order API works with RQ versions 6.19 and up.

ENDPOINTS

Sandbox: https://apirc.iqmetrix.net/rqinventoryadjustment/
Production: https://api.iqmetrix.net/rqinventoryadjustment/

RESOURCES

QuantityAdjustmentResource

Describes an adjustment to product quantities

{
    "QuantityAdjustmentGuid": "4053c23b-c8c9-4be6-acd0-6489c96bf22c",
    "StoreEntityId": 14192,
    "EmployeeEntityId": 512,
    "Comments": "Test",
    "Products": [
        {
            "CatalogId": "",
            "VendorSKU": "VAP-51612",
            "Quantity": 2,
            "UnitCost": 4.99,
            "SerialNumber": "512612312315",
            "ReasonCode": 1,
            "Comments": ""
        }
    ]
}
Name Description
QuantityAdjustmentGuid (String) Identifier for the Quantity Adjustment, generated by the caller as a unique value
StoreEntityId (Integer) Identifier of the Store that will receive the quantity adjustment
EmployeeEntityId (Integer) Identifier of the Employee (User) that is making the quantity adjustment. Defaults to ID of RQ Service User (-99) if value is missing
Comments (String) Comments on the quantity adjustment
Products (Array[QuantityAdjustmentProductResource]) Products to be adjusted

QuantityAdjustmentProductResource

Describes a product being adjusted

{
    "CatalogId": "",
    "VendorSKU": "VAP-51612",
    "Quantity": 2,
    "UnitCost": 4.99,
    "SerialNumber": "512612312315",
    "ReasonCode": 1,
    "Comments": ""
}
Name Description
CatalogId (String) Identifier for a CatalogItem. Either CatalogId or VendorSKU is required. For a complete list, see Get All Catalog Items
VendorSKU (String) The Vendor SKU of the product. Either CatalogId or VendorSKU is required
Quantity (Integer) Quantity of the product to add or subtract
UnitCost (Decimal) The Unit Cost of the product
SerialNumber (String) Serial Number of the product
ReasonCode (Integer) Reason Code for this quantity adjustment, supplied by iQmetrix
Comments (String) Comments on the quantity adjustment

REQUESTS

Quantity Adjustment

Adjusts the quantity of a product (CatalogId/VendorSKU) in RQ at a given location (StoreEntityId).

When CatalogId is supplied, VendorSKU is ignored

Request

PUT /Companies/{CompanyId}/QuantityAdjustment

Example Request

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

{
    "QuantityAdjustmentGuid": "4053c23b-c8c9-4be6-acd0-6489c96bf22c",
    "StoreEntityId": 14192,
    "EmployeeEntityId": 512,
    "Comments": "Test",
    "Products": [
        {
            "CatalogId": "",
            "VendorSKU": "VAP-51612",
            "Quantity": 2,
            "UnitCost": 4.99,
            "SerialNumber": "512612312315",
            "ReasonCode": 1,
            "Comments": ""
        }
    ]
}
curl -X PUT "https://apirc.iqmetrix.net/rqinventoryadjustment//Companies/14146/QuantityAdjustment" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "QuantityAdjustmentGuid": "4053c23b-c8c9-4be6-acd0-6489c96bf22c",
    "StoreEntityId": 14192,
    "EmployeeEntityId": 512,
    "Comments": "Test",
    "Products": [
        {
            "CatalogId": "",
            "VendorSKU": "VAP-51612",
            "Quantity": 2,
            "UnitCost": 4.99,
            "SerialNumber": "512612312315",
            "ReasonCode": 1,
            "Comments": ""
        }
    ]
}'
static IRestResponse QuantityAdjustment()
{
    var client = new RestClient("https://apirc.iqmetrix.net/rqinventoryadjustment//Companies/14146/QuantityAdjustment");
    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", "{\"QuantityAdjustmentGuid\":\"4053c23b-c8c9-4be6-acd0-6489c96bf22c\",\"StoreEntityId\":14192,\"EmployeeEntityId\":512,\"Comments\":\"Test\",\"Products\":[{\"CatalogId\":\"\",\"VendorSKU\":\"VAP-51612\",\"Quantity\":2,\"UnitCost\":4.99,\"SerialNumber\":\"512612312315\",\"ReasonCode\":1,\"Comments\":\"\"}]}", 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 QuantityAdjustment() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPut request = new HttpPut("https://apirc.iqmetrix.net/rqinventoryadjustment//Companies/14146/QuantityAdjustment");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"QuantityAdjustmentGuid\":\"4053c23b-c8c9-4be6-acd0-6489c96bf22c\",\"StoreEntityId\":14192,\"EmployeeEntityId\":512,\"Comments\":\"Test\",\"Products\":[{\"CatalogId\":\"\",\"VendorSKU\":\"VAP-51612\",\"Quantity\":2,\"UnitCost\":4.99,\"SerialNumber\":\"512612312315\",\"ReasonCode\":1,\"Comments\":\"\"}]}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"QuantityAdjustmentGuid\":\"4053c23b-c8c9-4be6-acd0-6489c96bf22c\",\"StoreEntityId\":14192,\"EmployeeEntityId\":512,\"Comments\":\"Test\",\"Products\":[{\"CatalogId\":\"\",\"VendorSKU\":\"VAP-51612\",\"Quantity\":2,\"UnitCost\":4.99,\"SerialNumber\":\"512612312315\",\"ReasonCode\":1,\"Comments\":\"\"}]}";

response = RestClient.put 'https://apirc.iqmetrix.net/rqinventoryadjustment//Companies/14146/QuantityAdjustment', body, {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Content-Type' => 'application/json',
    } 

puts response

URI Parameters

Request Parameters

Response Parameters

Example Response

HTTP 204

ERRORS

Error Code Description Reason
400 Bad Request The request was somehow incorrect or invalid
401 Unauthorized The user making the request is not authenticated. The most common reason for this is that the access token used in the request has expired. Generate a new access token (or refresh the existing token) using the Authentication API
403 Forbidden The user making the request is authenticated, but does not have permission to access the requested resource. Make sure that the user making the request has appropriate permissions
404 NotFound The requested resource cannot be found. Ensure that the request URI is correct and that the correct method has been used
Was this page helpful?